diff --git a/CHANGELOG.md b/CHANGELOG.md index d41fbce..00d86f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ This file records the notable changes in each dsh-im release. Its format follows ### Added / 新增 +- 「设置 → IM机器人」新增 npm 更新检查和确认安装按钮,复用当前 Desktop / Harness 的包管理机制;保护源码链接、校验精确版本与目标 profile,不拉取 GitHub,安装后提示手动重启。手动重启后可「刷新状态」核验生效,无需重载原页面。更新功能不会主动重启或刷新;宿主自带的界面刷新不代表后台版本已生效。 + Added npm update checking and confirmed installation to Settings → IM Bot using the current Desktop / Harness package-management mechanism. It protects source links, verifies the exact version and target profile, uses no GitHub downloads, and requires a manual restart. Refresh status verifies the restarted Host without reloading the existing page. The updater does not request a restart or refresh; the host's own interface refresh does not mean the new backend version is running. + - 九个聊天渠道统一新增私聊命令 `/history [数量]`,只读预览当前绑定会话的最近对话:默认 3 条、最多 5 条,超出上限自动按 5 条处理;过滤工具、推理和未完成回复,长正文截断,并复用各渠道现有文字回复机制。命令不创建会话或调用模型,绑定成功提示和中英文帮助同步提供入口。 Added `/history [count]` to direct chats on all nine channels to preview the bound Session's recent conversation without creating a Session or prompting the model. It defaults to 3 messages and caps larger counts at 5, omits tools, reasoning, and unfinished replies, truncates long text, and reuses each channel's existing text-reply mechanism. Binding confirmations and bilingual help now point to the command. diff --git a/README.en.md b/README.en.md index 84e2570..ba10ac1 100644 --- a/README.en.md +++ b/README.en.md @@ -133,6 +133,24 @@ Each Telegram bot has its own access-mode control on its bot card. Existing and Each WhatsApp bot also has its own access mode. Existing bots migrate to **Only me**, which is also the default for newly linked bots and accepts only self-chat messages from the linked account. **Selected contacts** additionally accepts direct messages from allowlisted phone numbers and ignores groups. Enter one number with its country or region code per line; a leading `+` is optional. **Open responses** accepts all direct messages, group messages sent by the linked account, and mentions of or replies to that account from other group members; this also lets an owner-only group act as a separate conversation. Switching modes retains the allowlist. An empty Selected contacts allowlist behaves like Only me, and rejected messages are ignored silently. +## Checking and installing updates + +In **Settings → IM Bot**, click **Check for updates** immediately to the left of GitHub. The official npm registry is contacted only on request; confirm the target version and current profile before installing. Only `@xmanrui/dsh-im` is updated, without fetching GitHub or updating Harness / Desktop itself. + +After installation, the backend still requires a manual restart, and the panel reports **Installed; restart manually** based on the Host's status. The updater does not request a restart, hot reload, or page refresh. The host's existing module watcher may refresh the plugin interface, but an interface change does not mean the new backend version is running; the Host-reported running version is authoritative. Update when bots are idle, then restart the current Harness / Desktop yourself. Closing the settings page does not cancel a submitted installation. + +If the existing page still shows a restart notice after you restart manually, click **Refresh status** in the dialog or reopen **Restart needed**. This reads the current Host status without checking npm or refreshing the page. + +The button reuses Desktop's package-management service or the current Harness CLI for an exact-version install equivalent to the following (replace the example profile and version with the confirmed values): + +```sh +dsh plugin --profile web add -w --save-exact @xmanrui/dsh-im@3.0.8 --registry=https://registry.npmjs.org/ +``` + +Source `link:`, `file:`, Git, and unrecognized installations can check versions but are never replaced automatically. Confirm the intended profile before manually migrating to npm. Conflicting scoped registries, incompatible Node versions, and unavailable Host executors disable installation with an explanation. Standard Windows CLI installations currently require a manual update; Desktop uses its existing executor. + +Do not modify the same profile through a terminal or plugin market during installation. A failed command may leave partial dependency changes; it is not an automatic rollback. Inspect the installation, reinstall the previous exact version if needed, and restart manually. The updater keeps only the profile's latest job and manifest backup under the current `DSH_HOME/updates/dsh-im`, without copying bot credentials. Resolve uncertain remaining installers or locks before retrying; do not blindly delete a lock. + ## Bot commands | Command | Description | diff --git a/README.md b/README.md index a8a3a84..ba2d301 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,24 @@ dsh web 每个 WhatsApp 机器人也有独立的访问模式。旧机器人升级后和新接入机器人都默认使用**仅自己模式**,只响应已绑定账号的自聊消息。**指定联系人模式**额外接受白名单电话号码的私聊并忽略群聊;号码需包含国家或地区代码,每行一个,可带开头的 `+`。**开放响应模式**响应所有私聊、已绑定账号自己发出的群聊消息,以及其他群成员对该账号的提及或回复;因此也可以把“仅自己”的群当作独立会话使用。切换模式会保留白名单;指定联系人模式的空白名单等同于仅自己模式。未授权消息会被静默忽略。 +## 检查与安装更新 + +在「设置 → IM机器人」右上角点击 GitHub 左侧的「检查更新」。只有点击后才查询 npm 官方源;发现新版后,确认目标版本和当前 profile 再安装。更新只涉及 `@xmanrui/dsh-im`,不拉取 GitHub,不更新 Harness 或 Desktop 本体。 + +安装完成后,后台仍需手动重启,页面根据 Host 状态显示「已安装,待手动重启」。更新功能不会主动重启、执行热更新或刷新页面。宿主自带的模块监视机制可能自行刷新插件界面,但界面变化不代表后台版本已生效,运行版本以 Host 报告为准。请在机器人任务空闲时更新,并自行重启当前 Harness / Desktop。关闭设置页不会取消已提交的安装任务。 + +手动重启后,如果原页面仍显示待重启,点击窗口中的「刷新状态」,或重新打开「待手动重启」窗口。该操作只重新读取当前 Host 状态,不查询 npm,也不刷新页面。 + +按钮复用 Desktop 内置包管理服务或标准 Harness 的 CLI,执行相当于以下命令的精确版本安装(将示例 profile、版本替换为确认值): + +```sh +dsh plugin --profile web add -w --save-exact @xmanrui/dsh-im@3.0.8 --registry=https://registry.npmjs.org/ +``` + +源码 `link:`、`file:`、Git 来源或无法确认归属的安装只提供版本检查,不会替换开发链接;如需迁移为 npm 安装,请自行确认对应 profile。作用域 registry 冲突、Node 版本不满足要求或缺少当前 Host 的执行器时,按钮会说明原因。标准 Windows CLI 暂需手动更新;Desktop 使用其原有执行器。 + +安装期间不要同时在终端或插件市场修改该 profile。失败可能已经改变部分依赖,不能视为自动回滚;先检查安装状态,必要时按上述命令重装原精确版本,再手动重启。更新器只在当前 `DSH_HOME/updates/dsh-im` 下保存该 profile 最近一次任务与清单备份,不复制机器人凭据;残留安装进程或锁状态不明确时,请先人工确认,不要盲目重试或删除锁。 + ## 机器人命令 | 命令 | 作用 | diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 98afa35..0e25d71 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -18,6 +18,26 @@ This project is an independent DeepSeek Harness integration. It does not bundle The WeChat, QQ, Telegram, Discord, and WhatsApp marks use path data published by Simple Icons under the CC0 1.0 Universal license. The Feishu, DingTalk, and WeCom marks are inline vectors used for channel identification. Product names and logos remain trademarks of their respective owners. +The Host bundle also includes [semver](https://www.npmjs.com/package/semver) 7.8.5 for npm release comparison, licensed under the ISC License reproduced below. + +## semver license + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +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. + ## Lark Node SDK license MIT License diff --git a/docs/方案/Issue-61-npm更新检查与手动更新方案.md b/docs/方案/Issue-61-npm更新检查与手动更新方案.md new file mode 100644 index 0000000..866523f --- /dev/null +++ b/docs/方案/Issue-61-npm更新检查与手动更新方案.md @@ -0,0 +1,458 @@ +# Issue #61:npm 更新检查与手动更新方案 + +日期:2026-08-28。实现基线:v3.0.8 / `8c6c31a`。状态:已实施,自动化检查、本机 Desktop 与 npm 全局安装版 Web 验收通过。 + +需求来源:[Issue #61](https://github.com/xmanrui/dsh-im/issues/61)。本文保留评审时的设计和验收要求;第 13、14 节记录实际实现、实测结果和未验收边界,不能把计划中的用例当作已经通过。 + +## 1. 本期范围 + +| 项目 | 决定 | +| --- | --- | +| 更新对象 | 仅 `@xmanrui/dsh-im` 插件,不更新 Harness、Desktop 本体或其他插件 | +| 更新来源 | npm;不查询 GitHub Release、不拉 GitHub 源码、不提供 GitHub 回退源 | +| 更新版本 | npm `latest` 指向的稳定版本;安装用户确认的具体版本号 | +| 检查方式 | 用户点击“检查更新”;首期不做启动时或后台定时检查 | +| 安装方式 | 用户确认后,由当前 Host 在当前 profile 中异步执行安装 | +| 更新生效 | 安装后显示“已安装,待手动重启”;用户重启后核验运行版本 | +| 自动重启、热更新 | 不做,不调用 Desktop 重启接口,不主动刷新页面或重载插件 | +| 按钮位置 | “设置 → IM机器人”页右上角,现有 GitHub 入口左侧 | +| 版本显示 | 继续保留左上角版本号,并处理前端、Host、磁盘版本不同的情况 | +| 本地源码安装 | 允许检查 npm 版本,但不自动替换 `link:`、`file:` 或源码目录 | +| GitHub 等其他安装来源 | 只提供手动迁移说明,不自动改成 npm 来源 | +| 主要真机验收环境 | 本机 DSH Desktop 2.0.3 / macOS;同时验证标准 `dsh web` | + +现有 GitHub 帮助链接可以保留,只有用户主动点击才打开网页。更新流程不调用它。本期也不从 GitHub 拉更新日志;确认窗口只展示版本、来源、目标 profile 和重启提示。以后如需内嵌更新日志,应从 npm 发布包提供的数据获取,另行设计。 + +## 2. 实施前的基础与调研事实 + +- 版本号从 v3.0.2 起已经常驻在品牌标题旁,入口为 `plugin-src/client/index.js`;当前构建从 `package.json` 注入版本。 +- Host 已有管理 RPC,默认使用 `loopback` 权限;可新增插件级通道,不需要给九个渠道各做一套更新接口。 +- 标准安装由 `dsh plugin --profile ...` 转交给该 profile 中的 pnpm,完成后协调插件 bundle 列表。[Harness CLI 实现](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/src/plugin.ts) +- 现有 `bin/dsh-im.mjs` 安装器默认拉 GitHub,且使用 `spawnSync`。新更新功能不能直接复用其默认安装流程,也不能把同步子进程调用搬进 Host。 +- 本机默认 Harness home 中,`web` 与 `desktop` 的 dsh-im 都通过 `link:<项目绝对路径>` 指向源码。它们是开发环境,不是应该被按钮自动替换的 npm 安装。 +- 已确认本机应用为 `/Applications/DSH Desktop.app`,版本 2.0.3;已用其内置 `desktop-cli.js --help` 做只读探测,退出码为 0。没有执行包安装、启动 Desktop 窗口或重启。 + +**Desktop 的平台差异必须保留在方案中:**这版应用给 Host 注入内置 pnpm,但 `dsh` 的 Host PATH shim 仅在 Windows 安装;macOS 内置终端拥有自己的 `dsh` shim,不能据此推断 Host 直接 `spawn('dsh')` 也可用。Desktop 终端、profile 与手动重启行为另见[用户指南](https://github.com/anywhere-labs/dsh-desktop/blob/master/docs/user-guide.md#打开终端)。 + +## 3. 界面与交互 + +### 3.1 入口 + +```text +DSH-IM v3.0.8 [检查更新] [GitHub ↗] +让 DeepSeek Harness 触手可及 +``` + +这是整个插件的统一入口,不放进微信、飞书等渠道页面。不改变现有渠道导航、机器人卡片和设置入口。 + +### 3.2 状态文案 + +| 状态 | 按钮或提示 | 可执行操作 | +| --- | --- | --- | +| 尚未检查 | 检查更新 | 请求 npm 版本信息 | +| 正在检查 | 检查中… | 禁止重复发起同一请求 | +| 已是最新版 | 已是最新版本,并显示检查时间 | 可再次检查 | +| 当前版本高于 npm 稳定版 | 当前版本高于 npm 稳定版 | 不降级 | +| 发现新版且允许安装 | 更新至 vX.X.X | 打开确认窗口 | +| 发现新版但不能自动安装 | 有新版本;显示源码模式、权限或环境限制原因 | 查看手动更新说明 | +| 安装中 | 正在安装 vX.X.X… | 不再启动安装;关闭面板不取消任务 | +| 安装后校验中 | 正在校验安装结果… | 等待真实结果 | +| 安装完成,Host 未重启 | 已安装,待手动重启 | 查看手动重启说明;重启后可手动刷新状态 | +| 手动重启后核验一致 | 已更新至 vX.X.X | 恢复正常检查入口 | +| 检查或安装失败 | 简短原因和可执行建议 | 按失败类型重试或手动恢复 | + +网络失败不能显示“已是最新版”。下载或安装没有可靠百分比时,只展示阶段和耗时,不伪造进度。 + +### 3.3 确认窗口 + +窗口展示当前运行版本、目标版本、npm 来源和目标 profile 名称,提供“取消”“确认安装”。提示内容至少包含: + +> 安装后需要手动重启 Harness 或 DSH Desktop 才能生效。请在机器人任务空闲时更新,安装期间不要同时通过终端或插件市场修改该 profile。 + +不能承诺安装过程对运行中机器人完全无影响:包文件及依赖可能在磁盘上发生变化。按钮不会主动停止任务、断开机器人或安排重启。 + +右上角操作组在窄屏允许换行,不挤压品牌和渠道内容;补齐中英文文案、键盘操作、可访问名称及状态播报。离开页面停止前端轮询,不停止已提交的 Host 安装任务。 + +## 4. npm 来源与版本规则 + +### 4.1 首期来源选择 + +为使检查结果与实际安装一致,首期使用公开 npm 官方 registry:`https://registry.npmjs.org/`。本期不新增镜像、私有 registry 或源切换设置。 + +版本检查由 Host 发起,请求固定包的 npm 元数据,例如 `https://registry.npmjs.org/@xmanrui%2Fdsh-im/latest`。浏览器不直接访问 registry,不提交自定义 URL、包名或安装 spec。 + +安装时明确使用同一 registry。安装前还要核对 `@xmanrui` 的有效作用域 registry:如果它覆盖到了其他地址,不能以为仅传 `--registry` 就必然消除了覆盖。首期对此显示手动处理说明,不改写用户 `.npmrc`、不读取或回传其中的认证值,不混用两个来源。pnpm 的 registry 与认证配置规则见[配置文档](https://pnpm.io/cli/config)。 + +不进行 GitHub 回退,不执行 `git clone`、`git pull` 或 GitHub 安装 spec。发行检查应保证 dsh-im 发布包的运行依赖不依赖 GitHub 拉取;不对同一 profile 中其他插件已有的依赖来源做自动迁移。 + +### 4.2 检查规则 + +1. 校验返回的包名、版本、运行时要求和必要发布字段;响应不合法就报告检查失败。校验下载来源和完整性元数据,实际包校验交给包管理器,不关闭其完整性检查,也不把响应中的任意 tarball URL 拼进安装命令。 +2. 使用成熟 SemVer 库比较,不能按字符串大小或简单拆分比较 `3.0.9` 与 `3.0.10`。 +3. 只接受 `latest` 指向的稳定版;不自动选择 `beta`、`rc`、其他 dist-tag,也不把意外指向预发布版的 `latest` 当成稳定升级。 +4. 目标必须高于当前运行版本;若磁盘已有尚未生效的更新,先显示待重启,不叠加第二次安装。 +5. 校验目标 `engines.node` 与实际 Host 运行时;Desktop 使用 Electron 内置 Node 的版本,不使用外部终端 Node 版本冒充。 +6. 显式检查成功后生成短时有效的更新确认记录,绑定目标版本、registry、profile 和当前安装状态。 +7. 确认前若记录过期、安装状态改变或目标元数据改变,应重新检查并要求确认,不能静默改装另一个版本。 + +初始建议:检查超时 10 秒,完整响应限制 256 KiB,同一 Host 合并并发检查;短时间连续点击做限流。上次成功结果可以保留用于展示,但失败后必须标出它是旧结果。确认记录有效期建议 10 分钟。这些是实现默认值,不是已经存在的配置项。 + +### 4.3 三个版本必须分开 + +| 字段 | 来源 | 用途 | +| --- | --- | --- | +| `clientVersion` | 前端构建时的版本 | 识别旧页面、旧缓存 | +| `runningVersion` | Host 模块加载时固定的版本 | 判断当前实际运行的插件 | +| `installedVersion` | 从当前 profile 的包入口重新解析并读取 | 判断磁盘上安装了什么 | + +不能用安装结束后读取的 `package.json` 冒充当前 Host 已运行的新版本;不能通过旧模块缓存读取磁盘版本。npm 的 `latestVersion` 是第四个独立事实。 + +状态接口可用后,页面以 Host 的运行版本为准。若前后端不同,明确提示手动刷新或重启;旧 Host 没有新接口时只展示静态版本和手动升级说明,不循环报错。 + +## 5. 环境识别与安装资格 + +### 5.1 当前 profile 的确定 + +Desktop 优先读取已声明的可选 `desktopProfiles` 服务的 `current.name` 和 `current.dir`;不得调用 `select()`,因为切换 profile 本身可能触发 Desktop 重启。可选服务使用 Cordis 的可选注入或受支持的 `ctx.get` 方式,不能随意读取未声明的 `ctx` 属性。 + +标准 CLI 只识别明确支持的启动形式:`dsh web` 和 `dsh --profile `。按 CLI 参数语义解析,结合实际加载包的位置与 profile 清单校验;不能从当前工作目录猜 profile,也不能扫描到第一个装有 dsh-im 的 profile 就选择它。 + +安装前验证 Harness home、profile 目录、插件依赖声明、bundle 列表及实际加载包属于同一环境。来源不明、存在多义性或无法证明当前运行包归属时,禁止自动安装。 + +### 5.2 资格矩阵 + +| 安装或运行方式 | 检查 npm | 一键安装 | +| --- | --- | --- | +| 标准 npm 依赖,profile 与执行器可确认 | 支持 | 支持 | +| Desktop 中的标准 npm 安装,适配器通过检查 | 支持 | 支持 | +| `link:`、本地目录、`file:`、workspace 开发安装 | 支持 | 禁用,保留源码链接 | +| GitHub、Git、任意远程 tarball、来源不明 | 支持 | 禁用,不自动换源 | +| 只读安装、缺少运行命令、profile 不明确 | 支持或给出检查环境限制 | 禁用,提供说明 | +| 目标 Node 要求不满足 | 显示发现的版本和不兼容原因 | 禁用,不升级 Host 运行时 | +| 已安装更新但尚未重启 | 可展示已知信息 | 禁用第二次安装 | + +**不能把所有符号链接都判定为开发安装。** pnpm 正常依赖可能通过符号链接指向其存储目录;必须结合依赖 spec、清单和解析结果判断。相反,不能仅因目录里有 `package.json` 就把 `link:` 安装当成 npm 包。 + +源码模式的手动说明应警告:执行 npm 安装会替换该 profile 的开发链接。本期不提供一键迁移,也不替用户恢复、切换或拉取源码。 + +## 6. 实际执行命令与 Desktop 适配 + +### 6.1 标准 Harness + +以 `web` profile、目标版本 `3.0.8` 为示例,安装命令语义为: + +```sh +dsh plugin --profile web add -w --save-exact @xmanrui/dsh-im@3.0.8 --registry=https://registry.npmjs.org/ +``` + +实际 profile 和版本来自 Host 已验证的更新记录,不写死为示例值。`--save-exact` 保存精确版本;不使用 `@latest` 在点击后重新选择版本,不执行无包名的全量 `update`。[pnpm 参数说明](https://pnpm.io/cli/add) + +Host 通过异步子进程执行,传递参数数组,不拼接 shell 命令。包管理器可能为了目标包而调整共享依赖,因此不能承诺 profile 的其他依赖文件完全不变;必须记录并检查变更。 + +系统没有可用 `dsh` 时不自动全局安装它,也不转而执行 `npx ...@latest` 下载另一个 Harness。本机源码启动可使用明确的源码 CLI 入口,但只用于已验证的开发适配;无法确定时给出手动指引。 + +### 6.2 DSH Desktop + +**实际实现已简化:**直接复用 Desktop 提供的 `desktopPnpm.runPlugin(args, profileDir, signal)`,由宿主自己配置以下 bootstrap、Electron Node、pnpm 和进程生命周期;不在插件里另造执行器。通过 `ctx.get()` 读取并验证 `desktopProfiles.current`、`desktopPnpm`、`desktopPnpmBootstrap`,不切换 profile。 + +macOS 适配器使用 Desktop 内置的 CLI bootstrap,与 Desktop 自己的终端执行路径保持一致: + +```text +可执行程序:当前 Desktop 的 process.execPath +参数:--expose-internals <已验证的 desktop-cli.js> + plugin --profile <当前 profile> add -w --save-exact + @xmanrui/dsh-im@<确认版本> --registry=https://registry.npmjs.org/ +子进程环境:ELECTRON_RUN_AS_NODE=1,当前 DSH_HOME,Desktop 的 pnpm PATH +``` + +`desktop-cli.js` 路径从当前安装的 Desktop 解析,核对包身份、版本与文件存在性,不把本机 `/Applications/...` 路径写死在插件里。保留 Desktop 的 pnpm、Electron 原生依赖构建环境和安全策略;不偷偷改用外部 Node 处理 Desktop 的依赖。 + +这属于有版本边界的 Desktop 适配,不应被描述成所有 Electron 应用都提供的通用 API。已完成的只读帮助探测证明入口可以启动,尚不证明安装、失败恢复和各平台兼容已经通过。 + +Windows 应使用受控的 Node/CLI 启动方式,或专门处理 `.cmd` shim 的适配器;不能假设 `shell: false` 能直接执行所有 `.cmd`。未知 Desktop 版本或入口变化时返回“不支持自动更新”,保留手动入口,不跨 Host 回退。 + +无论哪个执行器,都不调用 Desktop 的 `requestRestart()`、profile 切换、Loader 刷新、浏览器 reload 或进程退出接口来应用更新。 + +## 7. 一次更新的完整流程 + +```mermaid +flowchart TD + A[进入 IM 机器人设置页] --> B[读取 Host 本地更新状态] + B --> C[用户点击检查更新] + C --> D[读取 npm 稳定版并校验] + D --> E{有新版且允许安装?} + E -->|否| F[显示结果或手动指引] + E -->|是| G[用户确认目标版本与 profile] + G --> H[锁定任务并再次校验环境] + H --> I[备份恢复信息并异步安装] + I --> J{安装命令与磁盘校验通过?} + J -->|否| K[显示失败或待人工恢复] + J -->|是| L[已安装,待手动重启] + L --> M[用户自行重启 Harness 或 Desktop] + M --> N[核验运行版本和安装版本] + N --> O[确认更新生效] +``` + +安装任务由 Host 持有。RPC 提交后立即返回任务标识,页面轮询状态,不把整个安装过程挂在一个长连接请求上。建议安装期间每 1 秒查询一次,结束后停止轮询;卸载组件时清理定时器和正在读取状态的请求。 + +开始安装前获取该 profile 的更新锁,校验确认记录和权限,重新读取清单,确认来源仍为 npm、已安装版本未变化,随后写任务记录及恢复信息。只有全部预检成功才启动子进程。 + +安装退出码为 0 后,还需重新解析当前 profile 的包入口,核对包名、目标版本、必要的 Host/Client 入口和 bundle 声明。通过后仅进入 `restart-required`,不提前宣布新代码已运行。 + +手动重启后,新 Host 读取自己的运行版本及该 profile 的任务记录;只有运行版本、安装版本与该任务目标一致,才记录生效。若外部操作装了另一个版本,显示实际状态和不一致原因,不冒认本次任务成功。 + +## 8. RPC 与状态设计 + +新增独立逻辑通道 `/dsh-im`,不挂到任一渠道 RPC 下。 + +| 方法 | 输入 | 职责 | +| --- | --- | --- | +| `update.status` | 空对象 | 返回当前版本、安装资格、检查结果和安装任务状态,不访问外网 | +| `update.check` | 空对象 | 查询固定 npm 包,返回校验结果和短时有效的 `checkId` | +| `update.install` | `checkId`、`requestId` | 消费已确认记录,幂等创建安装任务,立即返回任务状态 | + +前端不传包名、registry URL、shell 命令、profile、文件路径或任意版本。即使用户绕过页面直接调用 RPC,也必须执行同一套预检。 + +公开状态字段包括:`runningVersion`、`installedVersion`、`latestVersion`、`profileName`、`environmentKind`、`canInstall`、`blockedReason`、`checkedAt` 和任务的 `id/state/targetVersion/message`。绝对路径、环境变量、认证值及子进程原始输出不直接返回浏览器。 + +检查结果与安装任务分开记录。安装状态至少包含:`idle`、`installing`、`verifying`、`restart-required`、`completed`、`failed`、`interrupted`。页面刷新后从 Host 恢复,不能仅靠 React state 判定成功。 + +同一 `requestId` 重试应返回原任务,不启动第二个安装。提交响应丢失时先查询状态;`checkId` 失效不自动安装当前最新版本。安装期间的其他提交返回“已有更新任务”,待重启状态也不接受新安装。 + +## 9. 权限、失败与恢复 + +### 9.1 权限与并发 + +更新属于安装本机代码的管理操作。本期 RPC 固定使用 Harness 已有的本机/受信 IPC 授权边界,采用 `loopback` 策略,不因为普通机器人管理配置使用 `trusted-host` 就自动放宽更新权限。不得只靠隐藏按钮、User-Agent 或客户端声明来识别权限。 + +不新增聊天内 `/update` 命令,不让普通 IM 联系人触发安装。不使用 `sudo`,不自动授权构建脚本,不绕过 pnpm 安全策略,不修改全局 PATH 或用户 shell 配置。 + +锁以 Harness home 与 profile 为作用域,同时防止本插件多窗口、多 Host 重复安装。它不能阻止用户另开终端或插件市场修改同一个 profile;对此必须提示并检测异常变化,不能声称已经提供跨所有工具的全局互斥。 + +锁必须原子获取,并记录任务所有者;释放时核对所有者,不能用“先检查文件不存在,再创建”的方式冒充互斥。任务状态文件采用原子替换,写入失败时不继续启动安装。 + +### 9.2 持久记录 + +任务与恢复信息放在 Harness home 下独立的 dsh-im 更新状态目录,按 profile 分隔,不能放进会被替换的包目录。目录和文件使用适当的私有权限,并校验路径归属。 + +记录目标包和版本、旧版本、profile 身份、阶段、时间、已脱敏错误,以及安装前 `package.json`、锁文件和必要 pnpm 工作区配置的快照/摘要。不要备份整份 Harness home,不复制机器人 Token、会话历史或 `.npmrc` 认证内容。 + +子进程输出限长、脱敏后仅保留必要诊断,不收集完整环境变量。恢复信息的保留与清理限定在更新器自有目录,不能删除包管理器缓存、现有 profile 或正在运行的任务记录。 + +### 9.3 失败行为 + +| 情况 | 处理 | +| --- | --- | +| npm 网络失败、超时、限流、非法响应 | 检查失败;可展示带时间的旧结果,不显示已是最新,不换源 | +| 确认记录过期、版本或 profile 已变化 | 拒绝安装,重新检查和确认 | +| 目录不可写、命令缺失、运行时不兼容 | 尽量在启动安装前拒绝,返回明确原因 | +| 构建策略或交互确认阻塞 | 不自动批准;终止该次自动流程,转手动处理 | +| 命令非零退出 | 记录失败;重新读取磁盘状态,不能假定包完全没变 | +| 命令成功但版本/入口校验不符 | 校验失败,不显示待重启成功 | +| 页面关闭、切换渠道或刷新 | Host 任务继续,页面再次打开读取同一任务 | +| Host 正常退出或插件卸载 | 对本任务子进程做有界清理,记录中断;不安排自动重启 | +| Host 崩溃或断电 | 下次启动检查残留任务和安装状态,不自动继续安装或直接删除锁 | +| 用户通过其他工具更改包 | 显示实际状态;不恢复旧快照覆盖他人的变更 | + +建议给安装设置 15 分钟截止时间及有界的子进程清理时间;只处理本任务拥有的进程树,不能误杀其他 pnpm、Node 或 Harness 进程。无法确认残留安装是否结束时保持“需人工检查”,不直接重试。 + +**本期不承诺自动回滚或零中断升级。** pnpm 失败可能已经修改部分依赖;备份清单不等于还原安装目录。首期提供旧版本和对应的精确 npm 重装指引,避免自动覆盖整个 profile。回滚是否完成同样需要重新校验及手动重启,不以执行过一条恢复命令为准。 + +## 10. 本机与 Desktop 测试方案 + +### 10.1 保留日常开发环境 + +现有 `web`、`desktop` 的源码链接保持不变。实现后在这套环境构建并手动重启,可验证入口位置、npm 检查、状态显示,以及“源码安装不能自动替换”的保护逻辑。 + +不修改当前仓库版本号来伪造旧版本,不把生产 `link:` 安装改成 npm 安装来凑一次演示。测试用版本和故障只通过测试工厂、临时包及受控 fixture 注入,不新增生产可调用的“强制更新”“忽略来源”开关。 + +### 10.2 真实安装测试必须隔离数据 + +真实安装使用单独的 `DSH_HOME`、测试 profile 和临时工作目录,不复制已有机器人凭据、会话、用户 patch 或设置,不绑定日常机器人。 + +仅新建 profile 不足以隔离:当前渠道默认把配置和会话映射放在 `DSH_HOME/integrations` 下。Desktop 还要核对 Electron user-data、profile 选择状态和单实例锁;不能仅凭 `open -n` 或另一个窗口就断言隔离成功。具体隔离启动方式需在安装前实测,未确认时不在日常实例上尝试升级。 + +在 Desktop 的测试终端先核对欢迎信息中的 profile 和 DSH home,再验证内置 CLI、pnpm 与目标目录一致。测试准备阶段的任何 profile 切换或重启均由用户明确操作,不由更新按钮触发。 + +### 10.3 分层验证,分别记录证据 + +| 层次 | 验证内容 | 不可替代的部分 | +| --- | --- | --- | +| 纯逻辑与 RPC 测试 | SemVer、来源、权限、确认记录、任务互斥、脱敏、重启状态 | 不能证明真实包安装成功 | +| UI 交互测试 | 真实组件的检查、确认、错误、轮询、卸载与窄屏表现 | Mock 安装成功不等于完成更新 | +| 安装器集成测试 | 临时 profile 中实际执行 npm 旧版到新版安装,检查清单与入口 | 不证明旧版 npm 包拥有新按钮 | +| Desktop 按钮集成测试 | 含新功能的测试构建,在隔离 Desktop 中走完整按钮流程 | 使用测试 registry/fixture 时必须如实标注 | +| 公开 npm 完整验收 | 含更新功能的旧版检测并安装公开 npm 新版,手动重启后确认 | 需要实际存在合适的已发布版本 | + +目前公开的 3.0.7、3.0.8 不含此更新按钮;把它们互相安装只能验证安装器,不能声称验收了新按钮。 + +首次开发期间可以使用测试专用 npm Registry 和临时测试构建覆盖完整交互,但生产包不能带可远程开启的测试来源或版本伪造功能。公开 npm 的完整闭环需要合适的已发布候选与目标版本;如采用独立 dist-tag 的预发布流程,必须另获发布授权,不默认发布测试包或改动 `latest`。 + +### 10.4 重点测试用例 + +- 相等版本、正常升级、`3.0.9 → 3.0.10`、预发布版、当前高于 npm、非法元数据。 +- 源码 `link:` 与正常 pnpm 链接区分;GitHub 来源不自动迁移。 +- Web 和 Desktop 的 profile 识别;多个 profile 共用源码时不误选。 +- macOS Desktop 不依赖全局 `dsh`;缺少内置入口时明确降级;Windows shim 参数边界单独覆盖。 +- registry 配置冲突、网络超时、401/403/429/5xx、镜像/重定向异常不触发 GitHub 回退。 +- 未授权 RPC、畸形输入、伪造 `checkId`、重复 `requestId`、跨窗口并发、过期确认记录。 +- 安装失败、部分写入、校验失败、超时、页面刷新、Host 中断及残留锁。 +- 安装后 Host 仍旧版时必须显示待重启;旧前端不能把新磁盘版本当成运行版本。 +- 手动重启后核对运行版本、前后端一致性、界面可用及机器人配置未被重置。 +- 所有路径均不调用自动重启、热更新、GitHub 网络请求或全局安装。 + +标准 Web 与 macOS Desktop 真机测试通过后再声明相应支持。Windows 和其他 Desktop 版本分别记录测试结果,不能用 macOS 的帮助命令探测替代平台验收。 + +## 11. 实现拆分与文件范围 + +实际新增四个功能文件:`update-panel.js`、`update-runtime.mjs`、`update-service.mjs`、`update-rpc.mjs`。原方案的 environment/installer 合并为 runtime;请求适配复用现有页面,不新增 update-api 文件。以下表格保留原职责拆分,实际文件以第 13 节为准。 + +| 位置 | 改动 | +| --- | --- | +| `plugin-src/client/index.js` | 标题操作组,注入插件级 RPC;不改渠道业务 | +| `plugin-src/client/update-panel.js`(新增) | 更新按钮、确认窗口、任务状态与轮询生命周期 | +| `plugin-src/client/update-api.js`(新增) | 通道和 endpoint 常量、请求适配 | +| `plugin-src/client/styles.js`、`i18n.js` | 布局、窄屏与中英文文案 | +| `plugin-src/host/update-service.mjs`(新增) | 检查、确认记录、任务状态与恢复协调 | +| `plugin-src/host/update-environment.mjs`(新增) | profile、安装来源、运行时和 registry 资格判断 | +| `plugin-src/host/update-installer.mjs`(新增) | 标准 CLI / Desktop 执行器及有界子进程管理 | +| `plugin-src/host/update-rpc.mjs`(新增) | 参数验证、权限和公开状态投影 | +| `plugin-src/host/index.mjs` | 注册独立更新能力;初始化失败不得拖垮已有渠道 | +| `test/update-*.test.mjs`、现有 UI/Host 测试 | 测试矩阵与回归 | +| `package.json`、锁文件及构建检查 | 按需加入 SemVer 依赖,确认 Host/Client 打包正确 | +| `README.md`、`README.en.md`、`CHANGELOG.md` | 更新来源、操作步骤、限制和手动恢复说明 | + +不修改九个渠道的消息处理、登录、会话或凭据协议。`lib/index.js`、`lib/client.js` 只通过构建生成,不手改产物。本期无需修改现有 GitHub 源安装 CLI;新更新功能不调用该路径。如要调整 CLI 默认安装来源,应另列改动,避免混入本需求。 + +## 12. 实施顺序与完成标准 + +### 实施顺序 + +1. 实现只读检查、版本区分和安装资格判断,先验证源码模式保护。 +2. 实现有测试接缝的异步执行器、持久任务、锁、校验和失败说明。 +3. 接入统一页面按钮、确认、进度与待重启状态。 +4. 在隔离环境验证真实 npm 安装器,再做 Desktop 和 Web 交互测试。 +5. 执行目标测试与既有 `npm run check`,更新文档和发布说明,列出尚未实测的平台。 + +### 完成标准 + +- 页面位置与状态符合第 3 节,版本号和渠道页面不回退。 +- 更新链路只使用 npm,确认版本与安装版本一致,不安装其他目标包。 +- 只有可确认的 npm 安装、正确 profile 和受信执行器能启动更新。 +- 安装结果经过磁盘校验,重启前不显示已生效,重启后能核验。 +- 不自动重启、不热更新、不改动现有源码链接,不重置机器人数据。 +- 网络、权限、并发、中断和部分安装失败均有真实测试证据及明确提示。 +- Web、Desktop、模拟测试与公开 npm 验收分开记录;未执行的步骤不写成已通过。 + +本次已实施并执行隔离 Desktop 和本机 npm 全局安装版 Web 的安装与手动重启测试;未发布 npm 包或关闭 Issue。仓库版本号仍为 3.0.8。 + +## 13. 实施与验收记录 + +### 实际改动 + +- `plugin-src/host/update-runtime.mjs`:校验当前 profile、包来源、入口和作用域 registry;复用宿主的 Desktop/CLI 异步执行能力。 +- `plugin-src/host/update-service.mjs`:固定 npm 检查、SemVer、确认记录、任务锁、持久状态和磁盘校验。 +- `plugin-src/host/update-rpc.mjs`:独立 `/dsh-im` 通道,严格输入和固定 `loopback` 权限。 +- `plugin-src/client/update-panel.js`:一个按钮和对话框,复用轮询调度器,重新挂载后从 Host 恢复状态;手动重启后也可在原页面刷新本地状态。 +- 修改现有 client/host 入口、样式、翻译、包验证脚本和文档;新增四组更新测试。 +- 新增构建依赖 `semver@7.8.5`,打入 Host;未改渠道消息、登录、会话或凭据协议。 +- 没有新配置项、强制更新开关、全局安装、自动回滚或自动重启逻辑;未改独立 GitHub 源安装器。 + +### Desktop 自带前端刷新 + +真机发现 Desktop 2.0.3 的 `dsh-client-hmr` 每 500ms 检测前端 bundle,改变后重建插件界面;Host HMR 则默认关闭。该刷新是宿主已有行为,不是更新功能主动调用。 + +本实现不包装宿主服务、不禁用全局 HMR,也不新增旧 bundle 路由。新版页面挂载后立即查询 `update.status`,以旧 Host 的 `runningVersion` 显示标题和“待手动重启”。界面更新不代表后台新代码已经生效。UI 和中英文文档已据此修正文案。 + +### 隔离启动 + +测试使用本机已安装的 `/Applications/DSH Desktop.app`(2.0.3),同时隔离 `DSH_HOME` 和 Electron user-data: + +```sh +DSH_HOME="<独立临时目录>/dsh-home" \ +DSH_TELEMETRY_DISABLED=1 \ +"/Applications/DSH Desktop.app/Contents/MacOS/DSH Desktop" \ + --user-data-dir="<独立临时目录>/electron-data" +``` + +本次使用系统临时目录下的独立根目录,profile 为 `update-test`;具体路径仅保留在本地验收记录中。没有复制日常配置、机器人凭据或模型 Key;日常源码链接没有替换为 npm 安装。 + +### Desktop 实测结果 + +1. 在隔离 profile 从官方 npm 安装真实 3.0.7,再覆盖含本功能的 3.0.7 测试构建;仓库版本未降低。覆盖使用新文件加原子替换,没有原地修改 pnpm 硬链接。 +2. 在原生设置页点击新按钮,查到官方 npm 3.0.8,并显示正确目标 `update-test`。 +3. 原生界面确认安装后,真实 pnpm 完成 3.0.7 → 3.0.8,profile 保存精确依赖 3.0.8;磁盘入口校验通过,任务为 `restart-required`。 +4. 安装期间 Desktop PID 17477 及启动时间保持不变,没有更新器发起的重启。 +5. 公开 3.0.8 尚不含新按钮,宿主加载该前端后按钮消失。为验证含功能目标版本的状态恢复,在隔离包覆盖当前代码的 3.0.8 测试构建;没有伪造 registry 或再次安装。 +6. 新前端正确显示:后台运行 3.0.7、已安装 3.0.8、页面 3.0.8、待手动重启。由此确认后台没有随前端重新挂载而升级。 +7. 在测试窗口使用 Desktop 原有 Restart 菜单并手动确认;新 PID 19287,界面从新 Host 获取 3.0.8,任务变为 completed。 +8. 临时给测试 profile 设置冲突的作用域 registry,界面正确显示源冲突且不允许安装;该临时设置已删除。 + +真实安装记录位于临时根目录 `real-npm-install-result.json`,截图位于 `evidence/`。记录不包含模型或机器人凭据。 + +### 验收边界 + +- 已验证新按钮驱动真实官方 npm 安装、磁盘校验、重启前旧 Host、手动重启后新 Host和前端状态恢复。 +- 当前公开 3.0.7/3.0.8 都不含更新器,因此还不能验证“已发布且含更新器的旧版 → 已发布且含更新器的新版”完整闭环;没有为此发布包或改动 latest。 +- 开发期间连续覆盖同版本前端测试构建后,旧设置页曾无法再次打开对话框;手动刷新后最终构建的检查和已生效状态均通过。没有为此加入自动刷新或修改宿主 HMR,发布后的版本间前端替换仍需单独验收。 +- Windows/Linux Desktop 未真机验收;不能把 macOS 的测试推广为所有平台和版本已通过。 +- 标准 Windows CLI 目前关闭按钮安装,保留检查和手动更新;没有猜测执行 .cmd shim。 +- Desktop 阶段的 `npm run check`:1619/1619 通过,0 失败、跳过或取消;Host/Client 构建和发行包校验均通过。当时更新专项为 59 项,后续 Web 修复增加了回归用例。 +- 早期 Web 烟测使用本机已有的 `apps/cli/lib/bin.js` 和独立临时 DSH_HOME:`update.status`、`update.check` 均 HTTP 200,正确返回 web/cli、运行及安装版本 3.0.8、官方 npm 最新版本 3.0.8、`source-install` 和 `canInstall:false`。首页 200 且包含插件;进程及监听已清理。当时未做视觉测试或真实安装;该限制已通过第 14 节的本机 npm 全局安装版 Web 验收补充。源码 CLI 的外部 FiberState 导出不匹配没有通过修改外部仓库来绕过。 +- 模型调用和 IM 发消息不属于本次更新功能验收,无需模型 Key,本次没有使用或保存。 + +## 14. 本机 npm 全局安装版 Web 验收 + +### 环境与实际命令 + +本次使用已安装的 `@deepseek-ai/dsh@0.1.1-rc.2`,其目录不是源码链接: + +- Node:`~/.nvm/versions/node/v24.13.0/bin/node`,版本 24.13.0。 +- CLI:`~/.nvm/versions/node/v24.13.0/lib/node_modules/@deepseek-ai/dsh/lib/bin.js`。 +- pnpm:10.29.2,由该 CLI 的既有插件管理流程调用。 +- 独立测试根目录:系统临时目录下的新目录,仅使用其中的 `dsh-home/profiles/web` 和空 workspace;具体路径仅保留在本地验收记录中。 +- 浏览器:本机内嵌浏览器,默认 1280 × 720 视口。 + +启动的是全局安装入口的 `web --host 127.0.0.1 --port 63972 --no-open`。测试设置独立 `DSH_HOME`、禁用 telemetry,没有填写模型 Key 或机器人凭据。没有把源码仓库直接启动当作本机安装版 Web 验收。 + +按钮使用当前 Node 和已校验 CLI 入口执行的命令,等价于: + +```sh +dsh plugin --profile web add -w --save-exact @xmanrui/dsh-im@3.0.8 --registry=https://registry.npmjs.org/ +``` + +`web` 来自当前 Host 的 profile,不接受浏览器传入的替代 profile。这里的 3.0.8 是本次官方 npm 检查和用户确认的目标,不是运行时写死的更新版本。 + +### 实测结果与修复 + +1. 从官方 npm 安装真实 3.0.7 到隔离 profile,并原子替换为含新功能的 3.0.7 测试 bundle。仓库版本始终为 3.0.8,不修改公开 npm 元数据。 +2. 在「设置 → IM bots」确认按钮位于 GitHub 左侧,查询到官方 npm 3.0.8,确认窗口显示正确版本、来源、目标 `web` 和手动重启提示。 +3. 第一轮安装成功,但发现同端口手动重启后,原页面会继续显示 3.0.7 / 待重启,而 Host 已是 3.0.8 / completed。没有用刷新整页掩盖此问题。 +4. 增加手动「刷新状态」;重新打开「待手动重启」窗口也读取一次本地 `update.status`。不增加待重启期间的持续轮询,不查询 npm、不重启、不刷新页面。 +5. 补充安装重试的迟到响应回归:读取到权威新状态时同步取消旧轮询,旧 Host 的迟到结果不能把 3.0.8 改回 3.0.7;新状态仍在安装时继续正常轮询。刷新失败可再次操作,卸载页面会取消读取。 +6. 使用修复后的构建重新执行真实按钮安装。安装前后 PID 均为 30383,启动时间均为 `2026-08-28 06:17:44`;profile 清单和磁盘包均为精确 3.0.8,旧 Host 仍为 3.0.7,任务为 `restart-required`。 +7. 真实安装结果先保存,再在隔离包覆盖含功能的 3.0.8 测试 bundle。原页面正确显示运行 3.0.7、已安装 3.0.8、页面 3.0.8。 +8. 保持更新窗口打开,人工停止测试 Host 并以相同入口、profile 和端口 63972 重启;新 PID 31522。原页面仍保留待重启状态,证明没有通过重载页面自动恢复。 +9. 点击「刷新状态」后,原页面标题和运行版本变为 3.0.8,状态为 `Updated version is active`;该 Host 的 `latestVersion`、`checkedAt` 仍为 null,确认没有额外查询 npm。 +10. 修复动作按钮变为禁用时的焦点丢失:提交刷新、检查或安装前先聚焦现有更新窗口;「刷新状态 / 重新检查」复用同一按钮节点。最终 Web 实测「重新检查」期间及完成后焦点都在更新窗口,按钮可再次操作,控制台没有 error。没有为此新增全局监听或刷新页面。 + +### 保护行为 + +- 临时冲突的 `@xmanrui:registry` 会显示源冲突并移除安装操作;移除该测试配置后可重新检查。未改用户的 registry 配置。 +- 任意附加安装选项被 `bad-request` 拒绝,伪造确认被 `check-expired` 拒绝,跨源安装请求返回 HTTP 403。 +- 另用相同的全局安装 CLI 验证源码 profile:status/check 正常,但始终是 `source-install`、`canInstall:false`、`checkId:null`;伪造安装没有创建任务,清单和锁文件不变。 +- 日常 `~/.dsh/profiles/web` 和 `desktop` 仍通过 `link:<项目绝对路径>` 指向原源码目录,未替换为 npm 安装。 + +### 证据与边界 + +Web 测试根目录下的 `real-npm-install-result-fixed.json` 保存真实 npm 安装及进程不变的结果;`web-run-fixed-after-restart.json` 保存人工重启记录;`evidence/fixed-web-update-completed.txt` 和同名 PNG 保存原页面恢复结果。首次旧状态问题、registry 冲突、RPC 拒绝和磁盘校验也保留了独立记录。 + +公开 3.0.7/3.0.8 均尚未包含此更新功能,所以两端界面使用隔离测试构建,真实包安装使用官方 npm;不能写成公开发布版已经具备新按钮。未发布 npm 或关闭 Issue,也未增加任何自动重启、热更新或页面刷新逻辑。 + +### 最终回归与清理 + +- 最终 `npm run check`:**1626/1626 通过**,0 失败、取消或跳过;Host/Client 构建和发行包校验通过。更新专项共 66 项。 +- `git diff --check` 通过。最终焦点和完成状态保存在 `evidence/final-web-focus.json`、`final-web-completed.txt` 和同名 PNG。 +- 本次 Web 测试标签页已关闭,测试 PID 31522 及其进程组已退出,63972 端口已释放;临时 `.npmrc` 和更新锁均不存在。 +- 对比日常 `web`、`desktop` profile 的清单、锁文件及链接目标,均未改变;未停止或重启用户的日常实例。 +- `cleanup.json` 保存清理结果。隔离 profile、测试构建和验收证据继续保留在临时目录,未宣称删除整个目录。 diff --git a/lib/client.js b/lib/client.js index c27f0d2..109791d 100644 --- a/lib/client.js +++ b/lib/client.js @@ -42,7 +42,7 @@ __export(index_exports, { name: () => name }); module.exports = __toCommonJS(index_exports); -var React20 = __toESM(require("react"), 1); +var React21 = __toESM(require("react"), 1); // package.json var package_default = { @@ -149,7 +149,8 @@ var package_default = { "https-proxy-agent": "5.0.1", react: "18.3.1", "react-dom": "18.3.1", - "react-test-renderer": "18.3.1" + "react-test-renderer": "18.3.1", + semver: "7.8.5" } }; @@ -310,6 +311,62 @@ var EN = Object.freeze({ "IM \u6E20\u9053": "IM channels", "\u8BA9 DeepSeek Harness \u89E6\u624B\u53EF\u53CA": "Connecting DeepSeek Harness", "\u5F53\u524D\u7248\u672C": "Current version", + "DSH-IM \u66F4\u65B0": "DSH-IM update", + "\u68C0\u67E5\u66F4\u65B0": "Check for updates", + "\u91CD\u65B0\u68C0\u67E5": "Check again", + "\u5237\u65B0\u72B6\u6001": "Refresh status", + "\u66F4\u65B0\u81F3": "Update to", + "\u5B89\u88C5\u66F4\u65B0": "Install update", + "\u6B63\u5728\u66F4\u65B0\u2026": "Updating\u2026", + "\u5F85\u624B\u52A8\u91CD\u542F": "Restart needed", + "\u8FD0\u884C\u7248\u672C": "Running version", + "\u5DF2\u5B89\u88C5\u7248\u672C": "Installed version", + "npm \u6700\u65B0\u7248\u672C": "Latest on npm", + "\u76EE\u6807 profile": "Target profile", + "\u76EE\u6807\u7248\u672C": "Target version", + "\u66F4\u65B0\u6765\u6E90": "Update source", + "\u9875\u9762\u7248\u672C": "Page version", + "\u65E0\u6CD5\u786E\u8BA4": "Unknown", + "\u53D1\u73B0\u65B0\u7248\u672C": "Update available", + "\u5DF2\u662F\u6700\u65B0\u7248\u672C": "Up to date", + "\u5F53\u524D\u7248\u672C\u65E0\u9700\u66F4\u65B0": "No newer version available", + "\u5DF2\u83B7\u53D6 npm \u6700\u65B0\u7248\u672C": "Latest npm version retrieved", + "\u68C0\u67E5 npm \u6700\u65B0\u7248\u672C\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u5B89\u88C5\u3002": "Check the latest npm version. Nothing is installed automatically.", + "\u6B63\u5728\u4ECE npm \u68C0\u67E5\u6700\u65B0\u7248\u672C\u2026": "Checking npm for the latest version\u2026", + "\u6B63\u5728\u5B89\u88C5\uFF0C\u8BF7\u7A0D\u5019\u2026": "Installing, please wait\u2026", + "\u6B63\u5728\u6821\u9A8C\u5B89\u88C5\u7ED3\u679C\u2026": "Verifying the installation\u2026", + "\u5DF2\u5B89\u88C5\uFF0C\u5F85\u624B\u52A8\u91CD\u542F": "Installed \u2014 manual restart needed", + "\u66F4\u65B0\u5DF2\u751F\u6548": "Updated version is active", + "\u66F4\u65B0\u5931\u8D25": "Update failed", + "\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25": "Update request failed", + "\u4EC5\u66F4\u65B0 DSH-IM\u3002\u5B89\u88C5\u5B8C\u6210\u540E\u9700\u624B\u52A8\u91CD\u542F\u540E\u53F0\uFF1B\u672C\u529F\u80FD\u4E0D\u4F1A\u81EA\u52A8\u91CD\u542F\u6216\u4E3B\u52A8\u5237\u65B0\u9875\u9762\u3002": "Only DSH-IM will be updated. Restart the backend manually after installation. This feature does not automatically restart it or initiate a page refresh.", + "\u5F53\u524D\u662F\u6E90\u7801\u6216\u94FE\u63A5\u5B89\u88C5\uFF0C\u53EA\u80FD\u68C0\u67E5\u7248\u672C\uFF1B\u8BF7\u624B\u52A8\u66F4\u65B0\u6E90\u7801\uFF0C\u6216\u8FC1\u79FB\u5230 npm \u5B89\u88C5\u3002": "This is a source or linked installation. You can check versions, but must update the source manually or migrate to an npm installation.", + "\u65E0\u6CD5\u786E\u8BA4\u5F53\u524D profile\uFF0C\u8BF7\u5728\u5BF9\u5E94\u7684 Harness \u73AF\u5883\u4E2D\u624B\u52A8\u66F4\u65B0\u3002": "The current profile could not be identified. Update manually in the corresponding Harness environment.", + "\u5F53\u524D\u8FD0\u884C\u73AF\u5883\u4E0D\u652F\u6301\u6309\u94AE\u5B89\u88C5\uFF0C\u8BF7\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u3002": "This runtime cannot install through this button. Update the plugin manually.", + "\u5F53\u524D npm \u6E90\u914D\u7F6E\u4E0E\u5B98\u65B9\u6E90\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u5148\u68C0\u67E5 registry \u914D\u7F6E\u3002": "The npm registry configuration differs from the official registry. Check your registry settings first.", + "\u5F53\u524D Host \u7684 Node.js \u7248\u672C\u4E0D\u6EE1\u8DB3\u65B0\u7248\u8981\u6C42\uFF0C\u8BF7\u5148\u66F4\u65B0\u8FD0\u884C\u73AF\u5883\u3002": "The Host Node.js version does not meet the new version\u2019s requirements. Update the runtime first.", + "\u65B0\u7248\u672C\u5DF2\u5B89\u88C5\uFF0C\u8BF7\u5728\u65B9\u4FBF\u65F6\u624B\u52A8\u91CD\u542F\u5F53\u524D Harness \u6216 Desktop\u3002": "The new version is installed. Manually restart this Harness or Desktop when convenient.", + "\u4E0A\u6B21\u5B89\u88C5\u7ED3\u679C\u65E0\u6CD5\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u6B64 profile \u7684\u63D2\u4EF6\u5B89\u88C5\u72B6\u6001\u3002": "The previous installation result is uncertain. Check this profile\u2019s plugin installation first.", + "\u65E0\u6CD5\u8BBF\u95EE npm \u6216\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u68C0\u67E5\u3002": "npm is unreachable or the request timed out. Check again later.", + "npm \u8FD4\u56DE\u7684\u7248\u672C\u4FE1\u606F\u65E0\u6548\uFF0C\u6682\u65F6\u65E0\u6CD5\u66F4\u65B0\u3002": "npm returned invalid release information. Updating is unavailable.", + "\u7248\u672C\u786E\u8BA4\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u540E\u518D\u5B89\u88C5\u3002": "The version confirmation expired. Check again before installing.", + "\u63D2\u4EF6\u5B89\u88C5\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u3002": "The plugin installation changed. Check again.", + "\u6B64 profile \u6B63\u5728\u66F4\u65B0\uFF0C\u8BF7\u7A0D\u540E\u67E5\u770B\u72B6\u6001\u3002": "This profile is already updating. Check its status shortly.", + "\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002": "Installation failed. Check the current installation before retrying.", + "\u5B89\u88C5\u7ED3\u679C\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u68C0\u67E5\u63D2\u4EF6\u7248\u672C\u3002": "Installation verification failed. Check the plugin version manually.", + "\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u66F4\u65B0\u72B6\u6001\uFF0C\u8BF7\u5148\u68C0\u67E5\u5F53\u524D\u5B89\u88C5\u7ED3\u679C\u3002": "Update state could not be saved safely. Check the current installation result before retrying.", + "\u4E0A\u6B21\u66F4\u65B0\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002": "The previous update was interrupted. Check the installation before retrying.", + "\u66F4\u65B0\u670D\u52A1\u5DF2\u5173\u95ED\uFF0C\u8BF7\u624B\u52A8\u91CD\u65B0\u6253\u5F00\u8BBE\u7F6E\u9875\u3002": "The update service has closed. Reopen settings manually.", + "\u66F4\u65B0\u8BF7\u6C42\u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u7248\u672C\u3002": "The update request is invalid. Check the version again.", + "\u5F53\u524D\u63D2\u4EF6\u5B89\u88C5\u4E0D\u5B8C\u6574\u6216\u4E0E profile \u4E0D\u7B26\uFF0C\u8BF7\u624B\u52A8\u68C0\u67E5\u5B89\u88C5\u914D\u7F6E\u3002": "The plugin installation is incomplete or does not match this profile. Check the installation configuration manually.", + "\u65E0\u6CD5\u786E\u8BA4\u5F53\u524D npm \u6E90\u914D\u7F6E\uFF0C\u6682\u65F6\u4E0D\u80FD\u5B89\u88C5\u66F4\u65B0\u3002": "The npm registry configuration could not be verified. Installation is unavailable.", + "\u5B89\u88C5\u8D85\u65F6\uFF0C\u8BF7\u5148\u786E\u8BA4\u5F53\u524D\u5B89\u88C5\u72B6\u6001\uFF0C\u518D\u51B3\u5B9A\u662F\u5426\u91CD\u8BD5\u3002": "Installation timed out. Check the current installation before retrying.", + "\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002": "The update request failed. Try again.", + "\u66F4\u65B0\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002": "The update service returned an unrecognized response.", + "\u5F53\u524D Host \u4E0D\u652F\u6301\u66F4\u65B0\u63A5\u53E3\uFF0C\u8BF7\u5148\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u5E76\u91CD\u542F\u3002": "This Host does not support the update API. Update the plugin manually and restart first.", + "\u5173\u95ED\u7A97\u53E3\u4E0D\u4F1A\u53D6\u6D88\u5B89\u88C5\u3002\u8BF7\u52FF\u540C\u65F6\u5728\u5176\u4ED6\u7A97\u53E3\u7BA1\u7406\u6B64 profile \u7684\u63D2\u4EF6\u3002": "Closing this window does not cancel installation. Do not manage this profile\u2019s plugins in another window at the same time.", + "\u9875\u9762\u7248\u672C\u4E0E\u8FD0\u884C\u7248\u672C\u4E0D\u540C\uFF0C\u8BF7\u624B\u52A8\u5237\u65B0\u9875\u9762\uFF1B\u82E5\u4ECD\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u624B\u52A8\u91CD\u542F Harness \u6216 Desktop\u3002": "The page and running versions differ. Refresh the page manually; if they still differ, manually restart Harness or Desktop.", + "\u8BF7\u5728\u673A\u5668\u4EBA\u7A7A\u95F2\u65F6\u5B89\u88C5\uFF1B\u5B89\u88C5\u4F1A\u4FEE\u6539\u5F53\u524D profile \u7684\u4F9D\u8D56\uFF0C\u5B8C\u6210\u540E\u9700\u624B\u52A8\u91CD\u542F\u3002": "Install while bots are idle. This changes the current profile\u2019s dependencies and requires a manual restart afterward.", "AI Office": "AI Office", "\uFF08\u5B9E\u9A8C\u529F\u80FD\uFF09": "(Experimental)", "AI Office \u8BBE\u7F6E": "AI Office settings", @@ -2414,7 +2471,7 @@ function AccountCard({ const state = busy === "reconnect" ? "connecting" : account.state; const tone = account.connected ? "success" : state === "error" ? "error" : "warning"; const stateLabel2 = account.connected ? "\u8FD0\u884C\u6B63\u5E38" : state === "connecting" ? "\u6B63\u5728\u8FDE\u63A5" : "\u8FDE\u63A5\u672A\u5C31\u7EEA"; - const summary = account.error?.message ?? (account.connected ? null : account.health.summary); + const summary2 = account.error?.message ?? (account.connected ? null : account.health.summary); return h2( "article", { className: "ddt-card dim-botCard", tabIndex: -1, "data-bot-id": account.botId }, @@ -2474,7 +2531,7 @@ function AccountCard({ "\u79FB\u9664\u63A5\u5165" ) ), - summary ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary) : null, + summary2 ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary2) : null, account.lastMessageError ? h2(LastMessageErrorSummary, { className: "ddt-summary", error: account.lastMessageError @@ -3137,11 +3194,11 @@ function createTokenChannelApi(channel4, connectionSummary, { agentPresetCatalog: normalizeAgentPresetCatalog(source.agentPresetCatalog) }; }; - const presentError10 = (error) => ({ + const presentError11 = (error) => ({ code: text2(error?.code, `${channel4.toUpperCase()}_ERROR`, 80), message: text2(error?.message, `${channel4}\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5`) }); - return Object.freeze({ unwrapRpcResult: unwrapRpcResult10, normalizeSnapshot: normalizeSnapshot9, presentError: presentError10 }); + return Object.freeze({ unwrapRpcResult: unwrapRpcResult10, normalizeSnapshot: normalizeSnapshot9, presentError: presentError11 }); } // plugin-src/client/channels/discord/api.js @@ -3210,7 +3267,7 @@ function createTokenChannelSettings(definition) { const state = busy === "reconnect" ? "connecting" : account.state; const tone = account.connected ? "success" : state === "error" ? "error" : "warning"; const stateLabel2 = account.connected ? "\u8FD0\u884C\u6B63\u5E38" : state === "connecting" ? "\u6B63\u5728\u8FDE\u63A5" : "\u8FDE\u63A5\u672A\u5C31\u7EEA"; - const summary = account.error?.message ?? (account.connected ? null : account.health.summary); + const summary2 = account.error?.message ?? (account.connected ? null : account.health.summary); const identity = account.bot.username ? `@${account.bot.username}` : account.bot.idMasked; return h2( "article", @@ -3281,7 +3338,7 @@ function createTokenChannelSettings(definition) { disabled: Boolean(busy) }, "\u79FB\u9664\u63A5\u5165") ), - summary ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary) : null, + summary2 ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary2) : null, account.lastMessageError ? h2(LastMessageErrorSummary, { className: "ddt-summary", error: account.lastMessageError @@ -4497,7 +4554,7 @@ function BotCard({ const repairTooltipId = React12.useId(); const stateForDisplay = busy === "reconnect" ? "connecting" : state; const tone = stateForDisplay === "connected" ? "success" : stateForDisplay === "connecting" ? "warning" : "error"; - const summary = actionError?.message ?? connection.error?.message ?? (connected ? null : health.summary); + const summary2 = actionError?.message ?? connection.error?.message ?? (connected ? null : health.summary); const titleId = `bxf-bot-${connection.botId.replace(/[^a-zA-Z0-9_-]/g, "-")}`; return h2( "article", @@ -4611,10 +4668,10 @@ function BotCard({ "aria-label": `\u4ECE DeepSeek Harness \u79FB\u9664${bot.name}` }, "\u79FB\u9664\u63A5\u5165") ), - summary ? h2( + summary2 ? h2( "div", { className: "bxf-healthSummary dim-cardSummary", "data-error": actionError || connection.error ? "true" : void 0 }, - summary + summary2 ) : null, connection.lastMessageError ? h2(LastMessageErrorSummary, { className: "bxf-healthSummary", @@ -6358,7 +6415,7 @@ function AccountCard2({ }) { const tone = account.connected ? "success" : account.state === "error" ? "error" : "warning"; const stateLabel2 = account.connected ? "\u8FD0\u884C\u6B63\u5E38" : account.state === "connecting" ? "\u6B63\u5728\u8FDE\u63A5" : "\u8FDE\u63A5\u672A\u5C31\u7EEA"; - const summary = account.error?.message ?? (account.connected ? null : account.health.summary); + const summary2 = account.error?.message ?? (account.connected ? null : account.health.summary); return h2( "article", { className: "ddt-card dim-botCard", "data-bot-id": account.botId }, @@ -6410,7 +6467,7 @@ function AccountCard2({ h2(Button7, { className: "dim-cardAction", onClick: onReconnect, disabled: Boolean(busy) }, busy === "reconnect" ? "\u68C0\u67E5\u4E2D\u2026" : account.connected ? "\u68C0\u67E5\u8FDE\u63A5" : "\u91CD\u8BD5\u8FDE\u63A5"), h2(Button7, { className: "dim-cardAction", kind: "danger", onClick: onRequestRemove, disabled: Boolean(busy) }, "\u79FB\u9664\u63A5\u5165") ), - summary ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary) : null, + summary2 ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary2) : null, account.lastMessageError ? h2(LastMessageErrorSummary, { className: "ddt-summary", error: account.lastMessageError @@ -7906,7 +7963,7 @@ function AccountCard3({ }) { const tone = account.connected ? "success" : account.state === "error" ? "error" : "warning"; const stateLabel2 = account.connected ? "\u8FD0\u884C\u6B63\u5E38" : account.state === "connecting" ? "\u6B63\u5728\u8FDE\u63A5" : "\u8FDE\u63A5\u672A\u5C31\u7EEA"; - const summary = account.error?.message ?? (account.connected ? null : account.health.summary); + const summary2 = account.error?.message ?? (account.connected ? null : account.health.summary); return h2( "article", { className: "ddt-card dim-botCard", "data-bot-id": account.botId }, @@ -7958,7 +8015,7 @@ function AccountCard3({ h2(Button10, { className: "dim-cardAction", onClick: onReconnect, disabled: Boolean(busy) }, busy === "reconnect" ? "\u68C0\u67E5\u4E2D\u2026" : account.connected ? "\u68C0\u67E5\u8FDE\u63A5" : "\u91CD\u8BD5\u8FDE\u63A5"), h2(Button10, { className: "dim-cardAction", kind: "danger", onClick: onRequestRemove, disabled: Boolean(busy) }, "\u79FB\u9664\u63A5\u5165") ), - summary ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary) : null, + summary2 ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary2) : null, account.lastMessageError ? h2(LastMessageErrorSummary, { className: "ddt-summary", error: account.lastMessageError @@ -8730,7 +8787,7 @@ function AccountCard4({ }) { const state = busy === "reconnect" ? "connecting" : account.state; const tone = account.connected ? "success" : state === "error" ? "error" : "warning"; - const summary = account.error?.message ?? (account.connected ? null : account.health.summary); + const summary2 = account.error?.message ?? (account.connected ? null : account.health.summary); return h2( "article", { className: "dxw-card dim-botCard", tabIndex: -1, "data-bot-id": account.botId }, @@ -8781,7 +8838,7 @@ function AccountCard4({ ), h2(Button12, { className: "dim-cardAction", kind: "danger", onClick: onRequestRemove, disabled: Boolean(busy) }, "\u79FB\u9664\u63A5\u5165") ), - summary ? h2("div", { className: "dxw-summary dim-cardSummary" }, summary) : null, + summary2 ? h2("div", { className: "dxw-summary dim-cardSummary" }, summary2) : null, account.lastMessageError ? h2(LastMessageErrorSummary, { className: "dxw-summary", error: account.lastMessageError @@ -9933,7 +9990,7 @@ function WhatsappAccountCard({ const state = busy === "reconnect" ? "connecting" : account.state; const tone = account.connected ? "success" : state === "error" ? "error" : "warning"; const stateLabel2 = account.connected ? "\u8FD0\u884C\u6B63\u5E38" : state === "connecting" ? "\u6B63\u5728\u8FDE\u63A5" : "\u8FDE\u63A5\u672A\u5C31\u7EEA"; - const summary = account.error?.message ?? (account.connected ? null : account.health.summary); + const summary2 = account.error?.message ?? (account.connected ? null : account.health.summary); return h2( "article", { className: "ddt-card dim-botCard", "data-bot-id": account.botId }, @@ -10002,7 +10059,7 @@ function WhatsappAccountCard({ disabled: Boolean(busy) }, "\u79FB\u9664\u63A5\u5165") ), - summary ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary) : null, + summary2 ? h2("div", { className: "ddt-summary dim-cardSummary" }, summary2) : null, account.lastMessageError ? h2(LastMessageErrorSummary, { className: "ddt-summary", error: account.lastMessageError @@ -10387,6 +10444,32 @@ var CSS11 = String.raw` .dim-brandName { color: var(--dsw-alias-label-primary, #1f2329); font-size: 20px; line-height: 24px; font-weight: 800; letter-spacing: .04em; } .dim-brandVersion { color: var(--dsw-alias-label-tertiary, #8f959e); font: 500 10px/16px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; } .dim-title p { margin: 0; color: var(--dsw-alias-label-secondary, #646a73); font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap; } +.dim-titleActions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; } +.dim-updateButton { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 5px 10px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 8px; color: var(--dsw-alias-label-secondary, #646a73); background: var(--dsw-alias-bg-layer-1, #fff); font: inherit; font-size: 12px; line-height: 18px; font-weight: 560; cursor: pointer; } +.dim-updateButton:hover:not(:disabled) { border-color: #aeb3bb; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); } +.dim-updateButton:focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary, #3370ff); outline-offset: 2px; } +.dim-updateButton:disabled { opacity: .55; cursor: default; } +.dim-updateTrigger { white-space: nowrap; } +.dim-updateBackdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: rgb(15 17 21 / 42%); } +.dim-updateBackdrop, .dim-updateBackdrop * { box-sizing: border-box; } +.dim-updateDialog { width: min(480px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 16px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-3, #fff); box-shadow: 0 20px 70px rgb(0 0 0 / 20%); text-align: left; } +.dim-updateDialog:focus { outline: none; } +.dim-updateDialog h3 { margin: 22px 24px 8px; font-size: 18px; line-height: 25px; font-weight: 680; } +.dim-updateDescription { margin: 0 24px; color: var(--dsw-alias-label-secondary, #646a73); font-size: 13px; line-height: 20px; } +.dim-updateBody { padding: 18px 24px 20px; } +.dim-updateVersions { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0 0 18px; font-size: 12px; line-height: 18px; } +.dim-updateVersions dt { color: var(--dsw-alias-label-secondary, #646a73); } +.dim-updateVersions dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; } +.dim-updateStatus { padding: 12px 14px; border: 1px solid var(--dsw-alias-border-l1, #eef0f3); border-radius: 10px; background: var(--dsw-alias-bg-layer-1, #f7f8fa); font-size: 13px; line-height: 20px; } +.dim-updateStatus strong { font-weight: 600; } +.dim-updateStatus p { margin: 6px 0 0; color: var(--dsw-alias-label-secondary, #646a73); font-size: 12px; line-height: 19px; overflow-wrap: anywhere; } +.dim-updateStatusError { border-color: color-mix(in srgb, var(--dsw-alias-state-danger-primary, #d92d20) 25%, var(--dsw-alias-border-l2, #dfe1e5)); } +.dim-updateHint, .dim-updateError { margin: 12px 0 0; font-size: 12px; line-height: 19px; overflow-wrap: anywhere; } +.dim-updateHint { color: var(--dsw-alias-label-secondary, #646a73); } +.dim-updateError { color: var(--dsw-alias-state-danger-primary, #d92d20); } +.dim-updateFooter { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--dsw-alias-border-l1, #eef0f3); } +.dim-updateFooter .dim-updateButton:first-child { margin-right: auto; } +.dim-updatePrimary, .dim-updatePrimary:hover:not(:disabled) { border-color: var(--dsw-alias-state-business-primary, #3370ff); color: #fff; background: var(--dsw-alias-state-business-primary, #3370ff); } .dim-githubAction { position: relative; display: inline-flex; flex: none; } .dim-githubLink { min-height: 30px; display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 0 10px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 8px; color: var(--dsw-alias-label-secondary, #646a73); background: var(--dsw-alias-bg-layer-1, #fff); font-size: 12px; line-height: normal; font-weight: 560; text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease; } .dim-githubLink:hover { border-color: #aeb3bb; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); } @@ -10654,6 +10737,13 @@ var CSS11 = String.raw` @media (max-width: 560px) { .dim-title { flex-direction: column; gap: 10px; } .dim-title p { white-space: normal; } + .dim-titleActions { justify-content: flex-start; } + .dim-updateBackdrop { padding: 12px; } + .dim-updateDialog { max-height: calc(100vh - 24px); } + .dim-updateDialog h3 { margin: 18px 18px 8px; } + .dim-updateDescription { margin: 0 18px; } + .dim-updateBody { padding: 16px 18px; } + .dim-updateFooter { padding: 12px 18px; } .dim-githubTooltip { right: auto; left: 0; } .dim-rail { grid-template-columns: minmax(0, 1fr); } .dim-loopbackRecovery { align-items: stretch; flex-direction: column; gap: 12px; } @@ -10686,6 +10776,393 @@ function installImStyles() { return () => style.remove(); } +// plugin-src/client/update-panel.js +var React20 = __toESM(require("react"), 1); +var import_react_dom2 = require("react-dom"); +var UPDATE_RPC_CHANNEL = "/dsh-im"; +var ACTIVE_STATES4 = /* @__PURE__ */ new Set(["installing", "verifying"]); +var BLOCKED_REASONS = Object.freeze({ + "source-install": "\u5F53\u524D\u662F\u6E90\u7801\u6216\u94FE\u63A5\u5B89\u88C5\uFF0C\u53EA\u80FD\u68C0\u67E5\u7248\u672C\uFF1B\u8BF7\u624B\u52A8\u66F4\u65B0\u6E90\u7801\uFF0C\u6216\u8FC1\u79FB\u5230 npm \u5B89\u88C5\u3002", + "unknown-profile": "\u65E0\u6CD5\u786E\u8BA4\u5F53\u524D profile\uFF0C\u8BF7\u5728\u5BF9\u5E94\u7684 Harness \u73AF\u5883\u4E2D\u624B\u52A8\u66F4\u65B0\u3002", + "unsupported-runtime": "\u5F53\u524D\u8FD0\u884C\u73AF\u5883\u4E0D\u652F\u6301\u6309\u94AE\u5B89\u88C5\uFF0C\u8BF7\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u3002", + "registry-conflict": "\u5F53\u524D npm \u6E90\u914D\u7F6E\u4E0E\u5B98\u65B9\u6E90\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u5148\u68C0\u67E5 registry \u914D\u7F6E\u3002", + "incompatible-node": "\u5F53\u524D Host \u7684 Node.js \u7248\u672C\u4E0D\u6EE1\u8DB3\u65B0\u7248\u8981\u6C42\uFF0C\u8BF7\u5148\u66F4\u65B0\u8FD0\u884C\u73AF\u5883\u3002", + "pending-restart": "\u65B0\u7248\u672C\u5DF2\u5B89\u88C5\uFF0C\u8BF7\u5728\u65B9\u4FBF\u65F6\u624B\u52A8\u91CD\u542F\u5F53\u524D Harness \u6216 Desktop\u3002", + "recovery-required": "\u4E0A\u6B21\u5B89\u88C5\u7ED3\u679C\u65E0\u6CD5\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u6B64 profile \u7684\u63D2\u4EF6\u5B89\u88C5\u72B6\u6001\u3002" +}); +var ERROR_MESSAGES = Object.freeze({ + "check-failed": "\u65E0\u6CD5\u8BBF\u95EE npm \u6216\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u68C0\u67E5\u3002", + "update-failed": "\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002", + "invalid-release": "npm \u8FD4\u56DE\u7684\u7248\u672C\u4FE1\u606F\u65E0\u6548\uFF0C\u6682\u65F6\u65E0\u6CD5\u66F4\u65B0\u3002", + "check-expired": "\u7248\u672C\u786E\u8BA4\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u540E\u518D\u5B89\u88C5\u3002", + "installation-changed": "\u63D2\u4EF6\u5B89\u88C5\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u3002", + "update-busy": "\u6B64 profile \u6B63\u5728\u66F4\u65B0\uFF0C\u8BF7\u7A0D\u540E\u67E5\u770B\u72B6\u6001\u3002", + "install-failed": "\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002", + "verify-failed": "\u5B89\u88C5\u7ED3\u679C\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u68C0\u67E5\u63D2\u4EF6\u7248\u672C\u3002", + "state-unavailable": "\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u66F4\u65B0\u72B6\u6001\uFF0C\u8BF7\u5148\u68C0\u67E5\u5F53\u524D\u5B89\u88C5\u7ED3\u679C\u3002", + interrupted: "\u4E0A\u6B21\u66F4\u65B0\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002", + disposed: "\u66F4\u65B0\u670D\u52A1\u5DF2\u5173\u95ED\uFF0C\u8BF7\u624B\u52A8\u91CD\u65B0\u6253\u5F00\u8BBE\u7F6E\u9875\u3002", + "bad-request": "\u66F4\u65B0\u8BF7\u6C42\u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u68C0\u67E5\u7248\u672C\u3002", + "invalid-installation": "\u5F53\u524D\u63D2\u4EF6\u5B89\u88C5\u4E0D\u5B8C\u6574\u6216\u4E0E profile \u4E0D\u7B26\uFF0C\u8BF7\u624B\u52A8\u68C0\u67E5\u5B89\u88C5\u914D\u7F6E\u3002", + "executor-unavailable": BLOCKED_REASONS["unsupported-runtime"], + "registry-check-failed": "\u65E0\u6CD5\u786E\u8BA4\u5F53\u524D npm \u6E90\u914D\u7F6E\uFF0C\u6682\u65F6\u4E0D\u80FD\u5B89\u88C5\u66F4\u65B0\u3002", + "install-interrupted": "\u4E0A\u6B21\u66F4\u65B0\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002", + "install-timeout": "\u5B89\u88C5\u8D85\u65F6\uFF0C\u8BF7\u5148\u786E\u8BA4\u5F53\u524D\u5B89\u88C5\u72B6\u6001\uFF0C\u518D\u51B3\u5B9A\u662F\u5426\u91CD\u8BD5\u3002", + "invalid-version": "npm \u8FD4\u56DE\u7684\u7248\u672C\u4FE1\u606F\u65E0\u6548\uFF0C\u6682\u65F6\u65E0\u6CD5\u66F4\u65B0\u3002" +}); +function unwrapSnapshot(result) { + if (result?.ok === false) { + const error = new Error(result.error?.message || "\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"); + error.code = result.error?.code; + throw error; + } + const value = result?.value; + if (result?.ok !== true || typeof value?.runningVersion !== "string" || typeof value?.canInstall !== "boolean") { + throw new Error("\u66F4\u65B0\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002"); + } + return value; +} +function presentError10(error) { + const code = error?.rpcError?.code ?? error?.code ?? ""; + const message = error?.rpcError?.message ?? error?.message ?? ""; + if (code === "update-unavailable" || /(?:not[-_ ]found|unimplemented|unknown[-_ ](?:endpoint|channel)|no[-_ ]handler)/i.test(code) || /(?:not found|unknown (?:endpoint|channel)|not registered|no .*handler|HTTP 404)/i.test(message)) { + return "\u5F53\u524D Host \u4E0D\u652F\u6301\u66F4\u65B0\u63A5\u53E3\uFF0C\u8BF7\u5148\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u5E76\u91CD\u542F\u3002"; + } + return BLOCKED_REASONS[code] ?? ERROR_MESSAGES[code] ?? (message.slice(0, 400) || "\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"); +} +function summary(snapshot, action, error) { + if (action === "checking") return "\u6B63\u5728\u4ECE npm \u68C0\u67E5\u6700\u65B0\u7248\u672C\u2026"; + if (action === "starting" || snapshot?.job?.state === "installing") return "\u6B63\u5728\u5B89\u88C5\uFF0C\u8BF7\u7A0D\u5019\u2026"; + if (snapshot?.job?.state === "verifying") return "\u6B63\u5728\u6821\u9A8C\u5B89\u88C5\u7ED3\u679C\u2026"; + if (snapshot?.job?.state === "restart-required" || snapshot?.blockedReason === "pending-restart") { + return "\u5DF2\u5B89\u88C5\uFF0C\u5F85\u624B\u52A8\u91CD\u542F"; + } + if (snapshot?.job?.state === "completed") return "\u66F4\u65B0\u5DF2\u751F\u6548"; + if (snapshot?.job?.state === "failed") return "\u66F4\u65B0\u5931\u8D25"; + if (snapshot?.job?.state === "interrupted") return "\u4E0A\u6B21\u66F4\u65B0\u5DF2\u4E2D\u65AD\uFF0C\u8BF7\u68C0\u67E5\u5B89\u88C5\u72B6\u6001\u540E\u91CD\u8BD5\u3002"; + if (error) return "\u66F4\u65B0\u8BF7\u6C42\u5931\u8D25"; + if (snapshot?.canInstall) return "\u53D1\u73B0\u65B0\u7248\u672C"; + if (snapshot?.checkedAt && snapshot.latestVersion === snapshot.runningVersion) return "\u5DF2\u662F\u6700\u65B0\u7248\u672C"; + if (snapshot?.blockedReason === "no-update") return "\u5F53\u524D\u7248\u672C\u65E0\u9700\u66F4\u65B0"; + if (snapshot?.checkedAt) return "\u5DF2\u83B7\u53D6 npm \u6700\u65B0\u7248\u672C"; + return "\u68C0\u67E5 npm \u6700\u65B0\u7248\u672C\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u5B89\u88C5\u3002"; +} +function retainDialogFocus(event) { + event?.currentTarget?.closest?.(".dim-updateDialog")?.focus?.({ preventScroll: true }); +} +function UpdateDialog({ children, onClose }) { + const dialogRef = React20.useRef(null); + const titleId = React20.useId(); + const descriptionId = React20.useId(); + React20.useEffect(() => { + const previous = globalThis.document?.activeElement; + dialogRef.current?.focus?.(); + return () => { + if (previous?.isConnected) previous.focus?.(); + }; + }, []); + const content = h2( + "div", + { + className: "dim-updateBackdrop", + onMouseDown: (event) => { + if (event.target === event.currentTarget) onClose(); + } + }, + h2( + "section", + { + ref: dialogRef, + className: "dim-updateDialog", + role: "dialog", + "aria-modal": "true", + "aria-labelledby": titleId, + "aria-describedby": descriptionId, + tabIndex: -1, + onKeyDown: (event) => { + if (event.key === "Escape") { + event.preventDefault(); + event.stopPropagation(); + onClose(); + } + if (event.key !== "Tab") return; + const buttons = dialogRef.current?.querySelectorAll?.("button:not(:disabled)"); + if (!buttons?.length) return; + const first = buttons[0]; + const last = buttons[buttons.length - 1]; + const active = globalThis.document?.activeElement; + if (event.shiftKey && (active === first || active === dialogRef.current)) { + event.preventDefault(); + last.focus(); + } else if (!event.shiftKey && (active === last || active === dialogRef.current)) { + event.preventDefault(); + first.focus(); + } + } + }, + h2("h3", { id: titleId }, "DSH-IM \u66F4\u65B0"), + h2( + "p", + { id: descriptionId, className: "dim-updateDescription" }, + "\u4EC5\u66F4\u65B0 DSH-IM\u3002\u5B89\u88C5\u5B8C\u6210\u540E\u9700\u624B\u52A8\u91CD\u542F\u540E\u53F0\uFF1B\u672C\u529F\u80FD\u4E0D\u4F1A\u81EA\u52A8\u91CD\u542F\u6216\u4E3B\u52A8\u5237\u65B0\u9875\u9762\u3002" + ), + children + ) + ); + return typeof document !== "undefined" && document.body ? (0, import_react_dom2.createPortal)(content, document.body) : content; +} +function UpdatePanel({ rpcCall, clientVersion, onStatus }) { + const [snapshot, setSnapshot] = React20.useState(null); + const [action, setAction] = React20.useState("status"); + const [error, setError] = React20.useState(null); + const [open, setOpen] = React20.useState(false); + const [uncertainInstall, setUncertainInstall] = React20.useState(false); + const mounted = React20.useRef(false); + const busy = React20.useRef(false); + const readController = React20.useRef(null); + const pollReadController = React20.useRef(null); + const installRequest = React20.useRef(null); + const onStatusRef = React20.useRef(onStatus); + onStatusRef.current = onStatus; + const accept = React20.useCallback((next) => { + setSnapshot(next); + onStatusRef.current?.(next); + }, []); + const acceptAuthoritative = (next) => { + pollReadController.current?.abort(); + setUncertainInstall(false); + accept(next); + }; + const invoke = React20.useCallback(async (endpoint, payload = {}, signal) => { + if (typeof rpcCall !== "function") { + const unavailable = new Error("\u5F53\u524D Host \u4E0D\u652F\u6301\u66F4\u65B0\u63A5\u53E3\uFF0C\u8BF7\u5148\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u5E76\u91CD\u542F\u3002"); + unavailable.code = "update-unavailable"; + throw unavailable; + } + return unwrapSnapshot(await rpcCall(endpoint, payload, signal)); + }, [rpcCall]); + React20.useEffect(() => { + mounted.current = true; + busy.current = true; + const controller = new AbortController(); + void invoke("update.status", {}, controller.signal).then((next) => { + if (!controller.signal.aborted) accept(next); + }).catch((cause) => { + if (!controller.signal.aborted) setError(presentError10(cause)); + }).finally(() => { + if (!controller.signal.aborted) { + busy.current = false; + setAction(null); + } + }); + return () => { + mounted.current = false; + controller.abort(); + readController.current?.abort(); + }; + }, [accept, invoke]); + const activeJob = ACTIVE_STATES4.has(snapshot?.job?.state); + const restartRequired = snapshot?.job?.state === "restart-required" || snapshot?.blockedReason === "pending-restart"; + const shouldPoll = activeJob || uncertainInstall; + React20.useEffect(() => { + if (!shouldPoll) return void 0; + let controller; + const scheduler = createPollScheduler({ + setTimeoutFn: (callback, delay) => globalThis.setTimeout(callback, delay), + clearTimeoutFn: (timer) => globalThis.clearTimeout(timer) + }); + const poll = async () => { + const pendingController = new AbortController(); + controller = pendingController; + pollReadController.current = pendingController; + let keepPolling = true; + try { + const next = await invoke("update.status", {}, pendingController.signal); + if (!pendingController.signal.aborted) { + accept(next); + setError(null); + setUncertainInstall(false); + keepPolling = ACTIVE_STATES4.has(next.job?.state); + } + } catch (cause) { + if (!pendingController.signal.aborted) setError(presentError10(cause)); + } finally { + if (pollReadController.current === pendingController) pollReadController.current = null; + } + if (keepPolling) scheduler.schedule(poll, 1e3); + }; + scheduler.schedule(poll, 1e3); + return () => { + controller?.abort(); + scheduler.dispose(); + }; + }, [accept, invoke, shouldPoll]); + const readSnapshot = async (endpoint) => { + const checkLatest = endpoint === "update.check"; + if (!mounted.current || busy.current || checkLatest && (activeJob || restartRequired)) return; + busy.current = true; + setAction(checkLatest ? "checking" : "status"); + setError(null); + if (checkLatest) { + installRequest.current = null; + setSnapshot((current) => current ? { ...current, canInstall: false, checkId: null, latestVersion: null, checkedAt: null } : current); + } + const controller = new AbortController(); + readController.current = controller; + try { + const next = await invoke(endpoint, {}, controller.signal); + if (!controller.signal.aborted && mounted.current) { + if (checkLatest) accept(next); + else acceptAuthoritative(next); + } + } catch (cause) { + if (!controller.signal.aborted && mounted.current) setError(presentError10(cause)); + } finally { + if (!controller.signal.aborted && mounted.current) { + busy.current = false; + setAction(null); + } + } + }; + const check = () => readSnapshot("update.check"); + const refreshStatus = () => readSnapshot("update.status"); + const install = async () => { + if (busy.current || !snapshot?.canInstall || !snapshot.checkId) return; + busy.current = true; + setAction("starting"); + setError(null); + if (installRequest.current?.checkId !== snapshot.checkId) { + installRequest.current = { + checkId: snapshot.checkId, + requestId: globalThis.crypto?.randomUUID?.() ?? `update-${Date.now()}-${Math.random().toString(36).slice(2)}` + }; + } + try { + const next = await invoke("update.install", installRequest.current); + if (mounted.current) acceptAuthoritative(next); + } catch (cause) { + if (mounted.current) { + setError(presentError10(cause)); + setUncertainInstall(true); + } + } finally { + if (mounted.current) { + busy.current = false; + setAction(null); + } + } + }; + const busyAction = action !== null; + const blocked = BLOCKED_REASONS[snapshot?.blockedReason] ?? ERROR_MESSAGES[snapshot?.blockedReason]; + const canConfirm = snapshot?.canInstall && snapshot.checkId && !activeJob && !restartRequired; + const versionsDiffer = snapshot && clientVersion && snapshot.runningVersion !== clientVersion; + const failedJob = ["failed", "interrupted"].includes(snapshot?.job?.state); + const jobMessage = snapshot?.job?.message; + const targetVersion = snapshot?.job?.targetVersion; + const buttonLabel = action === "checking" ? "\u68C0\u67E5\u4E2D\u2026" : action === "starting" || activeJob ? "\u6B63\u5728\u66F4\u65B0\u2026" : restartRequired ? "\u5F85\u624B\u52A8\u91CD\u542F" : snapshot?.canInstall ? "\u66F4\u65B0\u81F3" : "\u68C0\u67E5\u66F4\u65B0"; + return h2( + React20.Fragment, + null, + h2("button", { + type: "button", + className: "dim-updateButton dim-updateTrigger", + disabled: busyAction, + "aria-haspopup": "dialog", + onClick: () => { + setOpen(true); + if (restartRequired) void refreshStatus(); + else if (!snapshot?.canInstall && !snapshot?.job) void check(); + } + }, buttonLabel, buttonLabel === "\u66F4\u65B0\u81F3" ? ` v${snapshot.latestVersion}` : null), + open ? h2( + UpdateDialog, + { onClose: () => setOpen(false) }, + h2( + "div", + { className: "dim-updateBody" }, + h2( + "dl", + { className: "dim-updateVersions" }, + h2("dt", null, "\u8FD0\u884C\u7248\u672C"), + h2("dd", null, `v${snapshot?.runningVersion ?? clientVersion}`), + snapshot?.installedVersion && snapshot.installedVersion !== snapshot.runningVersion ? h2( + React20.Fragment, + null, + h2("dt", null, "\u5DF2\u5B89\u88C5\u7248\u672C"), + h2("dd", null, `v${snapshot.installedVersion}`) + ) : null, + h2("dt", null, "npm \u6700\u65B0\u7248\u672C"), + h2("dd", null, snapshot?.latestVersion ? `v${snapshot.latestVersion}` : "\u5C1A\u672A\u68C0\u67E5"), + targetVersion ? h2( + React20.Fragment, + null, + h2("dt", null, "\u76EE\u6807\u7248\u672C"), + h2("dd", null, `v${targetVersion}`) + ) : null, + h2("dt", null, "\u76EE\u6807 profile"), + h2("dd", null, snapshot?.profileName ?? "\u65E0\u6CD5\u786E\u8BA4"), + h2("dt", null, "\u66F4\u65B0\u6765\u6E90"), + h2("dd", null, "registry.npmjs.org"), + versionsDiffer ? h2( + React20.Fragment, + null, + h2("dt", null, "\u9875\u9762\u7248\u672C"), + h2("dd", null, `v${clientVersion}`) + ) : null + ), + h2( + "div", + { + className: `dim-updateStatus${error || failedJob ? " dim-updateStatusError" : ""}`, + role: "status", + "aria-live": "polite", + "aria-atomic": "true" + }, + h2("strong", null, summary(snapshot, action, error)), + activeJob || action === "starting" ? h2("p", null, "\u5173\u95ED\u7A97\u53E3\u4E0D\u4F1A\u53D6\u6D88\u5B89\u88C5\u3002\u8BF7\u52FF\u540C\u65F6\u5728\u5176\u4ED6\u7A97\u53E3\u7BA1\u7406\u6B64 profile \u7684\u63D2\u4EF6\u3002") : null, + restartRequired ? h2("p", null, BLOCKED_REASONS["pending-restart"]) : null, + failedJob && jobMessage ? h2( + "p", + null, + BLOCKED_REASONS[jobMessage] ?? ERROR_MESSAGES[jobMessage] ?? jobMessage + ) : null + ), + error ? h2("p", { className: "dim-updateError", role: "alert" }, error) : null, + blocked && !restartRequired ? h2("p", { className: "dim-updateHint" }, blocked) : null, + versionsDiffer && !restartRequired ? h2("p", { className: "dim-updateHint" }, "\u9875\u9762\u7248\u672C\u4E0E\u8FD0\u884C\u7248\u672C\u4E0D\u540C\uFF0C\u8BF7\u624B\u52A8\u5237\u65B0\u9875\u9762\uFF1B\u82E5\u4ECD\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u624B\u52A8\u91CD\u542F Harness \u6216 Desktop\u3002") : null, + canConfirm ? h2( + "p", + { className: "dim-updateHint" }, + "\u8BF7\u5728\u673A\u5668\u4EBA\u7A7A\u95F2\u65F6\u5B89\u88C5\uFF1B\u5B89\u88C5\u4F1A\u4FEE\u6539\u5F53\u524D profile \u7684\u4F9D\u8D56\uFF0C\u5B8C\u6210\u540E\u9700\u624B\u52A8\u91CD\u542F\u3002" + ) : null + ), + h2( + "footer", + { className: "dim-updateFooter" }, + h2("button", { type: "button", className: "dim-updateButton", onClick: () => setOpen(false) }, "\u5173\u95ED"), + restartRequired || !activeJob ? h2("button", { + type: "button", + className: "dim-updateButton", + disabled: busyAction, + onClick: (event) => { + retainDialogFocus(event); + void (restartRequired ? refreshStatus() : check()); + } + }, restartRequired ? "\u5237\u65B0\u72B6\u6001" : "\u91CD\u65B0\u68C0\u67E5") : null, + canConfirm ? h2("button", { + type: "button", + className: "dim-updateButton dim-updatePrimary", + disabled: busyAction, + onClick: (event) => { + retainDialogFocus(event); + void install(); + } + }, "\u5B89\u88C5\u66F4\u65B0") : null + ) + ) : null + ); +} + // plugin-src/client/index.js var name = "im-settings"; var inject = ["slots", "connection", "locale", "workspaces"]; @@ -10808,18 +11285,23 @@ function IMSettingsTab({ weixinRpcCall, whatsappRpcCall, officeRpcCall, + updateRpcCall, workspaceDirectoryPicker, browserLocation = globalThis.location, navigateToRecoveryUrl = replacePageLocation }) { - const [selected, setSelected] = React20.useState("weixin"); - const [loopbackRecovery, setLoopbackRecovery] = React20.useState(null); - const githubTooltipId = React20.useId(); + const [selected, setSelected] = React21.useState("weixin"); + const [loopbackRecovery, setLoopbackRecovery] = React21.useState(null); + const [runningVersion, setRunningVersion] = React21.useState(IM_PLUGIN_VERSION); + const githubTooltipId = React21.useId(); const active = CHANNELS.find((channel4) => channel4.id === selected) ?? CHANNELS[0]; - const reportLoopbackRecovery = React20.useCallback((recovery) => { + const reportLoopbackRecovery = React21.useCallback((recovery) => { setLoopbackRecovery((current) => current?.url === recovery.url ? current : recovery); }, []); - const rpcCalls = React20.useMemo(() => createLoopbackAwareRpcCalls({ + const reportUpdateStatus = React21.useCallback((snapshot) => { + setRunningVersion(snapshot.runningVersion); + }, []); + const rpcCalls = React21.useMemo(() => createLoopbackAwareRpcCalls({ dingtalkRpcCall, discordRpcCall, feishuRpcCall, @@ -10829,7 +11311,8 @@ function IMSettingsTab({ wecomRpcCall, weixinRpcCall, whatsappRpcCall, - officeRpcCall + officeRpcCall, + updateRpcCall }, { location: browserLocation, onRecovery: reportLoopbackRecovery @@ -10843,6 +11326,7 @@ function IMSettingsTab({ reportLoopbackRecovery, slackRpcCall, telegramRpcCall, + updateRpcCall, wecomRpcCall, weixinRpcCall, whatsappRpcCall @@ -10863,31 +11347,40 @@ function IMSettingsTab({ "div", { className: "dim-brandHeading" }, h2("strong", { className: "dim-brandName" }, "DSH-IM"), - h2("span", { className: "dim-brandVersion" }, `v${IM_PLUGIN_VERSION}`) + h2("span", { className: "dim-brandVersion" }, `v${runningVersion}`) ), h2("p", null, "\u8BA9 DeepSeek Harness \u89E6\u624B\u53EF\u53CA") ), h2( - "span", - { className: "dim-githubAction" }, + "div", + { className: "dim-titleActions" }, + h2(UpdatePanel, { + rpcCall: rpcCalls.updateRpcCall, + clientVersion: IM_PLUGIN_VERSION, + onStatus: reportUpdateStatus + }), h2( - "a", - { - className: "dim-githubLink", - href: "https://github.com/xmanrui/dsh-im", - target: "_blank", - rel: "noopener noreferrer", - "aria-label": "dsh-im GitHub", - "aria-describedby": githubTooltipId - }, - h2("span", null, "GitHub"), - h2("span", { className: "dim-githubArrow", "aria-hidden": "true" }, "\u2197") - ), - h2("span", { - id: githubTooltipId, - className: "dim-githubTooltip", - role: "tooltip" - }, "\u5E2E\u52A9\u4E0E\u53CD\u9988 \xB7 \u524D\u5F80 GitHub") + "span", + { className: "dim-githubAction" }, + h2( + "a", + { + className: "dim-githubLink", + href: "https://github.com/xmanrui/dsh-im", + target: "_blank", + rel: "noopener noreferrer", + "aria-label": "dsh-im GitHub", + "aria-describedby": githubTooltipId + }, + h2("span", null, "GitHub"), + h2("span", { className: "dim-githubArrow", "aria-hidden": "true" }, "\u2197") + ), + h2("span", { + id: githubTooltipId, + className: "dim-githubTooltip", + role: "tooltip" + }, "\u5E2E\u52A9\u4E0E\u53CD\u9988 \xB7 \u524D\u5F80 GitHub") + ) ) ), h2( @@ -10970,6 +11463,7 @@ function apply(ctx) { const whatsappRpcCall = (endpoint, payload, signal) => ctx.connection.rpc.call(WHATSAPP_RPC_CHANNEL, endpoint, payload, signal); const slackRpcCall = (endpoint, payload, signal) => ctx.connection.rpc.call(SLACK_RPC_CHANNEL, endpoint, payload, signal); const officeRpcCall = (endpoint, payload, signal) => ctx.connection.rpc.call(OFFICE_RPC_CHANNEL, endpoint, payload, signal); + const updateRpcCall = (endpoint, payload, signal) => ctx.connection.rpc.call(UPDATE_RPC_CHANNEL, endpoint, payload, signal); const workspaceDirectoryPicker = Object.freeze({ listDirectory: (path, signal) => ctx.workspaces.listDirectory(path, signal), pickDirectory: () => ctx.workspaces.pickDirectory() @@ -10991,6 +11485,7 @@ function apply(ctx) { weixinRpcCall, whatsappRpcCall, officeRpcCall, + updateRpcCall, workspaceDirectoryPicker }) }, IMSettingsTab)); diff --git a/lib/index.js b/lib/index.js index 6df7ac7..291d344 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,78 +4,78 @@ import { fileURLToPath as __dshFileURLToPath } from 'node:url'; const require = __dshCreateRequire(import.meta.url); const __filename = __dshFileURLToPath(import.meta.url); const __dirname = __dshDirname(__filename); -var lge=Object.create;var Ob=Object.defineProperty;var pge=Object.getOwnPropertyDescriptor;var dge=Object.getOwnPropertyNames;var hge=Object.getPrototypeOf,Ege=Object.prototype.hasOwnProperty;var Xe=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var ue=(n,t)=>()=>(n&&(t=n(n=0)),t);var $=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Mr=(n,t)=>{for(var o in t)Ob(n,o,{get:t[o],enumerable:!0})},Cge=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of dge(t))!Ege.call(n,e)&&e!==o&&Ob(n,e,{get:()=>t[e],enumerable:!(i=pge(t,e))||i.enumerable});return n};var Ve=(n,t,o)=>(o=n!=null?lge(hge(n)):{},Cge(t||!n||!n.__esModule?Ob(o,"default",{value:n,enumerable:!0}):o,n));var hY=$((Q7e,dY)=>{var pY=Xe("stream").Stream,ICe=Xe("util");dY.exports=rn;function rn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}ICe.inherits(rn,pY);rn.create=function(n,t){var o=new this;t=t||{};for(var i in t)o[i]=t[i];o.source=n;var e=n.emit;return n.emit=function(){return o._handleEmit(arguments),e.apply(n,arguments)},n.on("error",function(){}),o.pauseStream&&n.pause(),o};Object.defineProperty(rn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});rn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};rn.prototype.resume=function(){this._released||this.release(),this.source.resume()};rn.prototype.pause=function(){this.source.pause()};rn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};rn.prototype.pipe=function(){var n=pY.prototype.pipe.apply(this,arguments);return this.resume(),n};rn.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};rn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var BY=$((y7e,uY)=>{var lCe=Xe("util"),CY=Xe("stream").Stream,EY=hY();uY.exports=dr;function dr(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}lCe.inherits(dr,CY);dr.create=function(n){var t=new this;n=n||{};for(var o in n)t[o]=n[o];return t};dr.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};dr.prototype.append=function(n){var t=dr.isStreamLike(n);if(t){if(!(n instanceof EY)){var o=EY.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=o}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};dr.prototype.pipe=function(n,t){return CY.prototype.pipe.call(this,n,t),this.resume(),n};dr.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};dr.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var t=n;t(function(o){var i=dr.isStreamLike(o);i&&(o.on("data",this._checkDataSize.bind(this)),this._handleErrors(o)),this._pipeNext(o)}.bind(this))};dr.prototype._pipeNext=function(n){this._currentStream=n;var t=dr.isStreamLike(n);if(t){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var o=n;this.write(o),this._getNext()};dr.prototype._handleErrors=function(n){var t=this;n.on("error",function(o){t._emitError(o)})};dr.prototype.write=function(n){this.emit("data",n)};dr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};dr.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};dr.prototype.end=function(){this._reset(),this.emit("end")};dr.prototype.destroy=function(){this._reset(),this.emit("close")};dr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};dr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};dr.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(t){t.dataSize&&(n.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};dr.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var fY=$((m7e,pCe)=>{pCe.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var yY=$((S7e,QY)=>{QY.exports=fY()});var DY=$(Qi=>{"use strict";var iQ=yY(),dCe=Xe("path").extname,mY=/^\s*([^;\s]*)(?:;|\s|$)/,hCe=/^text\//i;Qi.charset=SY;Qi.charsets={lookup:SY};Qi.contentType=ECe;Qi.extension=CCe;Qi.extensions=Object.create(null);Qi.lookup=uCe;Qi.types=Object.create(null);BCe(Qi.extensions,Qi.types);function SY(n){if(!n||typeof n!="string")return!1;var t=mY.exec(n),o=t&&iQ[t[1].toLowerCase()];return o&&o.charset?o.charset:t&&hCe.test(t[1])?"UTF-8":!1}function ECe(n){if(!n||typeof n!="string")return!1;var t=n.indexOf("/")===-1?Qi.lookup(n):n;if(!t)return!1;if(t.indexOf("charset")===-1){var o=Qi.charset(t);o&&(t+="; charset="+o.toLowerCase())}return t}function CCe(n){if(!n||typeof n!="string")return!1;var t=mY.exec(n),o=t&&Qi.extensions[t[1].toLowerCase()];return!o||!o.length?!1:o[0]}function uCe(n){if(!n||typeof n!="string")return!1;var t=dCe("x."+n).toLowerCase().substr(1);return t&&Qi.types[t]||!1}function BCe(n,t){var o=["nginx","apache",void 0,"iana"];Object.keys(iQ).forEach(function(e){var a=iQ[e],A=a.extensions;if(!(!A||!A.length)){n[e]=A;for(var r=0;rc||g===c&&t[s].substr(0,12)==="application/"))continue}t[s]=e}}})}});var OY=$((w7e,wY)=>{wY.exports=fCe;function fCe(n){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(n):setTimeout(n,0)}});var zM=$((O7e,MY)=>{var bY=OY();MY.exports=QCe;function QCe(n){var t=!1;return bY(function(){t=!0}),function(i,e){t?n(i,e):bY(function(){n(i,e)})}}});var VM=$((b7e,_Y)=>{_Y.exports=yCe;function yCe(n){Object.keys(n.jobs).forEach(mCe.bind(n)),n.jobs={}}function mCe(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var WM=$((M7e,NY)=>{var TY=zM(),SCe=VM();NY.exports=DCe;function DCe(n,t,o,i){var e=o.keyedList?o.keyedList[o.index]:o.index;o.jobs[e]=wCe(t,e,n[e],function(a,A){e in o.jobs&&(delete o.jobs[e],a?SCe(o):o.results[e]=A,i(a,o.results))})}function wCe(n,t,o,i){var e;return n.length==2?e=n(o,TY(i)):e=n(o,t,TY(i)),e}});var ZM=$((_7e,RY)=>{RY.exports=OCe;function OCe(n,t){var o=!Array.isArray(n),i={index:0,keyedList:o||t?Object.keys(n):null,jobs:{},results:o?{}:[],size:o?Object.keys(n).length:n.length};return t&&i.keyedList.sort(o?t:function(e,a){return t(n[e],n[a])}),i}});var XM=$((T7e,kY)=>{var bCe=VM(),MCe=zM();kY.exports=_Ce;function _Ce(n){Object.keys(this.jobs).length&&(this.index=this.size,bCe(this),MCe(n)(null,this.results))}});var PY=$((N7e,vY)=>{var TCe=WM(),NCe=ZM(),RCe=XM();vY.exports=kCe;function kCe(n,t,o){for(var i=NCe(n);i.index<(i.keyedList||n).length;)TCe(n,t,i,function(e,a){if(e){o(e,a);return}if(Object.keys(i.jobs).length===0){o(null,i.results);return}}),i.index++;return RCe.bind(i,o)}});var $M=$((R7e,oQ)=>{var GY=WM(),vCe=ZM(),PCe=XM();oQ.exports=GCe;oQ.exports.ascending=FY;oQ.exports.descending=FCe;function GCe(n,t,o,i){var e=vCe(n,o);return GY(n,t,e,function a(A,r){if(A){i(A,r);return}if(e.index++,e.index<(e.keyedList||n).length){GY(n,t,e,a);return}i(null,e.results)}),PCe.bind(e,i)}function FY(n,t){return nt?1:0}function FCe(n,t){return-1*FY(n,t)}});var UY=$((k7e,LY)=>{var LCe=$M();LY.exports=UCe;function UCe(n,t,o){return LCe(n,t,null,o)}});var KY=$((v7e,HY)=>{HY.exports={parallel:PY(),serial:UY(),serialOrdered:$M()}});var e_=$((P7e,xY)=>{"use strict";xY.exports=Object});var jY=$((G7e,YY)=>{"use strict";YY.exports=Error});var qY=$((F7e,JY)=>{"use strict";JY.exports=EvalError});var VY=$((L7e,zY)=>{"use strict";zY.exports=RangeError});var ZY=$((U7e,WY)=>{"use strict";WY.exports=ReferenceError});var $Y=$((H7e,XY)=>{"use strict";XY.exports=SyntaxError});var Kg=$((K7e,e1)=>{"use strict";e1.exports=TypeError});var t1=$((x7e,A1)=>{"use strict";A1.exports=URIError});var a1=$((Y7e,r1)=>{"use strict";r1.exports=Math.abs});var o1=$((j7e,i1)=>{"use strict";i1.exports=Math.floor});var s1=$((J7e,n1)=>{"use strict";n1.exports=Math.max});var c1=$((q7e,g1)=>{"use strict";g1.exports=Math.min});var l1=$((z7e,I1)=>{"use strict";I1.exports=Math.pow});var d1=$((V7e,p1)=>{"use strict";p1.exports=Math.round});var E1=$((W7e,h1)=>{"use strict";h1.exports=Number.isNaN||function(t){return t!==t}});var u1=$((Z7e,C1)=>{"use strict";var HCe=E1();C1.exports=function(t){return HCe(t)||t===0?t:t<0?-1:1}});var f1=$((X7e,B1)=>{"use strict";B1.exports=Object.getOwnPropertyDescriptor});var A_=$(($7e,Q1)=>{"use strict";var nQ=f1();if(nQ)try{nQ([],"length")}catch{nQ=null}Q1.exports=nQ});var t_=$((e$e,y1)=>{"use strict";var sQ=Object.defineProperty||!1;if(sQ)try{sQ({},"a",{value:1})}catch{sQ=!1}y1.exports=sQ});var r_=$((A$e,m1)=>{"use strict";m1.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var e=42;t[o]=e;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var A=Object.getOwnPropertySymbols(t);if(A.length!==1||A[0]!==o||!Object.prototype.propertyIsEnumerable.call(t,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(t,o);if(r.value!==e||r.enumerable!==!0)return!1}return!0}});var w1=$((t$e,D1)=>{"use strict";var S1=typeof Symbol<"u"&&Symbol,KCe=r_();D1.exports=function(){return typeof S1!="function"||typeof Symbol!="function"||typeof S1("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:KCe()}});var a_=$((r$e,O1)=>{"use strict";O1.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var i_=$((a$e,b1)=>{"use strict";var xCe=e_();b1.exports=xCe.getPrototypeOf||null});var T1=$((i$e,_1)=>{"use strict";var YCe="Function.prototype.bind called on incompatible ",jCe=Object.prototype.toString,JCe=Math.max,qCe="[object Function]",M1=function(t,o){for(var i=[],e=0;e{"use strict";var WCe=T1();N1.exports=Function.prototype.bind||WCe});var gQ=$((n$e,R1)=>{"use strict";R1.exports=Function.prototype.call});var o_=$((s$e,k1)=>{"use strict";k1.exports=Function.prototype.apply});var P1=$((g$e,v1)=>{"use strict";v1.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var F1=$((c$e,G1)=>{"use strict";var ZCe=SE(),XCe=o_(),$Ce=gQ(),eue=P1();G1.exports=eue||ZCe.call($Ce,XCe)});var n_=$((I$e,L1)=>{"use strict";var Aue=SE(),tue=Kg(),rue=gQ(),aue=F1();L1.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new tue("a function is required");return aue(Aue,rue,t)}});var j1=$((l$e,Y1)=>{"use strict";var iue=n_(),U1=A_(),K1;try{K1=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var s_=!!K1&&U1&&U1(Object.prototype,"__proto__"),x1=Object,H1=x1.getPrototypeOf;Y1.exports=s_&&typeof s_.get=="function"?iue([s_.get]):typeof H1=="function"?function(t){return H1(t==null?t:x1(t))}:!1});var W1=$((p$e,V1)=>{"use strict";var J1=a_(),q1=i_(),z1=j1();V1.exports=J1?function(t){return J1(t)}:q1?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return q1(t)}:z1?function(t){return z1(t)}:null});var cQ=$((d$e,Z1)=>{"use strict";var oue=Function.prototype.call,nue=Object.prototype.hasOwnProperty,sue=SE();Z1.exports=sue.call(oue,nue)});var bE=$((h$e,r3)=>{"use strict";var it,gue=e_(),cue=jY(),Iue=qY(),lue=VY(),pue=ZY(),Cp=$Y(),Ep=Kg(),due=t1(),hue=a1(),Eue=o1(),Cue=s1(),uue=c1(),Bue=l1(),fue=d1(),Que=u1(),A3=Function,g_=function(n){try{return A3('"use strict"; return ('+n+").constructor;")()}catch{}},DE=A_(),yue=t_(),c_=function(){throw new Ep},mue=DE?(function(){try{return arguments.callee,c_}catch{try{return DE(arguments,"callee").get}catch{return c_}}})():c_,dp=w1()(),$r=W1(),Sue=i_(),Due=a_(),t3=o_(),wE=gQ(),hp={},wue=typeof Uint8Array>"u"||!$r?it:$r(Uint8Array),lI={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?it:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?it:ArrayBuffer,"%ArrayIteratorPrototype%":dp&&$r?$r([][Symbol.iterator]()):it,"%AsyncFromSyncIteratorPrototype%":it,"%AsyncFunction%":hp,"%AsyncGenerator%":hp,"%AsyncGeneratorFunction%":hp,"%AsyncIteratorPrototype%":hp,"%Atomics%":typeof Atomics>"u"?it:Atomics,"%BigInt%":typeof BigInt>"u"?it:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?it:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?it:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?it:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":cue,"%eval%":eval,"%EvalError%":Iue,"%Float16Array%":typeof Float16Array>"u"?it:Float16Array,"%Float32Array%":typeof Float32Array>"u"?it:Float32Array,"%Float64Array%":typeof Float64Array>"u"?it:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?it:FinalizationRegistry,"%Function%":A3,"%GeneratorFunction%":hp,"%Int8Array%":typeof Int8Array>"u"?it:Int8Array,"%Int16Array%":typeof Int16Array>"u"?it:Int16Array,"%Int32Array%":typeof Int32Array>"u"?it:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":dp&&$r?$r($r([][Symbol.iterator]())):it,"%JSON%":typeof JSON=="object"?JSON:it,"%Map%":typeof Map>"u"?it:Map,"%MapIteratorPrototype%":typeof Map>"u"||!dp||!$r?it:$r(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":gue,"%Object.getOwnPropertyDescriptor%":DE,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?it:Promise,"%Proxy%":typeof Proxy>"u"?it:Proxy,"%RangeError%":lue,"%ReferenceError%":pue,"%Reflect%":typeof Reflect>"u"?it:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?it:Set,"%SetIteratorPrototype%":typeof Set>"u"||!dp||!$r?it:$r(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?it:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":dp&&$r?$r(""[Symbol.iterator]()):it,"%Symbol%":dp?Symbol:it,"%SyntaxError%":Cp,"%ThrowTypeError%":mue,"%TypedArray%":wue,"%TypeError%":Ep,"%Uint8Array%":typeof Uint8Array>"u"?it:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?it:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?it:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?it:Uint32Array,"%URIError%":due,"%WeakMap%":typeof WeakMap>"u"?it:WeakMap,"%WeakRef%":typeof WeakRef>"u"?it:WeakRef,"%WeakSet%":typeof WeakSet>"u"?it:WeakSet,"%Function.prototype.call%":wE,"%Function.prototype.apply%":t3,"%Object.defineProperty%":yue,"%Object.getPrototypeOf%":Sue,"%Math.abs%":hue,"%Math.floor%":Eue,"%Math.max%":Cue,"%Math.min%":uue,"%Math.pow%":Bue,"%Math.round%":fue,"%Math.sign%":Que,"%Reflect.getPrototypeOf%":Due};if($r)try{null.error}catch(n){X1=$r($r(n)),lI["%Error.prototype%"]=X1}var X1,Oue=function n(t){var o;if(t==="%AsyncFunction%")o=g_("async function () {}");else if(t==="%GeneratorFunction%")o=g_("function* () {}");else if(t==="%AsyncGeneratorFunction%")o=g_("async function* () {}");else if(t==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(o=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var e=n("%AsyncGenerator%");e&&$r&&(o=$r(e.prototype))}return lI[t]=o,o},$1={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},OE=SE(),IQ=cQ(),bue=OE.call(wE,Array.prototype.concat),Mue=OE.call(t3,Array.prototype.splice),e3=OE.call(wE,String.prototype.replace),lQ=OE.call(wE,String.prototype.slice),_ue=OE.call(wE,RegExp.prototype.exec),Tue=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Nue=/\\(\\)?/g,Rue=function(t){var o=lQ(t,0,1),i=lQ(t,-1);if(o==="%"&&i!=="%")throw new Cp("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&o!=="%")throw new Cp("invalid intrinsic syntax, expected opening `%`");var e=[];return e3(t,Tue,function(a,A,r,s){e[e.length]=r?e3(s,Nue,"$1"):A||a}),e},kue=function(t,o){var i=t,e;if(IQ($1,i)&&(e=$1[i],i="%"+e[0]+"%"),IQ(lI,i)){var a=lI[i];if(a===hp&&(a=Oue(i)),typeof a>"u"&&!o)throw new Ep("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:e,name:i,value:a}}throw new Cp("intrinsic "+t+" does not exist!")};r3.exports=function(t,o){if(typeof t!="string"||t.length===0)throw new Ep("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new Ep('"allowMissing" argument must be a boolean');if(_ue(/^%?[^%]*%?$/,t)===null)throw new Cp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Rue(t),e=i.length>0?i[0]:"",a=kue("%"+e+"%",o),A=a.name,r=a.value,s=!1,g=a.alias;g&&(e=g[0],Mue(i,bue([0,1],g)));for(var c=1,I=!0;c=i.length){var Q=DE(r,d);I=!!Q,I&&"get"in Q&&!("originalValue"in Q.get)?r=Q.get:r=r[d]}else I=IQ(r,d),r=r[d];I&&!s&&(lI[A]=r)}}return r}});var i3=$((E$e,a3)=>{"use strict";var vue=r_();a3.exports=function(){return vue()&&!!Symbol.toStringTag}});var s3=$((C$e,n3)=>{"use strict";var Pue=bE(),o3=Pue("%Object.defineProperty%",!0),Gue=i3()(),Fue=cQ(),Lue=Kg(),pQ=Gue?Symbol.toStringTag:null;n3.exports=function(t,o){var i=arguments.length>2&&!!arguments[2]&&arguments[2].force,e=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof i<"u"&&typeof i!="boolean"||typeof e<"u"&&typeof e!="boolean")throw new Lue("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");pQ&&(i||!Fue(t,pQ))&&(o3?o3(t,pQ,{configurable:!e,enumerable:!1,value:o,writable:!1}):t[pQ]=o)}});var c3=$((u$e,g3)=>{"use strict";g3.exports=function(n,t){return Object.keys(t).forEach(function(o){n[o]=n[o]||t[o]}),n}});var p3=$((B$e,l3)=>{"use strict";var d_=BY(),Uue=Xe("util"),I_=Xe("path"),Hue=Xe("http"),Kue=Xe("https"),xue=Xe("url").parse,Yue=Xe("fs"),jue=Xe("stream").Stream,Jue=Xe("crypto"),l_=DY(),que=KY(),zue=s3(),xg=cQ(),p_=c3();function I3(n){return String(n).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Et(n){if(!(this instanceof Et))return new Et(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],d_.call(this),n=n||{};for(var t in n)this[t]=n[t]}Uue.inherits(Et,d_);Et.LINE_BREAK=`\r -`;Et.DEFAULT_CONTENT_TYPE="application/octet-stream";Et.prototype.append=function(n,t,o){o=o||{},typeof o=="string"&&(o={filename:o});var i=d_.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var e=this._multiPartHeader(n,t,o),a=this._multiPartFooter();i(e),i(t),i(a),this._trackLength(e,t,o)};Et.prototype._trackLength=function(n,t,o){var i=0;o.knownLength!=null?i+=Number(o.knownLength):Buffer.isBuffer(t)?i=t.length:typeof t=="string"&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(n)+Et.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&xg(t,"httpVersion"))&&!(t instanceof jue))&&(o.knownLength||this._valuesToMeasure.push(t))};Et.prototype._lengthRetriever=function(n,t){xg(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?t(null,n.end+1-(n.start?n.start:0)):Yue.stat(n.path,function(o,i){if(o){t(o);return}var e=i.size-(n.start?n.start:0);t(null,e)}):xg(n,"httpVersion")?t(null,Number(n.headers["content-length"])):xg(n,"httpModule")?(n.on("response",function(o){n.pause(),t(null,Number(o.headers["content-length"]))}),n.resume()):t("Unknown stream")};Et.prototype._multiPartHeader=function(n,t,o){if(typeof o.header=="string")return o.header;var i=this._getContentDisposition(t,o),e=this._getContentType(t,o),a="",A={"Content-Disposition":["form-data",'name="'+I3(n)+'"'].concat(i||[]),"Content-Type":[].concat(e||[])};typeof o.header=="object"&&p_(A,o.header);var r;for(var s in A)if(xg(A,s)){if(r=A[s],r==null)continue;Array.isArray(r)||(r=[r]),r.length&&(a+=s+": "+r.join("; ")+Et.LINE_BREAK)}return"--"+this.getBoundary()+Et.LINE_BREAK+a+Et.LINE_BREAK};Et.prototype._getContentDisposition=function(n,t){var o;if(typeof t.filepath=="string"?o=I_.normalize(t.filepath).replace(/\\/g,"/"):t.filename||n&&(n.name||n.path)?o=I_.basename(t.filename||n&&(n.name||n.path)):n&&n.readable&&xg(n,"httpVersion")&&(o=I_.basename(n.client._httpMessage.path||"")),o)return'filename="'+I3(o)+'"'};Et.prototype._getContentType=function(n,t){var o=t.contentType;return!o&&n&&n.name&&(o=l_.lookup(n.name)),!o&&n&&n.path&&(o=l_.lookup(n.path)),!o&&n&&n.readable&&xg(n,"httpVersion")&&(o=n.headers["content-type"]),!o&&(t.filepath||t.filename)&&(o=l_.lookup(t.filepath||t.filename)),!o&&n&&typeof n=="object"&&(o=Et.DEFAULT_CONTENT_TYPE),o};Et.prototype._multiPartFooter=function(){return function(n){var t=Et.LINE_BREAK,o=this._streams.length===0;o&&(t+=this._lastBoundary()),n(t)}.bind(this)};Et.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Et.LINE_BREAK};Et.prototype.getHeaders=function(n){var t,o={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in n)xg(n,t)&&(o[t.toLowerCase()]=n[t]);return o};Et.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};Et.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Et.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),t=this.getBoundary(),o=0,i=this._streams.length;o{var fp=1e3,Qp=fp*60,yp=Qp*60,hI=yp*24,uBe=hI*7,BBe=hI*365.25;b3.exports=function(n,t){t=t||{};var o=typeof n;if(o==="string"&&n.length>0)return fBe(n);if(o==="number"&&isFinite(n))return t.long?yBe(n):QBe(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function fBe(n){if(n=String(n),!(n.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(t){var o=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return o*BBe;case"weeks":case"week":case"w":return o*uBe;case"days":case"day":case"d":return o*hI;case"hours":case"hour":case"hrs":case"hr":case"h":return o*yp;case"minutes":case"minute":case"mins":case"min":case"m":return o*Qp;case"seconds":case"second":case"secs":case"sec":case"s":return o*fp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function QBe(n){var t=Math.abs(n);return t>=hI?Math.round(n/hI)+"d":t>=yp?Math.round(n/yp)+"h":t>=Qp?Math.round(n/Qp)+"m":t>=fp?Math.round(n/fp)+"s":n+"ms"}function yBe(n){var t=Math.abs(n);return t>=hI?CQ(n,t,hI,"day"):t>=yp?CQ(n,t,yp,"hour"):t>=Qp?CQ(n,t,Qp,"minute"):t>=fp?CQ(n,t,fp,"second"):n+" ms"}function CQ(n,t,o,i){var e=t>=o*1.5;return Math.round(n/o)+" "+i+(e?"s":"")}});var __=$((yeA,_3)=>{function mBe(n){o.debug=o,o.default=o,o.coerce=s,o.disable=A,o.enable=e,o.enabled=r,o.humanize=M3(),o.destroy=g,Object.keys(n).forEach(c=>{o[c]=n[c]}),o.names=[],o.skips=[],o.formatters={};function t(c){let I=0;for(let d=0;d{if(J==="%%")return"%";G++;let q=o.formatters[L];if(typeof q=="function"){let j=y[G];J=q.call(m,j),y.splice(G,1),G--}return J}),o.formatArgs.call(m,y),(m.log||o.log).apply(m,y)}return Q.namespace=c,Q.useColors=o.useColors(),Q.color=o.selectColor(c),Q.extend=i,Q.destroy=o.destroy,Object.defineProperty(Q,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(B!==o.namespaces&&(B=o.namespaces,f=o.enabled(c)),f),set:y=>{d=y}}),typeof o.init=="function"&&o.init(Q),Q}function i(c,I){let d=o(this.namespace+(typeof I>"u"?":":I)+c);return d.log=this.log,d}function e(c){o.save(c),o.namespaces=c,o.names=[],o.skips=[];let I=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of I)d[0]==="-"?o.skips.push(d.slice(1)):o.names.push(d)}function a(c,I){let d=0,B=0,f=-1,Q=0;for(;d"-"+I)].join(",");return o.enable(""),c}function r(c){for(let I of o.skips)if(a(c,I))return!1;for(let I of o.names)if(a(c,I))return!0;return!1}function s(c){return c instanceof Error?c.stack||c.message:c}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}_3.exports=mBe});var T3=$((yi,uQ)=>{yi.formatArgs=DBe;yi.save=wBe;yi.load=OBe;yi.useColors=SBe;yi.storage=bBe();yi.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();yi.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function SBe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function DBe(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+uQ.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;n.splice(1,0,t,"color: inherit");let o=0,i=0;n[0].replace(/%[a-zA-Z%]/g,e=>{e!=="%%"&&(o++,e==="%c"&&(i=o))}),n.splice(i,0,t)}yi.log=console.debug||console.log||(()=>{});function wBe(n){try{n?yi.storage.setItem("debug",n):yi.storage.removeItem("debug")}catch{}}function OBe(){let n;try{n=yi.storage.getItem("debug")||yi.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function bBe(){try{return localStorage}catch{}}uQ.exports=__()(yi);var{formatters:MBe}=uQ.exports;MBe.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var R3=$((ea,fQ)=>{var _Be=Xe("tty"),BQ=Xe("util");ea.init=GBe;ea.log=kBe;ea.formatArgs=NBe;ea.save=vBe;ea.load=PBe;ea.useColors=TBe;ea.destroy=BQ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ea.colors=[6,2,3,4,5,1];try{let n=Xe("supports-color");n&&(n.stderr||n).level>=2&&(ea.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ea.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,t)=>{let o=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,a)=>a.toUpperCase()),i=process.env[t];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),n[o]=i,n},{});function TBe(){return"colors"in ea.inspectOpts?!!ea.inspectOpts.colors:_Be.isatty(process.stderr.fd)}function NBe(n){let{namespace:t,useColors:o}=this;if(o){let i=this.color,e="\x1B[3"+(i<8?i:"8;5;"+i),a=` ${e};1m${t} \x1B[0m`;n[0]=a+n[0].split(` +var Jge=Object.create;var xb=Object.defineProperty;var qge=Object.getOwnPropertyDescriptor;var zge=Object.getOwnPropertyNames;var Vge=Object.getPrototypeOf,Wge=Object.prototype.hasOwnProperty;var Xe=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var ue=(n,t)=>()=>(n&&(t=n(n=0)),t);var $=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),_r=(n,t)=>{for(var o in t)xb(n,o,{get:t[o],enumerable:!0})},Zge=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of zge(t))!Wge.call(n,e)&&e!==o&&xb(n,e,{get:()=>t[e],enumerable:!(i=qge(t,e))||i.enumerable});return n};var qe=(n,t,o)=>(o=n!=null?Jge(Vge(n)):{},Zge(t||!n||!n.__esModule?xb(o,"default",{value:n,enumerable:!0}):o,n));var GY=$((T$e,PY)=>{var vY=Xe("stream").Stream,jCe=Xe("util");PY.exports=an;function an(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}jCe.inherits(an,vY);an.create=function(n,t){var o=new this;t=t||{};for(var i in t)o[i]=t[i];o.source=n;var e=n.emit;return n.emit=function(){return o._handleEmit(arguments),e.apply(n,arguments)},n.on("error",function(){}),o.pauseStream&&n.pause(),o};Object.defineProperty(an.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});an.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};an.prototype.resume=function(){this._released||this.release(),this.source.resume()};an.prototype.pause=function(){this.source.pause()};an.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};an.prototype.pipe=function(){var n=vY.prototype.pipe.apply(this,arguments);return this.resume(),n};an.prototype._handleEmit=function(n){if(this._released){this.emit.apply(this,n);return}n[0]==="data"&&(this.dataSize+=n[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(n)};an.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(n))}}});var HY=$((N$e,UY)=>{var JCe=Xe("util"),LY=Xe("stream").Stream,FY=GY();UY.exports=hr;function hr(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}JCe.inherits(hr,LY);hr.create=function(n){var t=new this;n=n||{};for(var o in n)t[o]=n[o];return t};hr.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};hr.prototype.append=function(n){var t=hr.isStreamLike(n);if(t){if(!(n instanceof FY)){var o=FY.create(n,{maxDataSize:1/0,pauseStream:this.pauseStreams});n.on("data",this._checkDataSize.bind(this)),n=o}this._handleErrors(n),this.pauseStreams&&n.pause()}return this._streams.push(n),this};hr.prototype.pipe=function(n,t){return LY.prototype.pipe.call(this,n,t),this.resume(),n};hr.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};hr.prototype._realGetNext=function(){var n=this._streams.shift();if(typeof n>"u"){this.end();return}if(typeof n!="function"){this._pipeNext(n);return}var t=n;t(function(o){var i=hr.isStreamLike(o);i&&(o.on("data",this._checkDataSize.bind(this)),this._handleErrors(o)),this._pipeNext(o)}.bind(this))};hr.prototype._pipeNext=function(n){this._currentStream=n;var t=hr.isStreamLike(n);if(t){n.on("end",this._getNext.bind(this)),n.pipe(this,{end:!1});return}var o=n;this.write(o),this._getNext()};hr.prototype._handleErrors=function(n){var t=this;n.on("error",function(o){t._emitError(o)})};hr.prototype.write=function(n){this.emit("data",n)};hr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};hr.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};hr.prototype.end=function(){this._reset(),this.emit("end")};hr.prototype.destroy=function(){this._reset(),this.emit("close")};hr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};hr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};hr.prototype._updateDataSize=function(){this.dataSize=0;var n=this;this._streams.forEach(function(t){t.dataSize&&(n.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};hr.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var KY=$((R$e,qCe)=>{qCe.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var YY=$((k$e,xY)=>{xY.exports=KY()});var qY=$(yi=>{"use strict";var CQ=YY(),zCe=Xe("path").extname,jY=/^\s*([^;\s]*)(?:;|\s|$)/,VCe=/^text\//i;yi.charset=JY;yi.charsets={lookup:JY};yi.contentType=WCe;yi.extension=ZCe;yi.extensions=Object.create(null);yi.lookup=XCe;yi.types=Object.create(null);$Ce(yi.extensions,yi.types);function JY(n){if(!n||typeof n!="string")return!1;var t=jY.exec(n),o=t&&CQ[t[1].toLowerCase()];return o&&o.charset?o.charset:t&&VCe.test(t[1])?"UTF-8":!1}function WCe(n){if(!n||typeof n!="string")return!1;var t=n.indexOf("/")===-1?yi.lookup(n):n;if(!t)return!1;if(t.indexOf("charset")===-1){var o=yi.charset(t);o&&(t+="; charset="+o.toLowerCase())}return t}function ZCe(n){if(!n||typeof n!="string")return!1;var t=jY.exec(n),o=t&&yi.extensions[t[1].toLowerCase()];return!o||!o.length?!1:o[0]}function XCe(n){if(!n||typeof n!="string")return!1;var t=zCe("x."+n).toLowerCase().substr(1);return t&&yi.types[t]||!1}function $Ce(n,t){var o=["nginx","apache",void 0,"iana"];Object.keys(CQ).forEach(function(e){var a=CQ[e],A=a.extensions;if(!(!A||!A.length)){n[e]=A;for(var r=0;rc||g===c&&t[s].substr(0,12)==="application/"))continue}t[s]=e}}})}});var VY=$((P$e,zY)=>{zY.exports=eue;function eue(n){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(n):setTimeout(n,0)}});var c_=$((G$e,ZY)=>{var WY=VY();ZY.exports=Aue;function Aue(n){var t=!1;return WY(function(){t=!0}),function(i,e){t?n(i,e):WY(function(){n(i,e)})}}});var I_=$((F$e,XY)=>{XY.exports=tue;function tue(n){Object.keys(n.jobs).forEach(rue.bind(n)),n.jobs={}}function rue(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var l_=$((L$e,e1)=>{var $Y=c_(),aue=I_();e1.exports=iue;function iue(n,t,o,i){var e=o.keyedList?o.keyedList[o.index]:o.index;o.jobs[e]=oue(t,e,n[e],function(a,A){e in o.jobs&&(delete o.jobs[e],a?aue(o):o.results[e]=A,i(a,o.results))})}function oue(n,t,o,i){var e;return n.length==2?e=n(o,$Y(i)):e=n(o,t,$Y(i)),e}});var p_=$((U$e,A1)=>{A1.exports=nue;function nue(n,t){var o=!Array.isArray(n),i={index:0,keyedList:o||t?Object.keys(n):null,jobs:{},results:o?{}:[],size:o?Object.keys(n).length:n.length};return t&&i.keyedList.sort(o?t:function(e,a){return t(n[e],n[a])}),i}});var d_=$((H$e,t1)=>{var sue=I_(),gue=c_();t1.exports=cue;function cue(n){Object.keys(this.jobs).length&&(this.index=this.size,sue(this),gue(n)(null,this.results))}});var a1=$((K$e,r1)=>{var Iue=l_(),lue=p_(),pue=d_();r1.exports=due;function due(n,t,o){for(var i=lue(n);i.index<(i.keyedList||n).length;)Iue(n,t,i,function(e,a){if(e){o(e,a);return}if(Object.keys(i.jobs).length===0){o(null,i.results);return}}),i.index++;return pue.bind(i,o)}});var h_=$((x$e,uQ)=>{var i1=l_(),hue=p_(),Eue=d_();uQ.exports=Cue;uQ.exports.ascending=o1;uQ.exports.descending=uue;function Cue(n,t,o,i){var e=hue(n,o);return i1(n,t,e,function a(A,r){if(A){i(A,r);return}if(e.index++,e.index<(e.keyedList||n).length){i1(n,t,e,a);return}i(null,e.results)}),Eue.bind(e,i)}function o1(n,t){return nt?1:0}function uue(n,t){return-1*o1(n,t)}});var s1=$((Y$e,n1)=>{var Bue=h_();n1.exports=fue;function fue(n,t,o){return Bue(n,t,null,o)}});var c1=$((j$e,g1)=>{g1.exports={parallel:a1(),serial:s1(),serialOrdered:h_()}});var E_=$((J$e,I1)=>{"use strict";I1.exports=Object});var p1=$((q$e,l1)=>{"use strict";l1.exports=Error});var h1=$((z$e,d1)=>{"use strict";d1.exports=EvalError});var C1=$((V$e,E1)=>{"use strict";E1.exports=RangeError});var B1=$((W$e,u1)=>{"use strict";u1.exports=ReferenceError});var Q1=$((Z$e,f1)=>{"use strict";f1.exports=SyntaxError});var qg=$((X$e,y1)=>{"use strict";y1.exports=TypeError});var S1=$(($$e,m1)=>{"use strict";m1.exports=URIError});var w1=$((eeA,D1)=>{"use strict";D1.exports=Math.abs});var b1=$((AeA,O1)=>{"use strict";O1.exports=Math.floor});var _1=$((teA,M1)=>{"use strict";M1.exports=Math.max});var N1=$((reA,T1)=>{"use strict";T1.exports=Math.min});var k1=$((aeA,R1)=>{"use strict";R1.exports=Math.pow});var P1=$((ieA,v1)=>{"use strict";v1.exports=Math.round});var F1=$((oeA,G1)=>{"use strict";G1.exports=Number.isNaN||function(t){return t!==t}});var U1=$((neA,L1)=>{"use strict";var Que=F1();L1.exports=function(t){return Que(t)||t===0?t:t<0?-1:1}});var K1=$((seA,H1)=>{"use strict";H1.exports=Object.getOwnPropertyDescriptor});var C_=$((geA,x1)=>{"use strict";var BQ=K1();if(BQ)try{BQ([],"length")}catch{BQ=null}x1.exports=BQ});var u_=$((ceA,Y1)=>{"use strict";var fQ=Object.defineProperty||!1;if(fQ)try{fQ({},"a",{value:1})}catch{fQ=!1}Y1.exports=fQ});var B_=$((IeA,j1)=>{"use strict";j1.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var e=42;t[o]=e;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var A=Object.getOwnPropertySymbols(t);if(A.length!==1||A[0]!==o||!Object.prototype.propertyIsEnumerable.call(t,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(t,o);if(r.value!==e||r.enumerable!==!0)return!1}return!0}});var z1=$((leA,q1)=>{"use strict";var J1=typeof Symbol<"u"&&Symbol,yue=B_();q1.exports=function(){return typeof J1!="function"||typeof Symbol!="function"||typeof J1("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:yue()}});var f_=$((peA,V1)=>{"use strict";V1.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Q_=$((deA,W1)=>{"use strict";var mue=E_();W1.exports=mue.getPrototypeOf||null});var $1=$((heA,X1)=>{"use strict";var Sue="Function.prototype.bind called on incompatible ",Due=Object.prototype.toString,wue=Math.max,Oue="[object Function]",Z1=function(t,o){for(var i=[],e=0;e{"use strict";var _ue=$1();e3.exports=Function.prototype.bind||_ue});var QQ=$((CeA,A3)=>{"use strict";A3.exports=Function.prototype.call});var y_=$((ueA,t3)=>{"use strict";t3.exports=Function.prototype.apply});var a3=$((BeA,r3)=>{"use strict";r3.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var o3=$((feA,i3)=>{"use strict";var Tue=_E(),Nue=y_(),Rue=QQ(),kue=a3();i3.exports=kue||Tue.call(Rue,Nue)});var m_=$((QeA,n3)=>{"use strict";var vue=_E(),Pue=qg(),Gue=QQ(),Fue=o3();n3.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new Pue("a function is required");return Fue(vue,Gue,t)}});var p3=$((yeA,l3)=>{"use strict";var Lue=m_(),s3=C_(),c3;try{c3=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var S_=!!c3&&s3&&s3(Object.prototype,"__proto__"),I3=Object,g3=I3.getPrototypeOf;l3.exports=S_&&typeof S_.get=="function"?Lue([S_.get]):typeof g3=="function"?function(t){return g3(t==null?t:I3(t))}:!1});var u3=$((meA,C3)=>{"use strict";var d3=f_(),h3=Q_(),E3=p3();C3.exports=d3?function(t){return d3(t)}:h3?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return h3(t)}:E3?function(t){return E3(t)}:null});var yQ=$((SeA,B3)=>{"use strict";var Uue=Function.prototype.call,Hue=Object.prototype.hasOwnProperty,Kue=_E();B3.exports=Kue.call(Uue,Hue)});var kE=$((DeA,D3)=>{"use strict";var it,xue=E_(),Yue=p1(),jue=h1(),Jue=C1(),que=B1(),mp=Q1(),yp=qg(),zue=S1(),Vue=w1(),Wue=b1(),Zue=_1(),Xue=N1(),$ue=k1(),eBe=P1(),ABe=U1(),m3=Function,D_=function(n){try{return m3('"use strict"; return ('+n+").constructor;")()}catch{}},TE=C_(),tBe=u_(),w_=function(){throw new yp},rBe=TE?(function(){try{return arguments.callee,w_}catch{try{return TE(arguments,"callee").get}catch{return w_}}})():w_,fp=z1()(),ea=u3(),aBe=Q_(),iBe=f_(),S3=y_(),NE=QQ(),Qp={},oBe=typeof Uint8Array>"u"||!ea?it:ea(Uint8Array),uI={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?it:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?it:ArrayBuffer,"%ArrayIteratorPrototype%":fp&&ea?ea([][Symbol.iterator]()):it,"%AsyncFromSyncIteratorPrototype%":it,"%AsyncFunction%":Qp,"%AsyncGenerator%":Qp,"%AsyncGeneratorFunction%":Qp,"%AsyncIteratorPrototype%":Qp,"%Atomics%":typeof Atomics>"u"?it:Atomics,"%BigInt%":typeof BigInt>"u"?it:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?it:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?it:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?it:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Yue,"%eval%":eval,"%EvalError%":jue,"%Float16Array%":typeof Float16Array>"u"?it:Float16Array,"%Float32Array%":typeof Float32Array>"u"?it:Float32Array,"%Float64Array%":typeof Float64Array>"u"?it:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?it:FinalizationRegistry,"%Function%":m3,"%GeneratorFunction%":Qp,"%Int8Array%":typeof Int8Array>"u"?it:Int8Array,"%Int16Array%":typeof Int16Array>"u"?it:Int16Array,"%Int32Array%":typeof Int32Array>"u"?it:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fp&&ea?ea(ea([][Symbol.iterator]())):it,"%JSON%":typeof JSON=="object"?JSON:it,"%Map%":typeof Map>"u"?it:Map,"%MapIteratorPrototype%":typeof Map>"u"||!fp||!ea?it:ea(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":xue,"%Object.getOwnPropertyDescriptor%":TE,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?it:Promise,"%Proxy%":typeof Proxy>"u"?it:Proxy,"%RangeError%":Jue,"%ReferenceError%":que,"%Reflect%":typeof Reflect>"u"?it:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?it:Set,"%SetIteratorPrototype%":typeof Set>"u"||!fp||!ea?it:ea(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?it:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fp&&ea?ea(""[Symbol.iterator]()):it,"%Symbol%":fp?Symbol:it,"%SyntaxError%":mp,"%ThrowTypeError%":rBe,"%TypedArray%":oBe,"%TypeError%":yp,"%Uint8Array%":typeof Uint8Array>"u"?it:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?it:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?it:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?it:Uint32Array,"%URIError%":zue,"%WeakMap%":typeof WeakMap>"u"?it:WeakMap,"%WeakRef%":typeof WeakRef>"u"?it:WeakRef,"%WeakSet%":typeof WeakSet>"u"?it:WeakSet,"%Function.prototype.call%":NE,"%Function.prototype.apply%":S3,"%Object.defineProperty%":tBe,"%Object.getPrototypeOf%":aBe,"%Math.abs%":Vue,"%Math.floor%":Wue,"%Math.max%":Zue,"%Math.min%":Xue,"%Math.pow%":$ue,"%Math.round%":eBe,"%Math.sign%":ABe,"%Reflect.getPrototypeOf%":iBe};if(ea)try{null.error}catch(n){f3=ea(ea(n)),uI["%Error.prototype%"]=f3}var f3,nBe=function n(t){var o;if(t==="%AsyncFunction%")o=D_("async function () {}");else if(t==="%GeneratorFunction%")o=D_("function* () {}");else if(t==="%AsyncGeneratorFunction%")o=D_("async function* () {}");else if(t==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(o=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var e=n("%AsyncGenerator%");e&&ea&&(o=ea(e.prototype))}return uI[t]=o,o},Q3={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},RE=_E(),mQ=yQ(),sBe=RE.call(NE,Array.prototype.concat),gBe=RE.call(S3,Array.prototype.splice),y3=RE.call(NE,String.prototype.replace),SQ=RE.call(NE,String.prototype.slice),cBe=RE.call(NE,RegExp.prototype.exec),IBe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,lBe=/\\(\\)?/g,pBe=function(t){var o=SQ(t,0,1),i=SQ(t,-1);if(o==="%"&&i!=="%")throw new mp("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&o!=="%")throw new mp("invalid intrinsic syntax, expected opening `%`");var e=[];return y3(t,IBe,function(a,A,r,s){e[e.length]=r?y3(s,lBe,"$1"):A||a}),e},dBe=function(t,o){var i=t,e;if(mQ(Q3,i)&&(e=Q3[i],i="%"+e[0]+"%"),mQ(uI,i)){var a=uI[i];if(a===Qp&&(a=nBe(i)),typeof a>"u"&&!o)throw new yp("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:e,name:i,value:a}}throw new mp("intrinsic "+t+" does not exist!")};D3.exports=function(t,o){if(typeof t!="string"||t.length===0)throw new yp("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new yp('"allowMissing" argument must be a boolean');if(cBe(/^%?[^%]*%?$/,t)===null)throw new mp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=pBe(t),e=i.length>0?i[0]:"",a=dBe("%"+e+"%",o),A=a.name,r=a.value,s=!1,g=a.alias;g&&(e=g[0],gBe(i,sBe([0,1],g)));for(var c=1,I=!0;c=i.length){var Q=TE(r,d);I=!!Q,I&&"get"in Q&&!("originalValue"in Q.get)?r=Q.get:r=r[d]}else I=mQ(r,d),r=r[d];I&&!s&&(uI[A]=r)}}return r}});var O3=$((weA,w3)=>{"use strict";var hBe=B_();w3.exports=function(){return hBe()&&!!Symbol.toStringTag}});var _3=$((OeA,M3)=>{"use strict";var EBe=kE(),b3=EBe("%Object.defineProperty%",!0),CBe=O3()(),uBe=yQ(),BBe=qg(),DQ=CBe?Symbol.toStringTag:null;M3.exports=function(t,o){var i=arguments.length>2&&!!arguments[2]&&arguments[2].force,e=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof i<"u"&&typeof i!="boolean"||typeof e<"u"&&typeof e!="boolean")throw new BBe("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");DQ&&(i||!uBe(t,DQ))&&(b3?b3(t,DQ,{configurable:!e,enumerable:!1,value:o,writable:!1}):t[DQ]=o)}});var N3=$((beA,T3)=>{"use strict";T3.exports=function(n,t){return Object.keys(t).forEach(function(o){n[o]=n[o]||t[o]}),n}});var v3=$((MeA,k3)=>{"use strict";var __=HY(),fBe=Xe("util"),O_=Xe("path"),QBe=Xe("http"),yBe=Xe("https"),mBe=Xe("url").parse,SBe=Xe("fs"),DBe=Xe("stream").Stream,wBe=Xe("crypto"),b_=qY(),OBe=c1(),bBe=_3(),zg=yQ(),M_=N3();function R3(n){return String(n).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Et(n){if(!(this instanceof Et))return new Et(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],__.call(this),n=n||{};for(var t in n)this[t]=n[t]}fBe.inherits(Et,__);Et.LINE_BREAK=`\r +`;Et.DEFAULT_CONTENT_TYPE="application/octet-stream";Et.prototype.append=function(n,t,o){o=o||{},typeof o=="string"&&(o={filename:o});var i=__.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var e=this._multiPartHeader(n,t,o),a=this._multiPartFooter();i(e),i(t),i(a),this._trackLength(e,t,o)};Et.prototype._trackLength=function(n,t,o){var i=0;o.knownLength!=null?i+=Number(o.knownLength):Buffer.isBuffer(t)?i=t.length:typeof t=="string"&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(n)+Et.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&zg(t,"httpVersion"))&&!(t instanceof DBe))&&(o.knownLength||this._valuesToMeasure.push(t))};Et.prototype._lengthRetriever=function(n,t){zg(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?t(null,n.end+1-(n.start?n.start:0)):SBe.stat(n.path,function(o,i){if(o){t(o);return}var e=i.size-(n.start?n.start:0);t(null,e)}):zg(n,"httpVersion")?t(null,Number(n.headers["content-length"])):zg(n,"httpModule")?(n.on("response",function(o){n.pause(),t(null,Number(o.headers["content-length"]))}),n.resume()):t("Unknown stream")};Et.prototype._multiPartHeader=function(n,t,o){if(typeof o.header=="string")return o.header;var i=this._getContentDisposition(t,o),e=this._getContentType(t,o),a="",A={"Content-Disposition":["form-data",'name="'+R3(n)+'"'].concat(i||[]),"Content-Type":[].concat(e||[])};typeof o.header=="object"&&M_(A,o.header);var r;for(var s in A)if(zg(A,s)){if(r=A[s],r==null)continue;Array.isArray(r)||(r=[r]),r.length&&(a+=s+": "+r.join("; ")+Et.LINE_BREAK)}return"--"+this.getBoundary()+Et.LINE_BREAK+a+Et.LINE_BREAK};Et.prototype._getContentDisposition=function(n,t){var o;if(typeof t.filepath=="string"?o=O_.normalize(t.filepath).replace(/\\/g,"/"):t.filename||n&&(n.name||n.path)?o=O_.basename(t.filename||n&&(n.name||n.path)):n&&n.readable&&zg(n,"httpVersion")&&(o=O_.basename(n.client._httpMessage.path||"")),o)return'filename="'+R3(o)+'"'};Et.prototype._getContentType=function(n,t){var o=t.contentType;return!o&&n&&n.name&&(o=b_.lookup(n.name)),!o&&n&&n.path&&(o=b_.lookup(n.path)),!o&&n&&n.readable&&zg(n,"httpVersion")&&(o=n.headers["content-type"]),!o&&(t.filepath||t.filename)&&(o=b_.lookup(t.filepath||t.filename)),!o&&n&&typeof n=="object"&&(o=Et.DEFAULT_CONTENT_TYPE),o};Et.prototype._multiPartFooter=function(){return function(n){var t=Et.LINE_BREAK,o=this._streams.length===0;o&&(t+=this._lastBoundary()),n(t)}.bind(this)};Et.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Et.LINE_BREAK};Et.prototype.getHeaders=function(n){var t,o={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in n)zg(n,t)&&(o[t.toLowerCase()]=n[t]);return o};Et.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};Et.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Et.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),t=this.getBoundary(),o=0,i=this._streams.length;o{var wp=1e3,Op=wp*60,bp=Op*60,QI=bp*24,XBe=QI*7,$Be=QI*365.25;W3.exports=function(n,t){t=t||{};var o=typeof n;if(o==="string"&&n.length>0)return efe(n);if(o==="number"&&isFinite(n))return t.long?tfe(n):Afe(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function efe(n){if(n=String(n),!(n.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(t){var o=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return o*$Be;case"weeks":case"week":case"w":return o*XBe;case"days":case"day":case"d":return o*QI;case"hours":case"hour":case"hrs":case"hr":case"h":return o*bp;case"minutes":case"minute":case"mins":case"min":case"m":return o*Op;case"seconds":case"second":case"secs":case"sec":case"s":return o*wp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function Afe(n){var t=Math.abs(n);return t>=QI?Math.round(n/QI)+"d":t>=bp?Math.round(n/bp)+"h":t>=Op?Math.round(n/Op)+"m":t>=wp?Math.round(n/wp)+"s":n+"ms"}function tfe(n){var t=Math.abs(n);return t>=QI?MQ(n,t,QI,"day"):t>=bp?MQ(n,t,bp,"hour"):t>=Op?MQ(n,t,Op,"minute"):t>=wp?MQ(n,t,wp,"second"):n+" ms"}function MQ(n,t,o,i){var e=t>=o*1.5;return Math.round(n/o)+" "+i+(e?"s":"")}});var J_=$((NAA,X3)=>{function rfe(n){o.debug=o,o.default=o,o.coerce=s,o.disable=A,o.enable=e,o.enabled=r,o.humanize=Z3(),o.destroy=g,Object.keys(n).forEach(c=>{o[c]=n[c]}),o.names=[],o.skips=[],o.formatters={};function t(c){let I=0;for(let d=0;d{if(j==="%%")return"%";R++;let q=o.formatters[F];if(typeof q=="function"){let J=y[R];j=q.call(m,J),y.splice(R,1),R--}return j}),o.formatArgs.call(m,y),(m.log||o.log).apply(m,y)}return Q.namespace=c,Q.useColors=o.useColors(),Q.color=o.selectColor(c),Q.extend=i,Q.destroy=o.destroy,Object.defineProperty(Q,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(B!==o.namespaces&&(B=o.namespaces,f=o.enabled(c)),f),set:y=>{d=y}}),typeof o.init=="function"&&o.init(Q),Q}function i(c,I){let d=o(this.namespace+(typeof I>"u"?":":I)+c);return d.log=this.log,d}function e(c){o.save(c),o.namespaces=c,o.names=[],o.skips=[];let I=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of I)d[0]==="-"?o.skips.push(d.slice(1)):o.names.push(d)}function a(c,I){let d=0,B=0,f=-1,Q=0;for(;d"-"+I)].join(",");return o.enable(""),c}function r(c){for(let I of o.skips)if(a(c,I))return!1;for(let I of o.names)if(a(c,I))return!0;return!1}function s(c){return c instanceof Error?c.stack||c.message:c}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}X3.exports=rfe});var $3=$((mi,_Q)=>{mi.formatArgs=ife;mi.save=ofe;mi.load=nfe;mi.useColors=afe;mi.storage=sfe();mi.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();mi.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function afe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ife(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+_Q.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;n.splice(1,0,t,"color: inherit");let o=0,i=0;n[0].replace(/%[a-zA-Z%]/g,e=>{e!=="%%"&&(o++,e==="%c"&&(i=o))}),n.splice(i,0,t)}mi.log=console.debug||console.log||(()=>{});function ofe(n){try{n?mi.storage.setItem("debug",n):mi.storage.removeItem("debug")}catch{}}function nfe(){let n;try{n=mi.storage.getItem("debug")||mi.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function sfe(){try{return localStorage}catch{}}_Q.exports=J_()(mi);var{formatters:gfe}=_Q.exports;gfe.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Aj=$((Aa,NQ)=>{var cfe=Xe("tty"),TQ=Xe("util");Aa.init=Cfe;Aa.log=dfe;Aa.formatArgs=lfe;Aa.save=hfe;Aa.load=Efe;Aa.useColors=Ife;Aa.destroy=TQ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Aa.colors=[6,2,3,4,5,1];try{let n=Xe("supports-color");n&&(n.stderr||n).level>=2&&(Aa.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Aa.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,t)=>{let o=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,a)=>a.toUpperCase()),i=process.env[t];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),n[o]=i,n},{});function Ife(){return"colors"in Aa.inspectOpts?!!Aa.inspectOpts.colors:cfe.isatty(process.stderr.fd)}function lfe(n){let{namespace:t,useColors:o}=this;if(o){let i=this.color,e="\x1B[3"+(i<8?i:"8;5;"+i),a=` ${e};1m${t} \x1B[0m`;n[0]=a+n[0].split(` `).join(` -`+a),n.push(e+"m+"+fQ.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=RBe()+t+" "+n[0]}function RBe(){return ea.inspectOpts.hideDate?"":new Date().toISOString()+" "}function kBe(...n){return process.stderr.write(BQ.formatWithOptions(ea.inspectOpts,...n)+` -`)}function vBe(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function PBe(){return process.env.DEBUG}function GBe(n){n.inspectOpts={};let t=Object.keys(ea.inspectOpts);for(let o=0;ot.trim()).join(" ")};N3.O=function(n){return this.inspectOpts.colors=this.useColors,BQ.inspect(n,this.inspectOpts)}});var ct=$((meA,T_)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?T_.exports=T3():T_.exports=R3()});var k3=$(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});function FBe(n){return function(t,o){return new Promise((i,e)=>{n.call(this,t,o,(a,A)=>{a?e(a):i(A)})})}}N_.default=FBe});var G3=$((k_,P3)=>{"use strict";var v3=k_&&k_.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},LBe=Xe("events"),UBe=v3(ct()),HBe=v3(k3()),TE=UBe.default("agent-base");function KBe(n){return!!n&&typeof n.addRequest=="function"}function R_(){let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` -`).some(t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1)}function QQ(n,t){return new QQ.Agent(n,t)}(function(n){class t extends LBe.EventEmitter{constructor(i,e){super();let a=e;typeof i=="function"?this.callback=i:i&&(a=i),this.timeout=null,a&&typeof a.timeout=="number"&&(this.timeout=a.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:R_()?443:80}set defaultPort(i){this.explicitDefaultPort=i}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:R_()?"https:":"http:"}set protocol(i){this.explicitProtocol=i}callback(i,e,a){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(i,e){let a=Object.assign({},e);typeof a.secureEndpoint!="boolean"&&(a.secureEndpoint=R_()),a.host==null&&(a.host="localhost"),a.port==null&&(a.port=a.secureEndpoint?443:80),a.protocol==null&&(a.protocol=a.secureEndpoint?"https:":"http:"),a.host&&a.path&&delete a.path,delete a.agent,delete a.hostname,delete a._defaultAgent,delete a.defaultPort,delete a.createConnection,i._last=!0,i.shouldKeepAlive=!1;let A=!1,r=null,s=a.timeout||this.timeout,g=B=>{i._hadError||(i.emit("error",B),i._hadError=!0)},c=()=>{r=null,A=!0;let B=new Error(`A "socket" was not created for HTTP request before ${s}ms`);B.code="ETIMEOUT",g(B)},I=B=>{A||(r!==null&&(clearTimeout(r),r=null),g(B))},d=B=>{if(A)return;if(r!=null&&(clearTimeout(r),r=null),KBe(B)){TE("Callback returned another Agent instance %o",B.constructor.name),B.addRequest(i,a);return}if(B){B.once("free",()=>{this.freeSocket(B,a)}),i.onSocket(B);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${i.method} ${i.path}\``);g(f)};if(typeof this.callback!="function"){g(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(TE("Converting legacy callback function to promise"),this.promisifiedCallback=HBe.default(this.callback)):this.promisifiedCallback=this.callback),typeof s=="number"&&s>0&&(r=setTimeout(c,s)),"port"in a&&typeof a.port!="number"&&(a.port=Number(a.port));try{TE("Resolving socket for %o request: %o",a.protocol,`${i.method} ${i.path}`),Promise.resolve(this.promisifiedCallback(i,a)).then(d,I)}catch(B){Promise.reject(B).catch(I)}}freeSocket(i,e){TE("Freeing socket %o %o",i.constructor.name,e),i.destroy()}destroy(){TE("Destroying agent %o",this.constructor.name)}}n.Agent=t,n.prototype=n.Agent.prototype})(QQ||(QQ={}));P3.exports=QQ});var F3=$(RE=>{"use strict";var xBe=RE&&RE.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(RE,"__esModule",{value:!0});var YBe=xBe(ct()),NE=YBe.default("https-proxy-agent:parse-proxy-response");function jBe(n){return new Promise((t,o)=>{let i=0,e=[];function a(){let I=n.read();I?c(I):n.once("readable",a)}function A(){n.removeListener("end",s),n.removeListener("error",g),n.removeListener("close",r),n.removeListener("readable",a)}function r(I){NE("onclose had error %o",I)}function s(){NE("onend")}function g(I){A(),NE("onerror %o",I),o(I)}function c(I){e.push(I),i+=I.length;let d=Buffer.concat(e,i);if(d.indexOf(`\r +`+a),n.push(e+"m+"+NQ.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=pfe()+t+" "+n[0]}function pfe(){return Aa.inspectOpts.hideDate?"":new Date().toISOString()+" "}function dfe(...n){return process.stderr.write(TQ.formatWithOptions(Aa.inspectOpts,...n)+` +`)}function hfe(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function Efe(){return process.env.DEBUG}function Cfe(n){n.inspectOpts={};let t=Object.keys(Aa.inspectOpts);for(let o=0;ot.trim()).join(" ")};ej.O=function(n){return this.inspectOpts.colors=this.useColors,TQ.inspect(n,this.inspectOpts)}});var ct=$((RAA,q_)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?q_.exports=$3():q_.exports=Aj()});var tj=$(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});function ufe(n){return function(t,o){return new Promise((i,e)=>{n.call(this,t,o,(a,A)=>{a?e(a):i(A)})})}}z_.default=ufe});var ij=$((W_,aj)=>{"use strict";var rj=W_&&W_.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},Bfe=Xe("events"),ffe=rj(ct()),Qfe=rj(tj()),GE=ffe.default("agent-base");function yfe(n){return!!n&&typeof n.addRequest=="function"}function V_(){let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` +`).some(t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1)}function RQ(n,t){return new RQ.Agent(n,t)}(function(n){class t extends Bfe.EventEmitter{constructor(i,e){super();let a=e;typeof i=="function"?this.callback=i:i&&(a=i),this.timeout=null,a&&typeof a.timeout=="number"&&(this.timeout=a.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:V_()?443:80}set defaultPort(i){this.explicitDefaultPort=i}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:V_()?"https:":"http:"}set protocol(i){this.explicitProtocol=i}callback(i,e,a){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(i,e){let a=Object.assign({},e);typeof a.secureEndpoint!="boolean"&&(a.secureEndpoint=V_()),a.host==null&&(a.host="localhost"),a.port==null&&(a.port=a.secureEndpoint?443:80),a.protocol==null&&(a.protocol=a.secureEndpoint?"https:":"http:"),a.host&&a.path&&delete a.path,delete a.agent,delete a.hostname,delete a._defaultAgent,delete a.defaultPort,delete a.createConnection,i._last=!0,i.shouldKeepAlive=!1;let A=!1,r=null,s=a.timeout||this.timeout,g=B=>{i._hadError||(i.emit("error",B),i._hadError=!0)},c=()=>{r=null,A=!0;let B=new Error(`A "socket" was not created for HTTP request before ${s}ms`);B.code="ETIMEOUT",g(B)},I=B=>{A||(r!==null&&(clearTimeout(r),r=null),g(B))},d=B=>{if(A)return;if(r!=null&&(clearTimeout(r),r=null),yfe(B)){GE("Callback returned another Agent instance %o",B.constructor.name),B.addRequest(i,a);return}if(B){B.once("free",()=>{this.freeSocket(B,a)}),i.onSocket(B);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${i.method} ${i.path}\``);g(f)};if(typeof this.callback!="function"){g(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(GE("Converting legacy callback function to promise"),this.promisifiedCallback=Qfe.default(this.callback)):this.promisifiedCallback=this.callback),typeof s=="number"&&s>0&&(r=setTimeout(c,s)),"port"in a&&typeof a.port!="number"&&(a.port=Number(a.port));try{GE("Resolving socket for %o request: %o",a.protocol,`${i.method} ${i.path}`),Promise.resolve(this.promisifiedCallback(i,a)).then(d,I)}catch(B){Promise.reject(B).catch(I)}}freeSocket(i,e){GE("Freeing socket %o %o",i.constructor.name,e),i.destroy()}destroy(){GE("Destroying agent %o",this.constructor.name)}}n.Agent=t,n.prototype=n.Agent.prototype})(RQ||(RQ={}));aj.exports=RQ});var oj=$(LE=>{"use strict";var mfe=LE&&LE.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(LE,"__esModule",{value:!0});var Sfe=mfe(ct()),FE=Sfe.default("https-proxy-agent:parse-proxy-response");function Dfe(n){return new Promise((t,o)=>{let i=0,e=[];function a(){let I=n.read();I?c(I):n.once("readable",a)}function A(){n.removeListener("end",s),n.removeListener("error",g),n.removeListener("close",r),n.removeListener("readable",a)}function r(I){FE("onclose had error %o",I)}function s(){FE("onend")}function g(I){A(),FE("onerror %o",I),o(I)}function c(I){e.push(I),i+=I.length;let d=Buffer.concat(e,i);if(d.indexOf(`\r \r -`)===-1){NE("have not received end of HTTP headers yet..."),a();return}let f=d.toString("ascii",0,d.indexOf(`\r -`)),Q=+f.split(" ")[1];NE("got proxy server response: %o",f),t({statusCode:Q,buffered:d})}n.on("error",g),n.on("close",r),n.on("end",s),a()})}RE.default=jBe});var H3=$(EI=>{"use strict";var JBe=EI&&EI.__awaiter||function(n,t,o,i){function e(a){return a instanceof o?a:new o(function(A){A(a)})}return new(o||(o=Promise))(function(a,A){function r(c){try{g(i.next(c))}catch(I){A(I)}}function s(c){try{g(i.throw(c))}catch(I){A(I)}}function g(c){c.done?a(c.value):e(c.value).then(r,s)}g((i=i.apply(n,t||[])).next())})},mp=EI&&EI.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(EI,"__esModule",{value:!0});var L3=mp(Xe("net")),U3=mp(Xe("tls")),qBe=mp(Xe("url")),zBe=mp(Xe("assert")),VBe=mp(ct()),WBe=G3(),ZBe=mp(F3()),kE=VBe.default("https-proxy-agent:agent"),v_=class extends WBe.Agent{constructor(t){let o;if(typeof t=="string"?o=qBe.default.parse(t):o=t,!o)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");kE("creating new HttpsProxyAgent instance: %o",o),super(o);let i=Object.assign({},o);this.secureProxy=o.secureProxy||efe(i.protocol),i.host=i.hostname||i.host,typeof i.port=="string"&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in i)&&(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(t,o){return JBe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:e}=this,a;e?(kE("Creating `tls.Socket`: %o",i),a=U3.default.connect(i)):(kE("Creating `net.Socket`: %o",i),a=L3.default.connect(i));let A=Object.assign({},i.headers),s=`CONNECT ${`${o.host}:${o.port}`} HTTP/1.1\r -`;i.auth&&(A["Proxy-Authorization"]=`Basic ${Buffer.from(i.auth).toString("base64")}`);let{host:g,port:c,secureEndpoint:I}=o;$Be(c,I)||(g+=`:${c}`),A.Host=g,A.Connection="close";for(let y of Object.keys(A))s+=`${y}: ${A[y]}\r -`;let d=ZBe.default(a);a.write(`${s}\r -`);let{statusCode:B,buffered:f}=yield d;if(B===200){if(t.once("socket",XBe),o.secureEndpoint){kE("Upgrading socket connection to TLS");let y=o.servername||o.host;return U3.default.connect(Object.assign(Object.assign({},Afe(o,"host","hostname","path","port")),{socket:a,servername:y}))}return a}a.destroy();let Q=new L3.default.Socket({writable:!1});return Q.readable=!0,t.once("socket",y=>{kE("replaying proxy buffer for failed request"),zBe.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),Q})}};EI.default=v_;function XBe(n){n.resume()}function $Be(n,t){return!!(!t&&n===80||t&&n===443)}function efe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function Afe(n,...t){let o={},i;for(i in n)t.includes(i)||(o[i]=n[i]);return o}});var L_=$((F_,K3)=>{"use strict";var tfe=F_&&F_.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},P_=tfe(H3());function G_(n){return new P_.default(n)}(function(n){n.HttpsProxyAgent=P_.default,n.prototype=P_.default.prototype})(G_||(G_={}));K3.exports=G_});var Y3=$((OeA,x3)=>{var vE;x3.exports=function(){if(!vE){try{vE=ct()("follow-redirects")}catch{}typeof vE!="function"&&(vE=function(){})}vE.apply(null,arguments)}});var V3=$((beA,Z_)=>{var GE=Xe("url"),PE=GE.URL,rfe=Xe("http"),afe=Xe("https"),Y_=Xe("stream").Writable,j_=Xe("assert"),j3=Y3();(function(){var t=typeof process<"u",o=typeof window<"u"&&typeof document<"u",i=uI(Error.captureStackTrace);!t&&(o||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var J_=!1;try{j_(new PE(""))}catch(n){J_=n.code==="ERR_INVALID_URL"}var ife=["Authorization","Proxy-Authorization","Cookie"],ofe=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],q_=["abort","aborted","connect","error","socket","timeout"],z_=Object.create(null);q_.forEach(function(n){z_[n]=function(t,o,i){this._redirectable.emit(n,t,o,i)}});var H_=FE("ERR_INVALID_URL","Invalid URL",TypeError),K_=FE("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),nfe=FE("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",K_),sfe=FE("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),gfe=FE("ERR_STREAM_WRITE_AFTER_END","write after end"),cfe=Y_.prototype.destroy||q3;function mi(n,t){Y_.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var o=this;this._onNativeResponse=function(i){try{o._processResponse(i)}catch(e){o.emit("error",e instanceof K_?e:new K_({cause:e}))}},this._headerFilter=new RegExp("^(?:"+ife.concat(n.sensitiveHeaders).map(Efe).join("|")+")$","i"),this._performRequest()}mi.prototype=Object.create(Y_.prototype);mi.prototype.abort=function(){W_(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};mi.prototype.destroy=function(n){return W_(this._currentRequest,n),cfe.call(this,n),this};mi.prototype.write=function(n,t,o){if(this._ending)throw new gfe;if(!CI(n)&&!dfe(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(uI(t)&&(o=t,t=null),n.length===0){o&&o();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:t}),this._currentRequest.write(n,t,o)):(this.emit("error",new sfe),this.abort())};mi.prototype.end=function(n,t,o){if(uI(n)?(o=n,n=t=null):uI(t)&&(o=t,t=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,o);else{var i=this,e=this._currentRequest;this.write(n,t,function(){i._ended=!0,e.end(null,null,o)}),this._ending=!0}};mi.prototype.setHeader=function(n,t){this._options.headers[n]=t,this._currentRequest.setHeader(n,t)};mi.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};mi.prototype.setTimeout=function(n,t){var o=this;function i(A){A.setTimeout(n),A.removeListener("timeout",A.destroy),A.addListener("timeout",A.destroy)}function e(A){o._timeout&&clearTimeout(o._timeout),o._timeout=setTimeout(function(){o.emit("timeout"),a()},n),i(A)}function a(){o._timeout&&(clearTimeout(o._timeout),o._timeout=null),o.removeListener("abort",a),o.removeListener("error",a),o.removeListener("response",a),o.removeListener("close",a),t&&o.removeListener("timeout",t),o.socket||o._currentRequest.removeListener("socket",e)}return t&&this.on("timeout",t),this.socket?e(this.socket):this._currentRequest.once("socket",e),this.on("socket",i),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){mi.prototype[n]=function(t,o){return this._currentRequest[n](t,o)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(mi.prototype,n,{get:function(){return this._currentRequest[n]}})});mi.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),pfe(n.sensitiveHeaders)||(n.sensitiveHeaders=[]),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var t=n.path.indexOf("?");t<0?n.pathname=n.path:(n.pathname=n.path.substring(0,t),n.search=n.path.substring(t))}};mi.prototype._performRequest=function(){var n=this._options.protocol,t=this._options.nativeProtocols[n];if(!t)throw new TypeError("Unsupported protocol "+n);if(this._options.agents){var o=n.slice(0,-1);this._options.agent=this._options.agents[o]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var e of q_)i.on(e,z_[e]);if(this._currentUrl=/^\//.test(this._options.path)?GE.format(this._options):this._options.path,this._isRedirect){var a=0,A=this,r=this._requestBodyBuffers;(function s(g){if(i===A._currentRequest)if(g)A.emit("error",g);else if(a=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(W_(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new nfe;var i,e=this._options.beforeRedirect;e&&(i=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var a=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],U_(/^content-/i,this._options.headers));var A=U_(/^host$/i,this._options.headers),r=V_(this._currentUrl),s=A||r.host,g=/^\w+:/.test(o)?this._currentUrl:GE.format(Object.assign(r,{host:s})),c=Ife(o,g);if(j3("redirecting to",c.href),this._isRedirect=!0,x_(c,this._options),(c.protocol!==r.protocol&&c.protocol!=="https:"||c.host!==s&&!lfe(c.host,s))&&U_(this._headerFilter,this._options.headers),uI(e)){var I={headers:n.headers,statusCode:t},d={url:g,method:a,headers:i};e(this._options,I,d),this._sanitizeOptions(this._options)}this._performRequest()};function J3(n){var t={maxRedirects:21,maxBodyLength:10485760},o={};return Object.keys(n).forEach(function(i){var e=i+":",a=o[e]=n[i],A=t[i]=Object.create(a);function r(g,c,I){return hfe(g)?g=x_(g):CI(g)?g=x_(V_(g)):(I=c,c=z3(g),g={protocol:e}),uI(c)&&(I=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},g,c),c.nativeProtocols=o,!CI(c.host)&&!CI(c.hostname)&&(c.hostname="::1"),j_.equal(c.protocol,e,"protocol mismatch"),j3("options",c),new mi(c,I)}function s(g,c,I){var d=A.request(g,c,I);return d.end(),d}Object.defineProperties(A,{request:{value:r,configurable:!0,enumerable:!0,writable:!0},get:{value:s,configurable:!0,enumerable:!0,writable:!0}})}),t}function q3(){}function V_(n){var t;if(J_)t=new PE(n);else if(t=z3(GE.parse(n)),!CI(t.protocol))throw new H_({input:n});return t}function Ife(n,t){return J_?new PE(n,t):V_(GE.resolve(t,n))}function z3(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new H_({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new H_({input:n.href||n});return n}function x_(n,t){var o=t||{};for(var i of ofe)o[i]=n[i];return o.hostname.startsWith("[")&&(o.hostname=o.hostname.slice(1,-1)),o.port!==""&&(o.port=Number(o.port)),o.path=o.search?o.pathname+o.search:o.pathname,o}function U_(n,t){var o;for(var i in t)n.test(i)&&(o=t[i],delete t[i]);return o===null||typeof o>"u"?void 0:String(o).trim()}function FE(n,t,o){function i(e){uI(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,e||{}),this.code=n,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(o||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),i}function W_(n,t){for(var o of q_)n.removeListener(o,z_[o]);n.on("error",q3),n.destroy(t)}function lfe(n,t){j_(CI(n)&&CI(t));var o=n.length-t.length-1;return o>0&&n[o]==="."&&n.endsWith(t)}function pfe(n){return n instanceof Array}function CI(n){return typeof n=="string"||n instanceof String}function uI(n){return typeof n=="function"}function dfe(n){return typeof n=="object"&&"length"in n}function hfe(n){return PE&&n instanceof PE}function Efe(n){return n.replace(/[\]\\/()*+?.$]/g,"\\$&")}Z_.exports=J3({http:rfe,https:afe});Z_.exports.wrap=J3});var jj=$((qrA,Yj)=>{Yj.exports=Xe("util").inspect});var VE=$((zrA,IJ)=>{var MT=typeof Map=="function"&&Map.prototype,fT=Object.getOwnPropertyDescriptor&&MT?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,_Q=MT&&fT&&typeof fT.get=="function"?fT.get:null,Jj=MT&&Map.prototype.forEach,_T=typeof Set=="function"&&Set.prototype,QT=Object.getOwnPropertyDescriptor&&_T?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,TQ=_T&&QT&&typeof QT.get=="function"?QT.get:null,qj=_T&&Set.prototype.forEach,MQe=typeof WeakMap=="function"&&WeakMap.prototype,JE=MQe?WeakMap.prototype.has:null,_Qe=typeof WeakSet=="function"&&WeakSet.prototype,qE=_Qe?WeakSet.prototype.has:null,TQe=typeof WeakRef=="function"&&WeakRef.prototype,zj=TQe?WeakRef.prototype.deref:null,NQe=Boolean.prototype.valueOf,RQe=Object.prototype.toString,kQe=Function.prototype.toString,vQe=String.prototype.match,TT=String.prototype.slice,Jg=String.prototype.replace,PQe=String.prototype.toUpperCase,Vj=String.prototype.toLowerCase,aJ=RegExp.prototype.test,Wj=Array.prototype.concat,Yn=Array.prototype.join,GQe=Array.prototype.slice,Zj=Math.floor,ST=typeof BigInt=="function"?BigInt.prototype.valueOf:null,yT=Object.getOwnPropertySymbols,DT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Op=typeof Symbol=="function"&&typeof Symbol.iterator=="object",zE=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Op||!0)?Symbol.toStringTag:null,iJ=Object.prototype.propertyIsEnumerable,Xj=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function $j(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||aJ.call(/e/,t))return t;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-Zj(-n):Zj(n);if(i!==n){var e=String(i),a=TT.call(t,e.length+1);return Jg.call(e,o,"$&_")+"."+Jg.call(Jg.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Jg.call(t,o,"$&_")}var wT=jj(),eJ=wT.custom,AJ=sJ(eJ)?eJ:null,oJ={__proto__:null,double:'"',single:"'"},FQe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};IJ.exports=function n(t,o,i,e){var a=o||{};if(Js(a,"quoteStyle")&&!Js(oJ,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Js(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var A=Js(a,"customInspect")?a.customInspect:!0;if(typeof A!="boolean"&&A!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Js(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Js(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var r=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return cJ(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return r?$j(t,s):s}if(typeof t=="bigint"){var g=String(t)+"n";return r?$j(t,g):g}var c=typeof a.depth>"u"?5:a.depth;if(typeof i>"u"&&(i=0),i>=c&&c>0&&typeof t=="object")return OT(t)?"[Array]":"[Object]";var I=tye(a,i);if(typeof e>"u")e=[];else if(gJ(e,t)>=0)return"[Circular]";function d(Y,N,P){if(N&&(e=GQe.call(e),e.push(N)),P){var V={depth:a.depth};return Js(a,"quoteStyle")&&(V.quoteStyle=a.quoteStyle),n(Y,V,i+1,e)}return n(Y,a,i+1,e)}if(typeof t=="function"&&!tJ(t)){var B=qQe(t),f=MQ(t,d);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(f.length>0?" { "+Yn.call(f,", ")+" }":"")}if(sJ(t)){var Q=Op?Jg.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):DT.call(t);return typeof t=="object"&&!Op?jE(Q):Q}if($Qe(t)){for(var y="<"+Vj.call(String(t.nodeName)),m=t.attributes||[],_=0;_",y}if(OT(t)){if(t.length===0)return"[]";var T=MQ(t,d);return I&&!Aye(T)?"["+bT(T,I)+"]":"[ "+Yn.call(T,", ")+" ]"}if(HQe(t)){var G=MQ(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!iJ.call(t,"cause")?"{ ["+String(t)+"] "+Yn.call(Wj.call("[cause]: "+d(t.cause),G),", ")+" }":G.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Yn.call(G,", ")+" }"}if(typeof t=="object"&&A){if(AJ&&typeof t[AJ]=="function"&&wT)return wT(t,{depth:c-i});if(A!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(zQe(t)){var x=[];return Jj&&Jj.call(t,function(Y,N){x.push(d(N,t,!0)+" => "+d(Y,t))}),rJ("Map",_Q.call(t),x,I)}if(ZQe(t)){var J=[];return qj&&qj.call(t,function(Y){J.push(d(Y,t))}),rJ("Set",TQ.call(t),J,I)}if(VQe(t))return mT("WeakMap");if(XQe(t))return mT("WeakSet");if(WQe(t))return mT("WeakRef");if(xQe(t))return jE(d(Number(t)));if(jQe(t))return jE(d(ST.call(t)));if(YQe(t))return jE(NQe.call(t));if(KQe(t))return jE(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof global<"u"&&t===global)return"{ [object globalThis] }";if(!UQe(t)&&!tJ(t)){var L=MQ(t,d),q=Xj?Xj(t)===Object.prototype:t instanceof Object||t.constructor===Object,j=t instanceof Object?"":"null prototype",K=!q&&zE&&Object(t)===t&&zE in t?TT.call(qg(t),8,-1):j?"Object":"",v=q||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=v+(K||j?"["+Yn.call(Wj.call([],K||[],j||[]),": ")+"] ":"");return L.length===0?W+"{}":I?W+"{"+bT(L,I)+"}":W+"{ "+Yn.call(L,", ")+" }"}return String(t)};function nJ(n,t,o){var i=o.quoteStyle||t,e=oJ[i];return e+n+e}function LQe(n){return Jg.call(String(n),/"/g,""")}function fI(n){return!zE||!(typeof n=="object"&&(zE in n||typeof n[zE]<"u"))}function OT(n){return qg(n)==="[object Array]"&&fI(n)}function UQe(n){return qg(n)==="[object Date]"&&fI(n)}function tJ(n){return qg(n)==="[object RegExp]"&&fI(n)}function HQe(n){return qg(n)==="[object Error]"&&fI(n)}function KQe(n){return qg(n)==="[object String]"&&fI(n)}function xQe(n){return qg(n)==="[object Number]"&&fI(n)}function YQe(n){return qg(n)==="[object Boolean]"&&fI(n)}function sJ(n){if(Op)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!DT)return!1;try{return DT.call(n),!0}catch{}return!1}function jQe(n){if(!n||typeof n!="object"||!ST)return!1;try{return ST.call(n),!0}catch{}return!1}var JQe=Object.prototype.hasOwnProperty||function(n){return n in this};function Js(n,t){return JQe.call(n,t)}function qg(n){return RQe.call(n)}function qQe(n){if(n.name)return n.name;var t=vQe.call(kQe.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function gJ(n,t){if(n.indexOf)return n.indexOf(t);for(var o=0,i=n.length;ot.maxStringLength){var o=n.length-t.maxStringLength,i="... "+o+" more character"+(o>1?"s":"");return cJ(TT.call(n,0,t.maxStringLength),t)+i}var e=FQe[t.quoteStyle||"single"];e.lastIndex=0;var a=Jg.call(Jg.call(n,e,"\\$1"),/[\x00-\x1f]/g,eye);return nJ(a,"single",t)}function eye(n){var t=n.charCodeAt(0),o={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return o?"\\"+o:"\\x"+(t<16?"0":"")+PQe.call(t.toString(16))}function jE(n){return"Object("+n+")"}function mT(n){return n+" { ? }"}function rJ(n,t,o,i){var e=i?bT(o,i):Yn.call(o,", ");return n+" ("+t+") {"+e+"}"}function Aye(n){for(var t=0;t=0)return!1;return!0}function tye(n,t){var o;if(n.indent===" ")o=" ";else if(typeof n.indent=="number"&&n.indent>0)o=Yn.call(Array(n.indent+1)," ");else return null;return{base:o,prev:Yn.call(Array(t+1),o)}}function bT(n,t){if(n.length===0)return"";var o=` -`+t.prev+t.base;return o+Yn.call(n,","+o)+` -`+t.prev}function MQ(n,t){var o=OT(n),i=[];if(o){i.length=n.length;for(var e=0;e{"use strict";var rye=VE(),aye=Kg(),NQ=function(n,t,o){for(var i=n,e;(e=i.next)!=null;i=e)if(e.key===t)return i.next=e.next,o||(e.next=n.next,n.next=e),e},iye=function(n,t){if(n){var o=NQ(n,t);return o&&o.value}},oye=function(n,t,o){var i=NQ(n,t);i?i.value=o:n.next={key:t,next:n.next,value:o}},nye=function(n,t){return n?!!NQ(n,t):!1},sye=function(n,t){if(n)return NQ(n,t,!0)};lJ.exports=function(){var t,o={assert:function(i){if(!o.has(i))throw new aye("Side channel does not contain "+rye(i))},delete:function(i){var e=sye(t,i);return e&&t&&!t.next&&(t=void 0),!!e},get:function(i){return iye(t,i)},has:function(i){return nye(t,i)},set:function(i,e){t||(t={next:void 0}),oye(t,i,e)}};return o}});var NT=$((WrA,EJ)=>{"use strict";var dJ=bE(),hJ=n_(),gye=hJ([dJ("%String.prototype.indexOf%")]);EJ.exports=function(t,o){var i=dJ(t,!!o);return typeof i=="function"&&gye(t,".prototype.")>-1?hJ([i]):i}});var RT=$((ZrA,uJ)=>{"use strict";var cye=bE(),WE=NT(),Iye=VE(),lye=Kg(),CJ=cye("%Map%",!0),pye=WE("Map.prototype.get",!0),dye=WE("Map.prototype.set",!0),hye=WE("Map.prototype.has",!0),Eye=WE("Map.prototype.delete",!0),Cye=WE("Map.prototype.size",!0);uJ.exports=!!CJ&&function(){var t,o={assert:function(i){if(!o.has(i))throw new lye("Side channel does not contain "+Iye(i))},delete:function(i){if(t){var e=Eye(t,i);return Cye(t)===0&&(t=void 0),e}return!1},get:function(i){if(t)return pye(t,i)},has:function(i){return t?hye(t,i):!1},set:function(i,e){t||(t=new CJ),dye(t,i,e)}};return o}});var fJ=$((XrA,BJ)=>{"use strict";var uye=bE(),kQ=NT(),Bye=VE(),RQ=RT(),fye=Kg(),bp=uye("%WeakMap%",!0),Qye=kQ("WeakMap.prototype.get",!0),yye=kQ("WeakMap.prototype.set",!0),mye=kQ("WeakMap.prototype.has",!0),Sye=kQ("WeakMap.prototype.delete",!0);BJ.exports=bp?function(){var t,o,i={assert:function(e){if(!i.has(e))throw new fye("Side channel does not contain "+Bye(e))},delete:function(e){if(bp&&e&&(typeof e=="object"||typeof e=="function")){if(t)return Sye(t,e)}else if(RQ&&o)return o.delete(e);return!1},get:function(e){return bp&&e&&(typeof e=="object"||typeof e=="function")&&t?Qye(t,e):o&&o.get(e)},has:function(e){return bp&&e&&(typeof e=="object"||typeof e=="function")&&t?mye(t,e):!!o&&o.has(e)},set:function(e,a){bp&&e&&(typeof e=="object"||typeof e=="function")?(t||(t=new bp),yye(t,e,a)):RQ&&(o||(o=RQ()),o.set(e,a))}};return i}:RQ});var kT=$(($rA,QJ)=>{"use strict";var Dye=Kg(),wye=VE(),Oye=pJ(),bye=RT(),Mye=fJ(),_ye=Mye||bye||Oye;QJ.exports=function(){var t,o={assert:function(i){if(!o.has(i)){var e=i&&Object(i)===i?"the given object key":wye(i);throw new Dye("Side channel does not contain "+e)}},delete:function(i){return!!t&&t.delete(i)},get:function(i){return t&&t.get(i)},has:function(i){return!!t&&t.has(i)},set:function(i,e){t||(t=_ye()),t.set(i,e)}};return o}});var vQ=$((eaA,yJ)=>{"use strict";var Tye=String.prototype.replace,Nye=/%20/g,vT={RFC1738:"RFC1738",RFC3986:"RFC3986"};yJ.exports={default:vT.RFC3986,formatters:{RFC1738:function(n){return Tye.call(n,Nye,"+")},RFC3986:function(n){return String(n)}},RFC1738:vT.RFC1738,RFC3986:vT.RFC3986}});var LT=$((AaA,DJ)=>{"use strict";var Rye=vQ(),SJ=kT(),mJ=t_(),PT=Object.prototype.hasOwnProperty,QI=Array.isArray,GQ=SJ(),yI=function(t,o){return GQ.set(t,o),t},mI=function(t){return GQ.has(t)},ZE=function(t){return GQ.get(t)},GT=function(t,o){GQ.set(t,o)},jn=(function(){for(var n=[],t=0;t<256;++t)n[n.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return n})(),kye=function(t){for(;t.length>1;){var o=t.pop(),i=o.obj[o.prop];if(QI(i)){for(var e=[],a=0;a=i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return yI(Mp(t.concat(o),i),e)}t[e]=o}else if(t&&typeof t=="object")if(mI(t)){var a=ZE(t)+1;t[a]=o,GT(t,a)}else{if(i&&i.strictMerge)return[t,o];(i&&(i.plainObjects||i.allowPrototypes)||!PT.call(Object.prototype,o))&&(t[o]=!0)}else return[t,o];return t}if(!t||typeof t!="object"){if(mI(o)){for(var A=Object.keys(o),r=i&&i.plainObjects?{__proto__:null,0:t}:{0:t},s=0;si.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return yI(Mp(c,i),c.length-1)}return c}var I=t;if(QI(t)&&!QI(o)&&(I=Mp(t,i)),QI(t)&&QI(o)){if(o.forEach(function(d,B){if(PT.call(t,B)){var f=t[B];f&&typeof f=="object"&&d&&typeof d=="object"?t[B]=n(f,d,i):t[t.length]=d}else t[B]=d}),i&&typeof i.arrayLimit=="number"&&t.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return yI(Mp(t,i),t.length-1)}return t}return Object.keys(o).reduce(function(d,B){var f=o[B];if(PT.call(d,B)?FT(d,B,n(d[B],f,i)):FT(d,B,f),mI(o)&&!mI(d)&&yI(d,ZE(o)),mI(d)){var Q=parseInt(B,10);String(Q)===B&&Q>=0&&Q>ZE(d)&>(d,Q)}return d},I)},Pye=function(t,o){return Object.keys(o).reduce(function(i,e){return FT(i,e,o[e]),i},t)},Gye=function(n,t,o){var i=n.replace(/\+/g," ");if(o==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},PQ=1024,Fye=function(t,o,i,e,a){if(t.length===0)return t;var A=t;if(typeof t=="symbol"?A=Symbol.prototype.toString.call(t):typeof t!="string"&&(A=String(t)),i==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var r="",s=0;s=PQ?A.slice(s,s+PQ):A;if(s+PQ=55296&&c<=56319&&(g=g.slice(0,-1),s-=1)}for(var I=[],d=0;d=48&&B<=57||B>=65&&B<=90||B>=97&&B<=122||a===Rye.RFC1738&&(B===40||B===41)){I[I.length]=g.charAt(d);continue}if(B<128){I[I.length]=jn[B];continue}if(B<2048){I[I.length]=jn[192|B>>6]+jn[128|B&63];continue}if(B<55296||B>=57344){I[I.length]=jn[224|B>>12]+jn[128|B>>6&63]+jn[128|B&63];continue}d+=1,B=65536+((B&1023)<<10|g.charCodeAt(d)&1023),I[I.length]=jn[240|B>>18]+jn[128|B>>12&63]+jn[128|B>>6&63]+jn[128|B&63]}r+=I.join("")}return r},Lye=function(t){for(var o=[{obj:{o:t},prop:"o"}],i=SJ(),e=0;ei){if(a)throw new RangeError("Array limit exceeded. Only "+i+" element"+(i===1?"":"s")+" allowed in an array.");return yI(Mp(r,{plainObjects:e}),r.length-1)}return r},xye=function(t,o){if(QI(t)){for(var i=[],e=0;e{"use strict";var OJ=kT(),FQ=LT(),XE=vQ(),Yye=Object.prototype.hasOwnProperty,bJ={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,o){return t+"["+o+"]"},repeat:function(t){return t}},Jn=Array.isArray,jye=Array.prototype.push,MJ=function(n,t){jye.apply(n,Jn(t)?t:[t])},Jye=Date.prototype.toISOString,wJ=XE.default,_r={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:FQ.encode,encodeValuesOnly:!1,filter:void 0,format:wJ,formatter:XE.formatters[wJ],indices:!1,serializeDate:function(t){return Jye.call(t)},skipNulls:!1,strictNullHandling:!1},qye=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},UT={},zye=function n(t,o,i,e,a,A,r,s,g,c,I,d,B,f,Q,y,m,_){for(var T=t,G=_,x=0,J=!1;(G=G.get(UT))!==void 0&&!J;){var L=G.get(t);if(x+=1,typeof L<"u"){if(L===x)throw new RangeError("Cyclic object value");J=!0}typeof G.get(UT)>"u"&&(x=0)}if(typeof c=="function"?T=c(o,T):T instanceof Date?T=B(T):i==="comma"&&Jn(T)&&(T=FQ.maybeMap(T,function(ce){return ce instanceof Date?B(ce):ce})),T===null){if(A)return Q(g&&!y?g(o,_r.encoder,m,"key",f):o);T=""}if(qye(T)||FQ.isBuffer(T)){if(g){var q=y?o:g(o,_r.encoder,m,"key",f);return[Q(q)+"="+Q(g(T,_r.encoder,m,"value",f))]}return[Q(o)+"="+Q(String(T))]}var j=[];if(typeof T>"u")return j;var K;if(i==="comma"&&Jn(T))y&&g&&(T=FQ.maybeMap(T,function(ce){return ce==null?ce:g(ce)})),K=[{value:T.length>0?T.join(",")||null:void 0}];else if(Jn(c))K=c;else{var v=Object.keys(T);K=I?v.sort(I):v}var W=s?String(o).replace(/\./g,"%2E"):String(o),Y=e&&Jn(T)&&T.length===1?W+"[]":W;if(a&&Jn(T)&&T.length===0)return Y+"[]";for(var N=0;N"u"?t.encodeDotInKeys===!0?!0:_r.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:_r.addQueryPrefix,allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:_r.allowEmptyArrays,arrayFormat:A,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:_r.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?_r.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:_r.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:_r.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:_r.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:_r.encodeValuesOnly,filter:a,format:i,formatter:e,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:_r.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:_r.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:_r.strictNullHandling}};_J.exports=function(n,t){var o=n,i=Vye(t),e,a;typeof i.filter=="function"?(a=i.filter,o=a("",o)):Jn(i.filter)&&(a=i.filter,e=a);var A=[];if(typeof o!="object"||o===null)return"";var r=bJ[i.arrayFormat],s=r==="comma"&&i.commaRoundTrip;e||(e=Object.keys(o)),i.sort&&e.sort(i.sort);for(var g=OJ(),c=0;c"u"||I===null)){var d=o[I];i.skipNulls&&d===null||MJ(A,zye(d,I,r,s,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,g))}}var B=A.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B"+i.delimiter:f+="utf8=%E2%9C%93"+i.delimiter),B.length>0?f+B:""}});var kJ=$((raA,RJ)=>{"use strict";var qn=LT(),LQ=Object.prototype.hasOwnProperty,HT=Array.isArray,ir={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:qn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},Wye=function(n){return n.replace(/&#(\d+);/g,function(t,o){return String.fromCharCode(parseInt(o,10))})},NJ=function(n,t,o,i){if(n&&typeof n=="string"&&t.comma&&n.indexOf(",")>-1){if(i&&t.throwOnLimitExceeded)for(var e=0,a=n.indexOf(",");a>-1;){if(e+=1,e>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");a=n.indexOf(",",a+1)}return n.split(",")}if(t.throwOnLimitExceeded&&o>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return n},Zye="utf8=%26%2310003%3B",Xye="utf8=%E2%9C%93",$ye=function(t,o){var i={__proto__:null},e=o.ignoreQueryPrefix?t.replace(/^\?/,""):t;e=e.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=o.parameterLimit===1/0?void 0:o.parameterLimit,A=e.split(o.delimiter,o.throwOnLimitExceeded&&typeof a<"u"?a+1:a);if(o.throwOnLimitExceeded&&typeof a<"u"&&A.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var r=-1,s,g=o.charset;if(o.charsetSentinel)for(s=0;s-1&&(f=HT(f)?[f]:f),o.comma&&HT(f)&&f.length>o.arrayLimit&&(f=qn.combine([],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded)),B!==null){var Q=LQ.call(i,B);Q&&(o.duplicates==="combine"||c.indexOf("[]=")>-1)?i[B]=qn.combine(i[B],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded):(!Q||o.duplicates==="last")&&(i[B]=f)}}return i},eme=function(n,t,o,i){var e=0;if(n.length>0&&n[n.length-1]==="[]"){var a=n.slice(0,-1).join("");e=Array.isArray(t)&&t[a]?t[a].length:0}for(var A=i?t:NJ(t,o,e),r=n.length-1;r>=0;--r){var s,g=n[r];if(g==="[]"&&o.parseArrays)qn.isOverflow(A)?s=A:s=o.allowEmptyArrays&&(A===""||o.strictNullHandling&&A===null)?[]:qn.combine([],A,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded);else{s=o.plainObjects?{__proto__:null}:{};var c=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,I=o.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(I,10),B=!isNaN(d)&&g!==I&&String(d)===I&&d>=0&&o.parseArrays;if(!o.parseArrays&&I==="")s={0:A};else if(B&&d=0?i.slice(0,a):i;if(A){if(!o.plainObjects&&LQ.call(Object.prototype,A)&&!o.allowPrototypes)return;e[e.length]=A}for(var r=i.length,s=a,g=0;s>=0&&g=0){if(o.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");e[e.length]="["+i.slice(s)+"]"}return e},tme=function(t,o,i,e){if(t){var a=Ame(t,i);if(a)return eme(a,o,i,e)}},rme=function(t){if(!t)return ir;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var o=typeof t.charset>"u"?ir.charset:t.charset,i=typeof t.duplicates>"u"?ir.duplicates:t.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var e=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ir.allowDots:!!t.allowDots;return{allowDots:e,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ir.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ir.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ir.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ir.arrayLimit,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ir.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ir.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ir.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ir.decoder,delimiter:typeof t.delimiter=="string"||qn.isRegExp(t.delimiter)?t.delimiter:ir.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ir.depth,duplicates:i,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ir.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ir.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ir.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:ir.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:ir.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ir.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}};RJ.exports=function(n,t){var o=rme(t);if(n===""||n===null||typeof n>"u")return o.plainObjects?{__proto__:null}:{};for(var i=typeof n=="string"?$ye(n,o):n,e=o.plainObjects?{__proto__:null}:{},a=Object.keys(i),A=0;A{"use strict";var ame=TJ(),ime=kJ(),ome=vQ();vJ.exports={formats:ome,parse:ime,stringify:ame}});var FJ=$((iaA,GJ)=>{function nme(n){return n}GJ.exports=nme});var Qq=$(($E,Tp)=>{var sme=200,gme="Expected a function",$T="__lodash_hash_undefined__",JQ=1,Np=2,zJ=1/0,VJ=9007199254740991,UQ="[object Arguments]",YT="[object Array]",WJ="[object Boolean]",ZJ="[object Date]",XJ="[object Error]",$J="[object Function]",cme="[object GeneratorFunction]",HQ="[object Map]",eq="[object Number]",_p="[object Object]",LJ="[object Promise]",Aq="[object RegExp]",KQ="[object Set]",tq="[object String]",rq="[object Symbol]",jT="[object WeakMap]",aq="[object ArrayBuffer]",xQ="[object DataView]",Ime="[object Float32Array]",lme="[object Float64Array]",pme="[object Int8Array]",dme="[object Int16Array]",hme="[object Int32Array]",Eme="[object Uint8Array]",Cme="[object Uint8ClampedArray]",ume="[object Uint16Array]",Bme="[object Uint32Array]",fme=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qme=/^\w*$/,yme=/^\./,mme=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sme=/[\\^$.*+?()[\]{}|]/g,Dme=/\\(\\)?/g,wme=/^\[object .+?Constructor\]$/,Ome=/^(?:0|[1-9]\d*)$/,Ut={};Ut[Ime]=Ut[lme]=Ut[pme]=Ut[dme]=Ut[hme]=Ut[Eme]=Ut[Cme]=Ut[ume]=Ut[Bme]=!0;Ut[UQ]=Ut[YT]=Ut[aq]=Ut[WJ]=Ut[xQ]=Ut[ZJ]=Ut[XJ]=Ut[$J]=Ut[HQ]=Ut[eq]=Ut[_p]=Ut[Aq]=Ut[KQ]=Ut[tq]=Ut[jT]=!1;var iq=typeof global=="object"&&global&&global.Object===Object&&global,bme=typeof self=="object"&&self&&self.Object===Object&&self,Wg=iq||bme||Function("return this")(),oq=typeof $E=="object"&&$E&&!$E.nodeType&&$E,UJ=oq&&typeof Tp=="object"&&Tp&&!Tp.nodeType&&Tp,Mme=UJ&&UJ.exports===oq,HJ=Mme&&iq.process,KJ=(function(){try{return HJ&&HJ.binding("util")}catch{}})(),xJ=KJ&&KJ.isTypedArray;function nq(n,t){for(var o=-1,i=t.length,e=n.length;++o-1}function aSe(n,t){var o=this.__data__,i=zQ(o,n);return i<0?o.push([n,t]):o[i][1]=t,this}zs.prototype.clear=eSe;zs.prototype.delete=ASe;zs.prototype.get=tSe;zs.prototype.has=rSe;zs.prototype.set=aSe;function Vs(n){var t=-1,o=n?n.length:0;for(this.clear();++tr))return!1;var g=a.get(n);if(g&&a.get(t))return g==t;var c=-1,I=!0,d=e&JQ?new jQ:void 0;for(a.set(n,t),a.set(t,n);++c-1&&n%1==0&&n-1&&n%1==0&&n<=VJ}function tC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function XQ(n){return!!n&&typeof n=="object"}function i0(n){return typeof n=="symbol"||XQ(n)&&Rp.call(n)==rq}var YSe=xJ?Rme(xJ):mSe;function jSe(n){return n==null?"":TSe(n)}function JSe(n,t,o){var i=n==null?void 0:cq(n,t);return i===void 0?o:i}function qSe(n,t){return n!=null&&FSe(n,t,BSe)}function XT(n){return r0(n)?gq(n):DSe(n)}function zSe(n){return r0(n)?gq(n,!0):wSe(n)}function VSe(n,t){return n==null?{}:MSe(n,kSe(n),SSe(t))}function WSe(n){return n}function ZSe(n){return WQ(n)?Tme(ZQ(n)):_Se(n)}function fq(){return[]}Tp.exports=VSe});var Wq=$((rC,vp)=>{var XSe=200,Tq="__lodash_hash_undefined__",$Se=800,eDe=16,Nq=9007199254740991,Rq="[object Arguments]",ADe="[object Array]",tDe="[object AsyncFunction]",rDe="[object Boolean]",aDe="[object Date]",iDe="[object Error]",kq="[object Function]",oDe="[object GeneratorFunction]",nDe="[object Map]",sDe="[object Number]",gDe="[object Null]",vq="[object Object]",cDe="[object Proxy]",IDe="[object RegExp]",lDe="[object Set]",pDe="[object String]",dDe="[object Undefined]",hDe="[object WeakMap]",EDe="[object ArrayBuffer]",CDe="[object DataView]",uDe="[object Float32Array]",BDe="[object Float64Array]",fDe="[object Int8Array]",QDe="[object Int16Array]",yDe="[object Int32Array]",mDe="[object Uint8Array]",SDe="[object Uint8ClampedArray]",DDe="[object Uint16Array]",wDe="[object Uint32Array]",ODe=/[\\^$.*+?()[\]{}|]/g,bDe=/^\[object .+?Constructor\]$/,MDe=/^(?:0|[1-9]\d*)$/,Ht={};Ht[uDe]=Ht[BDe]=Ht[fDe]=Ht[QDe]=Ht[yDe]=Ht[mDe]=Ht[SDe]=Ht[DDe]=Ht[wDe]=!0;Ht[Rq]=Ht[ADe]=Ht[EDe]=Ht[rDe]=Ht[CDe]=Ht[aDe]=Ht[iDe]=Ht[kq]=Ht[nDe]=Ht[sDe]=Ht[vq]=Ht[IDe]=Ht[lDe]=Ht[pDe]=Ht[hDe]=!1;var Pq=typeof global=="object"&&global&&global.Object===Object&&global,_De=typeof self=="object"&&self&&self.Object===Object&&self,oC=Pq||_De||Function("return this")(),Gq=typeof rC=="object"&&rC&&!rC.nodeType&&rC,aC=Gq&&typeof vp=="object"&&vp&&!vp.nodeType&&vp,Fq=aC&&aC.exports===Gq,o0=Fq&&Pq.process,yq=(function(){try{var n=aC&&aC.require&&aC.require("util").types;return n||o0&&o0.binding&&o0.binding("util")}catch{}})(),mq=yq&&yq.isTypedArray;function TDe(n,t,o){switch(o.length){case 0:return n.call(t);case 1:return n.call(t,o[0]);case 2:return n.call(t,o[0],o[1]);case 3:return n.call(t,o[0],o[1],o[2])}return n.apply(t,o)}function NDe(n,t){for(var o=-1,i=Array(n);++o-1}function ewe(n,t){var o=this.__data__,i=ry(o,n);return i<0?(++this.size,o.push([n,t])):o[i][1]=t,this}Zs.prototype.clear=WDe;Zs.prototype.delete=ZDe;Zs.prototype.get=XDe;Zs.prototype.has=$De;Zs.prototype.set=ewe;function Pp(n){var t=-1,o=n==null?0:n.length;for(this.clear();++t1?o[e-1]:void 0,A=e>2?o[2]:void 0;for(a=n.length>3&&typeof a=="function"?(e--,a):void 0,A&&Mwe(o[0],o[1],A)&&(a=e<3?void 0:a,e=1),t=Object(t);++i-1&&n%1==0&&n0){if(++t>=$Se)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function Gwe(n){if(n!=null){try{return ty.call(n)}catch{}try{return n+""}catch{}}return""}function oy(n,t){return n===t||n!==n&&t!==t}var c0=_q((function(){return arguments})())?_q:function(n){return nC(n)&&Ws.call(n,"callee")&&!UDe.call(n,"callee")},I0=Array.isArray;function d0(n){return n!=null&&Jq(n.length)&&!h0(n)}function Fwe(n){return nC(n)&&d0(n)}var jq=KDe||xwe;function h0(n){if(!bI(n))return!1;var t=ay(n);return t==kq||t==oDe||t==tDe||t==cDe}function Jq(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Nq}function bI(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function nC(n){return n!=null&&typeof n=="object"}function Lwe(n){if(!nC(n)||ay(n)!=vq)return!1;var t=Uq(n);if(t===null)return!0;var o=Ws.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&ty.call(o)==FDe}var qq=mq?RDe(mq):hwe;function Uwe(n){return Swe(n,zq(n))}function zq(n){return d0(n)?Iwe(n,!0):Ewe(n)}var Hwe=Dwe(function(n,t,o){Kq(n,t,o)});function Kwe(n){return function(){return n}}function Vq(n){return n}function xwe(){return!1}vp.exports=Hwe});var Xs=$((oaA,$q)=>{"use strict";var Zq=["nodebuffer","arraybuffer","fragments"],Xq=typeof Blob<"u";Xq&&Zq.push("blob");$q.exports={BINARY_TYPES:Zq,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Xq,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var sC=$((naA,ny)=>{"use strict";var{EMPTY_BUFFER:Ywe}=Xs(),E0=Buffer[Symbol.species];function jwe(n,t){if(n.length===0)return Ywe;if(n.length===1)return n[0];let o=Buffer.allocUnsafe(t),i=0;for(let e=0;e{"use strict";var t4=Symbol("kDone"),u0=Symbol("kRun"),B0=class{constructor(t){this[t4]=()=>{this.pending--,this[u0]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[u0]()}[u0](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[t4])}}};r4.exports=B0});var Up=$((gaA,s4)=>{"use strict";var gC=Xe("zlib"),i4=sC(),qwe=a4(),{kStatusCode:o4}=Xs(),zwe=Buffer[Symbol.species],Vwe=Buffer.from([0,0,255,255]),gy=Symbol("permessage-deflate"),$s=Symbol("total-length"),Fp=Symbol("callback"),Zg=Symbol("buffers"),Lp=Symbol("error"),sy,f0=class{constructor(t){if(this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!sy){let o=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;sy=new qwe(o)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[Fp];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let o=this._options,i=t.find(e=>!(o.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(o.serverMaxWindowBits===!1||typeof o.serverMaxWindowBits=="number"&&o.serverMaxWindowBits>e.server_max_window_bits)||typeof o.clientMaxWindowBits=="number"&&(typeof e.client_max_window_bits=="number"?o.clientMaxWindowBits>e.client_max_window_bits:!e.client_max_window_bits)));if(!i)throw new Error("None of the extension offers can be accepted");return o.serverNoContextTakeover&&(i.server_no_context_takeover=!0),o.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof o.serverMaxWindowBits=="number"&&(i.server_max_window_bits=o.serverMaxWindowBits),typeof o.clientMaxWindowBits=="number"?i.client_max_window_bits=o.clientMaxWindowBits:(i.client_max_window_bits===!0||o.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(t){let o=t[0];if(this._options.clientNoContextTakeover===!1&&o.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!o.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(o.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&o.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return o}normalizeParams(t){return t.forEach(o=>{Object.keys(o).forEach(i=>{let e=o[i];if(e.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(e=e[0],i==="client_max_window_bits"){if(e!==!0){let a=+e;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${e}`);e=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${e}`)}else if(i==="server_max_window_bits"){let a=+e;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${e}`);e=a}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(e!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${e}`)}else throw new Error(`Unknown parameter "${i}"`);o[i]=e})}),t}decompress(t,o,i){sy.add(e=>{this._decompress(t,o,(a,A)=>{e(),i(a,A)})})}compress(t,o,i){sy.add(e=>{this._compress(t,o,(a,A)=>{e(),i(a,A)})})}_decompress(t,o,i){let e=this._isServer?"client":"server";if(!this._inflate){let a=`${e}_max_window_bits`,A=typeof this.params[a]!="number"?gC.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=gC.createInflateRaw({...this._options.zlibInflateOptions,windowBits:A}),this._inflate[gy]=this,this._inflate[$s]=0,this._inflate[Zg]=[],this._inflate.on("error",Zwe),this._inflate.on("data",n4)}this._inflate[Fp]=i,this._inflate.write(t),o&&this._inflate.write(Vwe),this._inflate.flush(()=>{let a=this._inflate[Lp];if(a){this._inflate.close(),this._inflate=null,i(a);return}let A=i4.concat(this._inflate[Zg],this._inflate[$s]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[$s]=0,this._inflate[Zg]=[],o&&this.params[`${e}_no_context_takeover`]&&this._inflate.reset()),i(null,A)})}_compress(t,o,i){let e=this._isServer?"server":"client";if(!this._deflate){let a=`${e}_max_window_bits`,A=typeof this.params[a]!="number"?gC.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=gC.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:A}),this._deflate[$s]=0,this._deflate[Zg]=[],this._deflate.on("data",Wwe)}this._deflate[Fp]=i,this._deflate.write(t),this._deflate.flush(gC.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=i4.concat(this._deflate[Zg],this._deflate[$s]);o&&(a=new zwe(a.buffer,a.byteOffset,a.length-4)),this._deflate[Fp]=null,this._deflate[$s]=0,this._deflate[Zg]=[],o&&this.params[`${e}_no_context_takeover`]&&this._deflate.reset(),i(null,a)})}};s4.exports=f0;function Wwe(n){this[Zg].push(n),this[$s]+=n.length}function n4(n){if(this[$s]+=n.length,this[gy]._maxPayload<1||this[$s]<=this[gy]._maxPayload){this[Zg].push(n);return}this[Lp]=new RangeError("Max payload size exceeded"),this[Lp].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Lp][o4]=1009,this.removeListener("data",n4),this.reset()}function Zwe(n){if(this[gy]._inflate=null,this[Lp]){this[Fp](this[Lp]);return}n[o4]=1007,this[Fp](n)}});var Hp=$((caA,cy)=>{"use strict";var{isUtf8:g4}=Xe("buffer"),{hasBlob:Xwe}=Xs(),$we=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function eOe(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function Q0(n){let t=n.length,o=0;for(;o=t||(n[o+1]&192)!==128||(n[o+2]&192)!==128||n[o]===224&&(n[o+1]&224)===128||n[o]===237&&(n[o+1]&224)===160)return!1;o+=3}else if((n[o]&248)===240){if(o+3>=t||(n[o+1]&192)!==128||(n[o+2]&192)!==128||(n[o+3]&192)!==128||n[o]===240&&(n[o+1]&240)===128||n[o]===244&&n[o+1]>143||n[o]>244)return!1;o+=4}else return!1;return!0}function AOe(n){return Xwe&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&(n[Symbol.toStringTag]==="Blob"||n[Symbol.toStringTag]==="File")}cy.exports={isBlob:AOe,isValidStatusCode:eOe,isValidUTF8:Q0,tokenChars:$we};if(g4)cy.exports.isValidUTF8=function(n){return n.length<24?Q0(n):g4(n)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let n=Xe("utf-8-validate");cy.exports.isValidUTF8=function(t){return t.length<32?Q0(t):n(t)}}catch{}});var w0=$((IaA,E4)=>{"use strict";var{Writable:tOe}=Xe("stream"),c4=Up(),{BINARY_TYPES:rOe,EMPTY_BUFFER:I4,kStatusCode:aOe,kWebSocket:iOe}=Xs(),{concat:y0,toArrayBuffer:oOe,unmask:nOe}=sC(),{isValidStatusCode:sOe,isValidUTF8:l4}=Hp(),Iy=Buffer[Symbol.species],mo=0,p4=1,d4=2,h4=3,m0=4,S0=5,ly=6,D0=class extends tOe{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||rOe[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxBufferedChunks=t.maxBufferedChunks|0,this._maxFragments=t.maxFragments|0,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[iOe]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=mo}_write(t,o,i){if(this._opcode===8&&this._state==mo)return i();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){i(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(i)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t=i.length?o.set(this._buffers.shift(),e):(o.set(new Uint8Array(i.buffer,i.byteOffset,t),e),this._buffers[0]=new Iy(i.buffer,i.byteOffset+t,i.length-t)),t-=i.length}while(t>0);return o}startLoop(t){this._loop=!0;do switch(this._state){case mo:this.getInfo(t);break;case p4:this.getPayloadLength16(t);break;case d4:this.getPayloadLength64(t);break;case h4:this.getMask();break;case m0:this.getData(t);break;case S0:case ly:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!==0){let e=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(e);return}let i=(o[0]&64)===64;if(i&&!this._extensions[c4.extensionName]){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(this._fin=(o[0]&128)===128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(i){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(!this._fragmented){let e=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let e=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(e);return}if(i){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let e=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(e);return}}else{let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)===128,this._isServer){if(!this._masked){let e=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(e);return}}else if(this._masked){let e=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(e);return}this._payloadLength===126?this._state=p4:this._payloadLength===127?this._state=d4:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),i=o.readUInt32BE(0);if(i>Math.pow(2,21)-1){let e=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(e);return}this._payloadLength=i*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}this._masked?this._state=h4:this._state=m0}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=m0}getData(t){let o=I4;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(o,t);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let i=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(i);return}if(this._compressed){this._state=S0,this.decompress(o,t);return}o.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(o)),this.dataMessage(t)}decompress(t,o){this._extensions[c4.extensionName].decompress(t,this._fin,(e,a)=>{if(e)return o(e);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let A=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");o(A);return}this._fragments.push(a)}this.dataMessage(o),this._state===mo&&this.startLoop(o)})}dataMessage(t){if(!this._fin){this._state=mo;return}let o=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let e;this._binaryType==="nodebuffer"?e=y0(i,o):this._binaryType==="arraybuffer"?e=oOe(y0(i,o)):this._binaryType==="blob"?e=new Blob(i):e=i,this._allowSynchronousEvents?(this.emit("message",e,!0),this._state=mo):(this._state=ly,setImmediate(()=>{this.emit("message",e,!0),this._state=mo,this.startLoop(t)}))}else{let e=y0(i,o);if(!this._skipUTF8Validation&&!l4(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(a);return}this._state===S0||this._allowSynchronousEvents?(this.emit("message",e,!1),this._state=mo):(this._state=ly,setImmediate(()=>{this.emit("message",e,!1),this._state=mo,this.startLoop(t)}))}}controlMessage(t,o){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,I4),this.end();else{let i=t.readUInt16BE(0);if(!sOe(i)){let a=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");o(a);return}let e=new Iy(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!l4(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");o(a);return}this._loop=!1,this.emit("conclude",i,e),this.end()}this._state=mo;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=mo):(this._state=ly,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=mo,this.startLoop(o)}))}createError(t,o,i,e,a){this._loop=!1,this._errored=!0;let A=new t(i?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(A,this.createError),A.code=a,A[aOe]=e,A}};E4.exports=D0});var M0=$((paA,B4)=>{"use strict";var{Duplex:laA}=Xe("stream"),{randomFillSync:gOe}=Xe("crypto"),{types:{isUint8Array:cOe}}=Xe("util"),C4=Up(),{EMPTY_BUFFER:IOe,kWebSocket:lOe,NOOP:pOe}=Xs(),{isBlob:Kp,isValidStatusCode:dOe}=Hp(),{mask:u4,toBuffer:MI}=sC(),So=Symbol("kByteLength"),hOe=Buffer.alloc(4),py=8*1024,_I,xp=py,nn=0,EOe=1,COe=2,O0=class n{constructor(t,o,i){this._extensions=o||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=nn,this.onerror=pOe,this[lOe]=void 0}static frame(t,o){let i,e=!1,a=2,A=!1;o.mask&&(i=o.maskBuffer||hOe,o.generateMask?o.generateMask(i):(xp===py&&(_I===void 0&&(_I=Buffer.alloc(py)),gOe(_I,0,py),xp=0),i[0]=_I[xp++],i[1]=_I[xp++],i[2]=_I[xp++],i[3]=_I[xp++]),A=(i[0]|i[1]|i[2]|i[3])===0,a=6);let r;typeof t=="string"?(!o.mask||A)&&o[So]!==void 0?r=o[So]:(t=Buffer.from(t),r=t.length):(r=t.length,e=o.mask&&o.readOnly&&!A);let s=r;r>=65536?(a+=8,s=127):r>125&&(a+=2,s=126);let g=Buffer.allocUnsafe(e?r+a:a);return g[0]=o.fin?o.opcode|128:o.opcode,o.rsv1&&(g[0]|=64),g[1]=s,s===126?g.writeUInt16BE(r,2):s===127&&(g[2]=g[3]=0,g.writeUIntBE(r,4,6)),o.mask?(g[1]|=128,g[a-4]=i[0],g[a-3]=i[1],g[a-2]=i[2],g[a-1]=i[3],A?[g,t]:e?(u4(t,i,g,a,r),[g]):(u4(t,i,t,0,r),[g,t])):[g,t]}close(t,o,i,e){let a;if(t===void 0)a=IOe;else{if(typeof t!="number"||!dOe(t))throw new TypeError("First argument must be a valid error code number");if(o===void 0||!o.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let r=Buffer.byteLength(o);if(r>123)throw new RangeError("The message must not be greater than 123 bytes");if(a=Buffer.allocUnsafe(2+r),a.writeUInt16BE(t,0),typeof o=="string")a.write(o,2);else if(cOe(o))a.set(o,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let A={[So]:a.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==nn?this.enqueue([this.dispatch,a,!1,A,e]):this.sendFrame(n.frame(a,A),e)}ping(t,o,i){let e,a;if(typeof t=="string"?(e=Buffer.byteLength(t),a=!1):Kp(t)?(e=t.size,a=!1):(t=MI(t),e=t.length,a=MI.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[So]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};Kp(t)?this._state!==nn?this.enqueue([this.getBlobData,t,!1,A,i]):this.getBlobData(t,!1,A,i):this._state!==nn?this.enqueue([this.dispatch,t,!1,A,i]):this.sendFrame(n.frame(t,A),i)}pong(t,o,i){let e,a;if(typeof t=="string"?(e=Buffer.byteLength(t),a=!1):Kp(t)?(e=t.size,a=!1):(t=MI(t),e=t.length,a=MI.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[So]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};Kp(t)?this._state!==nn?this.enqueue([this.getBlobData,t,!1,A,i]):this.getBlobData(t,!1,A,i):this._state!==nn?this.enqueue([this.dispatch,t,!1,A,i]):this.sendFrame(n.frame(t,A),i)}send(t,o,i){let e=this._extensions[C4.extensionName],a=o.binary?2:1,A=o.compress,r,s;typeof t=="string"?(r=Buffer.byteLength(t),s=!1):Kp(t)?(r=t.size,s=!1):(t=MI(t),r=t.length,s=MI.readOnly),this._firstFragment?(this._firstFragment=!1,A&&e&&e.params[e._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(A=r>=e._threshold),this._compress=A):(A=!1,a=0),o.fin&&(this._firstFragment=!0);let g={[So]:r,fin:o.fin,generateMask:this._generateMask,mask:o.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:s,rsv1:A};Kp(t)?this._state!==nn?this.enqueue([this.getBlobData,t,this._compress,g,i]):this.getBlobData(t,this._compress,g,i):this._state!==nn?this.enqueue([this.dispatch,t,this._compress,g,i]):this.dispatch(t,this._compress,g,i)}getBlobData(t,o,i,e){this._bufferedBytes+=i[So],this._state=COe,t.arrayBuffer().then(a=>{if(this._socket.destroyed){let r=new Error("The socket was closed while the blob was being read");process.nextTick(b0,this,r,e);return}this._bufferedBytes-=i[So];let A=MI(a);o?this.dispatch(A,o,i,e):(this._state=nn,this.sendFrame(n.frame(A,i),e),this.dequeue())}).catch(a=>{process.nextTick(uOe,this,a,e)})}dispatch(t,o,i,e){if(!o){this.sendFrame(n.frame(t,i),e);return}let a=this._extensions[C4.extensionName];this._bufferedBytes+=i[So],this._state=EOe,a.compress(t,i.fin,(A,r)=>{if(this._socket.destroyed){let s=new Error("The socket was closed while data was being compressed");b0(this,s,e);return}this._bufferedBytes-=i[So],this._state=nn,i.readOnly=!1,this.sendFrame(n.frame(r,i),e),this.dequeue()})}dequeue(){for(;this._state===nn&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][So],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][So],this._queue.push(t)}sendFrame(t,o){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],o),this._socket.uncork()):this._socket.write(t[0],o)}};B4.exports=O0;function b0(n,t,o){typeof o=="function"&&o(t);for(let i=0;i{"use strict";var{kForOnEventAttribute:cC,kListener:_0}=Xs(),f4=Symbol("kCode"),Q4=Symbol("kData"),y4=Symbol("kError"),m4=Symbol("kMessage"),S4=Symbol("kReason"),Yp=Symbol("kTarget"),D4=Symbol("kType"),w4=Symbol("kWasClean"),eg=class{constructor(t){this[Yp]=null,this[D4]=t}get target(){return this[Yp]}get type(){return this[D4]}};Object.defineProperty(eg.prototype,"target",{enumerable:!0});Object.defineProperty(eg.prototype,"type",{enumerable:!0});var TI=class extends eg{constructor(t,o={}){super(t),this[f4]=o.code===void 0?0:o.code,this[S4]=o.reason===void 0?"":o.reason,this[w4]=o.wasClean===void 0?!1:o.wasClean}get code(){return this[f4]}get reason(){return this[S4]}get wasClean(){return this[w4]}};Object.defineProperty(TI.prototype,"code",{enumerable:!0});Object.defineProperty(TI.prototype,"reason",{enumerable:!0});Object.defineProperty(TI.prototype,"wasClean",{enumerable:!0});var jp=class extends eg{constructor(t,o={}){super(t),this[y4]=o.error===void 0?null:o.error,this[m4]=o.message===void 0?"":o.message}get error(){return this[y4]}get message(){return this[m4]}};Object.defineProperty(jp.prototype,"error",{enumerable:!0});Object.defineProperty(jp.prototype,"message",{enumerable:!0});var IC=class extends eg{constructor(t,o={}){super(t),this[Q4]=o.data===void 0?null:o.data}get data(){return this[Q4]}};Object.defineProperty(IC.prototype,"data",{enumerable:!0});var BOe={addEventListener(n,t,o={}){for(let e of this.listeners(n))if(!o[cC]&&e[_0]===t&&!e[cC])return;let i;if(n==="message")i=function(a,A){let r=new IC("message",{data:A?a:a.toString()});r[Yp]=this,dy(t,this,r)};else if(n==="close")i=function(a,A){let r=new TI("close",{code:a,reason:A.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Yp]=this,dy(t,this,r)};else if(n==="error")i=function(a){let A=new jp("error",{error:a,message:a.message});A[Yp]=this,dy(t,this,A)};else if(n==="open")i=function(){let a=new eg("open");a[Yp]=this,dy(t,this,a)};else return;i[cC]=!!o[cC],i[_0]=t,o.once?this.once(n,i):this.on(n,i)},removeEventListener(n,t){for(let o of this.listeners(n))if(o[_0]===t&&!o[cC]){this.removeListener(n,o);break}}};O4.exports={CloseEvent:TI,ErrorEvent:jp,Event:eg,EventTarget:BOe,MessageEvent:IC};function dy(n,t,o){typeof n=="object"&&n.handleEvent?n.handleEvent.call(n,o):n.call(t,o)}});var hy=$((haA,M4)=>{"use strict";var{tokenChars:lC}=Hp();function Vn(n,t,o){n[t]===void 0?n[t]=[o]:n[t].push(o)}function fOe(n){let t=Object.create(null),o=Object.create(null),i=!1,e=!1,a=!1,A,r,s=-1,g=-1,c=-1,I=0;for(;I{let o=n[t];return Array.isArray(o)||(o=[o]),o.map(i=>[t].concat(Object.keys(i).map(e=>{let a=i[e];return Array.isArray(a)||(a=[a]),a.map(A=>A===!0?e:`${e}=${A}`).join("; ")})).join("; ")).join(", ")}).join(", ")}M4.exports={format:QOe,parse:fOe}});var By=$((uaA,H4)=>{"use strict";var yOe=Xe("events"),mOe=Xe("https"),SOe=Xe("http"),N4=Xe("net"),DOe=Xe("tls"),{randomBytes:wOe,createHash:OOe}=Xe("crypto"),{Duplex:EaA,Readable:CaA}=Xe("stream"),{URL:T0}=Xe("url"),Xg=Up(),bOe=w0(),MOe=M0(),{isBlob:_Oe}=Hp(),{BINARY_TYPES:_4,CLOSE_TIMEOUT:TOe,EMPTY_BUFFER:Ey,GUID:NOe,kForOnEventAttribute:N0,kListener:ROe,kStatusCode:kOe,kWebSocket:Aa,NOOP:R4}=Xs(),{EventTarget:{addEventListener:vOe,removeEventListener:POe}}=b4(),{format:GOe,parse:FOe}=hy(),{toBuffer:LOe}=sC(),k4=Symbol("kAborted"),R0=[8,13],Ag=["CONNECTING","OPEN","CLOSING","CLOSED"],UOe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Vt=class n extends yOe{constructor(t,o,i){super(),this._binaryType=_4[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Ey,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=n.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,o===void 0?o=[]:Array.isArray(o)||(typeof o=="object"&&o!==null?(i=o,o=[]):o=[o]),v4(this,t,o,i)):(this._autoPong=i.autoPong,this._closeTimeout=i.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){_4.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,o,i){let e=new bOe({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),a=new MOe(t,this._extensions,i.generateMask);this._receiver=e,this._sender=a,this._socket=t,e[Aa]=this,a[Aa]=this,t[Aa]=this,e.on("conclude",xOe),e.on("drain",YOe),e.on("error",jOe),e.on("message",JOe),e.on("ping",qOe),e.on("pong",zOe),a.onerror=VOe,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),o.length>0&&t.unshift(o),t.on("close",F4),t.on("data",uy),t.on("end",L4),t.on("error",U4),this._readyState=n.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Xg.extensionName]&&this._extensions[Xg.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,o){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){ji(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===n.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=n.CLOSING,this._sender.close(t,o,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),G4(this)}}pause(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=o=void 0):typeof o=="function"&&(i=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){k0(this,t,i);return}o===void 0&&(o=!this._isServer),this._sender.ping(t||Ey,o,i)}pong(t,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=o=void 0):typeof o=="function"&&(i=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){k0(this,t,i);return}o===void 0&&(o=!this._isServer),this._sender.pong(t||Ey,o,i)}resume(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"&&(i=o,o={}),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){k0(this,t,i);return}let e={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...o};this._extensions[Xg.extensionName]||(e.compress=!1),this._sender.send(t||Ey,e,i)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){ji(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(Vt,"CONNECTING",{enumerable:!0,value:Ag.indexOf("CONNECTING")});Object.defineProperty(Vt.prototype,"CONNECTING",{enumerable:!0,value:Ag.indexOf("CONNECTING")});Object.defineProperty(Vt,"OPEN",{enumerable:!0,value:Ag.indexOf("OPEN")});Object.defineProperty(Vt.prototype,"OPEN",{enumerable:!0,value:Ag.indexOf("OPEN")});Object.defineProperty(Vt,"CLOSING",{enumerable:!0,value:Ag.indexOf("CLOSING")});Object.defineProperty(Vt.prototype,"CLOSING",{enumerable:!0,value:Ag.indexOf("CLOSING")});Object.defineProperty(Vt,"CLOSED",{enumerable:!0,value:Ag.indexOf("CLOSED")});Object.defineProperty(Vt.prototype,"CLOSED",{enumerable:!0,value:Ag.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(n=>{Object.defineProperty(Vt.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(Vt.prototype,`on${n}`,{enumerable:!0,get(){for(let t of this.listeners(n))if(t[N0])return t[ROe];return null},set(t){for(let o of this.listeners(n))if(o[N0]){this.removeListener(n,o);break}typeof t=="function"&&this.addEventListener(n,t,{[N0]:!0})}})});Vt.prototype.addEventListener=vOe;Vt.prototype.removeEventListener=POe;H4.exports=Vt;function v4(n,t,o,i){let e={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:TOe,protocolVersion:R0[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(n._autoPong=e.autoPong,n._closeTimeout=e.closeTimeout,!R0.includes(e.protocolVersion))throw new RangeError(`Unsupported protocol version: ${e.protocolVersion} (supported versions: ${R0.join(", ")})`);let a;if(t instanceof T0)a=t;else try{a=new T0(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),n._url=a.href;let A=a.protocol==="wss:",r=a.protocol==="ws+unix:",s;if(a.protocol!=="ws:"&&!A&&!r?s=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:r&&!a.pathname?s="The URL's pathname is empty":a.hash&&(s="The URL contains a fragment identifier"),s){let Q=new SyntaxError(s);if(n._redirects===0)throw Q;Cy(n,Q);return}let g=A?443:80,c=wOe(16).toString("base64"),I=A?mOe.request:SOe.request,d=new Set,B;if(e.createConnection=e.createConnection||(A?KOe:HOe),e.defaultPort=e.defaultPort||g,e.port=a.port||g,e.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,e.headers={...e.headers,"Sec-WebSocket-Version":e.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},e.path=a.pathname+a.search,e.timeout=e.handshakeTimeout,e.perMessageDeflate&&(B=new Xg({...e.perMessageDeflate,isServer:!1,maxPayload:e.maxPayload}),e.headers["Sec-WebSocket-Extensions"]=GOe({[Xg.extensionName]:B.offer()})),o.length){for(let Q of o){if(typeof Q!="string"||!UOe.test(Q)||d.has(Q))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(Q)}e.headers["Sec-WebSocket-Protocol"]=o.join(",")}if(e.origin&&(e.protocolVersion<13?e.headers["Sec-WebSocket-Origin"]=e.origin:e.headers.Origin=e.origin),(a.username||a.password)&&(e.auth=`${a.username}:${a.password}`),r){let Q=e.path.split(":");e.socketPath=Q[0],e.path=Q[1]}let f;if(e.followRedirects){if(n._redirects===0){n._originalIpc=r,n._originalSecure=A,n._originalHostOrSocketPath=r?e.socketPath:a.host;let Q=i&&i.headers;if(i={...i,headers:{}},Q)for(let[y,m]of Object.entries(Q))i.headers[y.toLowerCase()]=m}else if(n.listenerCount("redirect")===0){let Q=r?n._originalIpc?e.socketPath===n._originalHostOrSocketPath:!1:n._originalIpc?!1:a.host===n._originalHostOrSocketPath;(!Q||n._originalSecure&&!A)&&(delete e.headers.authorization,delete e.headers.cookie,Q||delete e.headers.host,e.auth=void 0)}e.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(e.auth).toString("base64")),f=n._req=I(e),n._redirects&&n.emit("redirect",n.url,f)}else f=n._req=I(e);e.timeout&&f.on("timeout",()=>{ji(n,f,"Opening handshake has timed out")}),f.on("error",Q=>{f===null||f[k4]||(f=n._req=null,Cy(n,Q))}),f.on("response",Q=>{let y=Q.headers.location,m=Q.statusCode;if(y&&e.followRedirects&&m>=300&&m<400){if(++n._redirects>e.maxRedirects){ji(n,f,"Maximum redirects exceeded");return}f.abort();let _;try{_=new T0(y,t)}catch{let G=new SyntaxError(`Invalid URL: ${y}`);Cy(n,G);return}v4(n,_,o,i)}else n.emit("unexpected-response",f,Q)||ji(n,f,`Unexpected server response: ${Q.statusCode}`)}),f.on("upgrade",(Q,y,m)=>{if(n.emit("upgrade",Q),n.readyState!==Vt.CONNECTING)return;f=n._req=null;let _=Q.headers.upgrade;if(_===void 0||_.toLowerCase()!=="websocket"){ji(n,y,"Invalid Upgrade header");return}let T=OOe("sha1").update(c+NOe).digest("base64");if(Q.headers["sec-websocket-accept"]!==T){ji(n,y,"Invalid Sec-WebSocket-Accept header");return}let G=Q.headers["sec-websocket-protocol"],x;if(G!==void 0?d.size?d.has(G)||(x="Server sent an invalid subprotocol"):x="Server sent a subprotocol but none was requested":d.size&&(x="Server sent no subprotocol"),x){ji(n,y,x);return}G&&(n._protocol=G);let J=Q.headers["sec-websocket-extensions"];if(J!==void 0){if(!B){ji(n,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let L;try{L=FOe(J)}catch{ji(n,y,"Invalid Sec-WebSocket-Extensions header");return}let q=Object.keys(L);if(q.length!==1||q[0]!==Xg.extensionName){ji(n,y,"Server indicated an extension that was not requested");return}try{B.accept(L[Xg.extensionName])}catch{ji(n,y,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[Xg.extensionName]=B}n.setSocket(y,m,{allowSynchronousEvents:e.allowSynchronousEvents,generateMask:e.generateMask,maxBufferedChunks:e.maxBufferedChunks,maxFragments:e.maxFragments,maxPayload:e.maxPayload,skipUTF8Validation:e.skipUTF8Validation})}),e.finishRequest?e.finishRequest(f,n):f.end()}function Cy(n,t){n._readyState=Vt.CLOSING,n._errorEmitted=!0,n.emit("error",t),n.emitClose()}function HOe(n){return n.path=n.socketPath,N4.connect(n)}function KOe(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=N4.isIP(n.host)?"":n.host),DOe.connect(n)}function ji(n,t,o){n._readyState=Vt.CLOSING;let i=new Error(o);Error.captureStackTrace(i,ji),t.setHeader?(t[k4]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Cy,n,i)):(t.destroy(i),t.once("error",n.emit.bind(n,"error")),t.once("close",n.emitClose.bind(n)))}function k0(n,t,o){if(t){let i=_Oe(t)?t.size:LOe(t).length;n._socket?n._sender._bufferedBytes+=i:n._bufferedAmount+=i}if(o){let i=new Error(`WebSocket is not open: readyState ${n.readyState} (${Ag[n.readyState]})`);process.nextTick(o,i)}}function xOe(n,t){let o=this[Aa];o._closeFrameReceived=!0,o._closeMessage=t,o._closeCode=n,o._socket[Aa]!==void 0&&(o._socket.removeListener("data",uy),process.nextTick(P4,o._socket),n===1005?o.close():o.close(n,t))}function YOe(){let n=this[Aa];n.isPaused||n._socket.resume()}function jOe(n){let t=this[Aa];t._socket[Aa]!==void 0&&(t._socket.removeListener("data",uy),process.nextTick(P4,t._socket),t.close(n[kOe])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n))}function T4(){this[Aa].emitClose()}function JOe(n,t){this[Aa].emit("message",n,t)}function qOe(n){let t=this[Aa];t._autoPong&&t.pong(n,!this._isServer,R4),t.emit("ping",n)}function zOe(n){this[Aa].emit("pong",n)}function P4(n){n.resume()}function VOe(n){let t=this[Aa];t.readyState!==Vt.CLOSED&&(t.readyState===Vt.OPEN&&(t._readyState=Vt.CLOSING,G4(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n)))}function G4(n){n._closeTimer=setTimeout(n._socket.destroy.bind(n._socket),n._closeTimeout)}function F4(){let n=this[Aa];if(this.removeListener("close",F4),this.removeListener("data",uy),this.removeListener("end",L4),n._readyState=Vt.CLOSING,!this._readableState.endEmitted&&!n._closeFrameReceived&&!n._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);n._receiver.write(t)}n._receiver.end(),this[Aa]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",T4),n._receiver.on("finish",T4))}function uy(n){this[Aa]._receiver.write(n)||this.pause()}function L4(){let n=this[Aa];n._readyState=Vt.CLOSING,n._receiver.end(),this.end()}function U4(){let n=this[Aa];this.removeListener("error",U4),this.on("error",R4),n&&(n._readyState=Vt.CLOSING,this.destroy())}});var j4=$((faA,Y4)=>{"use strict";var BaA=By(),{Duplex:WOe}=Xe("stream");function K4(n){n.emit("close")}function ZOe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function x4(n){this.removeListener("error",x4),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function XOe(n,t){let o=!0,i=new WOe({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(a,A){let r=!A&&i._readableState.objectMode?a.toString():a;i.push(r)||n.pause()}),n.once("error",function(a){i.destroyed||(o=!1,i.destroy(a))}),n.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(e,a){if(n.readyState===n.CLOSED){a(e),process.nextTick(K4,i);return}let A=!1;n.once("error",function(s){A=!0,a(s)}),n.once("close",function(){A||a(e),process.nextTick(K4,i)}),o&&n.terminate()},i._final=function(e){if(n.readyState===n.CONNECTING){n.once("open",function(){i._final(e)});return}n._socket!==null&&(n._socket._writableState.finished?(e(),i._readableState.endEmitted&&i.destroy()):(n._socket.once("finish",function(){e()}),n.close()))},i._read=function(){n.isPaused&&n.resume()},i._write=function(e,a,A){if(n.readyState===n.CONNECTING){n.once("open",function(){i._write(e,a,A)});return}n.send(e,A)},i.on("end",ZOe),i.on("error",x4),i}Y4.exports=XOe});var v0=$((QaA,J4)=>{"use strict";var{tokenChars:$Oe}=Hp();function ebe(n){let t=new Set,o=-1,i=-1,e=0;for(e;e{"use strict";var Abe=Xe("events"),fy=Xe("http"),{Duplex:yaA}=Xe("stream"),{createHash:tbe}=Xe("crypto"),q4=hy(),NI=Up(),rbe=v0(),abe=By(),{CLOSE_TIMEOUT:ibe,GUID:obe,kWebSocket:nbe}=Xs(),sbe=/^[+/0-9A-Za-z]{22}==$/,z4=0,V4=1,Z4=2,P0=class extends Abe{constructor(t,o){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:ibe,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:abe,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=fy.createServer((i,e)=>{let a=fy.STATUS_CODES[426];e.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),e.end(a)}),this._server.listen(t.port,t.host,t.backlog,o)):t.server&&(this._server=t.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=gbe(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(e,a,A)=>{this.handleUpgrade(e,a,A,i)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=z4}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===Z4){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(pC,this);return}if(t&&this.once("close",t),this._state!==V4)if(this._state=V4,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(pC,this):process.nextTick(pC,this);else{let o=this._server;this._removeListeners(),this._removeListeners=this._server=null,o.close(()=>{pC(this)})}}shouldHandle(t){if(this.options.path){let o=t.url.indexOf("?");if((o!==-1?t.url.slice(0,o):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,o,i,e){o.on("error",W4);let a=t.headers["sec-websocket-key"],A=t.headers.upgrade,r=+t.headers["sec-websocket-version"];if(t.method!=="GET"){RI(this,t,o,405,"Invalid HTTP method");return}if(A===void 0||A.toLowerCase()!=="websocket"){RI(this,t,o,400,"Invalid Upgrade header");return}if(a===void 0||!sbe.test(a)){RI(this,t,o,400,"Missing or invalid Sec-WebSocket-Key header");return}if(r!==13&&r!==8){RI(this,t,o,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(t)){dC(o,400);return}let s=t.headers["sec-websocket-protocol"],g=new Set;if(s!==void 0)try{g=rbe.parse(s)}catch{RI(this,t,o,400,"Invalid Sec-WebSocket-Protocol header");return}let c=t.headers["sec-websocket-extensions"],I={};if(this.options.perMessageDeflate&&c!==void 0){let d=new NI({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let B=q4.parse(c);B[NI.extensionName]&&(d.accept(B[NI.extensionName]),I[NI.extensionName]=d)}catch{RI(this,t,o,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:t.headers[`${r===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(B,f,Q,y)=>{if(!B)return dC(o,f||401,Q,y);this.completeUpgrade(I,a,g,t,o,i,e)});return}if(!this.options.verifyClient(d))return dC(o,401)}this.completeUpgrade(I,a,g,t,o,i,e)}completeUpgrade(t,o,i,e,a,A,r){if(!a.readable||!a.writable)return a.destroy();if(a[nbe])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>z4)return dC(a,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${tbe("sha1").update(o+obe).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(i.size){let I=this.options.handleProtocols?this.options.handleProtocols(i,e):i.values().next().value;I&&(g.push(`Sec-WebSocket-Protocol: ${I}`),c._protocol=I)}if(t[NI.extensionName]){let I=t[NI.extensionName].params,d=q4.format({[NI.extensionName]:[I]});g.push(`Sec-WebSocket-Extensions: ${d}`),c._extensions=t}this.emit("headers",g,e),a.write(g.concat(`\r +`)===-1){FE("have not received end of HTTP headers yet..."),a();return}let f=d.toString("ascii",0,d.indexOf(`\r +`)),Q=+f.split(" ")[1];FE("got proxy server response: %o",f),t({statusCode:Q,buffered:d})}n.on("error",g),n.on("close",r),n.on("end",s),a()})}LE.default=Dfe});var gj=$(yI=>{"use strict";var wfe=yI&&yI.__awaiter||function(n,t,o,i){function e(a){return a instanceof o?a:new o(function(A){A(a)})}return new(o||(o=Promise))(function(a,A){function r(c){try{g(i.next(c))}catch(I){A(I)}}function s(c){try{g(i.throw(c))}catch(I){A(I)}}function g(c){c.done?a(c.value):e(c.value).then(r,s)}g((i=i.apply(n,t||[])).next())})},Mp=yI&&yI.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(yI,"__esModule",{value:!0});var nj=Mp(Xe("net")),sj=Mp(Xe("tls")),Ofe=Mp(Xe("url")),bfe=Mp(Xe("assert")),Mfe=Mp(ct()),_fe=ij(),Tfe=Mp(oj()),UE=Mfe.default("https-proxy-agent:agent"),Z_=class extends _fe.Agent{constructor(t){let o;if(typeof t=="string"?o=Ofe.default.parse(t):o=t,!o)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");UE("creating new HttpsProxyAgent instance: %o",o),super(o);let i=Object.assign({},o);this.secureProxy=o.secureProxy||kfe(i.protocol),i.host=i.hostname||i.host,typeof i.port=="string"&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in i)&&(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(t,o){return wfe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:e}=this,a;e?(UE("Creating `tls.Socket`: %o",i),a=sj.default.connect(i)):(UE("Creating `net.Socket`: %o",i),a=nj.default.connect(i));let A=Object.assign({},i.headers),s=`CONNECT ${`${o.host}:${o.port}`} HTTP/1.1\r +`;i.auth&&(A["Proxy-Authorization"]=`Basic ${Buffer.from(i.auth).toString("base64")}`);let{host:g,port:c,secureEndpoint:I}=o;Rfe(c,I)||(g+=`:${c}`),A.Host=g,A.Connection="close";for(let y of Object.keys(A))s+=`${y}: ${A[y]}\r +`;let d=Tfe.default(a);a.write(`${s}\r +`);let{statusCode:B,buffered:f}=yield d;if(B===200){if(t.once("socket",Nfe),o.secureEndpoint){UE("Upgrading socket connection to TLS");let y=o.servername||o.host;return sj.default.connect(Object.assign(Object.assign({},vfe(o,"host","hostname","path","port")),{socket:a,servername:y}))}return a}a.destroy();let Q=new nj.default.Socket({writable:!1});return Q.readable=!0,t.once("socket",y=>{UE("replaying proxy buffer for failed request"),bfe.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),Q})}};yI.default=Z_;function Nfe(n){n.resume()}function Rfe(n,t){return!!(!t&&n===80||t&&n===443)}function kfe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function vfe(n,...t){let o={},i;for(i in n)t.includes(i)||(o[i]=n[i]);return o}});var AT=$((eT,cj)=>{"use strict";var Pfe=eT&&eT.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},X_=Pfe(gj());function $_(n){return new X_.default(n)}(function(n){n.HttpsProxyAgent=X_.default,n.prototype=X_.default.prototype})($_||($_={}));cj.exports=$_});var lj=$((GAA,Ij)=>{var HE;Ij.exports=function(){if(!HE){try{HE=ct()("follow-redirects")}catch{}typeof HE!="function"&&(HE=function(){})}HE.apply(null,arguments)}});var Cj=$((FAA,pT)=>{var xE=Xe("url"),KE=xE.URL,Gfe=Xe("http"),Ffe=Xe("https"),oT=Xe("stream").Writable,nT=Xe("assert"),pj=lj();(function(){var t=typeof process<"u",o=typeof window<"u"&&typeof document<"u",i=SI(Error.captureStackTrace);!t&&(o||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var sT=!1;try{nT(new KE(""))}catch(n){sT=n.code==="ERR_INVALID_URL"}var Lfe=["Authorization","Proxy-Authorization","Cookie"],Ufe=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],gT=["abort","aborted","connect","error","socket","timeout"],cT=Object.create(null);gT.forEach(function(n){cT[n]=function(t,o,i){this._redirectable.emit(n,t,o,i)}});var rT=YE("ERR_INVALID_URL","Invalid URL",TypeError),aT=YE("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Hfe=YE("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",aT),Kfe=YE("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),xfe=YE("ERR_STREAM_WRITE_AFTER_END","write after end"),Yfe=oT.prototype.destroy||hj;function Si(n,t){oT.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var o=this;this._onNativeResponse=function(i){try{o._processResponse(i)}catch(e){o.emit("error",e instanceof aT?e:new aT({cause:e}))}},this._headerFilter=new RegExp("^(?:"+Lfe.concat(n.sensitiveHeaders).map(Wfe).join("|")+")$","i"),this._performRequest()}Si.prototype=Object.create(oT.prototype);Si.prototype.abort=function(){lT(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Si.prototype.destroy=function(n){return lT(this._currentRequest,n),Yfe.call(this,n),this};Si.prototype.write=function(n,t,o){if(this._ending)throw new xfe;if(!mI(n)&&!zfe(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(SI(t)&&(o=t,t=null),n.length===0){o&&o();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:t}),this._currentRequest.write(n,t,o)):(this.emit("error",new Kfe),this.abort())};Si.prototype.end=function(n,t,o){if(SI(n)?(o=n,n=t=null):SI(t)&&(o=t,t=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,o);else{var i=this,e=this._currentRequest;this.write(n,t,function(){i._ended=!0,e.end(null,null,o)}),this._ending=!0}};Si.prototype.setHeader=function(n,t){this._options.headers[n]=t,this._currentRequest.setHeader(n,t)};Si.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};Si.prototype.setTimeout=function(n,t){var o=this;function i(A){A.setTimeout(n),A.removeListener("timeout",A.destroy),A.addListener("timeout",A.destroy)}function e(A){o._timeout&&clearTimeout(o._timeout),o._timeout=setTimeout(function(){o.emit("timeout"),a()},n),i(A)}function a(){o._timeout&&(clearTimeout(o._timeout),o._timeout=null),o.removeListener("abort",a),o.removeListener("error",a),o.removeListener("response",a),o.removeListener("close",a),t&&o.removeListener("timeout",t),o.socket||o._currentRequest.removeListener("socket",e)}return t&&this.on("timeout",t),this.socket?e(this.socket):this._currentRequest.once("socket",e),this.on("socket",i),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){Si.prototype[n]=function(t,o){return this._currentRequest[n](t,o)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(Si.prototype,n,{get:function(){return this._currentRequest[n]}})});Si.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),qfe(n.sensitiveHeaders)||(n.sensitiveHeaders=[]),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var t=n.path.indexOf("?");t<0?n.pathname=n.path:(n.pathname=n.path.substring(0,t),n.search=n.path.substring(t))}};Si.prototype._performRequest=function(){var n=this._options.protocol,t=this._options.nativeProtocols[n];if(!t)throw new TypeError("Unsupported protocol "+n);if(this._options.agents){var o=n.slice(0,-1);this._options.agent=this._options.agents[o]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var e of gT)i.on(e,cT[e]);if(this._currentUrl=/^\//.test(this._options.path)?xE.format(this._options):this._options.path,this._isRedirect){var a=0,A=this,r=this._requestBodyBuffers;(function s(g){if(i===A._currentRequest)if(g)A.emit("error",g);else if(a=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(lT(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Hfe;var i,e=this._options.beforeRedirect;e&&(i=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var a=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],tT(/^content-/i,this._options.headers));var A=tT(/^host$/i,this._options.headers),r=IT(this._currentUrl),s=A||r.host,g=/^\w+:/.test(o)?this._currentUrl:xE.format(Object.assign(r,{host:s})),c=jfe(o,g);if(pj("redirecting to",c.href),this._isRedirect=!0,iT(c,this._options),(c.protocol!==r.protocol&&c.protocol!=="https:"||c.host!==s&&!Jfe(c.host,s))&&tT(this._headerFilter,this._options.headers),SI(e)){var I={headers:n.headers,statusCode:t},d={url:g,method:a,headers:i};e(this._options,I,d),this._sanitizeOptions(this._options)}this._performRequest()};function dj(n){var t={maxRedirects:21,maxBodyLength:10485760},o={};return Object.keys(n).forEach(function(i){var e=i+":",a=o[e]=n[i],A=t[i]=Object.create(a);function r(g,c,I){return Vfe(g)?g=iT(g):mI(g)?g=iT(IT(g)):(I=c,c=Ej(g),g={protocol:e}),SI(c)&&(I=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},g,c),c.nativeProtocols=o,!mI(c.host)&&!mI(c.hostname)&&(c.hostname="::1"),nT.equal(c.protocol,e,"protocol mismatch"),pj("options",c),new Si(c,I)}function s(g,c,I){var d=A.request(g,c,I);return d.end(),d}Object.defineProperties(A,{request:{value:r,configurable:!0,enumerable:!0,writable:!0},get:{value:s,configurable:!0,enumerable:!0,writable:!0}})}),t}function hj(){}function IT(n){var t;if(sT)t=new KE(n);else if(t=Ej(xE.parse(n)),!mI(t.protocol))throw new rT({input:n});return t}function jfe(n,t){return sT?new KE(n,t):IT(xE.resolve(t,n))}function Ej(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new rT({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new rT({input:n.href||n});return n}function iT(n,t){var o=t||{};for(var i of Ufe)o[i]=n[i];return o.hostname.startsWith("[")&&(o.hostname=o.hostname.slice(1,-1)),o.port!==""&&(o.port=Number(o.port)),o.path=o.search?o.pathname+o.search:o.pathname,o}function tT(n,t){var o;for(var i in t)n.test(i)&&(o=t[i],delete t[i]);return o===null||typeof o>"u"?void 0:String(o).trim()}function YE(n,t,o){function i(e){SI(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,e||{}),this.code=n,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(o||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),i}function lT(n,t){for(var o of gT)n.removeListener(o,cT[o]);n.on("error",hj),n.destroy(t)}function Jfe(n,t){nT(mI(n)&&mI(t));var o=n.length-t.length-1;return o>0&&n[o]==="."&&n.endsWith(t)}function qfe(n){return n instanceof Array}function mI(n){return typeof n=="string"||n instanceof String}function SI(n){return typeof n=="function"}function zfe(n){return typeof n=="object"&&"length"in n}function Vfe(n){return KE&&n instanceof KE}function Wfe(n){return n.replace(/[\]\\/()*+?.$]/g,"\\$&")}pT.exports=dj({http:Gfe,https:Ffe});pT.exports.wrap=dj});var pJ=$((riA,lJ)=>{lJ.exports=Xe("util").inspect});var AC=$((aiA,RJ)=>{var jT=typeof Map=="function"&&Map.prototype,PT=Object.getOwnPropertyDescriptor&&jT?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,KQ=jT&&PT&&typeof PT.get=="function"?PT.get:null,dJ=jT&&Map.prototype.forEach,JT=typeof Set=="function"&&Set.prototype,GT=Object.getOwnPropertyDescriptor&&JT?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,xQ=JT&>&&typeof GT.get=="function"?GT.get:null,hJ=JT&&Set.prototype.forEach,gye=typeof WeakMap=="function"&&WeakMap.prototype,XE=gye?WeakMap.prototype.has:null,cye=typeof WeakSet=="function"&&WeakSet.prototype,$E=cye?WeakSet.prototype.has:null,Iye=typeof WeakRef=="function"&&WeakRef.prototype,EJ=Iye?WeakRef.prototype.deref:null,lye=Boolean.prototype.valueOf,pye=Object.prototype.toString,dye=Function.prototype.toString,hye=String.prototype.match,qT=String.prototype.slice,Zg=String.prototype.replace,Eye=String.prototype.toUpperCase,CJ=String.prototype.toLowerCase,wJ=RegExp.prototype.test,uJ=Array.prototype.concat,qn=Array.prototype.join,Cye=Array.prototype.slice,BJ=Math.floor,UT=typeof BigInt=="function"?BigInt.prototype.valueOf:null,FT=Object.getOwnPropertySymbols,HT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Rp=typeof Symbol=="function"&&typeof Symbol.iterator=="object",eC=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Rp||!0)?Symbol.toStringTag:null,OJ=Object.prototype.propertyIsEnumerable,fJ=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function QJ(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||wJ.call(/e/,t))return t;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-BJ(-n):BJ(n);if(i!==n){var e=String(i),a=qT.call(t,e.length+1);return Zg.call(e,o,"$&_")+"."+Zg.call(Zg.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Zg.call(t,o,"$&_")}var KT=pJ(),yJ=KT.custom,mJ=_J(yJ)?yJ:null,bJ={__proto__:null,double:'"',single:"'"},uye={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};RJ.exports=function n(t,o,i,e){var a=o||{};if(Ws(a,"quoteStyle")&&!Ws(bJ,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ws(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var A=Ws(a,"customInspect")?a.customInspect:!0;if(typeof A!="boolean"&&A!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ws(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ws(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var r=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return NJ(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return r?QJ(t,s):s}if(typeof t=="bigint"){var g=String(t)+"n";return r?QJ(t,g):g}var c=typeof a.depth>"u"?5:a.depth;if(typeof i>"u"&&(i=0),i>=c&&c>0&&typeof t=="object")return xT(t)?"[Array]":"[Object]";var I=Pye(a,i);if(typeof e>"u")e=[];else if(TJ(e,t)>=0)return"[Circular]";function d(U,N,k){if(N&&(e=Cye.call(e),e.push(N)),k){var V={depth:a.depth};return Ws(a,"quoteStyle")&&(V.quoteStyle=a.quoteStyle),n(U,V,i+1,e)}return n(U,a,i+1,e)}if(typeof t=="function"&&!SJ(t)){var B=Oye(t),f=HQ(t,d);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(f.length>0?" { "+qn.call(f,", ")+" }":"")}if(_J(t)){var Q=Rp?Zg.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):HT.call(t);return typeof t=="object"&&!Rp?ZE(Q):Q}if(Rye(t)){for(var y="<"+CJ.call(String(t.nodeName)),m=t.attributes||[],_=0;_",y}if(xT(t)){if(t.length===0)return"[]";var T=HQ(t,d);return I&&!vye(T)?"["+YT(T,I)+"]":"[ "+qn.call(T,", ")+" ]"}if(Qye(t)){var R=HQ(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!OJ.call(t,"cause")?"{ ["+String(t)+"] "+qn.call(uJ.call("[cause]: "+d(t.cause),R),", ")+" }":R.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+qn.call(R,", ")+" }"}if(typeof t=="object"&&A){if(mJ&&typeof t[mJ]=="function"&&KT)return KT(t,{depth:c-i});if(A!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(bye(t)){var H=[];return dJ&&dJ.call(t,function(U,N){H.push(d(N,t,!0)+" => "+d(U,t))}),DJ("Map",KQ.call(t),H,I)}if(Tye(t)){var j=[];return hJ&&hJ.call(t,function(U){j.push(d(U,t))}),DJ("Set",xQ.call(t),j,I)}if(Mye(t))return LT("WeakMap");if(Nye(t))return LT("WeakSet");if(_ye(t))return LT("WeakRef");if(mye(t))return ZE(d(Number(t)));if(Dye(t))return ZE(d(UT.call(t)));if(Sye(t))return ZE(lye.call(t));if(yye(t))return ZE(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof global<"u"&&t===global)return"{ [object globalThis] }";if(!fye(t)&&!SJ(t)){var F=HQ(t,d),q=fJ?fJ(t)===Object.prototype:t instanceof Object||t.constructor===Object,J=t instanceof Object?"":"null prototype",x=!q&&eC&&Object(t)===t&&eC in t?qT.call(Xg(t),8,-1):J?"Object":"",P=q||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",z=P+(x||J?"["+qn.call(uJ.call([],x||[],J||[]),": ")+"] ":"");return F.length===0?z+"{}":I?z+"{"+YT(F,I)+"}":z+"{ "+qn.call(F,", ")+" }"}return String(t)};function MJ(n,t,o){var i=o.quoteStyle||t,e=bJ[i];return e+n+e}function Bye(n){return Zg.call(String(n),/"/g,""")}function wI(n){return!eC||!(typeof n=="object"&&(eC in n||typeof n[eC]<"u"))}function xT(n){return Xg(n)==="[object Array]"&&wI(n)}function fye(n){return Xg(n)==="[object Date]"&&wI(n)}function SJ(n){return Xg(n)==="[object RegExp]"&&wI(n)}function Qye(n){return Xg(n)==="[object Error]"&&wI(n)}function yye(n){return Xg(n)==="[object String]"&&wI(n)}function mye(n){return Xg(n)==="[object Number]"&&wI(n)}function Sye(n){return Xg(n)==="[object Boolean]"&&wI(n)}function _J(n){if(Rp)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!HT)return!1;try{return HT.call(n),!0}catch{}return!1}function Dye(n){if(!n||typeof n!="object"||!UT)return!1;try{return UT.call(n),!0}catch{}return!1}var wye=Object.prototype.hasOwnProperty||function(n){return n in this};function Ws(n,t){return wye.call(n,t)}function Xg(n){return pye.call(n)}function Oye(n){if(n.name)return n.name;var t=hye.call(dye.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function TJ(n,t){if(n.indexOf)return n.indexOf(t);for(var o=0,i=n.length;ot.maxStringLength){var o=n.length-t.maxStringLength,i="... "+o+" more character"+(o>1?"s":"");return NJ(qT.call(n,0,t.maxStringLength),t)+i}var e=uye[t.quoteStyle||"single"];e.lastIndex=0;var a=Zg.call(Zg.call(n,e,"\\$1"),/[\x00-\x1f]/g,kye);return MJ(a,"single",t)}function kye(n){var t=n.charCodeAt(0),o={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return o?"\\"+o:"\\x"+(t<16?"0":"")+Eye.call(t.toString(16))}function ZE(n){return"Object("+n+")"}function LT(n){return n+" { ? }"}function DJ(n,t,o,i){var e=i?YT(o,i):qn.call(o,", ");return n+" ("+t+") {"+e+"}"}function vye(n){for(var t=0;t=0)return!1;return!0}function Pye(n,t){var o;if(n.indent===" ")o=" ";else if(typeof n.indent=="number"&&n.indent>0)o=qn.call(Array(n.indent+1)," ");else return null;return{base:o,prev:qn.call(Array(t+1),o)}}function YT(n,t){if(n.length===0)return"";var o=` +`+t.prev+t.base;return o+qn.call(n,","+o)+` +`+t.prev}function HQ(n,t){var o=xT(n),i=[];if(o){i.length=n.length;for(var e=0;e{"use strict";var Gye=AC(),Fye=qg(),YQ=function(n,t,o){for(var i=n,e;(e=i.next)!=null;i=e)if(e.key===t)return i.next=e.next,o||(e.next=n.next,n.next=e),e},Lye=function(n,t){if(n){var o=YQ(n,t);return o&&o.value}},Uye=function(n,t,o){var i=YQ(n,t);i?i.value=o:n.next={key:t,next:n.next,value:o}},Hye=function(n,t){return n?!!YQ(n,t):!1},Kye=function(n,t){if(n)return YQ(n,t,!0)};kJ.exports=function(){var t,o={assert:function(i){if(!o.has(i))throw new Fye("Side channel does not contain "+Gye(i))},delete:function(i){var e=Kye(t,i);return e&&t&&!t.next&&(t=void 0),!!e},get:function(i){return Lye(t,i)},has:function(i){return Hye(t,i)},set:function(i,e){t||(t={next:void 0}),Uye(t,i,e)}};return o}});var zT=$((oiA,FJ)=>{"use strict";var PJ=kE(),GJ=m_(),xye=GJ([PJ("%String.prototype.indexOf%")]);FJ.exports=function(t,o){var i=PJ(t,!!o);return typeof i=="function"&&xye(t,".prototype.")>-1?GJ([i]):i}});var VT=$((niA,UJ)=>{"use strict";var Yye=kE(),tC=zT(),jye=AC(),Jye=qg(),LJ=Yye("%Map%",!0),qye=tC("Map.prototype.get",!0),zye=tC("Map.prototype.set",!0),Vye=tC("Map.prototype.has",!0),Wye=tC("Map.prototype.delete",!0),Zye=tC("Map.prototype.size",!0);UJ.exports=!!LJ&&function(){var t,o={assert:function(i){if(!o.has(i))throw new Jye("Side channel does not contain "+jye(i))},delete:function(i){if(t){var e=Wye(t,i);return Zye(t)===0&&(t=void 0),e}return!1},get:function(i){if(t)return qye(t,i)},has:function(i){return t?Vye(t,i):!1},set:function(i,e){t||(t=new LJ),zye(t,i,e)}};return o}});var KJ=$((siA,HJ)=>{"use strict";var Xye=kE(),JQ=zT(),$ye=AC(),jQ=VT(),eme=qg(),kp=Xye("%WeakMap%",!0),Ame=JQ("WeakMap.prototype.get",!0),tme=JQ("WeakMap.prototype.set",!0),rme=JQ("WeakMap.prototype.has",!0),ame=JQ("WeakMap.prototype.delete",!0);HJ.exports=kp?function(){var t,o,i={assert:function(e){if(!i.has(e))throw new eme("Side channel does not contain "+$ye(e))},delete:function(e){if(kp&&e&&(typeof e=="object"||typeof e=="function")){if(t)return ame(t,e)}else if(jQ&&o)return o.delete(e);return!1},get:function(e){return kp&&e&&(typeof e=="object"||typeof e=="function")&&t?Ame(t,e):o&&o.get(e)},has:function(e){return kp&&e&&(typeof e=="object"||typeof e=="function")&&t?rme(t,e):!!o&&o.has(e)},set:function(e,a){kp&&e&&(typeof e=="object"||typeof e=="function")?(t||(t=new kp),tme(t,e,a)):jQ&&(o||(o=jQ()),o.set(e,a))}};return i}:jQ});var WT=$((giA,xJ)=>{"use strict";var ime=qg(),ome=AC(),nme=vJ(),sme=VT(),gme=KJ(),cme=gme||sme||nme;xJ.exports=function(){var t,o={assert:function(i){if(!o.has(i)){var e=i&&Object(i)===i?"the given object key":ome(i);throw new ime("Side channel does not contain "+e)}},delete:function(i){return!!t&&t.delete(i)},get:function(i){return t&&t.get(i)},has:function(i){return!!t&&t.has(i)},set:function(i,e){t||(t=cme()),t.set(i,e)}};return o}});var qQ=$((ciA,YJ)=>{"use strict";var Ime=String.prototype.replace,lme=/%20/g,ZT={RFC1738:"RFC1738",RFC3986:"RFC3986"};YJ.exports={default:ZT.RFC3986,formatters:{RFC1738:function(n){return Ime.call(n,lme,"+")},RFC3986:function(n){return String(n)}},RFC1738:ZT.RFC1738,RFC3986:ZT.RFC3986}});var A0=$((IiA,qJ)=>{"use strict";var pme=qQ(),JJ=WT(),jJ=u_(),XT=Object.prototype.hasOwnProperty,OI=Array.isArray,VQ=JJ(),bI=function(t,o){return VQ.set(t,o),t},MI=function(t){return VQ.has(t)},rC=function(t){return VQ.get(t)},$T=function(t,o){VQ.set(t,o)},zn=(function(){for(var n=[],t=0;t<256;++t)n[n.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return n})(),dme=function(t){for(;t.length>1;){var o=t.pop(),i=o.obj[o.prop];if(OI(i)){for(var e=[],a=0;a=i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return bI(vp(t.concat(o),i),e)}t[e]=o}else if(t&&typeof t=="object")if(MI(t)){var a=rC(t)+1;t[a]=o,$T(t,a)}else{if(i&&i.strictMerge)return[t,o];(i&&(i.plainObjects||i.allowPrototypes)||!XT.call(Object.prototype,o))&&(t[o]=!0)}else return[t,o];return t}if(!t||typeof t!="object"){if(MI(o)){for(var A=Object.keys(o),r=i&&i.plainObjects?{__proto__:null,0:t}:{0:t},s=0;si.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return bI(vp(c,i),c.length-1)}return c}var I=t;if(OI(t)&&!OI(o)&&(I=vp(t,i)),OI(t)&&OI(o)){if(o.forEach(function(d,B){if(XT.call(t,B)){var f=t[B];f&&typeof f=="object"&&d&&typeof d=="object"?t[B]=n(f,d,i):t[t.length]=d}else t[B]=d}),i&&typeof i.arrayLimit=="number"&&t.length>i.arrayLimit){if(i.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+i.arrayLimit+" element"+(i.arrayLimit===1?"":"s")+" allowed in an array.");return bI(vp(t,i),t.length-1)}return t}return Object.keys(o).reduce(function(d,B){var f=o[B];if(XT.call(d,B)?e0(d,B,n(d[B],f,i)):e0(d,B,f),MI(o)&&!MI(d)&&bI(d,rC(o)),MI(d)){var Q=parseInt(B,10);String(Q)===B&&Q>=0&&Q>rC(d)&&$T(d,Q)}return d},I)},Eme=function(t,o){return Object.keys(o).reduce(function(i,e){return e0(i,e,o[e]),i},t)},Cme=function(n,t,o){var i=n.replace(/\+/g," ");if(o==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},zQ=1024,ume=function(t,o,i,e,a){if(t.length===0)return t;var A=t;if(typeof t=="symbol"?A=Symbol.prototype.toString.call(t):typeof t!="string"&&(A=String(t)),i==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var r="",s=0;s=zQ?A.slice(s,s+zQ):A;if(s+zQ=55296&&c<=56319&&(g=g.slice(0,-1),s-=1)}for(var I=[],d=0;d=48&&B<=57||B>=65&&B<=90||B>=97&&B<=122||a===pme.RFC1738&&(B===40||B===41)){I[I.length]=g.charAt(d);continue}if(B<128){I[I.length]=zn[B];continue}if(B<2048){I[I.length]=zn[192|B>>6]+zn[128|B&63];continue}if(B<55296||B>=57344){I[I.length]=zn[224|B>>12]+zn[128|B>>6&63]+zn[128|B&63];continue}d+=1,B=65536+((B&1023)<<10|g.charCodeAt(d)&1023),I[I.length]=zn[240|B>>18]+zn[128|B>>12&63]+zn[128|B>>6&63]+zn[128|B&63]}r+=I.join("")}return r},Bme=function(t){for(var o=[{obj:{o:t},prop:"o"}],i=JJ(),e=0;ei){if(a)throw new RangeError("Array limit exceeded. Only "+i+" element"+(i===1?"":"s")+" allowed in an array.");return bI(vp(r,{plainObjects:e}),r.length-1)}return r},mme=function(t,o){if(OI(t)){for(var i=[],e=0;e{"use strict";var VJ=WT(),WQ=A0(),aC=qQ(),Sme=Object.prototype.hasOwnProperty,WJ={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,o){return t+"["+o+"]"},repeat:function(t){return t}},Vn=Array.isArray,Dme=Array.prototype.push,ZJ=function(n,t){Dme.apply(n,Vn(t)?t:[t])},wme=Date.prototype.toISOString,zJ=aC.default,Tr={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:WQ.encode,encodeValuesOnly:!1,filter:void 0,format:zJ,formatter:aC.formatters[zJ],indices:!1,serializeDate:function(t){return wme.call(t)},skipNulls:!1,strictNullHandling:!1},Ome=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},t0={},bme=function n(t,o,i,e,a,A,r,s,g,c,I,d,B,f,Q,y,m,_){for(var T=t,R=_,H=0,j=!1;(R=R.get(t0))!==void 0&&!j;){var F=R.get(t);if(H+=1,typeof F<"u"){if(F===H)throw new RangeError("Cyclic object value");j=!0}typeof R.get(t0)>"u"&&(H=0)}if(typeof c=="function"?T=c(o,T):T instanceof Date?T=B(T):i==="comma"&&Vn(T)&&(T=WQ.maybeMap(T,function(se){return se instanceof Date?B(se):se})),T===null){if(A)return Q(g&&!y?g(o,Tr.encoder,m,"key",f):o);T=""}if(Ome(T)||WQ.isBuffer(T)){if(g){var q=y?o:g(o,Tr.encoder,m,"key",f);return[Q(q)+"="+Q(g(T,Tr.encoder,m,"value",f))]}return[Q(o)+"="+Q(String(T))]}var J=[];if(typeof T>"u")return J;var x;if(i==="comma"&&Vn(T))y&&g&&(T=WQ.maybeMap(T,function(se){return se==null?se:g(se)})),x=[{value:T.length>0?T.join(",")||null:void 0}];else if(Vn(c))x=c;else{var P=Object.keys(T);x=I?P.sort(I):P}var z=s?String(o).replace(/\./g,"%2E"):String(o),U=e&&Vn(T)&&T.length===1?z+"[]":z;if(a&&Vn(T)&&T.length===0)return U+"[]";for(var N=0;N"u"?t.encodeDotInKeys===!0?!0:Tr.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Tr.addQueryPrefix,allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Tr.allowEmptyArrays,arrayFormat:A,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Tr.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Tr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Tr.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Tr.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Tr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Tr.encodeValuesOnly,filter:a,format:i,formatter:e,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Tr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Tr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Tr.strictNullHandling}};XJ.exports=function(n,t){var o=n,i=Mme(t),e,a;typeof i.filter=="function"?(a=i.filter,o=a("",o)):Vn(i.filter)&&(a=i.filter,e=a);var A=[];if(typeof o!="object"||o===null)return"";var r=WJ[i.arrayFormat],s=r==="comma"&&i.commaRoundTrip;e||(e=Object.keys(o)),i.sort&&e.sort(i.sort);for(var g=VJ(),c=0;c"u"||I===null)){var d=o[I];i.skipNulls&&d===null||ZJ(A,bme(d,I,r,s,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,g))}}var B=A.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B"+i.delimiter:f+="utf8=%E2%9C%93"+i.delimiter),B.length>0?f+B:""}});var tq=$((piA,Aq)=>{"use strict";var Wn=A0(),ZQ=Object.prototype.hasOwnProperty,r0=Array.isArray,or={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Wn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},_me=function(n){return n.replace(/&#(\d+);/g,function(t,o){return String.fromCharCode(parseInt(o,10))})},eq=function(n,t,o,i){if(n&&typeof n=="string"&&t.comma&&n.indexOf(",")>-1){if(i&&t.throwOnLimitExceeded)for(var e=0,a=n.indexOf(",");a>-1;){if(e+=1,e>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");a=n.indexOf(",",a+1)}return n.split(",")}if(t.throwOnLimitExceeded&&o>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return n},Tme="utf8=%26%2310003%3B",Nme="utf8=%E2%9C%93",Rme=function(t,o){var i={__proto__:null},e=o.ignoreQueryPrefix?t.replace(/^\?/,""):t;e=e.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=o.parameterLimit===1/0?void 0:o.parameterLimit,A=e.split(o.delimiter,o.throwOnLimitExceeded&&typeof a<"u"?a+1:a);if(o.throwOnLimitExceeded&&typeof a<"u"&&A.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var r=-1,s,g=o.charset;if(o.charsetSentinel)for(s=0;s-1&&(f=r0(f)?[f]:f),o.comma&&r0(f)&&f.length>o.arrayLimit&&(f=Wn.combine([],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded)),B!==null){var Q=ZQ.call(i,B);Q&&(o.duplicates==="combine"||c.indexOf("[]=")>-1)?i[B]=Wn.combine(i[B],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded):(!Q||o.duplicates==="last")&&(i[B]=f)}}return i},kme=function(n,t,o,i){var e=0;if(n.length>0&&n[n.length-1]==="[]"){var a=n.slice(0,-1).join("");e=Array.isArray(t)&&t[a]?t[a].length:0}for(var A=i?t:eq(t,o,e),r=n.length-1;r>=0;--r){var s,g=n[r];if(g==="[]"&&o.parseArrays)Wn.isOverflow(A)?s=A:s=o.allowEmptyArrays&&(A===""||o.strictNullHandling&&A===null)?[]:Wn.combine([],A,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded);else{s=o.plainObjects?{__proto__:null}:{};var c=g.charAt(0)==="["&&g.charAt(g.length-1)==="]"?g.slice(1,-1):g,I=o.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(I,10),B=!isNaN(d)&&g!==I&&String(d)===I&&d>=0&&o.parseArrays;if(!o.parseArrays&&I==="")s={0:A};else if(B&&d=0?i.slice(0,a):i;if(A){if(!o.plainObjects&&ZQ.call(Object.prototype,A)&&!o.allowPrototypes)return;e[e.length]=A}for(var r=i.length,s=a,g=0;s>=0&&g=0){if(o.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");e[e.length]="["+i.slice(s)+"]"}return e},Pme=function(t,o,i,e){if(t){var a=vme(t,i);if(a)return kme(a,o,i,e)}},Gme=function(t){if(!t)return or;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var o=typeof t.charset>"u"?or.charset:t.charset,i=typeof t.duplicates>"u"?or.duplicates:t.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var e=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:or.allowDots:!!t.allowDots;return{allowDots:e,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:or.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:or.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:or.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:or.arrayLimit,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:or.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:or.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:or.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:or.decoder,delimiter:typeof t.delimiter=="string"||Wn.isRegExp(t.delimiter)?t.delimiter:or.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:or.depth,duplicates:i,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:or.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:or.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:or.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:or.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:or.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:or.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}};Aq.exports=function(n,t){var o=Gme(t);if(n===""||n===null||typeof n>"u")return o.plainObjects?{__proto__:null}:{};for(var i=typeof n=="string"?Rme(n,o):n,e=o.plainObjects?{__proto__:null}:{},a=Object.keys(i),A=0;A{"use strict";var Fme=$J(),Lme=tq(),Ume=qQ();rq.exports={formats:Ume,parse:Lme,stringify:Fme}});var oq=$((hiA,iq)=>{function Hme(n){return n}iq.exports=Hme});var xq=$((iC,Gp)=>{var Kme=200,xme="Expected a function",h0="__lodash_hash_undefined__",ay=1,Fp=2,Eq=1/0,Cq=9007199254740991,XQ="[object Arguments]",o0="[object Array]",uq="[object Boolean]",Bq="[object Date]",fq="[object Error]",Qq="[object Function]",Yme="[object GeneratorFunction]",$Q="[object Map]",yq="[object Number]",Pp="[object Object]",nq="[object Promise]",mq="[object RegExp]",ey="[object Set]",Sq="[object String]",Dq="[object Symbol]",n0="[object WeakMap]",wq="[object ArrayBuffer]",Ay="[object DataView]",jme="[object Float32Array]",Jme="[object Float64Array]",qme="[object Int8Array]",zme="[object Int16Array]",Vme="[object Int32Array]",Wme="[object Uint8Array]",Zme="[object Uint8ClampedArray]",Xme="[object Uint16Array]",$me="[object Uint32Array]",eSe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ASe=/^\w*$/,tSe=/^\./,rSe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,aSe=/[\\^$.*+?()[\]{}|]/g,iSe=/\\(\\)?/g,oSe=/^\[object .+?Constructor\]$/,nSe=/^(?:0|[1-9]\d*)$/,Ht={};Ht[jme]=Ht[Jme]=Ht[qme]=Ht[zme]=Ht[Vme]=Ht[Wme]=Ht[Zme]=Ht[Xme]=Ht[$me]=!0;Ht[XQ]=Ht[o0]=Ht[wq]=Ht[uq]=Ht[Ay]=Ht[Bq]=Ht[fq]=Ht[Qq]=Ht[$Q]=Ht[yq]=Ht[Pp]=Ht[mq]=Ht[ey]=Ht[Sq]=Ht[n0]=!1;var Oq=typeof global=="object"&&global&&global.Object===Object&&global,sSe=typeof self=="object"&&self&&self.Object===Object&&self,Ac=Oq||sSe||Function("return this")(),bq=typeof iC=="object"&&iC&&!iC.nodeType&&iC,sq=bq&&typeof Gp=="object"&&Gp&&!Gp.nodeType&&Gp,gSe=sq&&sq.exports===bq,gq=gSe&&Oq.process,cq=(function(){try{return gq&&gq.binding("util")}catch{}})(),Iq=cq&&cq.isTypedArray;function Mq(n,t){for(var o=-1,i=t.length,e=n.length;++o-1}function FSe(n,t){var o=this.__data__,i=oy(o,n);return i<0?o.push([n,t]):o[i][1]=t,this}Xs.prototype.clear=kSe;Xs.prototype.delete=vSe;Xs.prototype.get=PSe;Xs.prototype.has=GSe;Xs.prototype.set=FSe;function $s(n){var t=-1,o=n?n.length:0;for(this.clear();++tr))return!1;var g=a.get(n);if(g&&a.get(t))return g==t;var c=-1,I=!0,d=e&ay?new ry:void 0;for(a.set(n,t),a.set(t,n);++c-1&&n%1==0&&n-1&&n%1==0&&n<=Cq}function sC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function cy(n){return!!n&&typeof n=="object"}function Q0(n){return typeof n=="symbol"||cy(n)&&Lp.call(n)==Dq}var SDe=Iq?pSe(Iq):rDe;function DDe(n){return n==null?"":IDe(n)}function wDe(n,t,o){var i=n==null?void 0:Nq(n,t);return i===void 0?o:i}function ODe(n,t){return n!=null&&uDe(n,t,$Se)}function d0(n){return B0(n)?Tq(n):iDe(n)}function bDe(n){return B0(n)?Tq(n,!0):oDe(n)}function MDe(n,t){return n==null?{}:gDe(n,dDe(n),aDe(t))}function _De(n){return n}function TDe(n){return sy(n)?ISe(gy(n)):cDe(n)}function Kq(){return[]}Gp.exports=MDe});var u4=$((gC,Hp)=>{var NDe=200,$q="__lodash_hash_undefined__",RDe=800,kDe=16,e4=9007199254740991,A4="[object Arguments]",vDe="[object Array]",PDe="[object AsyncFunction]",GDe="[object Boolean]",FDe="[object Date]",LDe="[object Error]",t4="[object Function]",UDe="[object GeneratorFunction]",HDe="[object Map]",KDe="[object Number]",xDe="[object Null]",r4="[object Object]",YDe="[object Proxy]",jDe="[object RegExp]",JDe="[object Set]",qDe="[object String]",zDe="[object Undefined]",VDe="[object WeakMap]",WDe="[object ArrayBuffer]",ZDe="[object DataView]",XDe="[object Float32Array]",$De="[object Float64Array]",ewe="[object Int8Array]",Awe="[object Int16Array]",twe="[object Int32Array]",rwe="[object Uint8Array]",awe="[object Uint8ClampedArray]",iwe="[object Uint16Array]",owe="[object Uint32Array]",nwe=/[\\^$.*+?()[\]{}|]/g,swe=/^\[object .+?Constructor\]$/,gwe=/^(?:0|[1-9]\d*)$/,Kt={};Kt[XDe]=Kt[$De]=Kt[ewe]=Kt[Awe]=Kt[twe]=Kt[rwe]=Kt[awe]=Kt[iwe]=Kt[owe]=!0;Kt[A4]=Kt[vDe]=Kt[WDe]=Kt[GDe]=Kt[ZDe]=Kt[FDe]=Kt[LDe]=Kt[t4]=Kt[HDe]=Kt[KDe]=Kt[r4]=Kt[jDe]=Kt[JDe]=Kt[qDe]=Kt[VDe]=!1;var a4=typeof global=="object"&&global&&global.Object===Object&&global,cwe=typeof self=="object"&&self&&self.Object===Object&&self,lC=a4||cwe||Function("return this")(),i4=typeof gC=="object"&&gC&&!gC.nodeType&&gC,cC=i4&&typeof Hp=="object"&&Hp&&!Hp.nodeType&&Hp,o4=cC&&cC.exports===i4,y0=o4&&a4.process,Yq=(function(){try{var n=cC&&cC.require&&cC.require("util").types;return n||y0&&y0.binding&&y0.binding("util")}catch{}})(),jq=Yq&&Yq.isTypedArray;function Iwe(n,t,o){switch(o.length){case 0:return n.call(t);case 1:return n.call(t,o[0]);case 2:return n.call(t,o[0],o[1]);case 3:return n.call(t,o[0],o[1],o[2])}return n.apply(t,o)}function lwe(n,t){for(var o=-1,i=Array(n);++o-1}function kwe(n,t){var o=this.__data__,i=hy(o,n);return i<0?(++this.size,o.push([n,t])):o[i][1]=t,this}Ag.prototype.clear=_we;Ag.prototype.delete=Twe;Ag.prototype.get=Nwe;Ag.prototype.has=Rwe;Ag.prototype.set=kwe;function Kp(n){var t=-1,o=n==null?0:n.length;for(this.clear();++t1?o[e-1]:void 0,A=e>2?o[2]:void 0;for(a=n.length>3&&typeof a=="function"?(e--,a):void 0,A&&gOe(o[0],o[1],A)&&(a=e<3?void 0:a,e=1),t=Object(t);++i-1&&n%1==0&&n0){if(++t>=RDe)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function COe(n){if(n!=null){try{return dy.call(n)}catch{}try{return n+""}catch{}}return""}function uy(n,t){return n===t||n!==n&&t!==t}var w0=Xq((function(){return arguments})())?Xq:function(n){return pC(n)&&eg.call(n,"callee")&&!fwe.call(n,"callee")},O0=Array.isArray;function _0(n){return n!=null&&d4(n.length)&&!T0(n)}function uOe(n){return pC(n)&&_0(n)}var p4=ywe||mOe;function T0(n){if(!kI(n))return!1;var t=Ey(n);return t==t4||t==UDe||t==PDe||t==YDe}function d4(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e4}function kI(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function pC(n){return n!=null&&typeof n=="object"}function BOe(n){if(!pC(n)||Ey(n)!=r4)return!1;var t=s4(n);if(t===null)return!0;var o=eg.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&dy.call(o)==uwe}var h4=jq?pwe(jq):Vwe;function fOe(n){return aOe(n,E4(n))}function E4(n){return _0(n)?jwe(n,!0):Wwe(n)}var QOe=iOe(function(n,t,o){c4(n,t,o)});function yOe(n){return function(){return n}}function C4(n){return n}function mOe(){return!1}Hp.exports=QOe});var tg=$((EiA,Q4)=>{"use strict";var B4=["nodebuffer","arraybuffer","fragments"],f4=typeof Blob<"u";f4&&B4.push("blob");Q4.exports={BINARY_TYPES:B4,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:f4,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var dC=$((CiA,By)=>{"use strict";var{EMPTY_BUFFER:SOe}=tg(),N0=Buffer[Symbol.species];function DOe(n,t){if(n.length===0)return SOe;if(n.length===1)return n[0];let o=Buffer.allocUnsafe(t),i=0;for(let e=0;e{"use strict";var S4=Symbol("kDone"),k0=Symbol("kRun"),v0=class{constructor(t){this[S4]=()=>{this.pending--,this[k0]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[k0]()}[k0](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[S4])}}};D4.exports=v0});var Jp=$((BiA,_4)=>{"use strict";var hC=Xe("zlib"),O4=dC(),OOe=w4(),{kStatusCode:b4}=tg(),bOe=Buffer[Symbol.species],MOe=Buffer.from([0,0,255,255]),Qy=Symbol("permessage-deflate"),rg=Symbol("total-length"),Yp=Symbol("callback"),tc=Symbol("buffers"),jp=Symbol("error"),fy,P0=class{constructor(t){if(this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!fy){let o=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;fy=new OOe(o)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[Yp];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let o=this._options,i=t.find(e=>!(o.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(o.serverMaxWindowBits===!1||typeof o.serverMaxWindowBits=="number"&&o.serverMaxWindowBits>e.server_max_window_bits)||typeof o.clientMaxWindowBits=="number"&&(typeof e.client_max_window_bits=="number"?o.clientMaxWindowBits>e.client_max_window_bits:!e.client_max_window_bits)));if(!i)throw new Error("None of the extension offers can be accepted");return o.serverNoContextTakeover&&(i.server_no_context_takeover=!0),o.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof o.serverMaxWindowBits=="number"&&(i.server_max_window_bits=o.serverMaxWindowBits),typeof o.clientMaxWindowBits=="number"?i.client_max_window_bits=o.clientMaxWindowBits:(i.client_max_window_bits===!0||o.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(t){let o=t[0];if(this._options.clientNoContextTakeover===!1&&o.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!o.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(o.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&o.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return o}normalizeParams(t){return t.forEach(o=>{Object.keys(o).forEach(i=>{let e=o[i];if(e.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(e=e[0],i==="client_max_window_bits"){if(e!==!0){let a=+e;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${e}`);e=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${e}`)}else if(i==="server_max_window_bits"){let a=+e;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${e}`);e=a}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(e!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${e}`)}else throw new Error(`Unknown parameter "${i}"`);o[i]=e})}),t}decompress(t,o,i){fy.add(e=>{this._decompress(t,o,(a,A)=>{e(),i(a,A)})})}compress(t,o,i){fy.add(e=>{this._compress(t,o,(a,A)=>{e(),i(a,A)})})}_decompress(t,o,i){let e=this._isServer?"client":"server";if(!this._inflate){let a=`${e}_max_window_bits`,A=typeof this.params[a]!="number"?hC.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=hC.createInflateRaw({...this._options.zlibInflateOptions,windowBits:A}),this._inflate[Qy]=this,this._inflate[rg]=0,this._inflate[tc]=[],this._inflate.on("error",TOe),this._inflate.on("data",M4)}this._inflate[Yp]=i,this._inflate.write(t),o&&this._inflate.write(MOe),this._inflate.flush(()=>{let a=this._inflate[jp];if(a){this._inflate.close(),this._inflate=null,i(a);return}let A=O4.concat(this._inflate[tc],this._inflate[rg]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[rg]=0,this._inflate[tc]=[],o&&this.params[`${e}_no_context_takeover`]&&this._inflate.reset()),i(null,A)})}_compress(t,o,i){let e=this._isServer?"server":"client";if(!this._deflate){let a=`${e}_max_window_bits`,A=typeof this.params[a]!="number"?hC.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=hC.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:A}),this._deflate[rg]=0,this._deflate[tc]=[],this._deflate.on("data",_Oe)}this._deflate[Yp]=i,this._deflate.write(t),this._deflate.flush(hC.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=O4.concat(this._deflate[tc],this._deflate[rg]);o&&(a=new bOe(a.buffer,a.byteOffset,a.length-4)),this._deflate[Yp]=null,this._deflate[rg]=0,this._deflate[tc]=[],o&&this.params[`${e}_no_context_takeover`]&&this._deflate.reset(),i(null,a)})}};_4.exports=P0;function _Oe(n){this[tc].push(n),this[rg]+=n.length}function M4(n){if(this[rg]+=n.length,this[Qy]._maxPayload<1||this[rg]<=this[Qy]._maxPayload){this[tc].push(n);return}this[jp]=new RangeError("Max payload size exceeded"),this[jp].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[jp][b4]=1009,this.removeListener("data",M4),this.reset()}function TOe(n){if(this[Qy]._inflate=null,this[jp]){this[Yp](this[jp]);return}n[b4]=1007,this[Yp](n)}});var qp=$((fiA,yy)=>{"use strict";var{isUtf8:T4}=Xe("buffer"),{hasBlob:NOe}=tg(),ROe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function kOe(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function G0(n){let t=n.length,o=0;for(;o=t||(n[o+1]&192)!==128||(n[o+2]&192)!==128||n[o]===224&&(n[o+1]&224)===128||n[o]===237&&(n[o+1]&224)===160)return!1;o+=3}else if((n[o]&248)===240){if(o+3>=t||(n[o+1]&192)!==128||(n[o+2]&192)!==128||(n[o+3]&192)!==128||n[o]===240&&(n[o+1]&240)===128||n[o]===244&&n[o+1]>143||n[o]>244)return!1;o+=4}else return!1;return!0}function vOe(n){return NOe&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&(n[Symbol.toStringTag]==="Blob"||n[Symbol.toStringTag]==="File")}yy.exports={isBlob:vOe,isValidStatusCode:kOe,isValidUTF8:G0,tokenChars:ROe};if(T4)yy.exports.isValidUTF8=function(n){return n.length<24?G0(n):T4(n)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let n=Xe("utf-8-validate");yy.exports.isValidUTF8=function(t){return t.length<32?G0(t):n(t)}}catch{}});var K0=$((QiA,F4)=>{"use strict";var{Writable:POe}=Xe("stream"),N4=Jp(),{BINARY_TYPES:GOe,EMPTY_BUFFER:R4,kStatusCode:FOe,kWebSocket:LOe}=tg(),{concat:F0,toArrayBuffer:UOe,unmask:HOe}=dC(),{isValidStatusCode:KOe,isValidUTF8:k4}=qp(),my=Buffer[Symbol.species],So=0,v4=1,P4=2,G4=3,L0=4,U0=5,Sy=6,H0=class extends POe{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||GOe[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxBufferedChunks=t.maxBufferedChunks|0,this._maxFragments=t.maxFragments|0,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[LOe]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=So}_write(t,o,i){if(this._opcode===8&&this._state==So)return i();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){i(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(i)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t=i.length?o.set(this._buffers.shift(),e):(o.set(new Uint8Array(i.buffer,i.byteOffset,t),e),this._buffers[0]=new my(i.buffer,i.byteOffset+t,i.length-t)),t-=i.length}while(t>0);return o}startLoop(t){this._loop=!0;do switch(this._state){case So:this.getInfo(t);break;case v4:this.getPayloadLength16(t);break;case P4:this.getPayloadLength64(t);break;case G4:this.getMask();break;case L0:this.getData(t);break;case U0:case Sy:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!==0){let e=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(e);return}let i=(o[0]&64)===64;if(i&&!this._extensions[N4.extensionName]){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(this._fin=(o[0]&128)===128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(i){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(!this._fragmented){let e=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let e=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(e);return}if(i){let e=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(e);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let e=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(e);return}}else{let e=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(e);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)===128,this._isServer){if(!this._masked){let e=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(e);return}}else if(this._masked){let e=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(e);return}this._payloadLength===126?this._state=v4:this._payloadLength===127?this._state=P4:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),i=o.readUInt32BE(0);if(i>Math.pow(2,21)-1){let e=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(e);return}this._payloadLength=i*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}this._masked?this._state=G4:this._state=L0}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=L0}getData(t){let o=R4;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(o,t);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let i=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(i);return}if(this._compressed){this._state=U0,this.decompress(o,t);return}o.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(o)),this.dataMessage(t)}decompress(t,o){this._extensions[N4.extensionName].decompress(t,this._fin,(e,a)=>{if(e)return o(e);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let A=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");o(A);return}this._fragments.push(a)}this.dataMessage(o),this._state===So&&this.startLoop(o)})}dataMessage(t){if(!this._fin){this._state=So;return}let o=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let e;this._binaryType==="nodebuffer"?e=F0(i,o):this._binaryType==="arraybuffer"?e=UOe(F0(i,o)):this._binaryType==="blob"?e=new Blob(i):e=i,this._allowSynchronousEvents?(this.emit("message",e,!0),this._state=So):(this._state=Sy,setImmediate(()=>{this.emit("message",e,!0),this._state=So,this.startLoop(t)}))}else{let e=F0(i,o);if(!this._skipUTF8Validation&&!k4(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(a);return}this._state===U0||this._allowSynchronousEvents?(this.emit("message",e,!1),this._state=So):(this._state=Sy,setImmediate(()=>{this.emit("message",e,!1),this._state=So,this.startLoop(t)}))}}controlMessage(t,o){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,R4),this.end();else{let i=t.readUInt16BE(0);if(!KOe(i)){let a=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");o(a);return}let e=new my(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!k4(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");o(a);return}this._loop=!1,this.emit("conclude",i,e),this.end()}this._state=So;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=So):(this._state=Sy,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=So,this.startLoop(o)}))}createError(t,o,i,e,a){this._loop=!1,this._errored=!0;let A=new t(i?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(A,this.createError),A.code=a,A[FOe]=e,A}};F4.exports=H0});var j0=$((miA,H4)=>{"use strict";var{Duplex:yiA}=Xe("stream"),{randomFillSync:xOe}=Xe("crypto"),{types:{isUint8Array:YOe}}=Xe("util"),L4=Jp(),{EMPTY_BUFFER:jOe,kWebSocket:JOe,NOOP:qOe}=tg(),{isBlob:zp,isValidStatusCode:zOe}=qp(),{mask:U4,toBuffer:vI}=dC(),Do=Symbol("kByteLength"),VOe=Buffer.alloc(4),Dy=8*1024,PI,Vp=Dy,sn=0,WOe=1,ZOe=2,x0=class n{constructor(t,o,i){this._extensions=o||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=sn,this.onerror=qOe,this[JOe]=void 0}static frame(t,o){let i,e=!1,a=2,A=!1;o.mask&&(i=o.maskBuffer||VOe,o.generateMask?o.generateMask(i):(Vp===Dy&&(PI===void 0&&(PI=Buffer.alloc(Dy)),xOe(PI,0,Dy),Vp=0),i[0]=PI[Vp++],i[1]=PI[Vp++],i[2]=PI[Vp++],i[3]=PI[Vp++]),A=(i[0]|i[1]|i[2]|i[3])===0,a=6);let r;typeof t=="string"?(!o.mask||A)&&o[Do]!==void 0?r=o[Do]:(t=Buffer.from(t),r=t.length):(r=t.length,e=o.mask&&o.readOnly&&!A);let s=r;r>=65536?(a+=8,s=127):r>125&&(a+=2,s=126);let g=Buffer.allocUnsafe(e?r+a:a);return g[0]=o.fin?o.opcode|128:o.opcode,o.rsv1&&(g[0]|=64),g[1]=s,s===126?g.writeUInt16BE(r,2):s===127&&(g[2]=g[3]=0,g.writeUIntBE(r,4,6)),o.mask?(g[1]|=128,g[a-4]=i[0],g[a-3]=i[1],g[a-2]=i[2],g[a-1]=i[3],A?[g,t]:e?(U4(t,i,g,a,r),[g]):(U4(t,i,t,0,r),[g,t])):[g,t]}close(t,o,i,e){let a;if(t===void 0)a=jOe;else{if(typeof t!="number"||!zOe(t))throw new TypeError("First argument must be a valid error code number");if(o===void 0||!o.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let r=Buffer.byteLength(o);if(r>123)throw new RangeError("The message must not be greater than 123 bytes");if(a=Buffer.allocUnsafe(2+r),a.writeUInt16BE(t,0),typeof o=="string")a.write(o,2);else if(YOe(o))a.set(o,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let A={[Do]:a.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==sn?this.enqueue([this.dispatch,a,!1,A,e]):this.sendFrame(n.frame(a,A),e)}ping(t,o,i){let e,a;if(typeof t=="string"?(e=Buffer.byteLength(t),a=!1):zp(t)?(e=t.size,a=!1):(t=vI(t),e=t.length,a=vI.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[Do]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};zp(t)?this._state!==sn?this.enqueue([this.getBlobData,t,!1,A,i]):this.getBlobData(t,!1,A,i):this._state!==sn?this.enqueue([this.dispatch,t,!1,A,i]):this.sendFrame(n.frame(t,A),i)}pong(t,o,i){let e,a;if(typeof t=="string"?(e=Buffer.byteLength(t),a=!1):zp(t)?(e=t.size,a=!1):(t=vI(t),e=t.length,a=vI.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[Do]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};zp(t)?this._state!==sn?this.enqueue([this.getBlobData,t,!1,A,i]):this.getBlobData(t,!1,A,i):this._state!==sn?this.enqueue([this.dispatch,t,!1,A,i]):this.sendFrame(n.frame(t,A),i)}send(t,o,i){let e=this._extensions[L4.extensionName],a=o.binary?2:1,A=o.compress,r,s;typeof t=="string"?(r=Buffer.byteLength(t),s=!1):zp(t)?(r=t.size,s=!1):(t=vI(t),r=t.length,s=vI.readOnly),this._firstFragment?(this._firstFragment=!1,A&&e&&e.params[e._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(A=r>=e._threshold),this._compress=A):(A=!1,a=0),o.fin&&(this._firstFragment=!0);let g={[Do]:r,fin:o.fin,generateMask:this._generateMask,mask:o.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:s,rsv1:A};zp(t)?this._state!==sn?this.enqueue([this.getBlobData,t,this._compress,g,i]):this.getBlobData(t,this._compress,g,i):this._state!==sn?this.enqueue([this.dispatch,t,this._compress,g,i]):this.dispatch(t,this._compress,g,i)}getBlobData(t,o,i,e){this._bufferedBytes+=i[Do],this._state=ZOe,t.arrayBuffer().then(a=>{if(this._socket.destroyed){let r=new Error("The socket was closed while the blob was being read");process.nextTick(Y0,this,r,e);return}this._bufferedBytes-=i[Do];let A=vI(a);o?this.dispatch(A,o,i,e):(this._state=sn,this.sendFrame(n.frame(A,i),e),this.dequeue())}).catch(a=>{process.nextTick(XOe,this,a,e)})}dispatch(t,o,i,e){if(!o){this.sendFrame(n.frame(t,i),e);return}let a=this._extensions[L4.extensionName];this._bufferedBytes+=i[Do],this._state=WOe,a.compress(t,i.fin,(A,r)=>{if(this._socket.destroyed){let s=new Error("The socket was closed while data was being compressed");Y0(this,s,e);return}this._bufferedBytes-=i[Do],this._state=sn,i.readOnly=!1,this.sendFrame(n.frame(r,i),e),this.dequeue()})}dequeue(){for(;this._state===sn&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][Do],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][Do],this._queue.push(t)}sendFrame(t,o){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],o),this._socket.uncork()):this._socket.write(t[0],o)}};H4.exports=x0;function Y0(n,t,o){typeof o=="function"&&o(t);for(let i=0;i{"use strict";var{kForOnEventAttribute:EC,kListener:J0}=tg(),K4=Symbol("kCode"),x4=Symbol("kData"),Y4=Symbol("kError"),j4=Symbol("kMessage"),J4=Symbol("kReason"),Wp=Symbol("kTarget"),q4=Symbol("kType"),z4=Symbol("kWasClean"),ag=class{constructor(t){this[Wp]=null,this[q4]=t}get target(){return this[Wp]}get type(){return this[q4]}};Object.defineProperty(ag.prototype,"target",{enumerable:!0});Object.defineProperty(ag.prototype,"type",{enumerable:!0});var GI=class extends ag{constructor(t,o={}){super(t),this[K4]=o.code===void 0?0:o.code,this[J4]=o.reason===void 0?"":o.reason,this[z4]=o.wasClean===void 0?!1:o.wasClean}get code(){return this[K4]}get reason(){return this[J4]}get wasClean(){return this[z4]}};Object.defineProperty(GI.prototype,"code",{enumerable:!0});Object.defineProperty(GI.prototype,"reason",{enumerable:!0});Object.defineProperty(GI.prototype,"wasClean",{enumerable:!0});var Zp=class extends ag{constructor(t,o={}){super(t),this[Y4]=o.error===void 0?null:o.error,this[j4]=o.message===void 0?"":o.message}get error(){return this[Y4]}get message(){return this[j4]}};Object.defineProperty(Zp.prototype,"error",{enumerable:!0});Object.defineProperty(Zp.prototype,"message",{enumerable:!0});var CC=class extends ag{constructor(t,o={}){super(t),this[x4]=o.data===void 0?null:o.data}get data(){return this[x4]}};Object.defineProperty(CC.prototype,"data",{enumerable:!0});var $Oe={addEventListener(n,t,o={}){for(let e of this.listeners(n))if(!o[EC]&&e[J0]===t&&!e[EC])return;let i;if(n==="message")i=function(a,A){let r=new CC("message",{data:A?a:a.toString()});r[Wp]=this,wy(t,this,r)};else if(n==="close")i=function(a,A){let r=new GI("close",{code:a,reason:A.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Wp]=this,wy(t,this,r)};else if(n==="error")i=function(a){let A=new Zp("error",{error:a,message:a.message});A[Wp]=this,wy(t,this,A)};else if(n==="open")i=function(){let a=new ag("open");a[Wp]=this,wy(t,this,a)};else return;i[EC]=!!o[EC],i[J0]=t,o.once?this.once(n,i):this.on(n,i)},removeEventListener(n,t){for(let o of this.listeners(n))if(o[J0]===t&&!o[EC]){this.removeListener(n,o);break}}};V4.exports={CloseEvent:GI,ErrorEvent:Zp,Event:ag,EventTarget:$Oe,MessageEvent:CC};function wy(n,t,o){typeof n=="object"&&n.handleEvent?n.handleEvent.call(n,o):n.call(t,o)}});var Oy=$((DiA,Z4)=>{"use strict";var{tokenChars:uC}=qp();function Xn(n,t,o){n[t]===void 0?n[t]=[o]:n[t].push(o)}function ebe(n){let t=Object.create(null),o=Object.create(null),i=!1,e=!1,a=!1,A,r,s=-1,g=-1,c=-1,I=0;for(;I{let o=n[t];return Array.isArray(o)||(o=[o]),o.map(i=>[t].concat(Object.keys(i).map(e=>{let a=i[e];return Array.isArray(a)||(a=[a]),a.map(A=>A===!0?e:`${e}=${A}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Z4.exports={format:Abe,parse:ebe}});var Ty=$((biA,g8)=>{"use strict";var tbe=Xe("events"),rbe=Xe("https"),abe=Xe("http"),e8=Xe("net"),ibe=Xe("tls"),{randomBytes:obe,createHash:nbe}=Xe("crypto"),{Duplex:wiA,Readable:OiA}=Xe("stream"),{URL:q0}=Xe("url"),rc=Jp(),sbe=K0(),gbe=j0(),{isBlob:cbe}=qp(),{BINARY_TYPES:X4,CLOSE_TIMEOUT:Ibe,EMPTY_BUFFER:by,GUID:lbe,kForOnEventAttribute:z0,kListener:pbe,kStatusCode:dbe,kWebSocket:ta,NOOP:A8}=tg(),{EventTarget:{addEventListener:hbe,removeEventListener:Ebe}}=W4(),{format:Cbe,parse:ube}=Oy(),{toBuffer:Bbe}=dC(),t8=Symbol("kAborted"),V0=[8,13],ig=["CONNECTING","OPEN","CLOSING","CLOSED"],fbe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Wt=class n extends tbe{constructor(t,o,i){super(),this._binaryType=X4[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=by,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=n.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,o===void 0?o=[]:Array.isArray(o)||(typeof o=="object"&&o!==null?(i=o,o=[]):o=[o]),r8(this,t,o,i)):(this._autoPong=i.autoPong,this._closeTimeout=i.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){X4.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,o,i){let e=new sbe({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),a=new gbe(t,this._extensions,i.generateMask);this._receiver=e,this._sender=a,this._socket=t,e[ta]=this,a[ta]=this,t[ta]=this,e.on("conclude",mbe),e.on("drain",Sbe),e.on("error",Dbe),e.on("message",wbe),e.on("ping",Obe),e.on("pong",bbe),a.onerror=Mbe,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),o.length>0&&t.unshift(o),t.on("close",o8),t.on("data",_y),t.on("end",n8),t.on("error",s8),this._readyState=n.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[rc.extensionName]&&this._extensions[rc.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=n.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,o){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){Ji(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===n.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=n.CLOSING,this._sender.close(t,o,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),i8(this)}}pause(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=o=void 0):typeof o=="function"&&(i=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){W0(this,t,i);return}o===void 0&&(o=!this._isServer),this._sender.ping(t||by,o,i)}pong(t,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=o=void 0):typeof o=="function"&&(i=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){W0(this,t,i);return}o===void 0&&(o=!this._isServer),this._sender.pong(t||by,o,i)}resume(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,o,i){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"&&(i=o,o={}),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){W0(this,t,i);return}let e={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...o};this._extensions[rc.extensionName]||(e.compress=!1),this._sender.send(t||by,e,i)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){Ji(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(Wt,"CONNECTING",{enumerable:!0,value:ig.indexOf("CONNECTING")});Object.defineProperty(Wt.prototype,"CONNECTING",{enumerable:!0,value:ig.indexOf("CONNECTING")});Object.defineProperty(Wt,"OPEN",{enumerable:!0,value:ig.indexOf("OPEN")});Object.defineProperty(Wt.prototype,"OPEN",{enumerable:!0,value:ig.indexOf("OPEN")});Object.defineProperty(Wt,"CLOSING",{enumerable:!0,value:ig.indexOf("CLOSING")});Object.defineProperty(Wt.prototype,"CLOSING",{enumerable:!0,value:ig.indexOf("CLOSING")});Object.defineProperty(Wt,"CLOSED",{enumerable:!0,value:ig.indexOf("CLOSED")});Object.defineProperty(Wt.prototype,"CLOSED",{enumerable:!0,value:ig.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(n=>{Object.defineProperty(Wt.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(Wt.prototype,`on${n}`,{enumerable:!0,get(){for(let t of this.listeners(n))if(t[z0])return t[pbe];return null},set(t){for(let o of this.listeners(n))if(o[z0]){this.removeListener(n,o);break}typeof t=="function"&&this.addEventListener(n,t,{[z0]:!0})}})});Wt.prototype.addEventListener=hbe;Wt.prototype.removeEventListener=Ebe;g8.exports=Wt;function r8(n,t,o,i){let e={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:Ibe,protocolVersion:V0[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(n._autoPong=e.autoPong,n._closeTimeout=e.closeTimeout,!V0.includes(e.protocolVersion))throw new RangeError(`Unsupported protocol version: ${e.protocolVersion} (supported versions: ${V0.join(", ")})`);let a;if(t instanceof q0)a=t;else try{a=new q0(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),n._url=a.href;let A=a.protocol==="wss:",r=a.protocol==="ws+unix:",s;if(a.protocol!=="ws:"&&!A&&!r?s=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:r&&!a.pathname?s="The URL's pathname is empty":a.hash&&(s="The URL contains a fragment identifier"),s){let Q=new SyntaxError(s);if(n._redirects===0)throw Q;My(n,Q);return}let g=A?443:80,c=obe(16).toString("base64"),I=A?rbe.request:abe.request,d=new Set,B;if(e.createConnection=e.createConnection||(A?ybe:Qbe),e.defaultPort=e.defaultPort||g,e.port=a.port||g,e.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,e.headers={...e.headers,"Sec-WebSocket-Version":e.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},e.path=a.pathname+a.search,e.timeout=e.handshakeTimeout,e.perMessageDeflate&&(B=new rc({...e.perMessageDeflate,isServer:!1,maxPayload:e.maxPayload}),e.headers["Sec-WebSocket-Extensions"]=Cbe({[rc.extensionName]:B.offer()})),o.length){for(let Q of o){if(typeof Q!="string"||!fbe.test(Q)||d.has(Q))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(Q)}e.headers["Sec-WebSocket-Protocol"]=o.join(",")}if(e.origin&&(e.protocolVersion<13?e.headers["Sec-WebSocket-Origin"]=e.origin:e.headers.Origin=e.origin),(a.username||a.password)&&(e.auth=`${a.username}:${a.password}`),r){let Q=e.path.split(":");e.socketPath=Q[0],e.path=Q[1]}let f;if(e.followRedirects){if(n._redirects===0){n._originalIpc=r,n._originalSecure=A,n._originalHostOrSocketPath=r?e.socketPath:a.host;let Q=i&&i.headers;if(i={...i,headers:{}},Q)for(let[y,m]of Object.entries(Q))i.headers[y.toLowerCase()]=m}else if(n.listenerCount("redirect")===0){let Q=r?n._originalIpc?e.socketPath===n._originalHostOrSocketPath:!1:n._originalIpc?!1:a.host===n._originalHostOrSocketPath;(!Q||n._originalSecure&&!A)&&(delete e.headers.authorization,delete e.headers.cookie,Q||delete e.headers.host,e.auth=void 0)}e.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(e.auth).toString("base64")),f=n._req=I(e),n._redirects&&n.emit("redirect",n.url,f)}else f=n._req=I(e);e.timeout&&f.on("timeout",()=>{Ji(n,f,"Opening handshake has timed out")}),f.on("error",Q=>{f===null||f[t8]||(f=n._req=null,My(n,Q))}),f.on("response",Q=>{let y=Q.headers.location,m=Q.statusCode;if(y&&e.followRedirects&&m>=300&&m<400){if(++n._redirects>e.maxRedirects){Ji(n,f,"Maximum redirects exceeded");return}f.abort();let _;try{_=new q0(y,t)}catch{let R=new SyntaxError(`Invalid URL: ${y}`);My(n,R);return}r8(n,_,o,i)}else n.emit("unexpected-response",f,Q)||Ji(n,f,`Unexpected server response: ${Q.statusCode}`)}),f.on("upgrade",(Q,y,m)=>{if(n.emit("upgrade",Q),n.readyState!==Wt.CONNECTING)return;f=n._req=null;let _=Q.headers.upgrade;if(_===void 0||_.toLowerCase()!=="websocket"){Ji(n,y,"Invalid Upgrade header");return}let T=nbe("sha1").update(c+lbe).digest("base64");if(Q.headers["sec-websocket-accept"]!==T){Ji(n,y,"Invalid Sec-WebSocket-Accept header");return}let R=Q.headers["sec-websocket-protocol"],H;if(R!==void 0?d.size?d.has(R)||(H="Server sent an invalid subprotocol"):H="Server sent a subprotocol but none was requested":d.size&&(H="Server sent no subprotocol"),H){Ji(n,y,H);return}R&&(n._protocol=R);let j=Q.headers["sec-websocket-extensions"];if(j!==void 0){if(!B){Ji(n,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=ube(j)}catch{Ji(n,y,"Invalid Sec-WebSocket-Extensions header");return}let q=Object.keys(F);if(q.length!==1||q[0]!==rc.extensionName){Ji(n,y,"Server indicated an extension that was not requested");return}try{B.accept(F[rc.extensionName])}catch{Ji(n,y,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[rc.extensionName]=B}n.setSocket(y,m,{allowSynchronousEvents:e.allowSynchronousEvents,generateMask:e.generateMask,maxBufferedChunks:e.maxBufferedChunks,maxFragments:e.maxFragments,maxPayload:e.maxPayload,skipUTF8Validation:e.skipUTF8Validation})}),e.finishRequest?e.finishRequest(f,n):f.end()}function My(n,t){n._readyState=Wt.CLOSING,n._errorEmitted=!0,n.emit("error",t),n.emitClose()}function Qbe(n){return n.path=n.socketPath,e8.connect(n)}function ybe(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=e8.isIP(n.host)?"":n.host),ibe.connect(n)}function Ji(n,t,o){n._readyState=Wt.CLOSING;let i=new Error(o);Error.captureStackTrace(i,Ji),t.setHeader?(t[t8]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(My,n,i)):(t.destroy(i),t.once("error",n.emit.bind(n,"error")),t.once("close",n.emitClose.bind(n)))}function W0(n,t,o){if(t){let i=cbe(t)?t.size:Bbe(t).length;n._socket?n._sender._bufferedBytes+=i:n._bufferedAmount+=i}if(o){let i=new Error(`WebSocket is not open: readyState ${n.readyState} (${ig[n.readyState]})`);process.nextTick(o,i)}}function mbe(n,t){let o=this[ta];o._closeFrameReceived=!0,o._closeMessage=t,o._closeCode=n,o._socket[ta]!==void 0&&(o._socket.removeListener("data",_y),process.nextTick(a8,o._socket),n===1005?o.close():o.close(n,t))}function Sbe(){let n=this[ta];n.isPaused||n._socket.resume()}function Dbe(n){let t=this[ta];t._socket[ta]!==void 0&&(t._socket.removeListener("data",_y),process.nextTick(a8,t._socket),t.close(n[dbe])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n))}function $4(){this[ta].emitClose()}function wbe(n,t){this[ta].emit("message",n,t)}function Obe(n){let t=this[ta];t._autoPong&&t.pong(n,!this._isServer,A8),t.emit("ping",n)}function bbe(n){this[ta].emit("pong",n)}function a8(n){n.resume()}function Mbe(n){let t=this[ta];t.readyState!==Wt.CLOSED&&(t.readyState===Wt.OPEN&&(t._readyState=Wt.CLOSING,i8(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n)))}function i8(n){n._closeTimer=setTimeout(n._socket.destroy.bind(n._socket),n._closeTimeout)}function o8(){let n=this[ta];if(this.removeListener("close",o8),this.removeListener("data",_y),this.removeListener("end",n8),n._readyState=Wt.CLOSING,!this._readableState.endEmitted&&!n._closeFrameReceived&&!n._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);n._receiver.write(t)}n._receiver.end(),this[ta]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",$4),n._receiver.on("finish",$4))}function _y(n){this[ta]._receiver.write(n)||this.pause()}function n8(){let n=this[ta];n._readyState=Wt.CLOSING,n._receiver.end(),this.end()}function s8(){let n=this[ta];this.removeListener("error",s8),this.on("error",A8),n&&(n._readyState=Wt.CLOSING,this.destroy())}});var p8=$((_iA,l8)=>{"use strict";var MiA=Ty(),{Duplex:_be}=Xe("stream");function c8(n){n.emit("close")}function Tbe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function I8(n){this.removeListener("error",I8),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function Nbe(n,t){let o=!0,i=new _be({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(a,A){let r=!A&&i._readableState.objectMode?a.toString():a;i.push(r)||n.pause()}),n.once("error",function(a){i.destroyed||(o=!1,i.destroy(a))}),n.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(e,a){if(n.readyState===n.CLOSED){a(e),process.nextTick(c8,i);return}let A=!1;n.once("error",function(s){A=!0,a(s)}),n.once("close",function(){A||a(e),process.nextTick(c8,i)}),o&&n.terminate()},i._final=function(e){if(n.readyState===n.CONNECTING){n.once("open",function(){i._final(e)});return}n._socket!==null&&(n._socket._writableState.finished?(e(),i._readableState.endEmitted&&i.destroy()):(n._socket.once("finish",function(){e()}),n.close()))},i._read=function(){n.isPaused&&n.resume()},i._write=function(e,a,A){if(n.readyState===n.CONNECTING){n.once("open",function(){i._write(e,a,A)});return}n.send(e,A)},i.on("end",Tbe),i.on("error",I8),i}l8.exports=Nbe});var Z0=$((TiA,d8)=>{"use strict";var{tokenChars:Rbe}=qp();function kbe(n){let t=new Set,o=-1,i=-1,e=0;for(e;e{"use strict";var vbe=Xe("events"),Ny=Xe("http"),{Duplex:NiA}=Xe("stream"),{createHash:Pbe}=Xe("crypto"),h8=Oy(),FI=Jp(),Gbe=Z0(),Fbe=Ty(),{CLOSE_TIMEOUT:Lbe,GUID:Ube,kWebSocket:Hbe}=tg(),Kbe=/^[+/0-9A-Za-z]{22}==$/,E8=0,C8=1,B8=2,X0=class extends vbe{constructor(t,o){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:Lbe,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Fbe,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=Ny.createServer((i,e)=>{let a=Ny.STATUS_CODES[426];e.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),e.end(a)}),this._server.listen(t.port,t.host,t.backlog,o)):t.server&&(this._server=t.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=xbe(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(e,a,A)=>{this.handleUpgrade(e,a,A,i)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=E8}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===B8){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(BC,this);return}if(t&&this.once("close",t),this._state!==C8)if(this._state=C8,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(BC,this):process.nextTick(BC,this);else{let o=this._server;this._removeListeners(),this._removeListeners=this._server=null,o.close(()=>{BC(this)})}}shouldHandle(t){if(this.options.path){let o=t.url.indexOf("?");if((o!==-1?t.url.slice(0,o):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,o,i,e){o.on("error",u8);let a=t.headers["sec-websocket-key"],A=t.headers.upgrade,r=+t.headers["sec-websocket-version"];if(t.method!=="GET"){LI(this,t,o,405,"Invalid HTTP method");return}if(A===void 0||A.toLowerCase()!=="websocket"){LI(this,t,o,400,"Invalid Upgrade header");return}if(a===void 0||!Kbe.test(a)){LI(this,t,o,400,"Missing or invalid Sec-WebSocket-Key header");return}if(r!==13&&r!==8){LI(this,t,o,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(t)){fC(o,400);return}let s=t.headers["sec-websocket-protocol"],g=new Set;if(s!==void 0)try{g=Gbe.parse(s)}catch{LI(this,t,o,400,"Invalid Sec-WebSocket-Protocol header");return}let c=t.headers["sec-websocket-extensions"],I={};if(this.options.perMessageDeflate&&c!==void 0){let d=new FI({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let B=h8.parse(c);B[FI.extensionName]&&(d.accept(B[FI.extensionName]),I[FI.extensionName]=d)}catch{LI(this,t,o,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:t.headers[`${r===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(B,f,Q,y)=>{if(!B)return fC(o,f||401,Q,y);this.completeUpgrade(I,a,g,t,o,i,e)});return}if(!this.options.verifyClient(d))return fC(o,401)}this.completeUpgrade(I,a,g,t,o,i,e)}completeUpgrade(t,o,i,e,a,A,r){if(!a.readable||!a.writable)return a.destroy();if(a[Hbe])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>E8)return fC(a,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Pbe("sha1").update(o+Ube).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(i.size){let I=this.options.handleProtocols?this.options.handleProtocols(i,e):i.values().next().value;I&&(g.push(`Sec-WebSocket-Protocol: ${I}`),c._protocol=I)}if(t[FI.extensionName]){let I=t[FI.extensionName].params,d=h8.format({[FI.extensionName]:[I]});g.push(`Sec-WebSocket-Extensions: ${d}`),c._extensions=t}this.emit("headers",g,e),a.write(g.concat(`\r `).join(`\r -`)),a.removeListener("error",W4),c.setSocket(a,A,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(pC,this)})),r(c,e)}};X4.exports=P0;function gbe(n,t){for(let o of Object.keys(t))n.on(o,t[o]);return function(){for(let i of Object.keys(t))n.removeListener(i,t[i])}}function pC(n){n._state=Z4,n.emit("close")}function W4(){this.destroy()}function dC(n,t,o,i){o=o||fy.STATUS_CODES[t],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(o),...i},n.once("finish",n.destroy),n.end(`HTTP/1.1 ${t} ${fy.STATUS_CODES[t]}\r +`)),a.removeListener("error",u8),c.setSocket(a,A,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(BC,this)})),r(c,e)}};f8.exports=X0;function xbe(n,t){for(let o of Object.keys(t))n.on(o,t[o]);return function(){for(let i of Object.keys(t))n.removeListener(i,t[i])}}function BC(n){n._state=B8,n.emit("close")}function u8(){this.destroy()}function fC(n,t,o,i){o=o||Ny.STATUS_CODES[t],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(o),...i},n.once("finish",n.destroy),n.end(`HTTP/1.1 ${t} ${Ny.STATUS_CODES[t]}\r `+Object.keys(i).map(e=>`${e}: ${i[e]}`).join(`\r `)+`\r \r -`+o)}function RI(n,t,o,i,e,a){if(n.listenerCount("wsClientError")){let A=new Error(e);Error.captureStackTrace(A,RI),n.emit("wsClientError",A,o,t)}else dC(o,i,e,a)}});var t8=$((DaA,A8)=>{"use strict";A8.exports=Cbe;function Cbe(n,t){for(var o=new Array(arguments.length-1),i=0,e=2,a=!0;e{"use strict";var Qy=i8;Qy.length=function(t){var o=t.length;if(!o)return 0;for(var i=0;--o%4>1&&t.charAt(o)==="=";)++i;return Math.ceil(t.length*3)/4-i};var Jp=new Array(64),a8=new Array(123);for(sn=0;sn<64;)a8[Jp[sn]=sn<26?sn+65:sn<52?sn+71:sn<62?sn-4:sn-59|43]=sn++;var sn;Qy.encode=function(t,o,i){for(var e=null,a=[],A=0,r=0,s;o>2],s=(g&3)<<4,r=1;break;case 1:a[A++]=Jp[s|g>>4],s=(g&15)<<2,r=2;break;case 2:a[A++]=Jp[s|g>>6],a[A++]=Jp[g&63],r=0;break}A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a)),A=0)}return r&&(a[A++]=Jp[s],a[A++]=61,r===1&&(a[A++]=61)),e?(A&&e.push(String.fromCharCode.apply(String,a.slice(0,A))),e.join("")):String.fromCharCode.apply(String,a.slice(0,A))};var r8="invalid encoding";Qy.decode=function(t,o,i){for(var e=i,a=0,A,r=0;r1)break;if((s=a8[s])===void 0)throw Error(r8);switch(a){case 0:A=s,a=1;break;case 1:o[i++]=A<<2|(s&48)>>4,A=s,a=2;break;case 2:o[i++]=(A&15)<<4|(s&60)>>2,A=s,a=3;break;case 3:o[i++]=(A&3)<<6|s,a=0;break}}if(a===1)throw Error(r8);return i-e};Qy.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var s8=$((OaA,n8)=>{"use strict";n8.exports=yy;function yy(){this._listeners=Object.create(null)}yy.prototype.on=function(t,o,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:o,ctx:i||this}),this};yy.prototype.off=function(t,o){if(t===void 0)this._listeners=Object.create(null);else if(o===void 0)this._listeners[t]=[];else{var i=this._listeners[t];if(!i)return this;for(var e=0;e{"use strict";d8.exports=g8(g8);function g8(n){return typeof Float32Array<"u"?(function(){var t=new Float32Array([-0]),o=new Uint8Array(t.buffer),i=o[3]===128;function e(s,g,c){t[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3]}function a(s,g,c){t[0]=s,g[c]=o[3],g[c+1]=o[2],g[c+2]=o[1],g[c+3]=o[0]}n.writeFloatLE=i?e:a,n.writeFloatBE=i?a:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],t[0]}function r(s,g){return o[3]=s[g],o[2]=s[g+1],o[1]=s[g+2],o[0]=s[g+3],t[0]}n.readFloatLE=i?A:r,n.readFloatBE=i?r:A})():(function(){function t(i,e,a,A){var r=e<0?1:0;if(r&&(e=-e),e===0)i(1/e>0?0:2147483648,a,A);else if(isNaN(e))i(2143289344,a,A);else if(e>34028234663852886e22)i((r<<31|2139095040)>>>0,a,A);else if(e<11754943508222875e-54)i((r<<31|Math.round(e/1401298464324817e-60))>>>0,a,A);else{var s=Math.floor(Math.log(e)/Math.LN2),g=Math.round(e*Math.pow(2,-s)*8388608)&8388607;i((r<<31|s+127<<23|g)>>>0,a,A)}}n.writeFloatLE=t.bind(null,c8),n.writeFloatBE=t.bind(null,I8);function o(i,e,a){var A=i(e,a),r=(A>>31)*2+1,s=A>>>23&255,g=A&8388607;return s===255?g?NaN:r*(1/0):s===0?r*1401298464324817e-60*g:r*Math.pow(2,s-150)*(g+8388608)}n.readFloatLE=o.bind(null,l8),n.readFloatBE=o.bind(null,p8)})(),typeof Float64Array<"u"?(function(){var t=new Float64Array([-0]),o=new Uint8Array(t.buffer),i=o[7]===128;function e(s,g,c){t[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3],g[c+4]=o[4],g[c+5]=o[5],g[c+6]=o[6],g[c+7]=o[7]}function a(s,g,c){t[0]=s,g[c]=o[7],g[c+1]=o[6],g[c+2]=o[5],g[c+3]=o[4],g[c+4]=o[3],g[c+5]=o[2],g[c+6]=o[1],g[c+7]=o[0]}n.writeDoubleLE=i?e:a,n.writeDoubleBE=i?a:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],o[4]=s[g+4],o[5]=s[g+5],o[6]=s[g+6],o[7]=s[g+7],t[0]}function r(s,g){return o[7]=s[g],o[6]=s[g+1],o[5]=s[g+2],o[4]=s[g+3],o[3]=s[g+4],o[2]=s[g+5],o[1]=s[g+6],o[0]=s[g+7],t[0]}n.readDoubleLE=i?A:r,n.readDoubleBE=i?r:A})():(function(){function t(i,e,a,A,r,s){var g=A<0?1:0;if(g&&(A=-A),A===0)i(0,r,s+e),i(1/A>0?0:2147483648,r,s+a);else if(isNaN(A))i(0,r,s+e),i(2146959360,r,s+a);else if(A>17976931348623157e292)i(0,r,s+e),i((g<<31|2146435072)>>>0,r,s+a);else{var c;if(A<22250738585072014e-324)c=A/5e-324,i(c>>>0,r,s+e),i((g<<31|c/4294967296)>>>0,r,s+a);else{var I=Math.floor(Math.log(A)/Math.LN2);I===1024&&(I=1023),c=A*Math.pow(2,-I),i(c*4503599627370496>>>0,r,s+e),i((g<<31|I+1023<<20|c*1048576&1048575)>>>0,r,s+a)}}}n.writeDoubleLE=t.bind(null,c8,0,4),n.writeDoubleBE=t.bind(null,I8,4,0);function o(i,e,a,A,r){var s=i(A,r+e),g=i(A,r+a),c=(g>>31)*2+1,I=g>>>20&2047,d=4294967296*(g&1048575)+s;return I===2047?d?NaN:c*(1/0):I===0?c*5e-324*d:c*Math.pow(2,I-1075)*(d+4503599627370496)}n.readDoubleLE=o.bind(null,l8,0,4),n.readDoubleBE=o.bind(null,p8,4,0)})(),n}function c8(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}function I8(n,t,o){t[o]=n>>>24,t[o+1]=n>>>16&255,t[o+2]=n>>>8&255,t[o+3]=n&255}function l8(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}function p8(n,t){return(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0}});var C8=$(E8=>{"use strict";var F0=E8,G0=65533;F0.length=function(t){for(var o=0,i=0,e=0;e=192&&r<224?(g=(r&31)<<6|t[o++]&63,a[A++]=g>=128?g:G0):r>=224&&r<240?(c=(r&15)<<12|(t[o++]&63)<<6|t[o++]&63,a[A++]=c>=2048?c:G0):r>=240&&(s=(r&7)<<18|(t[o++]&63)<<12|(t[o++]&63)<<6|t[o++]&63,s<65536||s>1114111?a[A++]=G0:(s-=65536,a[A++]=55296+(s>>10),a[A++]=56320+(s&1023))),A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a.slice(0,A))),A=0);return e?(A&&e.push(String.fromCharCode.apply(String,a.slice(0,A))),e.join("")):String.fromCharCode.apply(String,a.slice(0,A))};F0.write=function(t,o,i){for(var e=i,a,A,r=0;r>6|192,o[i++]=a&63|128):(a&64512)===55296&&((A=t.charCodeAt(r+1))&64512)===56320?(a=65536+((a&1023)<<10)+(A&1023),++r,o[i++]=a>>18|240,o[i++]=a>>12&63|128,o[i++]=a>>6&63|128,o[i++]=a&63|128):(o[i++]=a>>12|224,o[i++]=a>>6&63|128,o[i++]=a&63|128);return i-e}});var B8=$((_aA,u8)=>{"use strict";u8.exports=ube;function ube(n,t,o){var i=o||8192,e=i>>>1,a=null,A=i;return function(s){if(s<1||s>e)return n(s);A+s>i&&(a=n(i),A=0);var g=t.call(a,A,A+=s);return A&7&&(A=(A|7)+1),g}}});var Q8=$((TaA,f8)=>{"use strict";f8.exports=ta;var hC=ec();function ta(n,t){this.lo=n>>>0,this.hi=t>>>0}var kI=ta.zero=new ta(0,0);kI.toNumber=function(){return 0};kI.zzEncode=kI.zzDecode=function(){return this};kI.length=function(){return 1};var Bbe=ta.zeroHash="\0\0\0\0\0\0\0\0";ta.fromNumber=function(t){if(t===0)return kI;var o=t<0;o&&(t=-t);var i=t>>>0,e=(t-i)/4294967296>>>0;return o&&(e=~e>>>0,i=~i>>>0,++i>4294967295&&(i=0,++e>4294967295&&(e=0))),new ta(i,e)};ta.from=function(t){if(typeof t=="number")return ta.fromNumber(t);if(hC.isString(t))if(hC.Long)t=hC.Long.fromString(t);else return ta.fromNumber(parseInt(t,10));return t.low||t.high?new ta(t.low>>>0,t.high>>>0):kI};ta.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var o=~this.lo+1>>>0,i=~this.hi>>>0;return o||(i=i+1>>>0),-(o+i*4294967296)}return this.lo+this.hi*4294967296};ta.prototype.toLong=function(t){return hC.Long?new hC.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var $g=String.prototype.charCodeAt;ta.fromHash=function(t){return t===Bbe?kI:new ta(($g.call(t,0)|$g.call(t,1)<<8|$g.call(t,2)<<16|$g.call(t,3)<<24)>>>0,($g.call(t,4)|$g.call(t,5)<<8|$g.call(t,6)<<16|$g.call(t,7)<<24)>>>0)};ta.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};ta.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};ta.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};ta.prototype.length=function(){var t=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return i===0?o===0?t<16384?t<128?1:2:t<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:i<128?9:10}});var y8=$((EC,L0)=>{(function(n,t){function o(i){return i.default||i}typeof define=="function"&&define.amd?define([],function(){var i={};return t(i),o(i)}):typeof EC=="object"?(t(EC),typeof L0=="object"&&(L0.exports=o(EC))):(function(){var i={};t(i),n.Long=o(i)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:EC,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function o(Y,N,P){this.low=Y|0,this.high=N|0,this.unsigned=!!P}o.prototype.__isLong__,Object.defineProperty(o.prototype,"__isLong__",{value:!0});function i(Y){return(Y&&Y.__isLong__)===!0}function e(Y){var N=Math.clz32(Y&-Y);return Y?31-N:N}o.isLong=i;var a={},A={};function r(Y,N){var P,V,te;return N?(Y>>>=0,(te=0<=Y&&Y<256)&&(V=A[Y],V)?V:(P=g(Y,0,!0),te&&(A[Y]=P),P)):(Y|=0,(te=-128<=Y&&Y<128)&&(V=a[Y],V)?V:(P=g(Y,Y<0?-1:0,!1),te&&(a[Y]=P),P))}o.fromInt=r;function s(Y,N){if(isNaN(Y))return N?G:T;if(N){if(Y<0)return G;if(Y>=y)return j}else{if(Y<=-m)return K;if(Y+1>=m)return q}return Y<0?s(-Y,N).neg():g(Y%Q|0,Y/Q|0,N)}o.fromNumber=s;function g(Y,N,P){return new o(Y,N,P)}o.fromBits=g;var c=Math.pow;function I(Y,N,P){if(Y.length===0)throw Error("empty string");if(typeof N=="number"?(P=N,N=!1):N=!!N,Y==="NaN"||Y==="Infinity"||Y==="+Infinity"||Y==="-Infinity")return N?G:T;if(P=P||10,P<2||360)throw Error("interior hyphen");if(V===0)return I(Y.substring(1),N,P).neg();for(var te=s(c(P,8)),ne=T,Ne=0;Ne>>0:this.low},v.toNumber=function(){return this.unsigned?(this.high>>>0)*Q+(this.low>>>0):this.high*Q+(this.low>>>0)},v.toString=function(N){if(N=N||10,N<2||36>>0,De=fe.toString(N);if(Ne=Te,Ne.isZero())return De+ce;for(;De.length<6;)De="0"+De;ce=""+De+ce}},v.getHighBits=function(){return this.high},v.getHighBitsUnsigned=function(){return this.high>>>0},v.getLowBits=function(){return this.low},v.getLowBitsUnsigned=function(){return this.low>>>0},v.getNumBitsAbs=function(){if(this.isNegative())return this.eq(K)?64:this.neg().getNumBitsAbs();for(var N=this.high!=0?this.high:this.low,P=31;P>0&&(N&1<>21;return N?this.unsigned?!1:N===-1&&!(this.low===0&&this.high===-2097152):!0},v.isZero=function(){return this.high===0&&this.low===0},v.eqz=v.isZero,v.isNegative=function(){return!this.unsigned&&this.high<0},v.isPositive=function(){return this.unsigned||this.high>=0},v.isOdd=function(){return(this.low&1)===1},v.isEven=function(){return(this.low&1)===0},v.equals=function(N){return i(N)||(N=d(N)),this.unsigned!==N.unsigned&&this.high>>>31===1&&N.high>>>31===1?!1:this.high===N.high&&this.low===N.low},v.eq=v.equals,v.notEquals=function(N){return!this.eq(N)},v.neq=v.notEquals,v.ne=v.notEquals,v.lessThan=function(N){return this.comp(N)<0},v.lt=v.lessThan,v.lessThanOrEqual=function(N){return this.comp(N)<=0},v.lte=v.lessThanOrEqual,v.le=v.lessThanOrEqual,v.greaterThan=function(N){return this.comp(N)>0},v.gt=v.greaterThan,v.greaterThanOrEqual=function(N){return this.comp(N)>=0},v.gte=v.greaterThanOrEqual,v.ge=v.greaterThanOrEqual,v.compare=function(N){if(i(N)||(N=d(N)),this.eq(N))return 0;var P=this.isNegative(),V=N.isNegative();return P&&!V?-1:!P&&V?1:this.unsigned?N.high>>>0>this.high>>>0||N.high===this.high&&N.low>>>0>this.low>>>0?-1:1:this.sub(N).isNegative()?-1:1},v.comp=v.compare,v.negate=function(){return!this.unsigned&&this.eq(K)?K:this.not().add(x)},v.neg=v.negate,v.add=function(N){i(N)||(N=d(N));var P=this.high>>>16,V=this.high&65535,te=this.low>>>16,ne=this.low&65535,Ne=N.high>>>16,ce=N.high&65535,Te=N.low>>>16,fe=N.low&65535,De=0,Ke=0,rA=0,ve=0;return ve+=ne+fe,rA+=ve>>>16,ve&=65535,rA+=te+Te,Ke+=rA>>>16,rA&=65535,Ke+=V+ce,De+=Ke>>>16,Ke&=65535,De+=P+Ne,De&=65535,g(rA<<16|ve,De<<16|Ke,this.unsigned)},v.subtract=function(N){return i(N)||(N=d(N)),this.add(N.neg())},v.sub=v.subtract,v.multiply=function(N){if(this.isZero())return this;if(i(N)||(N=d(N)),t){var P=t.mul(this.low,this.high,N.low,N.high);return g(P,t.get_high(),this.unsigned)}if(N.isZero())return this.unsigned?G:T;if(this.eq(K))return N.isOdd()?K:T;if(N.eq(K))return this.isOdd()?K:T;if(this.isNegative())return N.isNegative()?this.neg().mul(N.neg()):this.neg().mul(N).neg();if(N.isNegative())return this.mul(N.neg()).neg();if(this.lt(_)&&N.lt(_))return s(this.toNumber()*N.toNumber(),this.unsigned);var V=this.high>>>16,te=this.high&65535,ne=this.low>>>16,Ne=this.low&65535,ce=N.high>>>16,Te=N.high&65535,fe=N.low>>>16,De=N.low&65535,Ke=0,rA=0,ve=0,iA=0;return iA+=Ne*De,ve+=iA>>>16,iA&=65535,ve+=ne*De,rA+=ve>>>16,ve&=65535,ve+=Ne*fe,rA+=ve>>>16,ve&=65535,rA+=te*De,Ke+=rA>>>16,rA&=65535,rA+=ne*fe,Ke+=rA>>>16,rA&=65535,rA+=Ne*Te,Ke+=rA>>>16,rA&=65535,Ke+=V*De+te*fe+ne*Te+Ne*ce,Ke&=65535,g(ve<<16|iA,Ke<<16|rA,this.unsigned)},v.mul=v.multiply,v.divide=function(N){if(i(N)||(N=d(N)),N.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&N.low===-1&&N.high===-1)return this;var P=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,N.low,N.high);return g(P,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?G:T;var V,te,ne;if(this.unsigned){if(N.unsigned||(N=N.toUnsigned()),N.gt(this))return G;if(N.gt(this.shru(1)))return J;ne=G}else{if(this.eq(K)){if(N.eq(x)||N.eq(L))return K;if(N.eq(K))return x;var Ne=this.shr(1);return V=Ne.div(N).shl(1),V.eq(T)?N.isNegative()?x:L:(te=this.sub(N.mul(V)),ne=V.add(te.div(N)),ne)}else if(N.eq(K))return this.unsigned?G:T;if(this.isNegative())return N.isNegative()?this.neg().div(N.neg()):this.neg().div(N).neg();if(N.isNegative())return this.div(N.neg()).neg();ne=T}for(te=this;te.gte(N);){V=Math.max(1,Math.floor(te.toNumber()/N.toNumber()));for(var ce=Math.ceil(Math.log(V)/Math.LN2),Te=ce<=48?1:c(2,ce-48),fe=s(V),De=fe.mul(N);De.isNegative()||De.gt(te);)V-=Te,fe=s(V,this.unsigned),De=fe.mul(N);fe.isZero()&&(fe=x),ne=ne.add(fe),te=te.sub(De)}return ne},v.div=v.divide,v.modulo=function(N){if(i(N)||(N=d(N)),t){var P=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,N.low,N.high);return g(P,t.get_high(),this.unsigned)}return this.sub(this.div(N).mul(N))},v.mod=v.modulo,v.rem=v.modulo,v.not=function(){return g(~this.low,~this.high,this.unsigned)},v.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},v.clz=v.countLeadingZeros,v.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},v.ctz=v.countTrailingZeros,v.and=function(N){return i(N)||(N=d(N)),g(this.low&N.low,this.high&N.high,this.unsigned)},v.or=function(N){return i(N)||(N=d(N)),g(this.low|N.low,this.high|N.high,this.unsigned)},v.xor=function(N){return i(N)||(N=d(N)),g(this.low^N.low,this.high^N.high,this.unsigned)},v.shiftLeft=function(N){return i(N)&&(N=N.toInt()),(N&=63)===0?this:N<32?g(this.low<>>32-N,this.unsigned):g(0,this.low<>>N|this.high<<32-N,this.high>>N,this.unsigned):g(this.high>>N-32,this.high>=0?0:-1,this.unsigned)},v.shr=v.shiftRight,v.shiftRightUnsigned=function(N){return i(N)&&(N=N.toInt()),(N&=63)===0?this:N<32?g(this.low>>>N|this.high<<32-N,this.high>>>N,this.unsigned):N===32?g(this.high,0,this.unsigned):g(this.high>>>N-32,0,this.unsigned)},v.shru=v.shiftRightUnsigned,v.shr_u=v.shiftRightUnsigned,v.rotateLeft=function(N){var P;return i(N)&&(N=N.toInt()),(N&=63)===0?this:N===32?g(this.high,this.low,this.unsigned):N<32?(P=32-N,g(this.low<>>P,this.high<>>P,this.unsigned)):(N-=32,P=32-N,g(this.high<>>P,this.low<>>P,this.unsigned))},v.rotl=v.rotateLeft,v.rotateRight=function(N){var P;return i(N)&&(N=N.toInt()),(N&=63)===0?this:N===32?g(this.high,this.low,this.unsigned):N<32?(P=32-N,g(this.high<>>N,this.low<>>N,this.unsigned)):(N-=32,P=32-N,g(this.low<>>N,this.high<>>N,this.unsigned))},v.rotr=v.rotateRight,v.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},v.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},v.toBytes=function(N){return N?this.toBytesLE():this.toBytesBE()},v.toBytesLE=function(){var N=this.high,P=this.low;return[P&255,P>>>8&255,P>>>16&255,P>>>24,N&255,N>>>8&255,N>>>16&255,N>>>24]},v.toBytesBE=function(){var N=this.high,P=this.low;return[N>>>24,N>>>16&255,N>>>8&255,N&255,P>>>24,P>>>16&255,P>>>8&255,P&255]},o.fromBytes=function(N,P,V){return V?o.fromBytesLE(N,P):o.fromBytesBE(N,P)},o.fromBytesLE=function(N,P){return new o(N[0]|N[1]<<8|N[2]<<16|N[3]<<24,N[4]|N[5]<<8|N[6]<<16|N[7]<<24,P)},o.fromBytesBE=function(N,P){return new o(N[4]<<24|N[5]<<16|N[6]<<8|N[7],N[0]<<24|N[1]<<16|N[2]<<8|N[3],P)},typeof BigInt=="function"&&(o.fromBigInt=function(N,P){var V=Number(BigInt.asIntN(32,N)),te=Number(BigInt.asIntN(32,N>>BigInt(32)));return g(V,te,P)},o.fromValue=function(N,P){return typeof N=="bigint"?o.fromBigInt(N,P):d(N,P)},v.toBigInt=function(){var N=BigInt(this.low>>>0),P=BigInt(this.unsigned?this.high>>>0:this.high);return P<{"use strict";var BA=U0;BA.asPromise=t8();BA.base64=o8();BA.EventEmitter=s8();BA.float=h8();BA.utf8=C8();BA.pool=B8();BA.LongBits=Q8();function m8(n){return n==="__proto__"||n==="prototype"||n==="constructor"}BA.isUnsafeProperty=m8;BA.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);BA.global=BA.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||U0;BA.emptyArray=Object.freeze?Object.freeze([]):[];BA.emptyObject=Object.freeze?Object.freeze({}):{};BA.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};BA.isString=function(t){return typeof t=="string"||t instanceof String};BA.isObject=function(t){return t&&typeof t=="object"};BA.isset=BA.isSet=function(t,o){var i=t[o];return i!=null&&Object.hasOwnProperty.call(t,o)?typeof i!="object"||(Array.isArray(i)?i.length:Object.keys(i).length)>0:!1};BA.Buffer=(function(){try{var n=BA.global.Buffer;return n.prototype.utf8Write?n:null}catch{return null}})();BA._Buffer_from=null;BA._Buffer_allocUnsafe=null;BA.newBuffer=function(t){return typeof t=="number"?BA.Buffer?BA._Buffer_allocUnsafe(t):new BA.Array(t):BA.Buffer?BA._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};BA.Array=typeof Uint8Array<"u"?Uint8Array:Array;BA.Long=BA.global.dcodeIO&&BA.global.dcodeIO.Long||BA.global.Long||(function(){try{var n=y8();return n&&n.isLong?n:null}catch{return null}})();BA.key2Re=/^true|false|0|1$/;BA.key32Re=/^-?(?:0|[1-9][0-9]*)$/;BA.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;BA.longToHash=function(t){return t?BA.LongBits.from(t).toHash():BA.LongBits.zeroHash};BA.longFromHash=function(t,o){var i=BA.LongBits.fromHash(t);return BA.Long?BA.Long.fromBits(i.lo,i.hi,o):i.toNumber(!!o)};function S8(n){var t=typeof arguments[arguments.length-1]=="boolean",o=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var i=1;i-1;--a)if(o[e[a]]===1&&this[e[a]]!==void 0&&this[e[a]]!==null)return e[a]}};BA.oneOfSetter=function(t){return function(o){for(var i=0;i{"use strict";M8.exports=ft;var wo=ec(),H0,my=wo.LongBits,w8=wo.base64,O8=wo.utf8;function CC(n,t,o){this.fn=n,this.len=t,this.next=void 0,this.val=o}function x0(){}function fbe(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function ft(){this.len=0,this.head=new CC(x0,0,0),this.tail=this.head,this.states=null}var b8=function(){return wo.Buffer?function(){return(ft.create=function(){return new H0})()}:function(){return new ft}};ft.create=b8();ft.alloc=function(t){return new wo.Array(t)};wo.Array!==Array&&(ft.alloc=wo.pool(ft.alloc,wo.Array.prototype.subarray));ft.prototype._push=function(t,o,i){return this.tail=this.tail.next=new CC(t,o,i),this.len+=o,this};function Y0(n,t,o){t[o]=n&255}function Qbe(n,t,o){for(;n>127;)t[o++]=n&127|128,n>>>=7;t[o]=n}function j0(n,t){this.len=n,this.next=void 0,this.val=t}j0.prototype=Object.create(CC.prototype);j0.prototype.fn=Qbe;ft.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new j0((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};ft.prototype.int32=function(t){return(t|=0)<0?this._push(J0,10,my.fromNumber(t)):this.uint32(t)};ft.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function J0(n,t,o){for(var i=n.lo,e=n.hi;e;)t[o++]=i&127|128,i=(i>>>7|e<<25)>>>0,e>>>=7;for(;i>127;)t[o++]=i&127|128,i=i>>>7;t[o++]=i}ft.prototype.uint64=function(t){var o=my.from(t);return this._push(J0,o.length(),o)};ft.prototype.int64=ft.prototype.uint64;ft.prototype.sint64=function(t){var o=my.from(t).zzEncode();return this._push(J0,o.length(),o)};ft.prototype.bool=function(t){return this._push(Y0,1,t?1:0)};function K0(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}ft.prototype.fixed32=function(t){return this._push(K0,4,t>>>0)};ft.prototype.sfixed32=ft.prototype.fixed32;ft.prototype.fixed64=function(t){var o=my.from(t);return this._push(K0,4,o.lo)._push(K0,4,o.hi)};ft.prototype.sfixed64=ft.prototype.fixed64;ft.prototype.float=function(t){return this._push(wo.float.writeFloatLE,4,t)};ft.prototype.double=function(t){return this._push(wo.float.writeDoubleLE,8,t)};var ybe=wo.Array.prototype.set?function(t,o,i){o.set(t,i)}:function(t,o,i){for(var e=0;e>>0;if(!o)return this._push(Y0,1,0);if(wo.isString(t)){var i=ft.alloc(o=w8.length(t));w8.decode(t,i,0),t=i}return this.uint32(o)._push(ybe,o,t)};ft.prototype.string=function(t){var o=O8.length(t);return o?this.uint32(o)._push(O8.write,o,t):this._push(Y0,1,0)};ft.prototype.fork=function(){return this.states=new fbe(this),this.head=this.tail=new CC(x0,0,0),this.len=0,this};ft.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new CC(x0,0,0),this.len=0),this};ft.prototype.ldelim=function(){var t=this.head,o=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=o,this.len+=i),this};ft.prototype.finish=function(){for(var t=this.head.next,o=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,o,i),i+=t.len,t=t.next;return o};ft._configure=function(n){H0=n,ft.create=b8(),H0._configure()}});var N8=$((kaA,T8)=>{"use strict";T8.exports=Wn;var _8=q0();(Wn.prototype=Object.create(_8.prototype)).constructor=Wn;var Ac=ec();function Wn(){_8.call(this)}Wn._configure=function(){Wn.alloc=Ac._Buffer_allocUnsafe,Wn.writeBytesBuffer=Ac.Buffer&&Ac.Buffer.prototype instanceof Uint8Array&&Ac.Buffer.prototype.set.name==="set"?function(t,o,i){o.set(t,i)}:function(t,o,i){if(t.copy)t.copy(o,i,0,t.length);else for(var e=0;e>>0;return this.uint32(o),o&&this._push(Wn.writeBytesBuffer,o,t),this};function mbe(n,t,o){n.length<40?Ac.utf8.write(n,t,o):t.utf8Write?t.utf8Write(n,o):t.write(n,o)}Wn.prototype.string=function(t){var o=Ac.Buffer.byteLength(t);return this.uint32(o),o&&this._push(mbe,o,t),this};Wn._configure()});var W0=$((vaA,G8)=>{"use strict";G8.exports=or;var Oo=ec(),V0,v8=Oo.LongBits,Sbe=Oo.utf8;function gn(n,t){return RangeError("index out of range: "+n.pos+" + "+(t||1)+" > "+n.len)}function or(n){this.buf=n,this.pos=0,this.len=n.length}var R8=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new or(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new or(t);throw Error("illegal buffer")},P8=function(){return Oo.Buffer?function(o){return(or.create=function(e){return Oo.Buffer.isBuffer(e)?new V0(e):R8(e)})(o)}:R8};or.create=P8();or.prototype._slice=Oo.Array.prototype.subarray||Oo.Array.prototype.slice;or.prototype.uint32=(function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,gn(this,10);return t}})();or.prototype.int32=function(){return this.uint32()|0};or.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function z0(){var n=new v8(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw gn(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<>>0,n}if(this.len-this.pos>4){for(;t<5;++t)if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}else for(;t<5;++t){if(this.pos>=this.len)throw gn(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}or.prototype.bool=function(){return this.uint32()!==0};function Sy(n,t){return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}or.prototype.fixed32=function(){if(this.pos+4>this.len)throw gn(this,4);return Sy(this.buf,this.pos+=4)};or.prototype.sfixed32=function(){if(this.pos+4>this.len)throw gn(this,4);return Sy(this.buf,this.pos+=4)|0};function k8(){if(this.pos+8>this.len)throw gn(this,8);return new v8(Sy(this.buf,this.pos+=4),Sy(this.buf,this.pos+=4))}or.prototype.float=function(){if(this.pos+4>this.len)throw gn(this,4);var t=Oo.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};or.prototype.double=function(){if(this.pos+8>this.len)throw gn(this,4);var t=Oo.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};or.prototype.bytes=function(){var t=this.uint32(),o=this.pos,i=this.pos+t;if(i>this.len)throw gn(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(o,i);if(o===i){var e=Oo.Buffer;return e?e.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,i)};or.prototype.string=function(){var t=this.bytes();return Sbe.read(t,0,t.length)};or.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw gn(this,t);this.pos+=t}else do if(this.pos>=this.len)throw gn(this);while(this.buf[this.pos++]&128);return this};or.recursionLimit=Oo.recursionLimit;or.prototype.skipType=function(n,t){if(t===void 0&&(t=0),t>or.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n,t+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};or._configure=function(n){V0=n,or.create=P8(),V0._configure();var t=Oo.Long?"toLong":"toNumber";Oo.merge(or.prototype,{int64:function(){return z0.call(this)[t](!1)},uint64:function(){return z0.call(this)[t](!0)},sint64:function(){return z0.call(this).zzDecode()[t](!1)},fixed64:function(){return k8.call(this)[t](!0)},sfixed64:function(){return k8.call(this)[t](!1)}})}});var H8=$((PaA,U8)=>{"use strict";U8.exports=vI;var L8=W0();(vI.prototype=Object.create(L8.prototype)).constructor=vI;var F8=ec();function vI(n){L8.call(this,n)}vI._configure=function(){F8.Buffer&&(vI.prototype._slice=F8.Buffer.prototype.slice)};vI.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};vI._configure()});var x8=$((GaA,K8)=>{"use strict";K8.exports=uC;var Z0=ec();(uC.prototype=Object.create(Z0.EventEmitter.prototype)).constructor=uC;function uC(n,t,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");Z0.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!t,this.responseDelimited=!!o}uC.prototype.rpcCall=function n(t,o,i,e,a){if(!e)throw TypeError("request must be specified");var A=this;if(!a)return Z0.asPromise(n,A,t,o,i,e);if(!A.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return A.rpcImpl(t,o[A.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(s,g){if(s)return A.emit("error",s,t),a(s);if(g===null){A.end(!0);return}if(!(g instanceof i))try{g=i[A.responseDelimited?"decodeDelimited":"decode"](g)}catch(c){return A.emit("error",c,t),a(c)}return A.emit("data",g,t),a(null,g)})}catch(r){A.emit("error",r,t),setTimeout(function(){a(r)},0);return}};uC.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var j8=$(Y8=>{"use strict";var Dbe=Y8;Dbe.Service=x8()});var q8=$((LaA,J8)=>{"use strict";J8.exports=Object.create(null)});var W8=$(V8=>{"use strict";var Si=V8;Si.build="minimal";Si.Writer=q0();Si.BufferWriter=N8();Si.Reader=W0();Si.BufferReader=H8();Si.util=ec();Si.rpc=j8();Si.roots=q8();Si.configure=z8;function z8(){Si.util._configure(),Si.Writer._configure(Si.BufferWriter),Si.Reader._configure(Si.BufferReader)}z8()});var Dy=$((HaA,Z8)=>{"use strict";Z8.exports=W8()});var YV=$(ot=>{"use strict";var KC=Symbol.for("react.element"),k0e=Symbol.for("react.portal"),v0e=Symbol.for("react.fragment"),P0e=Symbol.for("react.strict_mode"),G0e=Symbol.for("react.profiler"),F0e=Symbol.for("react.provider"),L0e=Symbol.for("react.context"),U0e=Symbol.for("react.forward_ref"),H0e=Symbol.for("react.suspense"),K0e=Symbol.for("react.memo"),x0e=Symbol.for("react.lazy"),RV=Symbol.iterator;function Y0e(n){return n===null||typeof n!="object"?null:(n=RV&&n[RV]||n["@@iterator"],typeof n=="function"?n:null)}var PV={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GV=Object.assign,FV={};function td(n,t,o){this.props=n,this.context=t,this.refs=FV,this.updater=o||PV}td.prototype.isReactComponent={};td.prototype.setState=function(n,t){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,t,"setState")};td.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function LV(){}LV.prototype=td.prototype;function Av(n,t,o){this.props=n,this.context=t,this.refs=FV,this.updater=o||PV}var tv=Av.prototype=new LV;tv.constructor=Av;GV(tv,td.prototype);tv.isPureReactComponent=!0;var kV=Array.isArray,UV=Object.prototype.hasOwnProperty,rv={current:null},HV={key:!0,ref:!0,__self:!0,__source:!0};function KV(n,t,o){var i,e={},a=null,A=null;if(t!=null)for(i in t.ref!==void 0&&(A=t.ref),t.key!==void 0&&(a=""+t.key),t)UV.call(t,i)&&!HV.hasOwnProperty(i)&&(e[i]=t[i]);var r=arguments.length-2;if(r===1)e.children=o;else if(1{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",t=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),r=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),f=Symbol.iterator,Q="@@iterator";function y(F){if(F===null||typeof F!="object")return null;var Ae=f&&F[f]||F[Q];return typeof Ae=="function"?Ae:null}var m={current:null},_={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},G={current:null},x={},J=null;function L(F){J=F}x.setExtraStackFrame=function(F){J=F},x.getCurrentStack=null,x.getStackAddendum=function(){var F="";J&&(F+=J);var Ae=x.getCurrentStack;return Ae&&(F+=Ae()||""),F};var q=!1,j=!1,K=!1,v=!1,W=!1,Y={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:_,ReactCurrentOwner:G};Y.ReactDebugCurrentFrame=x,Y.ReactCurrentActQueue=T;function N(F){{for(var Ae=arguments.length,pe=new Array(Ae>1?Ae-1:0),me=1;me1?Ae-1:0),me=1;me1){for(var jt=Array(Nt),Jt=0;Jt1){for(var tr=Array(Jt),Qr=0;Qr is not supported and will be removed in a future major release. Did you mean to render instead?")),Ae.Provider},set:function(EA){Ae.Provider=EA}},_currentValue:{get:function(){return Ae._currentValue},set:function(EA){Ae._currentValue=EA}},_currentValue2:{get:function(){return Ae._currentValue2},set:function(EA){Ae._currentValue2=EA}},_threadCount:{get:function(){return Ae._threadCount},set:function(EA){Ae._threadCount=EA}},Consumer:{get:function(){return pe||(pe=!0,P("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),Ae.Consumer}},displayName:{get:function(){return Ae.displayName},set:function(EA){qe||(N("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",EA),qe=!0)}}}),Ae.Consumer=TA}return Ae._currentRenderer=null,Ae._currentRenderer2=null,Ae}var de=-1,ye=0,Je=1,IA=2;function QA(F){if(F._status===de){var Ae=F._result,pe=Ae();if(pe.then(function(TA){if(F._status===ye||F._status===de){var EA=F;EA._status=Je,EA._result=TA}},function(TA){if(F._status===ye||F._status===de){var EA=F;EA._status=IA,EA._result=TA}}),F._status===de){var me=F;me._status=ye,me._result=pe}}if(F._status===Je){var qe=F._result;return qe===void 0&&P(`lazy: Expected the result of a dynamic import() call. Instead received: %s +`+o)}function LI(n,t,o,i,e,a){if(n.listenerCount("wsClientError")){let A=new Error(e);Error.captureStackTrace(A,LI),n.emit("wsClientError",A,o,t)}else fC(o,i,e,a)}});var S8=$((viA,m8)=>{"use strict";m8.exports=Zbe;function Zbe(n,t){for(var o=new Array(arguments.length-1),i=0,e=2,a=!0;e{"use strict";var Ry=O8;Ry.length=function(t){var o=t.length;if(!o)return 0;for(var i=0;--o%4>1&&t.charAt(o)==="=";)++i;return Math.ceil(t.length*3)/4-i};var Xp=new Array(64),w8=new Array(123);for(gn=0;gn<64;)w8[Xp[gn]=gn<26?gn+65:gn<52?gn+71:gn<62?gn-4:gn-59|43]=gn++;var gn;Ry.encode=function(t,o,i){for(var e=null,a=[],A=0,r=0,s;o>2],s=(g&3)<<4,r=1;break;case 1:a[A++]=Xp[s|g>>4],s=(g&15)<<2,r=2;break;case 2:a[A++]=Xp[s|g>>6],a[A++]=Xp[g&63],r=0;break}A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a)),A=0)}return r&&(a[A++]=Xp[s],a[A++]=61,r===1&&(a[A++]=61)),e?(A&&e.push(String.fromCharCode.apply(String,a.slice(0,A))),e.join("")):String.fromCharCode.apply(String,a.slice(0,A))};var D8="invalid encoding";Ry.decode=function(t,o,i){for(var e=i,a=0,A,r=0;r1)break;if((s=w8[s])===void 0)throw Error(D8);switch(a){case 0:A=s,a=1;break;case 1:o[i++]=A<<2|(s&48)>>4,A=s,a=2;break;case 2:o[i++]=(A&15)<<4|(s&60)>>2,A=s,a=3;break;case 3:o[i++]=(A&3)<<6|s,a=0;break}}if(a===1)throw Error(D8);return i-e};Ry.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var _8=$((GiA,M8)=>{"use strict";M8.exports=ky;function ky(){this._listeners=Object.create(null)}ky.prototype.on=function(t,o,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:o,ctx:i||this}),this};ky.prototype.off=function(t,o){if(t===void 0)this._listeners=Object.create(null);else if(o===void 0)this._listeners[t]=[];else{var i=this._listeners[t];if(!i)return this;for(var e=0;e{"use strict";P8.exports=T8(T8);function T8(n){return typeof Float32Array<"u"?(function(){var t=new Float32Array([-0]),o=new Uint8Array(t.buffer),i=o[3]===128;function e(s,g,c){t[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3]}function a(s,g,c){t[0]=s,g[c]=o[3],g[c+1]=o[2],g[c+2]=o[1],g[c+3]=o[0]}n.writeFloatLE=i?e:a,n.writeFloatBE=i?a:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],t[0]}function r(s,g){return o[3]=s[g],o[2]=s[g+1],o[1]=s[g+2],o[0]=s[g+3],t[0]}n.readFloatLE=i?A:r,n.readFloatBE=i?r:A})():(function(){function t(i,e,a,A){var r=e<0?1:0;if(r&&(e=-e),e===0)i(1/e>0?0:2147483648,a,A);else if(isNaN(e))i(2143289344,a,A);else if(e>34028234663852886e22)i((r<<31|2139095040)>>>0,a,A);else if(e<11754943508222875e-54)i((r<<31|Math.round(e/1401298464324817e-60))>>>0,a,A);else{var s=Math.floor(Math.log(e)/Math.LN2),g=Math.round(e*Math.pow(2,-s)*8388608)&8388607;i((r<<31|s+127<<23|g)>>>0,a,A)}}n.writeFloatLE=t.bind(null,N8),n.writeFloatBE=t.bind(null,R8);function o(i,e,a){var A=i(e,a),r=(A>>31)*2+1,s=A>>>23&255,g=A&8388607;return s===255?g?NaN:r*(1/0):s===0?r*1401298464324817e-60*g:r*Math.pow(2,s-150)*(g+8388608)}n.readFloatLE=o.bind(null,k8),n.readFloatBE=o.bind(null,v8)})(),typeof Float64Array<"u"?(function(){var t=new Float64Array([-0]),o=new Uint8Array(t.buffer),i=o[7]===128;function e(s,g,c){t[0]=s,g[c]=o[0],g[c+1]=o[1],g[c+2]=o[2],g[c+3]=o[3],g[c+4]=o[4],g[c+5]=o[5],g[c+6]=o[6],g[c+7]=o[7]}function a(s,g,c){t[0]=s,g[c]=o[7],g[c+1]=o[6],g[c+2]=o[5],g[c+3]=o[4],g[c+4]=o[3],g[c+5]=o[2],g[c+6]=o[1],g[c+7]=o[0]}n.writeDoubleLE=i?e:a,n.writeDoubleBE=i?a:e;function A(s,g){return o[0]=s[g],o[1]=s[g+1],o[2]=s[g+2],o[3]=s[g+3],o[4]=s[g+4],o[5]=s[g+5],o[6]=s[g+6],o[7]=s[g+7],t[0]}function r(s,g){return o[7]=s[g],o[6]=s[g+1],o[5]=s[g+2],o[4]=s[g+3],o[3]=s[g+4],o[2]=s[g+5],o[1]=s[g+6],o[0]=s[g+7],t[0]}n.readDoubleLE=i?A:r,n.readDoubleBE=i?r:A})():(function(){function t(i,e,a,A,r,s){var g=A<0?1:0;if(g&&(A=-A),A===0)i(0,r,s+e),i(1/A>0?0:2147483648,r,s+a);else if(isNaN(A))i(0,r,s+e),i(2146959360,r,s+a);else if(A>17976931348623157e292)i(0,r,s+e),i((g<<31|2146435072)>>>0,r,s+a);else{var c;if(A<22250738585072014e-324)c=A/5e-324,i(c>>>0,r,s+e),i((g<<31|c/4294967296)>>>0,r,s+a);else{var I=Math.floor(Math.log(A)/Math.LN2);I===1024&&(I=1023),c=A*Math.pow(2,-I),i(c*4503599627370496>>>0,r,s+e),i((g<<31|I+1023<<20|c*1048576&1048575)>>>0,r,s+a)}}}n.writeDoubleLE=t.bind(null,N8,0,4),n.writeDoubleBE=t.bind(null,R8,4,0);function o(i,e,a,A,r){var s=i(A,r+e),g=i(A,r+a),c=(g>>31)*2+1,I=g>>>20&2047,d=4294967296*(g&1048575)+s;return I===2047?d?NaN:c*(1/0):I===0?c*5e-324*d:c*Math.pow(2,I-1075)*(d+4503599627370496)}n.readDoubleLE=o.bind(null,k8,0,4),n.readDoubleBE=o.bind(null,v8,4,0)})(),n}function N8(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}function R8(n,t,o){t[o]=n>>>24,t[o+1]=n>>>16&255,t[o+2]=n>>>8&255,t[o+3]=n&255}function k8(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}function v8(n,t){return(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0}});var L8=$(F8=>{"use strict";var eN=F8,$0=65533;eN.length=function(t){for(var o=0,i=0,e=0;e=192&&r<224?(g=(r&31)<<6|t[o++]&63,a[A++]=g>=128?g:$0):r>=224&&r<240?(c=(r&15)<<12|(t[o++]&63)<<6|t[o++]&63,a[A++]=c>=2048?c:$0):r>=240&&(s=(r&7)<<18|(t[o++]&63)<<12|(t[o++]&63)<<6|t[o++]&63,s<65536||s>1114111?a[A++]=$0:(s-=65536,a[A++]=55296+(s>>10),a[A++]=56320+(s&1023))),A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a.slice(0,A))),A=0);return e?(A&&e.push(String.fromCharCode.apply(String,a.slice(0,A))),e.join("")):String.fromCharCode.apply(String,a.slice(0,A))};eN.write=function(t,o,i){for(var e=i,a,A,r=0;r>6|192,o[i++]=a&63|128):(a&64512)===55296&&((A=t.charCodeAt(r+1))&64512)===56320?(a=65536+((a&1023)<<10)+(A&1023),++r,o[i++]=a>>18|240,o[i++]=a>>12&63|128,o[i++]=a>>6&63|128,o[i++]=a&63|128):(o[i++]=a>>12|224,o[i++]=a>>6&63|128,o[i++]=a&63|128);return i-e}});var H8=$((UiA,U8)=>{"use strict";U8.exports=Xbe;function Xbe(n,t,o){var i=o||8192,e=i>>>1,a=null,A=i;return function(s){if(s<1||s>e)return n(s);A+s>i&&(a=n(i),A=0);var g=t.call(a,A,A+=s);return A&7&&(A=(A|7)+1),g}}});var x8=$((HiA,K8)=>{"use strict";K8.exports=ra;var QC=ic();function ra(n,t){this.lo=n>>>0,this.hi=t>>>0}var UI=ra.zero=new ra(0,0);UI.toNumber=function(){return 0};UI.zzEncode=UI.zzDecode=function(){return this};UI.length=function(){return 1};var $be=ra.zeroHash="\0\0\0\0\0\0\0\0";ra.fromNumber=function(t){if(t===0)return UI;var o=t<0;o&&(t=-t);var i=t>>>0,e=(t-i)/4294967296>>>0;return o&&(e=~e>>>0,i=~i>>>0,++i>4294967295&&(i=0,++e>4294967295&&(e=0))),new ra(i,e)};ra.from=function(t){if(typeof t=="number")return ra.fromNumber(t);if(QC.isString(t))if(QC.Long)t=QC.Long.fromString(t);else return ra.fromNumber(parseInt(t,10));return t.low||t.high?new ra(t.low>>>0,t.high>>>0):UI};ra.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var o=~this.lo+1>>>0,i=~this.hi>>>0;return o||(i=i+1>>>0),-(o+i*4294967296)}return this.lo+this.hi*4294967296};ra.prototype.toLong=function(t){return QC.Long?new QC.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var ac=String.prototype.charCodeAt;ra.fromHash=function(t){return t===$be?UI:new ra((ac.call(t,0)|ac.call(t,1)<<8|ac.call(t,2)<<16|ac.call(t,3)<<24)>>>0,(ac.call(t,4)|ac.call(t,5)<<8|ac.call(t,6)<<16|ac.call(t,7)<<24)>>>0)};ra.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};ra.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};ra.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};ra.prototype.length=function(){var t=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return i===0?o===0?t<16384?t<128?1:2:t<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:i<128?9:10}});var Y8=$((yC,AN)=>{(function(n,t){function o(i){return i.default||i}typeof define=="function"&&define.amd?define([],function(){var i={};return t(i),o(i)}):typeof yC=="object"?(t(yC),typeof AN=="object"&&(AN.exports=o(yC))):(function(){var i={};t(i),n.Long=o(i)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:yC,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function o(U,N,k){this.low=U|0,this.high=N|0,this.unsigned=!!k}o.prototype.__isLong__,Object.defineProperty(o.prototype,"__isLong__",{value:!0});function i(U){return(U&&U.__isLong__)===!0}function e(U){var N=Math.clz32(U&-U);return U?31-N:N}o.isLong=i;var a={},A={};function r(U,N){var k,V,ee;return N?(U>>>=0,(ee=0<=U&&U<256)&&(V=A[U],V)?V:(k=g(U,0,!0),ee&&(A[U]=k),k)):(U|=0,(ee=-128<=U&&U<128)&&(V=a[U],V)?V:(k=g(U,U<0?-1:0,!1),ee&&(a[U]=k),k))}o.fromInt=r;function s(U,N){if(isNaN(U))return N?R:T;if(N){if(U<0)return R;if(U>=y)return J}else{if(U<=-m)return x;if(U+1>=m)return q}return U<0?s(-U,N).neg():g(U%Q|0,U/Q|0,N)}o.fromNumber=s;function g(U,N,k){return new o(U,N,k)}o.fromBits=g;var c=Math.pow;function I(U,N,k){if(U.length===0)throw Error("empty string");if(typeof N=="number"?(k=N,N=!1):N=!!N,U==="NaN"||U==="Infinity"||U==="+Infinity"||U==="-Infinity")return N?R:T;if(k=k||10,k<2||360)throw Error("interior hyphen");if(V===0)return I(U.substring(1),N,k).neg();for(var ee=s(c(k,8)),ie=T,Te=0;Te>>0:this.low},P.toNumber=function(){return this.unsigned?(this.high>>>0)*Q+(this.low>>>0):this.high*Q+(this.low>>>0)},P.toString=function(N){if(N=N||10,N<2||36>>0,De=fe.toString(N);if(Te=Ne,Te.isZero())return De+se;for(;De.length<6;)De="0"+De;se=""+De+se}},P.getHighBits=function(){return this.high},P.getHighBitsUnsigned=function(){return this.high>>>0},P.getLowBits=function(){return this.low},P.getLowBitsUnsigned=function(){return this.low>>>0},P.getNumBitsAbs=function(){if(this.isNegative())return this.eq(x)?64:this.neg().getNumBitsAbs();for(var N=this.high!=0?this.high:this.low,k=31;k>0&&(N&1<>21;return N?this.unsigned?!1:N===-1&&!(this.low===0&&this.high===-2097152):!0},P.isZero=function(){return this.high===0&&this.low===0},P.eqz=P.isZero,P.isNegative=function(){return!this.unsigned&&this.high<0},P.isPositive=function(){return this.unsigned||this.high>=0},P.isOdd=function(){return(this.low&1)===1},P.isEven=function(){return(this.low&1)===0},P.equals=function(N){return i(N)||(N=d(N)),this.unsigned!==N.unsigned&&this.high>>>31===1&&N.high>>>31===1?!1:this.high===N.high&&this.low===N.low},P.eq=P.equals,P.notEquals=function(N){return!this.eq(N)},P.neq=P.notEquals,P.ne=P.notEquals,P.lessThan=function(N){return this.comp(N)<0},P.lt=P.lessThan,P.lessThanOrEqual=function(N){return this.comp(N)<=0},P.lte=P.lessThanOrEqual,P.le=P.lessThanOrEqual,P.greaterThan=function(N){return this.comp(N)>0},P.gt=P.greaterThan,P.greaterThanOrEqual=function(N){return this.comp(N)>=0},P.gte=P.greaterThanOrEqual,P.ge=P.greaterThanOrEqual,P.compare=function(N){if(i(N)||(N=d(N)),this.eq(N))return 0;var k=this.isNegative(),V=N.isNegative();return k&&!V?-1:!k&&V?1:this.unsigned?N.high>>>0>this.high>>>0||N.high===this.high&&N.low>>>0>this.low>>>0?-1:1:this.sub(N).isNegative()?-1:1},P.comp=P.compare,P.negate=function(){return!this.unsigned&&this.eq(x)?x:this.not().add(H)},P.neg=P.negate,P.add=function(N){i(N)||(N=d(N));var k=this.high>>>16,V=this.high&65535,ee=this.low>>>16,ie=this.low&65535,Te=N.high>>>16,se=N.high&65535,Ne=N.low>>>16,fe=N.low&65535,De=0,Ke=0,rA=0,ve=0;return ve+=ie+fe,rA+=ve>>>16,ve&=65535,rA+=ee+Ne,Ke+=rA>>>16,rA&=65535,Ke+=V+se,De+=Ke>>>16,Ke&=65535,De+=k+Te,De&=65535,g(rA<<16|ve,De<<16|Ke,this.unsigned)},P.subtract=function(N){return i(N)||(N=d(N)),this.add(N.neg())},P.sub=P.subtract,P.multiply=function(N){if(this.isZero())return this;if(i(N)||(N=d(N)),t){var k=t.mul(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}if(N.isZero())return this.unsigned?R:T;if(this.eq(x))return N.isOdd()?x:T;if(N.eq(x))return this.isOdd()?x:T;if(this.isNegative())return N.isNegative()?this.neg().mul(N.neg()):this.neg().mul(N).neg();if(N.isNegative())return this.mul(N.neg()).neg();if(this.lt(_)&&N.lt(_))return s(this.toNumber()*N.toNumber(),this.unsigned);var V=this.high>>>16,ee=this.high&65535,ie=this.low>>>16,Te=this.low&65535,se=N.high>>>16,Ne=N.high&65535,fe=N.low>>>16,De=N.low&65535,Ke=0,rA=0,ve=0,iA=0;return iA+=Te*De,ve+=iA>>>16,iA&=65535,ve+=ie*De,rA+=ve>>>16,ve&=65535,ve+=Te*fe,rA+=ve>>>16,ve&=65535,rA+=ee*De,Ke+=rA>>>16,rA&=65535,rA+=ie*fe,Ke+=rA>>>16,rA&=65535,rA+=Te*Ne,Ke+=rA>>>16,rA&=65535,Ke+=V*De+ee*fe+ie*Ne+Te*se,Ke&=65535,g(ve<<16|iA,Ke<<16|rA,this.unsigned)},P.mul=P.multiply,P.divide=function(N){if(i(N)||(N=d(N)),N.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&N.low===-1&&N.high===-1)return this;var k=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?R:T;var V,ee,ie;if(this.unsigned){if(N.unsigned||(N=N.toUnsigned()),N.gt(this))return R;if(N.gt(this.shru(1)))return j;ie=R}else{if(this.eq(x)){if(N.eq(H)||N.eq(F))return x;if(N.eq(x))return H;var Te=this.shr(1);return V=Te.div(N).shl(1),V.eq(T)?N.isNegative()?H:F:(ee=this.sub(N.mul(V)),ie=V.add(ee.div(N)),ie)}else if(N.eq(x))return this.unsigned?R:T;if(this.isNegative())return N.isNegative()?this.neg().div(N.neg()):this.neg().div(N).neg();if(N.isNegative())return this.div(N.neg()).neg();ie=T}for(ee=this;ee.gte(N);){V=Math.max(1,Math.floor(ee.toNumber()/N.toNumber()));for(var se=Math.ceil(Math.log(V)/Math.LN2),Ne=se<=48?1:c(2,se-48),fe=s(V),De=fe.mul(N);De.isNegative()||De.gt(ee);)V-=Ne,fe=s(V,this.unsigned),De=fe.mul(N);fe.isZero()&&(fe=H),ie=ie.add(fe),ee=ee.sub(De)}return ie},P.div=P.divide,P.modulo=function(N){if(i(N)||(N=d(N)),t){var k=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,N.low,N.high);return g(k,t.get_high(),this.unsigned)}return this.sub(this.div(N).mul(N))},P.mod=P.modulo,P.rem=P.modulo,P.not=function(){return g(~this.low,~this.high,this.unsigned)},P.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},P.clz=P.countLeadingZeros,P.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},P.ctz=P.countTrailingZeros,P.and=function(N){return i(N)||(N=d(N)),g(this.low&N.low,this.high&N.high,this.unsigned)},P.or=function(N){return i(N)||(N=d(N)),g(this.low|N.low,this.high|N.high,this.unsigned)},P.xor=function(N){return i(N)||(N=d(N)),g(this.low^N.low,this.high^N.high,this.unsigned)},P.shiftLeft=function(N){return i(N)&&(N=N.toInt()),(N&=63)===0?this:N<32?g(this.low<>>32-N,this.unsigned):g(0,this.low<>>N|this.high<<32-N,this.high>>N,this.unsigned):g(this.high>>N-32,this.high>=0?0:-1,this.unsigned)},P.shr=P.shiftRight,P.shiftRightUnsigned=function(N){return i(N)&&(N=N.toInt()),(N&=63)===0?this:N<32?g(this.low>>>N|this.high<<32-N,this.high>>>N,this.unsigned):N===32?g(this.high,0,this.unsigned):g(this.high>>>N-32,0,this.unsigned)},P.shru=P.shiftRightUnsigned,P.shr_u=P.shiftRightUnsigned,P.rotateLeft=function(N){var k;return i(N)&&(N=N.toInt()),(N&=63)===0?this:N===32?g(this.high,this.low,this.unsigned):N<32?(k=32-N,g(this.low<>>k,this.high<>>k,this.unsigned)):(N-=32,k=32-N,g(this.high<>>k,this.low<>>k,this.unsigned))},P.rotl=P.rotateLeft,P.rotateRight=function(N){var k;return i(N)&&(N=N.toInt()),(N&=63)===0?this:N===32?g(this.high,this.low,this.unsigned):N<32?(k=32-N,g(this.high<>>N,this.low<>>N,this.unsigned)):(N-=32,k=32-N,g(this.low<>>N,this.high<>>N,this.unsigned))},P.rotr=P.rotateRight,P.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},P.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},P.toBytes=function(N){return N?this.toBytesLE():this.toBytesBE()},P.toBytesLE=function(){var N=this.high,k=this.low;return[k&255,k>>>8&255,k>>>16&255,k>>>24,N&255,N>>>8&255,N>>>16&255,N>>>24]},P.toBytesBE=function(){var N=this.high,k=this.low;return[N>>>24,N>>>16&255,N>>>8&255,N&255,k>>>24,k>>>16&255,k>>>8&255,k&255]},o.fromBytes=function(N,k,V){return V?o.fromBytesLE(N,k):o.fromBytesBE(N,k)},o.fromBytesLE=function(N,k){return new o(N[0]|N[1]<<8|N[2]<<16|N[3]<<24,N[4]|N[5]<<8|N[6]<<16|N[7]<<24,k)},o.fromBytesBE=function(N,k){return new o(N[4]<<24|N[5]<<16|N[6]<<8|N[7],N[0]<<24|N[1]<<16|N[2]<<8|N[3],k)},typeof BigInt=="function"&&(o.fromBigInt=function(N,k){var V=Number(BigInt.asIntN(32,N)),ee=Number(BigInt.asIntN(32,N>>BigInt(32)));return g(V,ee,k)},o.fromValue=function(N,k){return typeof N=="bigint"?o.fromBigInt(N,k):d(N,k)},P.toBigInt=function(){var N=BigInt(this.low>>>0),k=BigInt(this.unsigned?this.high>>>0:this.high);return k<{"use strict";var BA=tN;BA.asPromise=S8();BA.base64=b8();BA.EventEmitter=_8();BA.float=G8();BA.utf8=L8();BA.pool=H8();BA.LongBits=x8();function j8(n){return n==="__proto__"||n==="prototype"||n==="constructor"}BA.isUnsafeProperty=j8;BA.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);BA.global=BA.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||tN;BA.emptyArray=Object.freeze?Object.freeze([]):[];BA.emptyObject=Object.freeze?Object.freeze({}):{};BA.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};BA.isString=function(t){return typeof t=="string"||t instanceof String};BA.isObject=function(t){return t&&typeof t=="object"};BA.isset=BA.isSet=function(t,o){var i=t[o];return i!=null&&Object.hasOwnProperty.call(t,o)?typeof i!="object"||(Array.isArray(i)?i.length:Object.keys(i).length)>0:!1};BA.Buffer=(function(){try{var n=BA.global.Buffer;return n.prototype.utf8Write?n:null}catch{return null}})();BA._Buffer_from=null;BA._Buffer_allocUnsafe=null;BA.newBuffer=function(t){return typeof t=="number"?BA.Buffer?BA._Buffer_allocUnsafe(t):new BA.Array(t):BA.Buffer?BA._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};BA.Array=typeof Uint8Array<"u"?Uint8Array:Array;BA.Long=BA.global.dcodeIO&&BA.global.dcodeIO.Long||BA.global.Long||(function(){try{var n=Y8();return n&&n.isLong?n:null}catch{return null}})();BA.key2Re=/^true|false|0|1$/;BA.key32Re=/^-?(?:0|[1-9][0-9]*)$/;BA.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;BA.longToHash=function(t){return t?BA.LongBits.from(t).toHash():BA.LongBits.zeroHash};BA.longFromHash=function(t,o){var i=BA.LongBits.fromHash(t);return BA.Long?BA.Long.fromBits(i.lo,i.hi,o):i.toNumber(!!o)};function J8(n){var t=typeof arguments[arguments.length-1]=="boolean",o=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var i=1;i-1;--a)if(o[e[a]]===1&&this[e[a]]!==void 0&&this[e[a]]!==null)return e[a]}};BA.oneOfSetter=function(t){return function(o){for(var i=0;i{"use strict";Z8.exports=ft;var Oo=ic(),rN,vy=Oo.LongBits,z8=Oo.base64,V8=Oo.utf8;function mC(n,t,o){this.fn=n,this.len=t,this.next=void 0,this.val=o}function iN(){}function eMe(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function ft(){this.len=0,this.head=new mC(iN,0,0),this.tail=this.head,this.states=null}var W8=function(){return Oo.Buffer?function(){return(ft.create=function(){return new rN})()}:function(){return new ft}};ft.create=W8();ft.alloc=function(t){return new Oo.Array(t)};Oo.Array!==Array&&(ft.alloc=Oo.pool(ft.alloc,Oo.Array.prototype.subarray));ft.prototype._push=function(t,o,i){return this.tail=this.tail.next=new mC(t,o,i),this.len+=o,this};function oN(n,t,o){t[o]=n&255}function AMe(n,t,o){for(;n>127;)t[o++]=n&127|128,n>>>=7;t[o]=n}function nN(n,t){this.len=n,this.next=void 0,this.val=t}nN.prototype=Object.create(mC.prototype);nN.prototype.fn=AMe;ft.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new nN((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};ft.prototype.int32=function(t){return(t|=0)<0?this._push(sN,10,vy.fromNumber(t)):this.uint32(t)};ft.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function sN(n,t,o){for(var i=n.lo,e=n.hi;e;)t[o++]=i&127|128,i=(i>>>7|e<<25)>>>0,e>>>=7;for(;i>127;)t[o++]=i&127|128,i=i>>>7;t[o++]=i}ft.prototype.uint64=function(t){var o=vy.from(t);return this._push(sN,o.length(),o)};ft.prototype.int64=ft.prototype.uint64;ft.prototype.sint64=function(t){var o=vy.from(t).zzEncode();return this._push(sN,o.length(),o)};ft.prototype.bool=function(t){return this._push(oN,1,t?1:0)};function aN(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}ft.prototype.fixed32=function(t){return this._push(aN,4,t>>>0)};ft.prototype.sfixed32=ft.prototype.fixed32;ft.prototype.fixed64=function(t){var o=vy.from(t);return this._push(aN,4,o.lo)._push(aN,4,o.hi)};ft.prototype.sfixed64=ft.prototype.fixed64;ft.prototype.float=function(t){return this._push(Oo.float.writeFloatLE,4,t)};ft.prototype.double=function(t){return this._push(Oo.float.writeDoubleLE,8,t)};var tMe=Oo.Array.prototype.set?function(t,o,i){o.set(t,i)}:function(t,o,i){for(var e=0;e>>0;if(!o)return this._push(oN,1,0);if(Oo.isString(t)){var i=ft.alloc(o=z8.length(t));z8.decode(t,i,0),t=i}return this.uint32(o)._push(tMe,o,t)};ft.prototype.string=function(t){var o=V8.length(t);return o?this.uint32(o)._push(V8.write,o,t):this._push(oN,1,0)};ft.prototype.fork=function(){return this.states=new eMe(this),this.head=this.tail=new mC(iN,0,0),this.len=0,this};ft.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new mC(iN,0,0),this.len=0),this};ft.prototype.ldelim=function(){var t=this.head,o=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=o,this.len+=i),this};ft.prototype.finish=function(){for(var t=this.head.next,o=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,o,i),i+=t.len,t=t.next;return o};ft._configure=function(n){rN=n,ft.create=W8(),rN._configure()}});var ez=$((YiA,$8)=>{"use strict";$8.exports=$n;var X8=gN();($n.prototype=Object.create(X8.prototype)).constructor=$n;var oc=ic();function $n(){X8.call(this)}$n._configure=function(){$n.alloc=oc._Buffer_allocUnsafe,$n.writeBytesBuffer=oc.Buffer&&oc.Buffer.prototype instanceof Uint8Array&&oc.Buffer.prototype.set.name==="set"?function(t,o,i){o.set(t,i)}:function(t,o,i){if(t.copy)t.copy(o,i,0,t.length);else for(var e=0;e>>0;return this.uint32(o),o&&this._push($n.writeBytesBuffer,o,t),this};function rMe(n,t,o){n.length<40?oc.utf8.write(n,t,o):t.utf8Write?t.utf8Write(n,o):t.write(n,o)}$n.prototype.string=function(t){var o=oc.Buffer.byteLength(t);return this.uint32(o),o&&this._push(rMe,o,t),this};$n._configure()});var lN=$((jiA,iz)=>{"use strict";iz.exports=nr;var bo=ic(),IN,rz=bo.LongBits,aMe=bo.utf8;function cn(n,t){return RangeError("index out of range: "+n.pos+" + "+(t||1)+" > "+n.len)}function nr(n){this.buf=n,this.pos=0,this.len=n.length}var Az=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new nr(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new nr(t);throw Error("illegal buffer")},az=function(){return bo.Buffer?function(o){return(nr.create=function(e){return bo.Buffer.isBuffer(e)?new IN(e):Az(e)})(o)}:Az};nr.create=az();nr.prototype._slice=bo.Array.prototype.subarray||bo.Array.prototype.slice;nr.prototype.uint32=(function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,cn(this,10);return t}})();nr.prototype.int32=function(){return this.uint32()|0};nr.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function cN(){var n=new rz(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw cn(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<>>0,n}if(this.len-this.pos>4){for(;t<5;++t)if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}else for(;t<5;++t){if(this.pos>=this.len)throw cn(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}nr.prototype.bool=function(){return this.uint32()!==0};function Py(n,t){return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}nr.prototype.fixed32=function(){if(this.pos+4>this.len)throw cn(this,4);return Py(this.buf,this.pos+=4)};nr.prototype.sfixed32=function(){if(this.pos+4>this.len)throw cn(this,4);return Py(this.buf,this.pos+=4)|0};function tz(){if(this.pos+8>this.len)throw cn(this,8);return new rz(Py(this.buf,this.pos+=4),Py(this.buf,this.pos+=4))}nr.prototype.float=function(){if(this.pos+4>this.len)throw cn(this,4);var t=bo.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};nr.prototype.double=function(){if(this.pos+8>this.len)throw cn(this,4);var t=bo.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};nr.prototype.bytes=function(){var t=this.uint32(),o=this.pos,i=this.pos+t;if(i>this.len)throw cn(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(o,i);if(o===i){var e=bo.Buffer;return e?e.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,i)};nr.prototype.string=function(){var t=this.bytes();return aMe.read(t,0,t.length)};nr.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw cn(this,t);this.pos+=t}else do if(this.pos>=this.len)throw cn(this);while(this.buf[this.pos++]&128);return this};nr.recursionLimit=bo.recursionLimit;nr.prototype.skipType=function(n,t){if(t===void 0&&(t=0),t>nr.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n,t+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};nr._configure=function(n){IN=n,nr.create=az(),IN._configure();var t=bo.Long?"toLong":"toNumber";bo.merge(nr.prototype,{int64:function(){return cN.call(this)[t](!1)},uint64:function(){return cN.call(this)[t](!0)},sint64:function(){return cN.call(this).zzDecode()[t](!1)},fixed64:function(){return tz.call(this)[t](!0)},sfixed64:function(){return tz.call(this)[t](!1)}})}});var gz=$((JiA,sz)=>{"use strict";sz.exports=HI;var nz=lN();(HI.prototype=Object.create(nz.prototype)).constructor=HI;var oz=ic();function HI(n){nz.call(this,n)}HI._configure=function(){oz.Buffer&&(HI.prototype._slice=oz.Buffer.prototype.slice)};HI.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};HI._configure()});var Iz=$((qiA,cz)=>{"use strict";cz.exports=SC;var pN=ic();(SC.prototype=Object.create(pN.EventEmitter.prototype)).constructor=SC;function SC(n,t,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");pN.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!t,this.responseDelimited=!!o}SC.prototype.rpcCall=function n(t,o,i,e,a){if(!e)throw TypeError("request must be specified");var A=this;if(!a)return pN.asPromise(n,A,t,o,i,e);if(!A.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return A.rpcImpl(t,o[A.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(s,g){if(s)return A.emit("error",s,t),a(s);if(g===null){A.end(!0);return}if(!(g instanceof i))try{g=i[A.responseDelimited?"decodeDelimited":"decode"](g)}catch(c){return A.emit("error",c,t),a(c)}return A.emit("data",g,t),a(null,g)})}catch(r){A.emit("error",r,t),setTimeout(function(){a(r)},0);return}};SC.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var pz=$(lz=>{"use strict";var iMe=lz;iMe.Service=Iz()});var hz=$((ViA,dz)=>{"use strict";dz.exports=Object.create(null)});var uz=$(Cz=>{"use strict";var Di=Cz;Di.build="minimal";Di.Writer=gN();Di.BufferWriter=ez();Di.Reader=lN();Di.BufferReader=gz();Di.util=ic();Di.rpc=pz();Di.roots=hz();Di.configure=Ez;function Ez(){Di.util._configure(),Di.Writer._configure(Di.BufferWriter),Di.Reader._configure(Di.BufferReader)}Ez()});var Gy=$((ZiA,Bz)=>{"use strict";Bz.exports=uz()});var lW=$(ot=>{"use strict";var zC=Symbol.for("react.element"),dNe=Symbol.for("react.portal"),hNe=Symbol.for("react.fragment"),ENe=Symbol.for("react.strict_mode"),CNe=Symbol.for("react.profiler"),uNe=Symbol.for("react.provider"),BNe=Symbol.for("react.context"),fNe=Symbol.for("react.forward_ref"),QNe=Symbol.for("react.suspense"),yNe=Symbol.for("react.memo"),mNe=Symbol.for("react.lazy"),AW=Symbol.iterator;function SNe(n){return n===null||typeof n!="object"?null:(n=AW&&n[AW]||n["@@iterator"],typeof n=="function"?n:null)}var aW={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iW=Object.assign,oW={};function sd(n,t,o){this.props=n,this.context=t,this.refs=oW,this.updater=o||aW}sd.prototype.isReactComponent={};sd.prototype.setState=function(n,t){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,t,"setState")};sd.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function nW(){}nW.prototype=sd.prototype;function Cv(n,t,o){this.props=n,this.context=t,this.refs=oW,this.updater=o||aW}var uv=Cv.prototype=new nW;uv.constructor=Cv;iW(uv,sd.prototype);uv.isPureReactComponent=!0;var tW=Array.isArray,sW=Object.prototype.hasOwnProperty,Bv={current:null},gW={key:!0,ref:!0,__self:!0,__source:!0};function cW(n,t,o){var i,e={},a=null,A=null;if(t!=null)for(i in t.ref!==void 0&&(A=t.ref),t.key!==void 0&&(a=""+t.key),t)sW.call(t,i)&&!gW.hasOwnProperty(i)&&(e[i]=t[i]);var r=arguments.length-2;if(r===1)e.children=o;else if(1{"use strict";process.env.NODE_ENV!=="production"&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",t=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),r=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),f=Symbol.iterator,Q="@@iterator";function y(L){if(L===null||typeof L!="object")return null;var te=f&&L[f]||L[Q];return typeof te=="function"?te:null}var m={current:null},_={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},R={current:null},H={},j=null;function F(L){j=L}H.setExtraStackFrame=function(L){j=L},H.getCurrentStack=null,H.getStackAddendum=function(){var L="";j&&(L+=j);var te=H.getCurrentStack;return te&&(L+=te()||""),L};var q=!1,J=!1,x=!1,P=!1,z=!1,U={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:_,ReactCurrentOwner:R};U.ReactDebugCurrentFrame=H,U.ReactCurrentActQueue=T;function N(L){{for(var te=arguments.length,pe=new Array(te>1?te-1:0),me=1;me1?te-1:0),me=1;me1){for(var Jt=Array(Rt),qt=0;qt1){for(var rr=Array(qt),yr=0;yr is not supported and will be removed in a future major release. Did you mean to render instead?")),te.Provider},set:function(EA){te.Provider=EA}},_currentValue:{get:function(){return te._currentValue},set:function(EA){te._currentValue=EA}},_currentValue2:{get:function(){return te._currentValue2},set:function(EA){te._currentValue2=EA}},_threadCount:{get:function(){return te._threadCount},set:function(EA){te._threadCount=EA}},Consumer:{get:function(){return pe||(pe=!0,k("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),te.Consumer}},displayName:{get:function(){return te.displayName},set:function(EA){ze||(N("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",EA),ze=!0)}}}),te.Consumer=TA}return te._currentRenderer=null,te._currentRenderer2=null,te}var de=-1,ye=0,Je=1,IA=2;function QA(L){if(L._status===de){var te=L._result,pe=te();if(pe.then(function(TA){if(L._status===ye||L._status===de){var EA=L;EA._status=Je,EA._result=TA}},function(TA){if(L._status===ye||L._status===de){var EA=L;EA._status=IA,EA._result=TA}}),L._status===de){var me=L;me._status=ye,me._result=pe}}if(L._status===Je){var ze=L._result;return ze===void 0&&k(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: const MyComponent = lazy(() => import('./MyComponent')) -Did you accidentally put curly braces around the import?`,qe),"default"in qe||P(`lazy: Expected the result of a dynamic import() call. Instead received: %s +Did you accidentally put curly braces around the import?`,ze),"default"in ze||k(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: - const MyComponent = lazy(() => import('./MyComponent'))`,qe),qe.default}else throw F._result}function XA(F){var Ae={_status:de,_result:F},pe={$$typeof:d,_payload:Ae,_init:QA};{var me,qe;Object.defineProperties(pe,{defaultProps:{configurable:!0,get:function(){return me},set:function(TA){P("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),me=TA,Object.defineProperty(pe,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return qe},set:function(TA){P("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),qe=TA,Object.defineProperty(pe,"propTypes",{enumerable:!0})}}})}return pe}function vA(F){F!=null&&F.$$typeof===I?P("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof F!="function"?P("forwardRef requires a render function but was given %s.",F===null?"null":typeof F):F.length!==0&&F.length!==2&&P("forwardRef render functions accept exactly two parameters: props and ref. %s",F.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),F!=null&&(F.defaultProps!=null||F.propTypes!=null)&&P("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var Ae={$$typeof:s,render:F};{var pe;Object.defineProperty(Ae,"displayName",{enumerable:!1,configurable:!0,get:function(){return pe},set:function(me){pe=me,!F.name&&!F.displayName&&(F.displayName=me)}})}return Ae}var YA;YA=Symbol.for("react.module.reference");function $A(F){return!!(typeof F=="string"||typeof F=="function"||F===i||F===a||W||F===e||F===g||F===c||v||F===B||q||j||K||typeof F=="object"&&F!==null&&(F.$$typeof===d||F.$$typeof===I||F.$$typeof===A||F.$$typeof===r||F.$$typeof===s||F.$$typeof===YA||F.getModuleId!==void 0))}function Pe(F,Ae){$A(F)||P("memo: The first argument must be a component. Instead received: %s",F===null?"null":typeof F);var pe={$$typeof:I,type:F,compare:Ae===void 0?null:Ae};{var me;Object.defineProperty(pe,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(qe){me=qe,!F.name&&!F.displayName&&(F.displayName=qe)}})}return pe}function AA(){var F=m.current;return F===null&&P(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: + const MyComponent = lazy(() => import('./MyComponent'))`,ze),ze.default}else throw L._result}function XA(L){var te={_status:de,_result:L},pe={$$typeof:d,_payload:te,_init:QA};{var me,ze;Object.defineProperties(pe,{defaultProps:{configurable:!0,get:function(){return me},set:function(TA){k("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),me=TA,Object.defineProperty(pe,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return ze},set:function(TA){k("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),ze=TA,Object.defineProperty(pe,"propTypes",{enumerable:!0})}}})}return pe}function vA(L){L!=null&&L.$$typeof===I?k("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof L!="function"?k("forwardRef requires a render function but was given %s.",L===null?"null":typeof L):L.length!==0&&L.length!==2&&k("forwardRef render functions accept exactly two parameters: props and ref. %s",L.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),L!=null&&(L.defaultProps!=null||L.propTypes!=null)&&k("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var te={$$typeof:s,render:L};{var pe;Object.defineProperty(te,"displayName",{enumerable:!1,configurable:!0,get:function(){return pe},set:function(me){pe=me,!L.name&&!L.displayName&&(L.displayName=me)}})}return te}var YA;YA=Symbol.for("react.module.reference");function $A(L){return!!(typeof L=="string"||typeof L=="function"||L===i||L===a||z||L===e||L===g||L===c||P||L===B||q||J||x||typeof L=="object"&&L!==null&&(L.$$typeof===d||L.$$typeof===I||L.$$typeof===A||L.$$typeof===r||L.$$typeof===s||L.$$typeof===YA||L.getModuleId!==void 0))}function Pe(L,te){$A(L)||k("memo: The first argument must be a component. Instead received: %s",L===null?"null":typeof L);var pe={$$typeof:I,type:L,compare:te===void 0?null:te};{var me;Object.defineProperty(pe,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(ze){me=ze,!L.name&&!L.displayName&&(L.displayName=ze)}})}return pe}function AA(){var L=m.current;return L===null&&k(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app -See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),F}function et(F){var Ae=AA();if(F._context!==void 0){var pe=F._context;pe.Consumer===F?P("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):pe.Provider===F&&P("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return Ae.useContext(F)}function Jr(F){var Ae=AA();return Ae.useState(F)}function Ar(F,Ae,pe){var me=AA();return me.useReducer(F,Ae,pe)}function oo(F){var Ae=AA();return Ae.useRef(F)}function hb(F,Ae){var pe=AA();return pe.useEffect(F,Ae)}function Eb(F,Ae){var pe=AA();return pe.useInsertionEffect(F,Ae)}function no(F,Ae){var pe=AA();return pe.useLayoutEffect(F,Ae)}function Fl(F,Ae){var pe=AA();return pe.useCallback(F,Ae)}function Cb(F,Ae){var pe=AA();return pe.useMemo(F,Ae)}function ub(F,Ae,pe){var me=AA();return me.useImperativeHandle(F,Ae,pe)}function Use(F,Ae){{var pe=AA();return pe.useDebugValue(F,Ae)}}function Hse(){var F=AA();return F.useTransition()}function Kse(F){var Ae=AA();return Ae.useDeferredValue(F)}function xse(){var F=AA();return F.useId()}function Yse(F,Ae,pe){var me=AA();return me.useSyncExternalStore(F,Ae,pe)}var jh=0,NU,RU,kU,vU,PU,GU,FU;function LU(){}LU.__reactDisabledLog=!0;function jse(){{if(jh===0){NU=console.log,RU=console.info,kU=console.warn,vU=console.error,PU=console.group,GU=console.groupCollapsed,FU=console.groupEnd;var F={configurable:!0,enumerable:!0,value:LU,writable:!0};Object.defineProperties(console,{info:F,log:F,warn:F,error:F,group:F,groupCollapsed:F,groupEnd:F})}jh++}}function Jse(){{if(jh--,jh===0){var F={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ce({},F,{value:NU}),info:ce({},F,{value:RU}),warn:ce({},F,{value:kU}),error:ce({},F,{value:vU}),group:ce({},F,{value:PU}),groupCollapsed:ce({},F,{value:GU}),groupEnd:ce({},F,{value:FU})})}jh<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Bb=Y.ReactCurrentDispatcher,fb;function nf(F,Ae,pe){{if(fb===void 0)try{throw Error()}catch(qe){var me=qe.stack.trim().match(/\n( *(at )?)/);fb=me&&me[1]||""}return` -`+fb+F}}var Qb=!1,sf;{var qse=typeof WeakMap=="function"?WeakMap:Map;sf=new qse}function UU(F,Ae){if(!F||Qb)return"";{var pe=sf.get(F);if(pe!==void 0)return pe}var me;Qb=!0;var qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var TA;TA=Bb.current,Bb.current=null,jse();try{if(Ae){var EA=function(){throw Error()};if(Object.defineProperty(EA.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(EA,[])}catch(Ia){me=Ia}Reflect.construct(F,[],EA)}else{try{EA.call()}catch(Ia){me=Ia}F.call(EA.prototype)}}else{try{throw Error()}catch(Ia){me=Ia}F()}}catch(Ia){if(Ia&&me&&typeof Ia.stack=="string"){for(var xA=Ia.stack.split(` +See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),L}function et(L){var te=AA();if(L._context!==void 0){var pe=L._context;pe.Consumer===L?k("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):pe.Provider===L&&k("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return te.useContext(L)}function qr(L){var te=AA();return te.useState(L)}function tr(L,te,pe){var me=AA();return me.useReducer(L,te,pe)}function no(L){var te=AA();return te.useRef(L)}function Tb(L,te){var pe=AA();return pe.useEffect(L,te)}function Nb(L,te){var pe=AA();return pe.useInsertionEffect(L,te)}function so(L,te){var pe=AA();return pe.useLayoutEffect(L,te)}function Yl(L,te){var pe=AA();return pe.useCallback(L,te)}function Rb(L,te){var pe=AA();return pe.useMemo(L,te)}function kb(L,te,pe){var me=AA();return me.useImperativeHandle(L,te,pe)}function fge(L,te){{var pe=AA();return pe.useDebugValue(L,te)}}function Qge(){var L=AA();return L.useTransition()}function yge(L){var te=AA();return te.useDeferredValue(L)}function mge(){var L=AA();return L.useId()}function Sge(L,te,pe){var me=AA();return me.useSyncExternalStore(L,te,pe)}var Zh=0,AH,tH,rH,aH,iH,oH,nH;function sH(){}sH.__reactDisabledLog=!0;function Dge(){{if(Zh===0){AH=console.log,tH=console.info,rH=console.warn,aH=console.error,iH=console.group,oH=console.groupCollapsed,nH=console.groupEnd;var L={configurable:!0,enumerable:!0,value:sH,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}Zh++}}function wge(){{if(Zh--,Zh===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:se({},L,{value:AH}),info:se({},L,{value:tH}),warn:se({},L,{value:rH}),error:se({},L,{value:aH}),group:se({},L,{value:iH}),groupCollapsed:se({},L,{value:oH}),groupEnd:se({},L,{value:nH})})}Zh<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var vb=U.ReactCurrentDispatcher,Pb;function uf(L,te,pe){{if(Pb===void 0)try{throw Error()}catch(ze){var me=ze.stack.trim().match(/\n( *(at )?)/);Pb=me&&me[1]||""}return` +`+Pb+L}}var Gb=!1,Bf;{var Oge=typeof WeakMap=="function"?WeakMap:Map;Bf=new Oge}function gH(L,te){if(!L||Gb)return"";{var pe=Bf.get(L);if(pe!==void 0)return pe}var me;Gb=!0;var ze=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var TA;TA=vb.current,vb.current=null,Dge();try{if(te){var EA=function(){throw Error()};if(Object.defineProperty(EA.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(EA,[])}catch(la){me=la}Reflect.construct(L,[],EA)}else{try{EA.call()}catch(la){me=la}L.call(EA.prototype)}}else{try{throw Error()}catch(la){me=la}L()}}catch(la){if(la&&me&&typeof la.stack=="string"){for(var xA=la.stack.split(` `),pt=me.stack.split(` -`),Nt=xA.length-1,jt=pt.length-1;Nt>=1&&jt>=0&&xA[Nt]!==pt[jt];)jt--;for(;Nt>=1&&jt>=0;Nt--,jt--)if(xA[Nt]!==pt[jt]){if(Nt!==1||jt!==1)do if(Nt--,jt--,jt<0||xA[Nt]!==pt[jt]){var Jt=` -`+xA[Nt].replace(" at new "," at ");return F.displayName&&Jt.includes("")&&(Jt=Jt.replace("",F.displayName)),typeof F=="function"&&sf.set(F,Jt),Jt}while(Nt>=1&&jt>=0);break}}}finally{Qb=!1,Bb.current=TA,Jse(),Error.prepareStackTrace=qe}var tr=F?F.displayName||F.name:"",Qr=tr?nf(tr):"";return typeof F=="function"&&sf.set(F,Qr),Qr}function zse(F,Ae,pe){return UU(F,!1)}function Vse(F){var Ae=F.prototype;return!!(Ae&&Ae.isReactComponent)}function gf(F,Ae,pe){if(F==null)return"";if(typeof F=="function")return UU(F,Vse(F));if(typeof F=="string")return nf(F);switch(F){case g:return nf("Suspense");case c:return nf("SuspenseList")}if(typeof F=="object")switch(F.$$typeof){case s:return zse(F.render);case I:return gf(F.type,Ae,pe);case d:{var me=F,qe=me._payload,TA=me._init;try{return gf(TA(qe),Ae,pe)}catch{}}}return""}var HU={},KU=Y.ReactDebugCurrentFrame;function cf(F){if(F){var Ae=F._owner,pe=gf(F.type,F._source,Ae?Ae.type:null);KU.setExtraStackFrame(pe)}else KU.setExtraStackFrame(null)}function Wse(F,Ae,pe,me,qe){{var TA=Function.call.bind(Re);for(var EA in F)if(TA(F,EA)){var xA=void 0;try{if(typeof F[EA]!="function"){var pt=Error((me||"React class")+": "+pe+" type `"+EA+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof F[EA]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw pt.name="Invariant Violation",pt}xA=F[EA](Ae,EA,me,pe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Nt){xA=Nt}xA&&!(xA instanceof Error)&&(cf(qe),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",me||"React class",pe,EA,typeof xA),cf(null)),xA instanceof Error&&!(xA.message in HU)&&(HU[xA.message]=!0,cf(qe),P("Failed %s type: %s",pe,xA.message),cf(null))}}}function Ll(F){if(F){var Ae=F._owner,pe=gf(F.type,F._source,Ae?Ae.type:null);L(pe)}else L(null)}var yb;yb=!1;function xU(){if(G.current){var F=Be(G.current.type);if(F)return` +`),Rt=xA.length-1,Jt=pt.length-1;Rt>=1&&Jt>=0&&xA[Rt]!==pt[Jt];)Jt--;for(;Rt>=1&&Jt>=0;Rt--,Jt--)if(xA[Rt]!==pt[Jt]){if(Rt!==1||Jt!==1)do if(Rt--,Jt--,Jt<0||xA[Rt]!==pt[Jt]){var qt=` +`+xA[Rt].replace(" at new "," at ");return L.displayName&&qt.includes("")&&(qt=qt.replace("",L.displayName)),typeof L=="function"&&Bf.set(L,qt),qt}while(Rt>=1&&Jt>=0);break}}}finally{Gb=!1,vb.current=TA,wge(),Error.prepareStackTrace=ze}var rr=L?L.displayName||L.name:"",yr=rr?uf(rr):"";return typeof L=="function"&&Bf.set(L,yr),yr}function bge(L,te,pe){return gH(L,!1)}function Mge(L){var te=L.prototype;return!!(te&&te.isReactComponent)}function ff(L,te,pe){if(L==null)return"";if(typeof L=="function")return gH(L,Mge(L));if(typeof L=="string")return uf(L);switch(L){case g:return uf("Suspense");case c:return uf("SuspenseList")}if(typeof L=="object")switch(L.$$typeof){case s:return bge(L.render);case I:return ff(L.type,te,pe);case d:{var me=L,ze=me._payload,TA=me._init;try{return ff(TA(ze),te,pe)}catch{}}}return""}var cH={},IH=U.ReactDebugCurrentFrame;function Qf(L){if(L){var te=L._owner,pe=ff(L.type,L._source,te?te.type:null);IH.setExtraStackFrame(pe)}else IH.setExtraStackFrame(null)}function _ge(L,te,pe,me,ze){{var TA=Function.call.bind(Re);for(var EA in L)if(TA(L,EA)){var xA=void 0;try{if(typeof L[EA]!="function"){var pt=Error((me||"React class")+": "+pe+" type `"+EA+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof L[EA]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw pt.name="Invariant Violation",pt}xA=L[EA](te,EA,me,pe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Rt){xA=Rt}xA&&!(xA instanceof Error)&&(Qf(ze),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",me||"React class",pe,EA,typeof xA),Qf(null)),xA instanceof Error&&!(xA.message in cH)&&(cH[xA.message]=!0,Qf(ze),k("Failed %s type: %s",pe,xA.message),Qf(null))}}}function jl(L){if(L){var te=L._owner,pe=ff(L.type,L._source,te?te.type:null);F(pe)}else F(null)}var Fb;Fb=!1;function lH(){if(R.current){var L=Be(R.current.type);if(L)return` -Check the render method of \``+F+"`."}return""}function Zse(F){if(F!==void 0){var Ae=F.fileName.replace(/^.*[\\\/]/,""),pe=F.lineNumber;return` +Check the render method of \``+L+"`."}return""}function Tge(L){if(L!==void 0){var te=L.fileName.replace(/^.*[\\\/]/,""),pe=L.lineNumber;return` -Check your code at `+Ae+":"+pe+"."}return""}function Xse(F){return F!=null?Zse(F.__source):""}var YU={};function $se(F){var Ae=xU();if(!Ae){var pe=typeof F=="string"?F:F.displayName||F.name;pe&&(Ae=` +Check your code at `+te+":"+pe+"."}return""}function Nge(L){return L!=null?Tge(L.__source):""}var pH={};function Rge(L){var te=lH();if(!te){var pe=typeof L=="string"?L:L.displayName||L.name;pe&&(te=` -Check the top-level render call using <`+pe+">.")}return Ae}function jU(F,Ae){if(!(!F._store||F._store.validated||F.key!=null)){F._store.validated=!0;var pe=$se(Ae);if(!YU[pe]){YU[pe]=!0;var me="";F&&F._owner&&F._owner!==G.current&&(me=" It was passed a child from "+Be(F._owner.type)+"."),Ll(F),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',pe,me),Ll(null)}}}function JU(F,Ae){if(typeof F=="object"){if(je(F))for(var pe=0;pe",qe=" Did you accidentally export a JSX literal instead of a component?"):EA=typeof F,P("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",EA,qe)}var xA=Qe.apply(this,arguments);if(xA==null)return xA;if(me)for(var pt=2;pt10&&N("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),me._updatedFibers.clear()}}}var WU=!1,If=null;function age(F){if(If===null)try{var Ae=("require"+Math.random()).slice(0,7),pe=Dm&&Dm[Ae];If=pe.call(Dm,"timers").setImmediate}catch{If=function(qe){WU===!1&&(WU=!0,typeof MessageChannel>"u"&&P("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var TA=new MessageChannel;TA.port1.onmessage=qe,TA.port2.postMessage(void 0)}}return If(F)}var Ul=0,ZU=!1;function XU(F){{var Ae=Ul;Ul++,T.current===null&&(T.current=[]);var pe=T.isBatchingLegacy,me;try{if(T.isBatchingLegacy=!0,me=F(),!pe&&T.didScheduleLegacyUpdate){var qe=T.current;qe!==null&&(T.didScheduleLegacyUpdate=!1,Db(qe))}}catch(tr){throw lf(Ae),tr}finally{T.isBatchingLegacy=pe}if(me!==null&&typeof me=="object"&&typeof me.then=="function"){var TA=me,EA=!1,xA={then:function(tr,Qr){EA=!0,TA.then(function(Ia){lf(Ae),Ul===0?mb(Ia,tr,Qr):tr(Ia)},function(Ia){lf(Ae),Qr(Ia)})}};return!ZU&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){EA||(ZU=!0,P("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),xA}else{var pt=me;if(lf(Ae),Ul===0){var Nt=T.current;Nt!==null&&(Db(Nt),T.current=null);var jt={then:function(tr,Qr){T.current===null?(T.current=[],mb(pt,tr,Qr)):tr(pt)}};return jt}else{var Jt={then:function(tr,Qr){tr(pt)}};return Jt}}}}function lf(F){F!==Ul-1&&P("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Ul=F}function mb(F,Ae,pe){{var me=T.current;if(me!==null)try{Db(me),age(function(){me.length===0?(T.current=null,Ae(F)):mb(F,Ae,pe)})}catch(qe){pe(qe)}else Ae(F)}}var Sb=!1;function Db(F){if(!Sb){Sb=!0;var Ae=0;try{for(;Ae{"use strict";process.env.NODE_ENV==="production"?iv.exports=YV():iv.exports=jV()});var ZI=$((KpA,W6)=>{"use strict";var RS=Xe("crypto"),zPe=Xe("assert");function No(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}function VPe(n,t,o){No(n),No(t),No(o);let i=RS.createCipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(t),i.final()])}function WPe(n,t,o){No(n),No(t),No(o);let i=RS.createDecipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(t),i.final()])}function ud(n,t){No(n),No(t);let o=RS.createHmac("sha256",n);return o.update(t),Buffer.from(o.digest())}function ZPe(n){No(n);let t=RS.createHash("sha512");return t.update(n),t.digest()}function XPe(n,t,o,i){if(No(n),No(t),No(o),t.byteLength!=32)throw new Error("Got salt of incorrect length");i=i||3,zPe(i>=1&&i<=3);let e=ud(t,n),a=new Uint8Array(o.byteLength+1+32);a.set(o,32),a[a.length-1]=1;let A=[ud(e,Buffer.from(a.slice(32)))];return i>1&&(a.set(A[A.length-1]),a[a.length-1]=2,A.push(ud(e,Buffer.from(a)))),i>2&&(a.set(A[A.length-1]),a[a.length-1]=3,A.push(ud(e,Buffer.from(a)))),A}function $Pe(n,t,o,i){let e=ud(t,n).slice(0,i);if(o.length!==i||e.length!==i)throw new Error("Bad MAC length");if(!o.equals(e))throw new Error("Bad MAC")}W6.exports={deriveSecrets:XPe,decrypt:WPe,encrypt:VPe,hash:ZPe,calculateMAC:ud,verifyMAC:$Pe}});var c5=$(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});var xpA=new Uint8Array(16),a5=new Uint8Array(32);a5[0]=9;function pA(n){var t,o=new Float64Array(16);if(n)for(t=0;t>24&255,n[t+1]=o>>16&255,n[t+2]=o>>8&255,n[t+3]=o&255,n[t+4]=i>>24&255,n[t+5]=i>>16&255,n[t+6]=i>>8&255,n[t+7]=i&255}function aGe(n,t,o,i,e){var a,A=0;for(a=0;a>>8)-1}function i5(n,t,o,i){return aGe(n,t,o,i,32)}function lc(n,t){var o;for(o=0;o<16;o++)n[o]=t[o]|0}function NP(n){var t,o,i=1;for(t=0;t<16;t++)o=n[t]+i+65535,i=Math.floor(o/65536),n[t]=o-i*65536;n[0]+=i-1+37*(i-1)}function Bd(n,t,o){for(var i,e=~(o-1),a=0;a<16;a++)i=e&(n[a]^t[a]),n[a]^=i,t[a]^=i}function Qd(n,t){var o,i,e,a=pA(),A=pA();for(o=0;o<16;o++)A[o]=t[o];for(NP(A),NP(A),NP(A),i=0;i<2;i++){for(a[0]=A[0]-65517,o=1;o<15;o++)a[o]=A[o]-65535-(a[o-1]>>16&1),a[o-1]&=65535;a[15]=A[15]-32767-(a[14]>>16&1),e=a[15]>>16&1,a[14]&=65535,Bd(A,a,1-e)}for(o=0;o<16;o++)n[2*o]=A[o]&255,n[2*o+1]=A[o]>>8}function e5(n,t){var o=new Uint8Array(32),i=new Uint8Array(32);return Qd(o,n),Qd(i,t),i5(o,0,i,0)}function o5(n){var t=new Uint8Array(32);return Qd(t,n),t[0]&1}function GP(n,t){var o;for(o=0;o<16;o++)n[o]=t[2*o]+(t[2*o+1]<<8);n[15]&=32767}function dn(n,t,o){for(var i=0;i<16;i++)n[i]=t[i]+o[i]}function En(n,t,o){for(var i=0;i<16;i++)n[i]=t[i]-o[i]}function It(n,t,o){var i,e,a=0,A=0,r=0,s=0,g=0,c=0,I=0,d=0,B=0,f=0,Q=0,y=0,m=0,_=0,T=0,G=0,x=0,J=0,L=0,q=0,j=0,K=0,v=0,W=0,Y=0,N=0,P=0,V=0,te=0,ne=0,Ne=0,ce=o[0],Te=o[1],fe=o[2],De=o[3],Ke=o[4],rA=o[5],ve=o[6],iA=o[7],Ce=o[8],he=o[9],Ze=o[10],je=o[11],Oe=o[12],hA=o[13],dA=o[14],aA=o[15];i=t[0],a+=i*ce,A+=i*Te,r+=i*fe,s+=i*De,g+=i*Ke,c+=i*rA,I+=i*ve,d+=i*iA,B+=i*Ce,f+=i*he,Q+=i*Ze,y+=i*je,m+=i*Oe,_+=i*hA,T+=i*dA,G+=i*aA,i=t[1],A+=i*ce,r+=i*Te,s+=i*fe,g+=i*De,c+=i*Ke,I+=i*rA,d+=i*ve,B+=i*iA,f+=i*Ce,Q+=i*he,y+=i*Ze,m+=i*je,_+=i*Oe,T+=i*hA,G+=i*dA,x+=i*aA,i=t[2],r+=i*ce,s+=i*Te,g+=i*fe,c+=i*De,I+=i*Ke,d+=i*rA,B+=i*ve,f+=i*iA,Q+=i*Ce,y+=i*he,m+=i*Ze,_+=i*je,T+=i*Oe,G+=i*hA,x+=i*dA,J+=i*aA,i=t[3],s+=i*ce,g+=i*Te,c+=i*fe,I+=i*De,d+=i*Ke,B+=i*rA,f+=i*ve,Q+=i*iA,y+=i*Ce,m+=i*he,_+=i*Ze,T+=i*je,G+=i*Oe,x+=i*hA,J+=i*dA,L+=i*aA,i=t[4],g+=i*ce,c+=i*Te,I+=i*fe,d+=i*De,B+=i*Ke,f+=i*rA,Q+=i*ve,y+=i*iA,m+=i*Ce,_+=i*he,T+=i*Ze,G+=i*je,x+=i*Oe,J+=i*hA,L+=i*dA,q+=i*aA,i=t[5],c+=i*ce,I+=i*Te,d+=i*fe,B+=i*De,f+=i*Ke,Q+=i*rA,y+=i*ve,m+=i*iA,_+=i*Ce,T+=i*he,G+=i*Ze,x+=i*je,J+=i*Oe,L+=i*hA,q+=i*dA,j+=i*aA,i=t[6],I+=i*ce,d+=i*Te,B+=i*fe,f+=i*De,Q+=i*Ke,y+=i*rA,m+=i*ve,_+=i*iA,T+=i*Ce,G+=i*he,x+=i*Ze,J+=i*je,L+=i*Oe,q+=i*hA,j+=i*dA,K+=i*aA,i=t[7],d+=i*ce,B+=i*Te,f+=i*fe,Q+=i*De,y+=i*Ke,m+=i*rA,_+=i*ve,T+=i*iA,G+=i*Ce,x+=i*he,J+=i*Ze,L+=i*je,q+=i*Oe,j+=i*hA,K+=i*dA,v+=i*aA,i=t[8],B+=i*ce,f+=i*Te,Q+=i*fe,y+=i*De,m+=i*Ke,_+=i*rA,T+=i*ve,G+=i*iA,x+=i*Ce,J+=i*he,L+=i*Ze,q+=i*je,j+=i*Oe,K+=i*hA,v+=i*dA,W+=i*aA,i=t[9],f+=i*ce,Q+=i*Te,y+=i*fe,m+=i*De,_+=i*Ke,T+=i*rA,G+=i*ve,x+=i*iA,J+=i*Ce,L+=i*he,q+=i*Ze,j+=i*je,K+=i*Oe,v+=i*hA,W+=i*dA,Y+=i*aA,i=t[10],Q+=i*ce,y+=i*Te,m+=i*fe,_+=i*De,T+=i*Ke,G+=i*rA,x+=i*ve,J+=i*iA,L+=i*Ce,q+=i*he,j+=i*Ze,K+=i*je,v+=i*Oe,W+=i*hA,Y+=i*dA,N+=i*aA,i=t[11],y+=i*ce,m+=i*Te,_+=i*fe,T+=i*De,G+=i*Ke,x+=i*rA,J+=i*ve,L+=i*iA,q+=i*Ce,j+=i*he,K+=i*Ze,v+=i*je,W+=i*Oe,Y+=i*hA,N+=i*dA,P+=i*aA,i=t[12],m+=i*ce,_+=i*Te,T+=i*fe,G+=i*De,x+=i*Ke,J+=i*rA,L+=i*ve,q+=i*iA,j+=i*Ce,K+=i*he,v+=i*Ze,W+=i*je,Y+=i*Oe,N+=i*hA,P+=i*dA,V+=i*aA,i=t[13],_+=i*ce,T+=i*Te,G+=i*fe,x+=i*De,J+=i*Ke,L+=i*rA,q+=i*ve,j+=i*iA,K+=i*Ce,v+=i*he,W+=i*Ze,Y+=i*je,N+=i*Oe,P+=i*hA,V+=i*dA,te+=i*aA,i=t[14],T+=i*ce,G+=i*Te,x+=i*fe,J+=i*De,L+=i*Ke,q+=i*rA,j+=i*ve,K+=i*iA,v+=i*Ce,W+=i*he,Y+=i*Ze,N+=i*je,P+=i*Oe,V+=i*hA,te+=i*dA,ne+=i*aA,i=t[15],G+=i*ce,x+=i*Te,J+=i*fe,L+=i*De,q+=i*Ke,j+=i*rA,K+=i*ve,v+=i*iA,W+=i*Ce,Y+=i*he,N+=i*Ze,P+=i*je,V+=i*Oe,te+=i*hA,ne+=i*dA,Ne+=i*aA,a+=38*x,A+=38*J,r+=38*L,s+=38*q,g+=38*j,c+=38*K,I+=38*v,d+=38*W,B+=38*Y,f+=38*N,Q+=38*P,y+=38*V,m+=38*te,_+=38*ne,T+=38*Ne,e=1,i=a+e+65535,e=Math.floor(i/65536),a=i-e*65536,i=A+e+65535,e=Math.floor(i/65536),A=i-e*65536,i=r+e+65535,e=Math.floor(i/65536),r=i-e*65536,i=s+e+65535,e=Math.floor(i/65536),s=i-e*65536,i=g+e+65535,e=Math.floor(i/65536),g=i-e*65536,i=c+e+65535,e=Math.floor(i/65536),c=i-e*65536,i=I+e+65535,e=Math.floor(i/65536),I=i-e*65536,i=d+e+65535,e=Math.floor(i/65536),d=i-e*65536,i=B+e+65535,e=Math.floor(i/65536),B=i-e*65536,i=f+e+65535,e=Math.floor(i/65536),f=i-e*65536,i=Q+e+65535,e=Math.floor(i/65536),Q=i-e*65536,i=y+e+65535,e=Math.floor(i/65536),y=i-e*65536,i=m+e+65535,e=Math.floor(i/65536),m=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=i-e*65536,i=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=G+e+65535,e=Math.floor(i/65536),G=i-e*65536,a+=e-1+37*(e-1),e=1,i=a+e+65535,e=Math.floor(i/65536),a=i-e*65536,i=A+e+65535,e=Math.floor(i/65536),A=i-e*65536,i=r+e+65535,e=Math.floor(i/65536),r=i-e*65536,i=s+e+65535,e=Math.floor(i/65536),s=i-e*65536,i=g+e+65535,e=Math.floor(i/65536),g=i-e*65536,i=c+e+65535,e=Math.floor(i/65536),c=i-e*65536,i=I+e+65535,e=Math.floor(i/65536),I=i-e*65536,i=d+e+65535,e=Math.floor(i/65536),d=i-e*65536,i=B+e+65535,e=Math.floor(i/65536),B=i-e*65536,i=f+e+65535,e=Math.floor(i/65536),f=i-e*65536,i=Q+e+65535,e=Math.floor(i/65536),Q=i-e*65536,i=y+e+65535,e=Math.floor(i/65536),y=i-e*65536,i=m+e+65535,e=Math.floor(i/65536),m=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=i-e*65536,i=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=G+e+65535,e=Math.floor(i/65536),G=i-e*65536,a+=e-1+37*(e-1),n[0]=a,n[1]=A,n[2]=r,n[3]=s,n[4]=g,n[5]=c,n[6]=I,n[7]=d,n[8]=B,n[9]=f,n[10]=Q,n[11]=y,n[12]=m,n[13]=_,n[14]=T,n[15]=G}function hn(n,t){It(n,t,t)}function FP(n,t){var o=pA(),i;for(i=0;i<16;i++)o[i]=t[i];for(i=253;i>=0;i--)hn(o,o),i!==2&&i!==4&&It(o,o,t);for(i=0;i<16;i++)n[i]=o[i]}function iGe(n,t){var o=pA(),i;for(i=0;i<16;i++)o[i]=t[i];for(i=250;i>=0;i--)hn(o,o),i!==1&&It(o,o,t);for(i=0;i<16;i++)n[i]=o[i]}function n5(n,t,o){var i=new Uint8Array(32),e=new Float64Array(80),a,A,r=pA(),s=pA(),g=pA(),c=pA(),I=pA(),d=pA();for(A=0;A<31;A++)i[A]=t[A];for(i[31]=t[31]&127|64,i[0]&=248,GP(e,o),A=0;A<16;A++)s[A]=e[A],c[A]=r[A]=g[A]=0;for(r[0]=c[0]=1,A=254;A>=0;--A)a=i[A>>>3]>>>(A&7)&1,Bd(r,s,a),Bd(g,c,a),dn(I,r,g),En(r,r,g),dn(g,s,c),En(s,s,c),hn(c,I),hn(d,r),It(r,g,r),It(g,s,I),dn(I,r,g),En(r,r,g),hn(s,r),En(g,c,d),It(r,g,eGe),dn(r,r,c),It(g,g,r),It(r,c,d),It(c,s,e),hn(s,I),Bd(r,s,a),Bd(g,c,a);for(A=0;A<16;A++)e[A+16]=r[A],e[A+32]=g[A],e[A+48]=s[A],e[A+64]=c[A];var B=e.subarray(32),f=e.subarray(16);return FP(B,B),It(f,f,B),Qd(n,f),0}function oGe(n,t){return n5(n,t,a5)}var A5=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function t5(n,t,o,i){for(var e=new Int32Array(16),a=new Int32Array(16),A,r,s,g,c,I,d,B,f,Q,y,m,_,T,G,x,J,L,q,j,K,v,W,Y,N,P,V=n[0],te=n[1],ne=n[2],Ne=n[3],ce=n[4],Te=n[5],fe=n[6],De=n[7],Ke=t[0],rA=t[1],ve=t[2],iA=t[3],Ce=t[4],he=t[5],Ze=t[6],je=t[7],Oe=0;i>=128;){for(q=0;q<16;q++)j=8*q+Oe,e[q]=o[j+0]<<24|o[j+1]<<16|o[j+2]<<8|o[j+3],a[q]=o[j+4]<<24|o[j+5]<<16|o[j+6]<<8|o[j+7];for(q=0;q<80;q++)if(A=V,r=te,s=ne,g=Ne,c=ce,I=Te,d=fe,B=De,f=Ke,Q=rA,y=ve,m=iA,_=Ce,T=he,G=Ze,x=je,K=De,v=je,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=(ce>>>14|Ce<<18)^(ce>>>18|Ce<<14)^(Ce>>>9|ce<<23),v=(Ce>>>14|ce<<18)^(Ce>>>18|ce<<14)^(ce>>>9|Ce<<23),W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,K=ce&Te^~ce&fe,v=Ce&he^~Ce&Ze,W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,K=A5[q*2],v=A5[q*2+1],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,K=e[q%16],v=a[q%16],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,J=N&65535|P<<16,L=W&65535|Y<<16,K=J,v=L,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=(V>>>28|Ke<<4)^(Ke>>>2|V<<30)^(Ke>>>7|V<<25),v=(Ke>>>28|V<<4)^(V>>>2|Ke<<30)^(V>>>7|Ke<<25),W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,K=V&te^V&ne^te&ne,v=Ke&rA^Ke&ve^rA&ve,W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,B=N&65535|P<<16,x=W&65535|Y<<16,K=g,v=m,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=J,v=L,W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,g=N&65535|P<<16,m=W&65535|Y<<16,te=A,ne=r,Ne=s,ce=g,Te=c,fe=I,De=d,V=B,rA=f,ve=Q,iA=y,Ce=m,he=_,Ze=T,je=G,Ke=x,q%16===15)for(j=0;j<16;j++)K=e[j],v=a[j],W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=e[(j+9)%16],v=a[(j+9)%16],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,J=e[(j+1)%16],L=a[(j+1)%16],K=(J>>>1|L<<31)^(J>>>8|L<<24)^J>>>7,v=(L>>>1|J<<31)^(L>>>8|J<<24)^(L>>>7|J<<25),W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,J=e[(j+14)%16],L=a[(j+14)%16],K=(J>>>19|L<<13)^(L>>>29|J<<3)^J>>>6,v=(L>>>19|J<<13)^(J>>>29|L<<3)^(L>>>6|J<<26),W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,e[j]=N&65535|P<<16,a[j]=W&65535|Y<<16;K=V,v=Ke,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=n[0],v=t[0],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,n[0]=V=N&65535|P<<16,t[0]=Ke=W&65535|Y<<16,K=te,v=rA,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=n[1],v=t[1],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,n[1]=te=N&65535|P<<16,t[1]=rA=W&65535|Y<<16,K=ne,v=ve,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=n[2],v=t[2],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,n[2]=ne=N&65535|P<<16,t[2]=ve=W&65535|Y<<16,K=Ne,v=iA,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=n[3],v=t[3],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,n[3]=Ne=N&65535|P<<16,t[3]=iA=W&65535|Y<<16,K=ce,v=Ce,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=n[4],v=t[4],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,n[4]=ce=N&65535|P<<16,t[4]=Ce=W&65535|Y<<16,K=Te,v=he,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=n[5],v=t[5],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,n[5]=Te=N&65535|P<<16,t[5]=he=W&65535|Y<<16,K=fe,v=Ze,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=n[6],v=t[6],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,n[6]=fe=N&65535|P<<16,t[6]=Ze=W&65535|Y<<16,K=De,v=je,W=v&65535,Y=v>>>16,N=K&65535,P=K>>>16,K=n[7],v=t[7],W+=v&65535,Y+=v>>>16,N+=K&65535,P+=K>>>16,Y+=W>>>16,N+=Y>>>16,P+=N>>>16,n[7]=De=N&65535|P<<16,t[7]=je=W&65535|Y<<16,Oe+=128,i-=128}return i}function yu(n,t,o){var i=new Int32Array(8),e=new Int32Array(8),a=new Uint8Array(256),A,r=o;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,e[0]=4089235720,e[1]=2227873595,e[2]=4271175723,e[3]=1595750129,e[4]=2917565137,e[5]=725511199,e[6]=4215389547,e[7]=327033209,t5(i,e,t,o),o%=128,A=0;A=0;--e)i=o[e/8|0]>>(e&7)&1,r5(n,t,i),vP(t,n),vP(n,n),r5(n,t,i)}function vS(n,t){var o=[pA(),pA(),pA(),pA()];lc(o[0],Z6),lc(o[1],X6),lc(o[2],fd),It(o[3],Z6,X6),s5(n,o,t)}var RP=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function LP(n,t){var o,i,e,a;for(i=63;i>=32;--i){for(o=0,e=i-32,a=i-12;e>8,t[e]-=o*256;t[e]+=o,t[i]=0}for(o=0,e=0;e<32;e++)t[e]+=o-(t[31]>>4)*RP[e],o=t[e]>>8,t[e]&=255;for(e=0;e<32;e++)t[e]-=o*RP[e];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,n[i]=t[i]&255}function mu(n){var t=new Float64Array(64),o;for(o=0;o<64;o++)t[o]=n[o];for(o=0;o<64;o++)n[o]=0;LP(n,t)}function nGe(n,t,o,i){var e=new Uint8Array(64),a=new Uint8Array(64),A,r,s=new Float64Array(64),g=[pA(),pA(),pA(),pA()];for(A=0;A>7&&En(n[0],kP,n[0]),It(n[3],n[0],n[1]),0)}function cGe(n,t,o,i){var e,a,A=new Uint8Array(32),r=new Uint8Array(64),s=[pA(),pA(),pA(),pA()],g=[pA(),pA(),pA(),pA()];if(a=-1,o<64||gGe(g,i))return-1;for(e=0;e=0}cg.verify=EGe;function CGe(n){if(pc(n),n.length!==32)throw new Error("wrong seed length");for(var t=new Uint8Array(32),o=new Uint8Array(32),i=0;i<32;i++)t[i]=n[i];return oGe(o,t),t[0]&=248,t[31]&=127,t[31]|=64,o[31]&=127,{public:o,private:t}}cg.generateKeyPair=CGe;cg.default={}});var dc=$(md=>{"use strict";var Su=c5(),yd=Xe("crypto"),UP=Buffer.from([48,42,48,5,6,3,43,101,110,3,33,0]),HP=Buffer.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]),uGe=Buffer.from([5]),KP=function(n){return Buffer.concat([uGe,n])};function I5(n){if(n===void 0)throw new Error("Undefined private key");if(!(n instanceof Buffer))throw new Error(`Invalid private key type: ${n.constructor.name}`);if(n.byteLength!=32)throw new Error(`Incorrect private key length: ${n.byteLength}`)}function l5(n){if(!(n instanceof Buffer))throw new Error(`Invalid public key type: ${n.constructor.name}`);if(n===void 0||(n.byteLength!=33||n[0]!=5)&&n.byteLength!=32)throw new Error("Invalid public key");return n.byteLength==33?n.slice(1):(console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"),n)}function BGe(n){let t=new Uint8Array(n);return t[0]|=6,t[31]|=128,t[31]&=-65,t}md.getPublicFromPrivateKey=function(n){let t=BGe(n),o=Su.generateKeyPair(t);return KP(Buffer.from(o.public))};md.generateKeyPair=function(){try{let{publicKey:n,privateKey:t}=yd.generateKeyPairSync("x25519",{publicKeyEncoding:{format:"der",type:"spki"},privateKeyEncoding:{format:"der",type:"pkcs8"}}),o=n.slice(UP.length,UP.length+32),i=t.slice(HP.length,HP.length+32);return{pubKey:KP(o),privKey:i}}catch{let t=Su.generateKeyPair(yd.randomBytes(32));return{privKey:Buffer.from(t.private),pubKey:KP(Buffer.from(t.public))}}};md.calculateAgreement=function(n,t){if(n=l5(n),I5(t),!n||n.byteLength!=32)throw new Error("Invalid public key");if(typeof yd.diffieHellman=="function"){let o=yd.createPrivateKey({key:Buffer.concat([HP,t]),format:"der",type:"pkcs8"}),i=yd.createPublicKey({key:Buffer.concat([UP,n]),format:"der",type:"spki"});return yd.diffieHellman({privateKey:o,publicKey:i})}else{let o=Su.sharedKey(t,n);return Buffer.from(o)}};md.calculateSignature=function(n,t){if(I5(n),!t)throw new Error("Invalid message");return Buffer.from(Su.sign(n,t))};md.verifySignature=function(n,t,o,i){if(n=l5(n),!n||n.byteLength!=32)throw new Error("Invalid public key");if(!t)throw new Error("Invalid message");if(!o||o.byteLength!=64)throw new Error("Invalid signature");return i?!0:Su.verify(n,t,o)}});var d5=$(Du=>{var PS=dc(),fGe=Xe("crypto");function p5(n){return typeof n=="number"&&n%1===0&&n>=0}Du.generateIdentityKeyPair=PS.generateKeyPair;Du.generateRegistrationId=function(){var n=Uint16Array.from(fGe.randomBytes(2))[0];return n&16383};Du.generateSignedPreKey=function(n,t){if(!(n.privKey instanceof Buffer)||n.privKey.byteLength!=32||!(n.pubKey instanceof Buffer)||n.pubKey.byteLength!=33)throw new TypeError("Invalid argument for identityKeyPair");if(!p5(t))throw new TypeError("Invalid argument for signedKeyId: "+t);let o=PS.generateKeyPair(),i=PS.calculateSignature(n.privKey,o.pubKey);return{keyId:t,keyPair:o,signature:i}};Du.generatePreKey=function(n){if(!p5(n))throw new TypeError("Invalid argument for keyId: "+n);let t=PS.generateKeyPair();return{keyId:n,keyPair:t}}});var YP=$((qpA,h5)=>{var xP=class n{static from(t){if(typeof t!="string"||!t.match(/.*\.\d+/))throw new Error("Invalid address encoding");let o=t.split(".");return new this(o[0],parseInt(o[1]))}constructor(t,o){if(typeof t!="string")throw new TypeError("id required for addr");if(t.indexOf(".")!==-1)throw new TypeError("encoded addr detected");if(this.id=t,typeof o!="number")throw new TypeError("number required for deviceId");this.deviceId=o}toString(){return`${this.id}.${this.deviceId}`}is(t){return t instanceof n?t.id===this.id&&t.deviceId===this.deviceId:!1}};h5.exports=xP});var jP=$((zpA,E5)=>{var QGe={OURS:1,THEIRS:2};E5.exports=QGe});var JP=$((VpA,C5)=>{var yGe={SENDING:1,RECEIVING:2};C5.exports=yGe});var US=$((WpA,B5)=>{var mGe=jP(),SGe=40,u5="v1";function FS(n){if(!Buffer.isBuffer(n))throw new TypeError("Buffer required")}var LS=class{constructor(){this._chains={}}toString(){return``}inspect(){return this.toString()}addChain(t,o){FS(t);let i=t.toString("base64");if(this._chains.hasOwnProperty(i))throw new Error("Overwrite attempt");this._chains[i]=o}getChain(t){return FS(t),this._chains[t.toString("base64")]}deleteChain(t){FS(t);let o=t.toString("base64");if(!this._chains.hasOwnProperty(o))throw new ReferenceError("Not Found");delete this._chains[o]}*chains(){for(let[t,o]of Object.entries(this._chains))yield[Buffer.from(t,"base64"),o]}serialize(){let t={registrationId:this.registrationId,currentRatchet:{ephemeralKeyPair:{pubKey:this.currentRatchet.ephemeralKeyPair.pubKey.toString("base64"),privKey:this.currentRatchet.ephemeralKeyPair.privKey.toString("base64")},lastRemoteEphemeralKey:this.currentRatchet.lastRemoteEphemeralKey.toString("base64"),previousCounter:this.currentRatchet.previousCounter,rootKey:this.currentRatchet.rootKey.toString("base64")},indexInfo:{baseKey:this.indexInfo.baseKey.toString("base64"),baseKeyType:this.indexInfo.baseKeyType,closed:this.indexInfo.closed,used:this.indexInfo.used,created:this.indexInfo.created,remoteIdentityKey:this.indexInfo.remoteIdentityKey.toString("base64")},_chains:this._serialize_chains(this._chains)};return this.pendingPreKey&&(t.pendingPreKey=Object.assign({},this.pendingPreKey),t.pendingPreKey.baseKey=this.pendingPreKey.baseKey.toString("base64")),t}static deserialize(t){let o=new this;return o.registrationId=t.registrationId,o.currentRatchet={ephemeralKeyPair:{pubKey:Buffer.from(t.currentRatchet.ephemeralKeyPair.pubKey,"base64"),privKey:Buffer.from(t.currentRatchet.ephemeralKeyPair.privKey,"base64")},lastRemoteEphemeralKey:Buffer.from(t.currentRatchet.lastRemoteEphemeralKey,"base64"),previousCounter:t.currentRatchet.previousCounter,rootKey:Buffer.from(t.currentRatchet.rootKey,"base64")},o.indexInfo={baseKey:Buffer.from(t.indexInfo.baseKey,"base64"),baseKeyType:t.indexInfo.baseKeyType,closed:t.indexInfo.closed,used:t.indexInfo.used,created:t.indexInfo.created,remoteIdentityKey:Buffer.from(t.indexInfo.remoteIdentityKey,"base64")},o._chains=this._deserialize_chains(t._chains),t.pendingPreKey&&(o.pendingPreKey=Object.assign({},t.pendingPreKey),o.pendingPreKey.baseKey=Buffer.from(t.pendingPreKey.baseKey,"base64")),o}_serialize_chains(t){let o={};for(let i of Object.keys(t)){let e=t[i],a={};for(let[A,r]of Object.entries(e.messageKeys))a[A]=r.toString("base64");o[i]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&e.chainKey.key.toString("base64")},chainType:e.chainType,messageKeys:a}}return o}static _deserialize_chains(t){let o={};for(let i of Object.keys(t)){let e=t[i],a={};for(let[A,r]of Object.entries(e.messageKeys))a[A]=Buffer.from(r,"base64");o[i]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&Buffer.from(e.chainKey.key,"base64")},chainType:e.chainType,messageKeys:a}}return o}},GS=[{version:"v1",migrate:function(t){let o=t._sessions;if(t.registrationId)for(let i in o)o[i].registrationId||(o[i].registrationId=t.registrationId);else for(let i in o)o[i].indexInfo.closed===-1&&console.error("V1 session storage migration error: registrationId",t.registrationId,"for open session version",t.version)}}],qP=class{static createEntry(){return new LS}static migrate(t){let o=t.version===void 0;for(let i=0;i{let i=t.indexInfo.used||0,e=o.indexInfo.used||0;return i===e?0:iSGe;){let t,o;for(let[i,e]of Object.entries(this.sessions))e.indexInfo.closed!==-1&&(!o||e.indexInfo.closed{os.SignalError=class extends Error{};os.UntrustedIdentityKeyError=class extends os.SignalError{constructor(t,o){super(),this.name="UntrustedIdentityKeyError",this.addr=t,this.identityKey=o}};os.SessionError=class extends os.SignalError{constructor(t){super(t),this.name="SessionError"}};os.MessageCounterError=class extends os.SessionError{constructor(t){super(t),this.name="MessageCounterError"}};os.PreKeyError=class extends os.SessionError{constructor(t){super(t),this.name="PreKeyError"}}});var zP=$((rdA,Q5)=>{"use strict";var KS=new Map,f5=1e4;async function DGe(n,t){let o=0;for(;;){let i=Math.min(n.length,f5);for(let e=o;e=f5?(n.splice(0,i),o=0):o=i;else break}t()}Q5.exports=function(n,t){t.name||(Object.defineProperty(t,"name",{writable:!0}),typeof n=="string"?t.name=n:console.warn("Unhandled bucket type (for naming):",typeof n,n));let o;KS.has(n)||(KS.set(n,[]),o=!0);let i=KS.get(n),e=new Promise((a,A)=>i.push({awaitable:t,resolve:a,reject:A}));return o&&DGe(i,()=>KS.delete(n)),e}});var WP=$((adA,D5)=>{"use strict";var y5=jP(),wGe=JP(),m5=US(),S5=ZI(),hc=dc(),xS=HS(),OGe=zP(),VP=class{constructor(t,o){this.addr=o,this.storage=t}async initOutgoing(t){let o=this.addr.toString();return await OGe(o,async()=>{if(!await this.storage.isTrustedIdentity(this.addr.id,t.identityKey))throw new xS.UntrustedIdentityKeyError(this.addr.id,t.identityKey);hc.verifySignature(t.identityKey,t.signedPreKey.publicKey,t.signedPreKey.signature,!0);let i=hc.generateKeyPair(),e=t.preKey&&t.preKey.publicKey,a=await this.initSession(!0,i,void 0,t.identityKey,e,t.signedPreKey.publicKey,t.registrationId);a.pendingPreKey={signedKeyId:t.signedPreKey.keyId,baseKey:i.pubKey},t.preKey&&(a.pendingPreKey.preKeyId=t.preKey.keyId);let A=await this.storage.loadSession(o);if(!A)A=new m5;else{let r=A.getOpenSession();r&&A.closeSession(r)}A.setSession(a),await this.storage.storeSession(o,A)})}async initIncoming(t,o){let i=this.addr.toString();if(!await this.storage.isTrustedIdentity(i,o.identityKey))throw new xS.UntrustedIdentityKeyError(this.addr.id,o.identityKey);if(t.getSession(o.baseKey))return;let e=await this.storage.loadPreKey(o.preKeyId);if(o.preKeyId&&!e)throw new xS.PreKeyError("Invalid PreKey ID");let a=await this.storage.loadSignedPreKey(o.signedPreKeyId);if(!a)throw new xS.PreKeyError("Missing SignedPreKey");let A=t.getOpenSession();return A&&(console.warn("Closing open session in favor of incoming prekey bundle"),t.closeSession(A)),t.setSession(await this.initSession(!1,e,a,o.identityKey,o.baseKey,void 0,o.registrationId)),o.preKeyId}async initSession(t,o,i,e,a,A,r){if(t){if(i)throw new Error("Invalid call to initSession");i=o}else{if(A)throw new Error("Invalid call to initSession");A=a}let s;!o||!a?s=new Uint8Array(128):s=new Uint8Array(160);for(var g=0;g<32;g++)s[g]=255;let c=await this.storage.getOurIdentity(),I=hc.calculateAgreement(A,c.privKey),d=hc.calculateAgreement(e,i.privKey),B=hc.calculateAgreement(A,i.privKey);if(t?(s.set(new Uint8Array(I),32),s.set(new Uint8Array(d),64)):(s.set(new Uint8Array(I),64),s.set(new Uint8Array(d),32)),s.set(new Uint8Array(B),96),o&&a){let y=hc.calculateAgreement(a,o.privKey);s.set(new Uint8Array(y),128)}let f=S5.deriveSecrets(Buffer.from(s),Buffer.alloc(32),Buffer.from("WhisperText")),Q=m5.createEntry();return Q.registrationId=r,Q.currentRatchet={rootKey:f[0],ephemeralKeyPair:t?hc.generateKeyPair():i,lastRemoteEphemeralKey:A,previousCounter:0},Q.indexInfo={created:Date.now(),used:Date.now(),remoteIdentityKey:e,baseKey:t?o.pubKey:a,baseKeyType:t?y5.OURS:y5.THEIRS,closed:-1},t&&this.calculateSendingRatchet(Q,A),Q}calculateSendingRatchet(t,o){let i=t.currentRatchet,e=hc.calculateAgreement(o,i.ephemeralKeyPair.privKey),a=S5.deriveSecrets(e,i.rootKey,Buffer.from("WhisperRatchet"));t.addChain(i.ephemeralKeyPair.pubKey,{messageKeys:{},chainKey:{counter:-1,key:a[1]},chainType:wGe.SENDING}),i.rootKey=a[0]}};D5.exports=VP});var O5=$((idA,w5)=>{"use strict";var Ec=Dy(),Ro=Ec.Reader,ZP=Ec.Writer,nA=Ec.util,Cn=Ec.roots.default||(Ec.roots.default={});Cn.textsecure=(function(){var n={};return n.WhisperMessage=(function(){function t(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 1:A.ephemeralKey=i.bytes();break;case 2:A.counter=i.uint32();break;case 3:A.previousCounter=i.uint32();break;case 4:A.ciphertext=i.bytes();break;default:i.skipType(r&7);break}}return A},t.decodeDelimited=function(i){return i instanceof Ro||(i=new Ro(i)),this.decode(i,i.uint32())},t.verify=function(i){return typeof i!="object"||i===null?"object expected":i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&!(i.ephemeralKey&&typeof i.ephemeralKey.length=="number"||nA.isString(i.ephemeralKey))?"ephemeralKey: buffer expected":i.counter!=null&&i.hasOwnProperty("counter")&&!nA.isInteger(i.counter)?"counter: integer expected":i.previousCounter!=null&&i.hasOwnProperty("previousCounter")&&!nA.isInteger(i.previousCounter)?"previousCounter: integer expected":i.ciphertext!=null&&i.hasOwnProperty("ciphertext")&&!(i.ciphertext&&typeof i.ciphertext.length=="number"||nA.isString(i.ciphertext))?"ciphertext: buffer expected":null},t.fromObject=function(i){if(i instanceof Cn.textsecure.WhisperMessage)return i;var e=new Cn.textsecure.WhisperMessage;return i.ephemeralKey!=null&&(typeof i.ephemeralKey=="string"?nA.base64.decode(i.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(i.ephemeralKey)),0):i.ephemeralKey.length&&(e.ephemeralKey=i.ephemeralKey)),i.counter!=null&&(e.counter=i.counter>>>0),i.previousCounter!=null&&(e.previousCounter=i.previousCounter>>>0),i.ciphertext!=null&&(typeof i.ciphertext=="string"?nA.base64.decode(i.ciphertext,e.ciphertext=nA.newBuffer(nA.base64.length(i.ciphertext)),0):i.ciphertext.length&&(e.ciphertext=i.ciphertext)),e},t.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(e.bytes===String?a.ephemeralKey="":(a.ephemeralKey=[],e.bytes!==Array&&(a.ephemeralKey=nA.newBuffer(a.ephemeralKey))),a.counter=0,a.previousCounter=0,e.bytes===String?a.ciphertext="":(a.ciphertext=[],e.bytes!==Array&&(a.ciphertext=nA.newBuffer(a.ciphertext)))),i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&(a.ephemeralKey=e.bytes===String?nA.base64.encode(i.ephemeralKey,0,i.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(i.ephemeralKey):i.ephemeralKey),i.counter!=null&&i.hasOwnProperty("counter")&&(a.counter=i.counter),i.previousCounter!=null&&i.hasOwnProperty("previousCounter")&&(a.previousCounter=i.previousCounter),i.ciphertext!=null&&i.hasOwnProperty("ciphertext")&&(a.ciphertext=e.bytes===String?nA.base64.encode(i.ciphertext,0,i.ciphertext.length):e.bytes===Array?Array.prototype.slice.call(i.ciphertext):i.ciphertext),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,Ec.util.toJSONOptions)},t})(),n.PreKeyWhisperMessage=(function(){function t(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 5:A.registrationId=i.uint32();break;case 1:A.preKeyId=i.uint32();break;case 6:A.signedPreKeyId=i.uint32();break;case 2:A.baseKey=i.bytes();break;case 3:A.identityKey=i.bytes();break;case 4:A.message=i.bytes();break;default:i.skipType(r&7);break}}return A},t.decodeDelimited=function(i){return i instanceof Ro||(i=new Ro(i)),this.decode(i,i.uint32())},t.verify=function(i){return typeof i!="object"||i===null?"object expected":i.registrationId!=null&&i.hasOwnProperty("registrationId")&&!nA.isInteger(i.registrationId)?"registrationId: integer expected":i.preKeyId!=null&&i.hasOwnProperty("preKeyId")&&!nA.isInteger(i.preKeyId)?"preKeyId: integer expected":i.signedPreKeyId!=null&&i.hasOwnProperty("signedPreKeyId")&&!nA.isInteger(i.signedPreKeyId)?"signedPreKeyId: integer expected":i.baseKey!=null&&i.hasOwnProperty("baseKey")&&!(i.baseKey&&typeof i.baseKey.length=="number"||nA.isString(i.baseKey))?"baseKey: buffer expected":i.identityKey!=null&&i.hasOwnProperty("identityKey")&&!(i.identityKey&&typeof i.identityKey.length=="number"||nA.isString(i.identityKey))?"identityKey: buffer expected":i.message!=null&&i.hasOwnProperty("message")&&!(i.message&&typeof i.message.length=="number"||nA.isString(i.message))?"message: buffer expected":null},t.fromObject=function(i){if(i instanceof Cn.textsecure.PreKeyWhisperMessage)return i;var e=new Cn.textsecure.PreKeyWhisperMessage;return i.registrationId!=null&&(e.registrationId=i.registrationId>>>0),i.preKeyId!=null&&(e.preKeyId=i.preKeyId>>>0),i.signedPreKeyId!=null&&(e.signedPreKeyId=i.signedPreKeyId>>>0),i.baseKey!=null&&(typeof i.baseKey=="string"?nA.base64.decode(i.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(i.baseKey)),0):i.baseKey.length&&(e.baseKey=i.baseKey)),i.identityKey!=null&&(typeof i.identityKey=="string"?nA.base64.decode(i.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(i.identityKey)),0):i.identityKey.length&&(e.identityKey=i.identityKey)),i.message!=null&&(typeof i.message=="string"?nA.base64.decode(i.message,e.message=nA.newBuffer(nA.base64.length(i.message)),0):i.message.length&&(e.message=i.message)),e},t.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(a.preKeyId=0,e.bytes===String?a.baseKey="":(a.baseKey=[],e.bytes!==Array&&(a.baseKey=nA.newBuffer(a.baseKey))),e.bytes===String?a.identityKey="":(a.identityKey=[],e.bytes!==Array&&(a.identityKey=nA.newBuffer(a.identityKey))),e.bytes===String?a.message="":(a.message=[],e.bytes!==Array&&(a.message=nA.newBuffer(a.message))),a.registrationId=0,a.signedPreKeyId=0),i.preKeyId!=null&&i.hasOwnProperty("preKeyId")&&(a.preKeyId=i.preKeyId),i.baseKey!=null&&i.hasOwnProperty("baseKey")&&(a.baseKey=e.bytes===String?nA.base64.encode(i.baseKey,0,i.baseKey.length):e.bytes===Array?Array.prototype.slice.call(i.baseKey):i.baseKey),i.identityKey!=null&&i.hasOwnProperty("identityKey")&&(a.identityKey=e.bytes===String?nA.base64.encode(i.identityKey,0,i.identityKey.length):e.bytes===Array?Array.prototype.slice.call(i.identityKey):i.identityKey),i.message!=null&&i.hasOwnProperty("message")&&(a.message=e.bytes===String?nA.base64.encode(i.message,0,i.message.length):e.bytes===Array?Array.prototype.slice.call(i.message):i.message),i.registrationId!=null&&i.hasOwnProperty("registrationId")&&(a.registrationId=i.registrationId),i.signedPreKeyId!=null&&i.hasOwnProperty("signedPreKeyId")&&(a.signedPreKeyId=i.signedPreKeyId),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,Ec.util.toJSONOptions)},t})(),n.KeyExchangeMessage=(function(){function t(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 1:A.id=i.uint32();break;case 2:A.baseKey=i.bytes();break;case 3:A.ephemeralKey=i.bytes();break;case 4:A.identityKey=i.bytes();break;case 5:A.baseKeySignature=i.bytes();break;default:i.skipType(r&7);break}}return A},t.decodeDelimited=function(i){return i instanceof Ro||(i=new Ro(i)),this.decode(i,i.uint32())},t.verify=function(i){return typeof i!="object"||i===null?"object expected":i.id!=null&&i.hasOwnProperty("id")&&!nA.isInteger(i.id)?"id: integer expected":i.baseKey!=null&&i.hasOwnProperty("baseKey")&&!(i.baseKey&&typeof i.baseKey.length=="number"||nA.isString(i.baseKey))?"baseKey: buffer expected":i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&!(i.ephemeralKey&&typeof i.ephemeralKey.length=="number"||nA.isString(i.ephemeralKey))?"ephemeralKey: buffer expected":i.identityKey!=null&&i.hasOwnProperty("identityKey")&&!(i.identityKey&&typeof i.identityKey.length=="number"||nA.isString(i.identityKey))?"identityKey: buffer expected":i.baseKeySignature!=null&&i.hasOwnProperty("baseKeySignature")&&!(i.baseKeySignature&&typeof i.baseKeySignature.length=="number"||nA.isString(i.baseKeySignature))?"baseKeySignature: buffer expected":null},t.fromObject=function(i){if(i instanceof Cn.textsecure.KeyExchangeMessage)return i;var e=new Cn.textsecure.KeyExchangeMessage;return i.id!=null&&(e.id=i.id>>>0),i.baseKey!=null&&(typeof i.baseKey=="string"?nA.base64.decode(i.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(i.baseKey)),0):i.baseKey.length&&(e.baseKey=i.baseKey)),i.ephemeralKey!=null&&(typeof i.ephemeralKey=="string"?nA.base64.decode(i.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(i.ephemeralKey)),0):i.ephemeralKey.length&&(e.ephemeralKey=i.ephemeralKey)),i.identityKey!=null&&(typeof i.identityKey=="string"?nA.base64.decode(i.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(i.identityKey)),0):i.identityKey.length&&(e.identityKey=i.identityKey)),i.baseKeySignature!=null&&(typeof i.baseKeySignature=="string"?nA.base64.decode(i.baseKeySignature,e.baseKeySignature=nA.newBuffer(nA.base64.length(i.baseKeySignature)),0):i.baseKeySignature.length&&(e.baseKeySignature=i.baseKeySignature)),e},t.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(a.id=0,e.bytes===String?a.baseKey="":(a.baseKey=[],e.bytes!==Array&&(a.baseKey=nA.newBuffer(a.baseKey))),e.bytes===String?a.ephemeralKey="":(a.ephemeralKey=[],e.bytes!==Array&&(a.ephemeralKey=nA.newBuffer(a.ephemeralKey))),e.bytes===String?a.identityKey="":(a.identityKey=[],e.bytes!==Array&&(a.identityKey=nA.newBuffer(a.identityKey))),e.bytes===String?a.baseKeySignature="":(a.baseKeySignature=[],e.bytes!==Array&&(a.baseKeySignature=nA.newBuffer(a.baseKeySignature)))),i.id!=null&&i.hasOwnProperty("id")&&(a.id=i.id),i.baseKey!=null&&i.hasOwnProperty("baseKey")&&(a.baseKey=e.bytes===String?nA.base64.encode(i.baseKey,0,i.baseKey.length):e.bytes===Array?Array.prototype.slice.call(i.baseKey):i.baseKey),i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&(a.ephemeralKey=e.bytes===String?nA.base64.encode(i.ephemeralKey,0,i.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(i.ephemeralKey):i.ephemeralKey),i.identityKey!=null&&i.hasOwnProperty("identityKey")&&(a.identityKey=e.bytes===String?nA.base64.encode(i.identityKey,0,i.identityKey.length):e.bytes===Array?Array.prototype.slice.call(i.identityKey):i.identityKey),i.baseKeySignature!=null&&i.hasOwnProperty("baseKeySignature")&&(a.baseKeySignature=e.bytes===String?nA.base64.encode(i.baseKeySignature,0,i.baseKeySignature.length):e.bytes===Array?Array.prototype.slice.call(i.baseKeySignature):i.baseKeySignature),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,Ec.util.toJSONOptions)},t})(),n})();w5.exports=Cn});var XP=$((odA,b5)=>{"use strict";var{textsecure:{WhisperMessage:bGe,PreKeyWhisperMessage:MGe}}=O5();b5.exports={WhisperMessage:bGe,PreKeyWhisperMessage:MGe}});var N5=$((ndA,T5)=>{var YS=JP(),_Ge=YP(),TGe=WP(),M5=US(),Ig=ZI(),_5=dc(),ns=HS(),Sd=XP(),NGe=zP(),Cc=3;function jS(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}var $P=class{constructor(t,o){if(!(o instanceof _Ge))throw new TypeError("protocolAddress must be a ProtocolAddress");this.addr=o,this.storage=t}_encodeTupleByte(t,o){if(t>15||o>15)throw TypeError("Numbers must be 4 bits or less");return t<<4|o}_decodeTupleByte(t){return[t>>4,t&15]}toString(){return``}async getRecord(){let t=await this.storage.loadSession(this.addr.toString());if(t&&!(t instanceof M5))throw new TypeError("SessionRecord type expected from loadSession");return t}async storeRecord(t){t.removeOldSessions(),await this.storage.storeSession(this.addr.toString(),t)}async queueJob(t){return await NGe(this.addr.toString(),t)}async encrypt(t){jS(t);let o=await this.storage.getOurIdentity();return await this.queueJob(async()=>{let i=await this.getRecord();if(!i)throw new ns.SessionError("No sessions");let e=i.getOpenSession();if(!e)throw new ns.SessionError("No open session");let a=e.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,a))throw new ns.UntrustedIdentityKeyError(this.addr.id,a);let A=e.getChain(e.currentRatchet.ephemeralKeyPair.pubKey);if(A.chainType===YS.RECEIVING)throw new Error("Tried to encrypt on a receiving chain");this.fillMessageKeys(A,A.chainKey.counter+1);let r=Ig.deriveSecrets(A.messageKeys[A.chainKey.counter],Buffer.alloc(32),Buffer.from("WhisperMessageKeys"));delete A.messageKeys[A.chainKey.counter];let s=Sd.WhisperMessage.create();s.ephemeralKey=e.currentRatchet.ephemeralKeyPair.pubKey,s.counter=A.chainKey.counter,s.previousCounter=e.currentRatchet.previousCounter,s.ciphertext=Ig.encrypt(r[0],t,r[2].slice(0,16));let g=Sd.WhisperMessage.encode(s).finish(),c=Buffer.alloc(g.byteLength+66+1);c.set(o.pubKey),c.set(e.indexInfo.remoteIdentityKey,33),c[66]=this._encodeTupleByte(Cc,Cc),c.set(g,67);let I=Ig.calculateMAC(r[1],c),d=Buffer.alloc(g.byteLength+9);d[0]=this._encodeTupleByte(Cc,Cc),d.set(g,1),d.set(I.slice(0,8),g.byteLength+1),await this.storeRecord(i);let B,f;if(e.pendingPreKey){B=3;let Q=Sd.PreKeyWhisperMessage.create({identityKey:o.pubKey,registrationId:await this.storage.getOurRegistrationId(),baseKey:e.pendingPreKey.baseKey,signedPreKeyId:e.pendingPreKey.signedKeyId,message:d});e.pendingPreKey.preKeyId&&(Q.preKeyId=e.pendingPreKey.preKeyId),f=Buffer.concat([Buffer.from([this._encodeTupleByte(Cc,Cc)]),Buffer.from(Sd.PreKeyWhisperMessage.encode(Q).finish())])}else B=1,f=d;return{type:B,body:f,registrationId:e.registrationId}})}async decryptWithSessions(t,o){if(!o.length)throw new ns.SessionError("No sessions available");let i=[];for(let e of o){let a;try{return a=await this.doDecryptWhisperMessage(t,e),e.indexInfo.used=Date.now(),{session:e,plaintext:a}}catch(A){i.push(A)}}console.error("Failed to decrypt message with any known session...");for(let e of i)console.error("Session error:"+e,e.stack);throw new ns.SessionError("No matching sessions found for message")}async decryptWhisperMessage(t){return jS(t),await this.queueJob(async()=>{let o=await this.getRecord();if(!o)throw new ns.SessionError("No session record");let i=await this.decryptWithSessions(t,o.getSessions()),e=i.session.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,e))throw new ns.UntrustedIdentityKeyError(this.addr.id,e);return o.isClosed(i.session)&&console.warn("Decrypted message with closed session."),await this.storeRecord(o),i.plaintext})}async decryptPreKeyWhisperMessage(t){jS(t);let o=this._decodeTupleByte(t[0]);if(o[1]>3||o[0]<3)throw new Error("Incompatible version number on PreKeyWhisperMessage");return await this.queueJob(async()=>{let i=await this.getRecord(),e=Sd.PreKeyWhisperMessage.decode(t.slice(1));if(!i){if(e.registrationId==null)throw new Error("No registrationId");i=new M5}let A=await new TGe(this.storage,this.addr).initIncoming(i,e),r=i.getSession(e.baseKey),s=await this.doDecryptWhisperMessage(e.message,r);return await this.storeRecord(i),A&&await this.storage.removePreKey(A),s})}async doDecryptWhisperMessage(t,o){if(jS(t),!o)throw new TypeError("session required");let i=this._decodeTupleByte(t[0]);if(i[1]>3||i[0]<3)throw new Error("Incompatible version number on WhisperMessage");let e=t.slice(1,-8),a=Sd.WhisperMessage.decode(e);this.maybeStepRatchet(o,a.ephemeralKey,a.previousCounter);let A=o.getChain(a.ephemeralKey);if(A.chainType===YS.SENDING)throw new Error("Tried to decrypt on a sending chain");if(this.fillMessageKeys(A,a.counter),!A.messageKeys.hasOwnProperty(a.counter))throw new ns.MessageCounterError("Key used already or never filled");let r=A.messageKeys[a.counter];delete A.messageKeys[a.counter];let s=Ig.deriveSecrets(r,Buffer.alloc(32),Buffer.from("WhisperMessageKeys")),g=await this.storage.getOurIdentity(),c=Buffer.alloc(e.byteLength+66+1);c.set(o.indexInfo.remoteIdentityKey),c.set(g.pubKey,33),c[66]=this._encodeTupleByte(Cc,Cc),c.set(e,67),Ig.verifyMAC(c,s[1],t.slice(-8),8);let I=Ig.decrypt(s[0],a.ciphertext,s[2].slice(0,16));return delete o.pendingPreKey,I}fillMessageKeys(t,o){if(t.chainKey.counter>=o)return;if(o-t.chainKey.counter>2e3)throw new ns.SessionError("Over 2000 messages into the future!");if(t.chainKey.key===void 0)throw new ns.SessionError("Chain closed");let i=t.chainKey.key;return t.messageKeys[t.chainKey.counter+1]=Ig.calculateMAC(i,Buffer.from([1])),t.chainKey.key=Ig.calculateMAC(i,Buffer.from([2])),t.chainKey.counter+=1,this.fillMessageKeys(t,o)}maybeStepRatchet(t,o,i){if(t.getChain(o))return;let e=t.currentRatchet,a=t.getChain(e.lastRemoteEphemeralKey);a&&(this.fillMessageKeys(a,i),delete a.chainKey.key),this.calculateRatchet(t,o,!1);let A=t.getChain(e.ephemeralKeyPair.pubKey);A&&(e.previousCounter=A.chainKey.counter,t.deleteChain(e.ephemeralKeyPair.pubKey)),e.ephemeralKeyPair=_5.generateKeyPair(),this.calculateRatchet(t,o,!0),e.lastRemoteEphemeralKey=o}calculateRatchet(t,o,i){let e=t.currentRatchet,a=_5.calculateAgreement(o,e.ephemeralKeyPair.privKey),A=Ig.deriveSecrets(a,e.rootKey,Buffer.from("WhisperRatchet"),2),r=i?e.ephemeralKeyPair.pubKey:o;t.addChain(r,{messageKeys:{},chainKey:{counter:-1,key:A[1]},chainType:i?YS.SENDING:YS.RECEIVING}),e.rootKey=A[0]}async hasOpenSession(){return await this.queueJob(async()=>{let t=await this.getRecord();return t?t.haveOpenSession():!1})}async closeOpenSession(){return await this.queueJob(async()=>{let t=await this.getRecord();if(t){let o=t.getOpenSession();o&&(t.closeSession(o),await this.storeRecord(t))}})}};T5.exports=$P});var R5=$(lg=>{"use strict";lg.crypto=ZI();lg.curve=dc();lg.keyhelper=d5();lg.ProtocolAddress=YP();lg.SessionBuilder=WP();lg.SessionCipher=N5();lg.SessionRecord=US();Object.assign(lg,HS())});var AG=$((ldA,F5)=>{"use strict";F5.exports=function(...n){try{return JSON.stringify(...n)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var tG=$((L5,U5)=>{"use strict";var LGe=AG();U5.exports=class extends Error{constructor(n){let t=n.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:LGe(o));super(t.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,L5.assert)}}});var XI=$((ddA,H5)=>{"use strict";var UGe=tG();H5.exports=function(n,...t){if(!n)throw t.length===1&&t[0]instanceof Error?t[0]:new UGe(t)}});var bu=$((hdA,x5)=>{"use strict";var rG=XI(),K5={};x5.exports=function(n,t,o){if(t===!1||t===null||t===void 0)return n;o=o||{},typeof o=="string"&&(o={separator:o});let i=Array.isArray(t);rG(!i||!o.separator,"Separator option is not valid for array-based chain");let e=i?t:t.split(o.separator||"."),a=n;for(let A=0;A{"use strict";var Y5={};Wa=j5.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};Y5.typeMap=new Map([["[object Error]",Wa.error],["[object Map]",Wa.map],["[object Promise]",Wa.promise],["[object Set]",Wa.set],["[object WeakMap]",Wa.weakMap],["[object WeakSet]",Wa.weakSet]]);Wa.getInternalProto=function(n){if(Array.isArray(n))return Wa.array;if(Buffer&&n instanceof Buffer)return Wa.buffer;if(n instanceof Date)return Wa.date;if(n instanceof RegExp)return Wa.regex;if(n instanceof Error)return Wa.error;let t=Object.prototype.toString.call(n);return Y5.typeMap.get(t)||Wa.generic}});var qS=$(J5=>{"use strict";J5.keys=function(n,t={}){return t.symbols!==!1?Reflect.ownKeys(n):Object.getOwnPropertyNames(n)}});var zS=$((CdA,q5)=>{"use strict";var HGe=bu(),Xi=aG(),KGe=qS(),dg={needsProtoHack:new Set([Xi.set,Xi.map,Xi.weakSet,Xi.weakMap])};q5.exports=dg.clone=function(n,t={},o=null){if(typeof n!="object"||n===null)return n;let i=dg.clone,e=o;if(t.shallow){if(t.shallow!==!0)return dg.cloneWithShallow(n,t);i=s=>s}else if(e){let s=e.get(n);if(s)return s}else e=new Map;let a=Xi.getInternalProto(n);if(a===Xi.buffer)return Buffer&&Buffer.from(n);if(a===Xi.date)return new Date(n.getTime());if(a===Xi.regex)return new RegExp(n);let A=dg.base(n,a,t);if(A===n)return n;if(e&&e.set(n,A),a===Xi.set)for(let s of n)A.add(i(s,t,e));else if(a===Xi.map)for(let[s,g]of n)A.set(s,i(g,t,e));let r=KGe.keys(n,t);for(let s of r){if(s==="__proto__")continue;if(a===Xi.array&&s==="length"){A.length=n.length;continue}let g=Object.getOwnPropertyDescriptor(n,s);g?g.get||g.set?Object.defineProperty(A,s,g):g.enumerable?A[s]=i(n[s],t,e):Object.defineProperty(A,s,{enumerable:!1,writable:!0,configurable:!0,value:i(n[s],t,e)}):Object.defineProperty(A,s,{enumerable:!0,writable:!0,configurable:!0,value:i(n[s],t,e)})}return A};dg.cloneWithShallow=function(n,t){let o=t.shallow;t=Object.assign({},t),t.shallow=!1;let i=new Map;for(let e of o){let a=HGe(n,e);(typeof a=="object"||typeof a=="function")&&i.set(a,a)}return dg.clone(n,t,i)};dg.base=function(n,t,o){if(o.prototype===!1)return dg.needsProtoHack.has(t)?new t.constructor:t===Xi.array?[]:{};let i=Object.getPrototypeOf(n);if(i&&i.isImmutable)return n;if(t===Xi.array){let e=[];return i!==t&&Object.setPrototypeOf(e,i),e}if(dg.needsProtoHack.has(t)){let e=new i.constructor;return i!==t&&Object.setPrototypeOf(e,i),e}return Object.create(i)}});var oG=$((udA,W5)=>{"use strict";var iG=XI(),z5=zS(),xGe=qS(),V5={};W5.exports=V5.merge=function(n,t,o){if(iG(n&&typeof n=="object","Invalid target value: must be an object"),iG(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return n;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(t)){iG(Array.isArray(n),"Cannot merge array onto an object"),o.mergeArrays||(n.length=0);for(let e=0;e{"use strict";var VS=XI(),X5=zS(),$5=oG(),Z5=bu(),WS={};eZ.exports=function(n,t,o={}){if(VS(n&&typeof n=="object","Invalid defaults value: must be an object"),VS(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),VS(typeof o=="object","Invalid options: must be an object"),!t)return null;if(o.shallow)return WS.applyToDefaultsWithShallow(n,t,o);let i=X5(n);if(t===!0)return i;let e=o.nullOverride!==void 0?o.nullOverride:!1;return $5(i,t,{nullOverride:e,mergeArrays:!1})};WS.applyToDefaultsWithShallow=function(n,t,o){let i=o.shallow;VS(Array.isArray(i),"Invalid keys");let e=new Map,a=t===!0?null:new Set;for(let s of i){s=Array.isArray(s)?s:s.split(".");let g=Z5(n,s);g&&typeof g=="object"?e.set(g,a&&Z5(t,s)||g):a&&a.add(s)}let A=X5(n,{},e);if(!a)return A;for(let s of a)WS.reachCopy(A,t,s);let r=o.nullOverride!==void 0?o.nullOverride:!1;return $5(A,t,{nullOverride:r,mergeArrays:!1})};WS.reachCopy=function(n,t,o){for(let a of o){if(!(a in t))return;let A=t[a];if(typeof A!="object"||A===null)return;t=A}let i=t,e=n;for(let a=0;a{"use strict";var nG={};tZ.exports=nG.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=nG.Bench.now()}elapsed(){return nG.Bench.now()-this.ts}static now(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}}});var sG=$((ydA,aZ)=>{"use strict";aZ.exports=function(){}});var oZ=$((mdA,iZ)=>{"use strict";var YGe=sG();iZ.exports=function(){return new Promise(YGe)}});var gG=$((SdA,nZ)=>{"use strict";var ss=aG(),Ya={mismatched:null};nZ.exports=function(n,t,o){return o=Object.assign({prototype:!0},o),!!Ya.isDeepEqual(n,t,o,[])};Ya.isDeepEqual=function(n,t,o,i){if(n===t)return n!==0||1/n===1/t;let e=typeof n;if(e!==typeof t||n===null||t===null)return!1;if(e==="function"){if(!o.deepFunction||n.toString()!==t.toString())return!1}else if(e!=="object")return n!==n&&t!==t;let a=Ya.getSharedType(n,t,!!o.prototype);switch(a){case ss.buffer:return Buffer&&Buffer.prototype.equals.call(n,t);case ss.promise:return n===t;case ss.regex:return n.toString()===t.toString();case Ya.mismatched:return!1}for(let A=i.length-1;A>=0;--A)if(i[A].isSame(n,t))return!0;i.push(new Ya.SeenEntry(n,t));try{return!!Ya.isDeepEqualObj(a,n,t,o,i)}finally{i.pop()}};Ya.getSharedType=function(n,t,o){if(o)return Object.getPrototypeOf(n)!==Object.getPrototypeOf(t)?Ya.mismatched:ss.getInternalProto(n);let i=ss.getInternalProto(n);return i!==ss.getInternalProto(t)?Ya.mismatched:i};Ya.valueOf=function(n){let t=n.valueOf;if(t===void 0)return n;try{return t.call(n)}catch(o){return o}};Ya.hasOwnEnumerableProperty=function(n,t){return Object.prototype.propertyIsEnumerable.call(n,t)};Ya.isSetSimpleEqual=function(n,t){for(let o of Set.prototype.values.call(n))if(!Set.prototype.has.call(t,o))return!1;return!0};Ya.isDeepEqualObj=function(n,t,o,i,e){let{isDeepEqual:a,valueOf:A,hasOwnEnumerableProperty:r}=Ya,{keys:s,getOwnPropertySymbols:g}=Object;if(n===ss.array)if(i.part){for(let f of t)for(let Q of o)if(a(f,Q,i,e))return!0}else{if(t.length!==o.length)return!1;for(let f=0;f{"use strict";sZ.exports=function(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var cZ=$((OdA,gZ)=>{"use strict";var ZS=XI(),jGe=gG(),JGe=cG(),qGe=qS(),$i={};gZ.exports=function(n,t,o={}){return typeof t!="object"&&(t=[t]),ZS(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof n=="string"?$i.string(n,t,o):Array.isArray(n)?$i.array(n,t,o):(ZS(typeof n=="object","Reference must be string or an object"),$i.object(n,t,o))};$i.array=function(n,t,o){if(Array.isArray(t)||(t=[t]),!n.length||o.only&&o.once&&n.length!==t.length)return!1;let i,e=new Map;for(let A of t)if(!o.deep||!A||typeof A!="object"){let r=e.get(A);r?++r.allowed:e.set(A,{allowed:1,hits:0})}else{i=i||$i.compare(o);let r=!1;for(let[s,g]of e.entries())if(i(s,A)){++g.allowed,r=!0;break}r||e.set(A,{allowed:1,hits:0})}let a=0;for(let A of n){let r;if(!o.deep||!A||typeof A!="object")r=e.get(A);else{i=i||$i.compare(o);for(let[s,g]of e.entries())if(i(s,A)){r=g;break}}if(r&&(++r.hits,++a,o.once&&r.hits>r.allowed))return!1}if(o.only&&a!==n.length)return!1;for(let A of e.values())if(A.hits!==A.allowed&&A.hitst.propertyIsEnumerable(s)),a=[...Object.keys(t),...e],A=$i.compare(o),r=new Set(a);for(let s of i){if(!r.has(s)){if(o.only)return!1;continue}if(!A(t[s],n[s]))return!1;r.delete(s)}return r.size?o.part?r.sizes!=="");let i=new Map,e=[];for(let s of t)if(ZS(typeof s=="string","Cannot compare string reference to non-string value"),s){let g=i.get(s);g?++g.allowed:(i.set(s,{allowed:1,hits:0}),e.push(JGe(s)))}else if(o.once||o.only)return!1;if(!e.length)return!0;let a=new RegExp(`(${e.join("|")})`,"g"),A=n.replace(a,(s,g)=>(++i.get(g).hits,""));if(o.only&&A)return!1;let r=!1;for(let s of i.values())if(s.hits&&(r=!0),s.hits!==s.allowed&&(s.hitsjGe(e,a,i)};$i.shallow=function(n,t){return n===t}});var lZ=$((bdA,IZ)=>{"use strict";var zGe=XI();IZ.exports=function(n){return zGe(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(n),"Bad attribute value ("+n+")"),n.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var dZ=$((MdA,pZ)=>{"use strict";var Bc={};pZ.exports=function(n){if(!n)return"";let t="";for(let o=0;o=256?"&#"+n+";":`&#x${n.toString(16).padStart(2,"0")};`)};Bc.isSafe=function(n){return Bc.safeCharCodes.has(n)};Bc.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);Bc.safeCharCodes=(function(){let n=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&n.add(t);return n})()});var EZ=$((_dA,hZ)=>{"use strict";var XS={};hZ.exports=function(n){return n?n.replace(/[<>&\u2028\u2029]/g,XS.escape):""};XS.escape=function(n){return XS.replacements.get(n)};XS.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var BZ=$((TdA,uZ)=>{"use strict";var CZ={};uZ.exports=CZ.flatten=function(n,t){let o=t||[];for(let i of n)Array.isArray(i)?CZ.flatten(i,o):o.push(i);return o}});var yZ=$((NdA,QZ)=>{"use strict";var fZ={};QZ.exports=function(n,t,o={}){if(!n||!t)return o.first?null:[];let i=[],e=Array.isArray(n)?new Set(n):n,a=new Set;for(let A of t)if(fZ.has(e,A)&&!a.has(A)){if(o.first)return A;i.push(A),a.add(A)}return o.first?null:i};fZ.has=function(n,t){return typeof n.has=="function"?n.has(t):n[t]!==void 0}});var SZ=$((RdA,mZ)=>{"use strict";mZ.exports=function(n){return!!n&&typeof n.then=="function"}});var OZ=$((kdA,wZ)=>{"use strict";var DZ={wrapped:Symbol("wrapped")};wZ.exports=function(n){if(n[DZ.wrapped])return n;let t=!1,o=function(...i){t||(t=!0,n(...i))};return o[DZ.wrapped]=!0,o}});var MZ=$((vdA,bZ)=>{"use strict";var VGe=bu();bZ.exports=function(n,t,o){return t.replace(/{([^{}]+)}/g,(i,e)=>{let a=VGe(n,e,o);return a??""})}});var TZ=$((PdA,_Z)=>{"use strict";var WGe={maxTimer:2147483647};_Z.exports=function(n,t,o){if(typeof n=="bigint"&&(n=Number(n)),n>=Number.MAX_SAFE_INTEGER&&(n=1/0),typeof n!="number"&&n!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(i=>{let e=o?o.setTimeout:setTimeout,a=()=>{let A=Math.min(n,WGe.maxTimer);n-=A,e(()=>n>0?a():i(t),A)};n!==1/0&&a()})}});var NZ=$(nr=>{"use strict";nr.applyToDefaults=AZ();nr.assert=XI();nr.Bench=rZ();nr.block=oZ();nr.clone=zS();nr.contain=cZ();nr.deepEqual=gG();nr.Error=tG();nr.escapeHeaderAttribute=lZ();nr.escapeHtml=dZ();nr.escapeJson=EZ();nr.escapeRegex=cG();nr.flatten=BZ();nr.ignore=sG();nr.intersect=yZ();nr.isPromise=SZ();nr.merge=oG();nr.once=OZ();nr.reach=bu();nr.reachTemplate=MZ();nr.stringify=AG();nr.wait=TZ()});var Pr=$(ke=>{"use strict";var $I=NZ(),bi={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary 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 Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[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 Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};ke.Boom=class extends Error{constructor(n,t={}){if(n instanceof Error)return ke.boomify($I.clone(n),t);let{statusCode:o=500,data:i=null,ctor:e=ke.Boom}=t,a=new Error(n||void 0);Error.captureStackTrace(a,e),a.data=i;let A=bi.initialize(a,o);return Object.defineProperty(A,"typeof",{value:e}),t.decorate&&Object.assign(A,t.decorate),A}static[Symbol.hasInstance](n){return this===ke.Boom?ke.isBoom(n):this.prototype.isPrototypeOf(n)}};ke.isBoom=function(n,t){return n instanceof Error&&!!n.isBoom&&(!t||n.output.statusCode===t)};ke.boomify=function(n,t){return $I.assert(n instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(n.data=t.data),t.decorate&&Object.assign(n,t.decorate),n.isBoom?t.override===!1||!t.statusCode&&!t.message?n:bi.initialize(n,t.statusCode||n.output.statusCode,t.message):bi.initialize(n,t.statusCode||500,t.message)};ke.badRequest=function(n,t){return new ke.Boom(n,{statusCode:400,data:t,ctor:ke.badRequest})};ke.unauthorized=function(n,t,o){let i=new ke.Boom(n,{statusCode:401,ctor:ke.unauthorized});if(!t)return i;if(typeof t!="string")return i.output.headers["WWW-Authenticate"]=t.join(", "),i;let e=`${t}`;return(o||n)&&(i.output.payload.attributes={}),o&&(typeof o=="string"?(e+=" "+$I.escapeHeaderAttribute(o),i.output.payload.attributes=o):e+=" "+Object.keys(o).map(a=>{let A=o[a];return A==null&&(A=""),i.output.payload.attributes[a]=A,`${a}="${$I.escapeHeaderAttribute(A.toString())}"`}).join(", ")),n?(o&&(e+=","),e+=` error="${$I.escapeHeaderAttribute(n)}"`,i.output.payload.attributes.error=n):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=e,i};ke.paymentRequired=function(n,t){return new ke.Boom(n,{statusCode:402,data:t,ctor:ke.paymentRequired})};ke.forbidden=function(n,t){return new ke.Boom(n,{statusCode:403,data:t,ctor:ke.forbidden})};ke.notFound=function(n,t){return new ke.Boom(n,{statusCode:404,data:t,ctor:ke.notFound})};ke.methodNotAllowed=function(n,t,o){let i=new ke.Boom(n,{statusCode:405,data:t,ctor:ke.methodNotAllowed});return typeof o=="string"&&(o=[o]),Array.isArray(o)&&(i.output.headers.Allow=o.join(", ")),i};ke.notAcceptable=function(n,t){return new ke.Boom(n,{statusCode:406,data:t,ctor:ke.notAcceptable})};ke.proxyAuthRequired=function(n,t){return new ke.Boom(n,{statusCode:407,data:t,ctor:ke.proxyAuthRequired})};ke.clientTimeout=function(n,t){return new ke.Boom(n,{statusCode:408,data:t,ctor:ke.clientTimeout})};ke.conflict=function(n,t){return new ke.Boom(n,{statusCode:409,data:t,ctor:ke.conflict})};ke.resourceGone=function(n,t){return new ke.Boom(n,{statusCode:410,data:t,ctor:ke.resourceGone})};ke.lengthRequired=function(n,t){return new ke.Boom(n,{statusCode:411,data:t,ctor:ke.lengthRequired})};ke.preconditionFailed=function(n,t){return new ke.Boom(n,{statusCode:412,data:t,ctor:ke.preconditionFailed})};ke.entityTooLarge=function(n,t){return new ke.Boom(n,{statusCode:413,data:t,ctor:ke.entityTooLarge})};ke.uriTooLong=function(n,t){return new ke.Boom(n,{statusCode:414,data:t,ctor:ke.uriTooLong})};ke.unsupportedMediaType=function(n,t){return new ke.Boom(n,{statusCode:415,data:t,ctor:ke.unsupportedMediaType})};ke.rangeNotSatisfiable=function(n,t){return new ke.Boom(n,{statusCode:416,data:t,ctor:ke.rangeNotSatisfiable})};ke.expectationFailed=function(n,t){return new ke.Boom(n,{statusCode:417,data:t,ctor:ke.expectationFailed})};ke.teapot=function(n,t){return new ke.Boom(n,{statusCode:418,data:t,ctor:ke.teapot})};ke.badData=function(n,t){return new ke.Boom(n,{statusCode:422,data:t,ctor:ke.badData})};ke.locked=function(n,t){return new ke.Boom(n,{statusCode:423,data:t,ctor:ke.locked})};ke.failedDependency=function(n,t){return new ke.Boom(n,{statusCode:424,data:t,ctor:ke.failedDependency})};ke.tooEarly=function(n,t){return new ke.Boom(n,{statusCode:425,data:t,ctor:ke.tooEarly})};ke.preconditionRequired=function(n,t){return new ke.Boom(n,{statusCode:428,data:t,ctor:ke.preconditionRequired})};ke.tooManyRequests=function(n,t){return new ke.Boom(n,{statusCode:429,data:t,ctor:ke.tooManyRequests})};ke.illegal=function(n,t){return new ke.Boom(n,{statusCode:451,data:t,ctor:ke.illegal})};ke.internal=function(n,t,o=500){return bi.serverError(n,t,o,ke.internal)};ke.notImplemented=function(n,t){return bi.serverError(n,t,501,ke.notImplemented)};ke.badGateway=function(n,t){return bi.serverError(n,t,502,ke.badGateway)};ke.serverUnavailable=function(n,t){return bi.serverError(n,t,503,ke.serverUnavailable)};ke.gatewayTimeout=function(n,t){return bi.serverError(n,t,504,ke.gatewayTimeout)};ke.badImplementation=function(n,t){let o=bi.serverError(n,t,500,ke.badImplementation);return o.isDeveloperError=!0,o};bi.initialize=function(n,t,o){let i=parseInt(t,10);if($I.assert(!isNaN(i)&&i>=400,"First argument must be a number (400+):",t),n.isBoom=!0,n.isServer=i>=500,n.hasOwnProperty("data")||(n.data=null),n.output={statusCode:i,payload:{},headers:{}},Object.defineProperty(n,"reformat",{value:bi.reformat,configurable:!0}),!o&&!n.message&&(n.reformat(),o=n.output.payload.error),o){let e=Object.getOwnPropertyDescriptor(n,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),"message");$I.assert(!e||e.configurable&&!e.get,"The error is not compatible with boom"),n.message=o+(n.message?": "+n.message:""),n.output.payload.message=n.message}return n.reformat(),n};bi.reformat=function(n=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=bi.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&n!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};bi.serverError=function(n,t,o,i){return t instanceof Error&&!t.isBoom?ke.boomify(t,{statusCode:o,message:n}):new ke.Boom(n,{statusCode:o,data:t,ctor:i})}});var v9,_Fe,TFe,NFe,RFe,kFe,vFe,PFe,GFe,FFe,LFe,UFe,HFe,KFe,xFe,O,cs=ue(()=>{v9=n=>typeof n<"u"&&n!==null,_Fe=n=>typeof n=="object",TFe=n=>Object.prototype.toString.call(n)==="[object Object]",NFe=n=>typeof n=="function",RFe=n=>typeof n=="boolean",kFe=n=>n instanceof Buffer,vFe=n=>{if(v9(n))switch(n.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},PFe=n=>n instanceof ArrayBuffer,GFe=n=>typeof n=="string"&&n.length>0,FFe=n=>typeof n=="number"&&Number.isFinite(n),LFe=n=>Number.isInteger(n),UFe=(n,t,o)=>n>=t&&n<=o,HFe=(n,t)=>t.includes(n),KFe=(n,t,o)=>new Error(`Expected ${t} for ${n} but received ${o} of type ${typeof o}`),xFe=(n,t)=>(t.message=n.message,t),O={defined:v9,object:_Fe,plainObject:TFe,fn:NFe,bool:RFe,buffer:kFe,typedArray:vFe,arrayBuffer:PFe,string:GFe,number:FFe,integer:LFe,inRange:UFe,inArray:HFe,invalidParameterError:KFe,nativeError:xFe}});var F9=$((qhA,G9)=>{"use strict";var P9=()=>process.platform==="linux",dD=null,YFe=()=>{if(!dD)if(P9()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,dD=process.report.getReport(),process.report.excludeNetwork=n}else dD={};return dD};G9.exports={isLinux:P9,getReport:YFe}});var U9=$((zhA,L9)=>{"use strict";var vd=Xe("fs"),jFe="/usr/bin/ldd",JFe="/proc/self/exe",hD=2048,qFe=n=>{let t=vd.openSync(n,"r"),o=Buffer.alloc(hD),i=vd.readSync(t,o,0,hD,0);return vd.close(t,()=>{}),o.subarray(0,i)},zFe=n=>new Promise((t,o)=>{vd.open(n,"r",(i,e)=>{if(i)o(i);else{let a=Buffer.alloc(hD);vd.read(e,a,0,hD,0,(A,r)=>{t(a.subarray(0,r)),vd.close(e,()=>{})})}})});L9.exports={LDD_PATH:jFe,SELF_PATH:JFe,readFileSync:qFe,readFile:zFe}});var K9=$((VhA,H9)=>{"use strict";var VFe=n=>{if(n.length<64||n.readUInt32BE(0)!==2135247942||n.readUInt8(4)!==2||n.readUInt8(5)!==1)return null;let t=n.readUInt32LE(32),o=n.readUInt16LE(54),i=n.readUInt16LE(56);for(let e=0;e{"use strict";var Y9=Xe("child_process"),{isLinux:Pd,getReport:j9}=F9(),{LDD_PATH:ED,SELF_PATH:J9,readFile:SG,readFileSync:DG}=U9(),{interpreterPath:q9}=K9(),Is,ls,ps,z9="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",wc="",V9=()=>wc||new Promise(n=>{Y9.exec(z9,(t,o)=>{wc=t?" ":o,n(wc)})}),W9=()=>{if(!wc)try{wc=Y9.execSync(z9,{encoding:"utf8"})}catch{wc=" "}return wc},Bg="glibc",Z9=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,il="musl",WFe=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),X9=()=>{let n=j9();return n.header&&n.header.glibcVersionRuntime?Bg:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(WFe)?il:null},$9=n=>{let[t,o]=n.split(/[\r\n]+/);return t&&t.includes(Bg)?Bg:o&&o.includes(il)?il:null},eX=n=>{if(n){if(n.includes("/ld-musl-"))return il;if(n.includes("/ld-linux-"))return Bg}return null},AX=n=>(n=n.toString(),n.includes("musl")?il:n.includes("GNU C Library")?Bg:null),ZFe=async()=>{if(ls!==void 0)return ls;ls=null;try{let n=await SG(ED);ls=AX(n)}catch{}return ls},XFe=()=>{if(ls!==void 0)return ls;ls=null;try{let n=DG(ED);ls=AX(n)}catch{}return ls},$Fe=async()=>{if(Is!==void 0)return Is;Is=null;try{let n=await SG(J9),t=q9(n);Is=eX(t)}catch{}return Is},eLe=()=>{if(Is!==void 0)return Is;Is=null;try{let n=DG(J9),t=q9(n);Is=eX(t)}catch{}return Is},tX=async()=>{let n=null;if(Pd()&&(n=await $Fe(),!n&&(n=await ZFe(),n||(n=X9()),!n))){let t=await V9();n=$9(t)}return n},rX=()=>{let n=null;if(Pd()&&(n=eLe(),!n&&(n=XFe(),n||(n=X9()),!n))){let t=W9();n=$9(t)}return n},ALe=async()=>Pd()&&await tX()!==Bg,tLe=()=>Pd()&&rX()!==Bg,rLe=async()=>{if(ps!==void 0)return ps;ps=null;try{let t=(await SG(ED)).match(Z9);t&&(ps=t[1])}catch{}return ps},aLe=()=>{if(ps!==void 0)return ps;ps=null;try{let t=DG(ED).match(Z9);t&&(ps=t[1])}catch{}return ps},aX=()=>{let n=j9();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},x9=n=>n.trim().split(/\s+/)[1],iX=n=>{let[t,o,i]=n.split(/[\r\n]+/);return t&&t.includes(Bg)?x9(t):o&&i&&o.includes(il)?x9(i):null},iLe=async()=>{let n=null;if(Pd()&&(n=await rLe(),n||(n=aX()),!n)){let t=await V9();n=iX(t)}return n},oLe=()=>{let n=null;if(Pd()&&(n=aLe(),n||(n=aX()),!n)){let t=W9();n=iX(t)}return n};oX.exports={GLIBC:Bg,MUSL:il,family:tX,familySync:rX,isNonGlibcLinux:ALe,isNonGlibcLinuxSync:tLe,version:iLe,versionSync:oLe}});var Gd=$((ZhA,nX)=>{"use strict";var nLe="2.0.0",sLe=Number.MAX_SAFE_INTEGER||9007199254740991,gLe=16,cLe=250,ILe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];nX.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:gLe,MAX_SAFE_BUILD_LENGTH:cLe,MAX_SAFE_INTEGER:sLe,RELEASE_TYPES:ILe,SEMVER_SPEC_VERSION:nLe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ku=$((XhA,sX)=>{"use strict";var lLe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};sX.exports=lLe});var Fd=$((ds,gX)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:wG,MAX_SAFE_BUILD_LENGTH:pLe,MAX_LENGTH:dLe}=Gd(),hLe=Ku();ds=gX.exports={};var ELe=ds.re=[],CLe=ds.safeRe=[],gA=ds.src=[],uLe=ds.safeSrc=[],cA=ds.t={},BLe=0,OG="[a-zA-Z0-9-]",fLe=[["\\s",1],["\\d",dLe],[OG,pLe]],QLe=n=>{for(let[t,o]of fLe)n=n.split(`${t}*`).join(`${t}{0,${o}}`).split(`${t}+`).join(`${t}{1,${o}}`);return n},JA=(n,t,o)=>{let i=QLe(t),e=BLe++;hLe(n,e,t),cA[n]=e,gA[e]=t,uLe[e]=i,ELe[e]=new RegExp(t,o?"g":void 0),CLe[e]=new RegExp(i,o?"g":void 0)};JA("NUMERICIDENTIFIER","0|[1-9]\\d*");JA("NUMERICIDENTIFIERLOOSE","\\d+");JA("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${OG}*`);JA("MAINVERSION",`(${gA[cA.NUMERICIDENTIFIER]})\\.(${gA[cA.NUMERICIDENTIFIER]})\\.(${gA[cA.NUMERICIDENTIFIER]})`);JA("MAINVERSIONLOOSE",`(${gA[cA.NUMERICIDENTIFIERLOOSE]})\\.(${gA[cA.NUMERICIDENTIFIERLOOSE]})\\.(${gA[cA.NUMERICIDENTIFIERLOOSE]})`);JA("PRERELEASEIDENTIFIER",`(?:${gA[cA.NONNUMERICIDENTIFIER]}|${gA[cA.NUMERICIDENTIFIER]})`);JA("PRERELEASEIDENTIFIERLOOSE",`(?:${gA[cA.NONNUMERICIDENTIFIER]}|${gA[cA.NUMERICIDENTIFIERLOOSE]})`);JA("PRERELEASE",`(?:-(${gA[cA.PRERELEASEIDENTIFIER]}(?:\\.${gA[cA.PRERELEASEIDENTIFIER]})*))`);JA("PRERELEASELOOSE",`(?:-?(${gA[cA.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${gA[cA.PRERELEASEIDENTIFIERLOOSE]})*))`);JA("BUILDIDENTIFIER",`${OG}+`);JA("BUILD",`(?:\\+(${gA[cA.BUILDIDENTIFIER]}(?:\\.${gA[cA.BUILDIDENTIFIER]})*))`);JA("FULLPLAIN",`v?${gA[cA.MAINVERSION]}${gA[cA.PRERELEASE]}?${gA[cA.BUILD]}?`);JA("FULL",`^${gA[cA.FULLPLAIN]}$`);JA("LOOSEPLAIN",`[v=\\s]*${gA[cA.MAINVERSIONLOOSE]}${gA[cA.PRERELEASELOOSE]}?${gA[cA.BUILD]}?`);JA("LOOSE",`^${gA[cA.LOOSEPLAIN]}$`);JA("GTLT","((?:<|>)?=?)");JA("XRANGEIDENTIFIERLOOSE",`${gA[cA.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);JA("XRANGEIDENTIFIER",`${gA[cA.NUMERICIDENTIFIER]}|x|X|\\*`);JA("XRANGEPLAIN",`[v=\\s]*(${gA[cA.XRANGEIDENTIFIER]})(?:\\.(${gA[cA.XRANGEIDENTIFIER]})(?:\\.(${gA[cA.XRANGEIDENTIFIER]})(?:${gA[cA.PRERELEASE]})?${gA[cA.BUILD]}?)?)?`);JA("XRANGEPLAINLOOSE",`[v=\\s]*(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:${gA[cA.PRERELEASELOOSE]})?${gA[cA.BUILD]}?)?)?`);JA("XRANGE",`^${gA[cA.GTLT]}\\s*${gA[cA.XRANGEPLAIN]}$`);JA("XRANGELOOSE",`^${gA[cA.GTLT]}\\s*${gA[cA.XRANGEPLAINLOOSE]}$`);JA("COERCEPLAIN",`(^|[^\\d])(\\d{1,${wG}})(?:\\.(\\d{1,${wG}}))?(?:\\.(\\d{1,${wG}}))?`);JA("COERCE",`${gA[cA.COERCEPLAIN]}(?:$|[^\\d])`);JA("COERCEFULL",gA[cA.COERCEPLAIN]+`(?:${gA[cA.PRERELEASE]})?(?:${gA[cA.BUILD]})?(?:$|[^\\d])`);JA("COERCERTL",gA[cA.COERCE],!0);JA("COERCERTLFULL",gA[cA.COERCEFULL],!0);JA("LONETILDE","(?:~>?)");JA("TILDETRIM",`(\\s*)${gA[cA.LONETILDE]}\\s+`,!0);ds.tildeTrimReplace="$1~";JA("TILDE",`^${gA[cA.LONETILDE]}${gA[cA.XRANGEPLAIN]}$`);JA("TILDELOOSE",`^${gA[cA.LONETILDE]}${gA[cA.XRANGEPLAINLOOSE]}$`);JA("LONECARET","(?:\\^)");JA("CARETTRIM",`(\\s*)${gA[cA.LONECARET]}\\s+`,!0);ds.caretTrimReplace="$1^";JA("CARET",`^${gA[cA.LONECARET]}${gA[cA.XRANGEPLAIN]}$`);JA("CARETLOOSE",`^${gA[cA.LONECARET]}${gA[cA.XRANGEPLAINLOOSE]}$`);JA("COMPARATORLOOSE",`^${gA[cA.GTLT]}\\s*(${gA[cA.LOOSEPLAIN]})$|^$`);JA("COMPARATOR",`^${gA[cA.GTLT]}\\s*(${gA[cA.FULLPLAIN]})$|^$`);JA("COMPARATORTRIM",`(\\s*)${gA[cA.GTLT]}\\s*(${gA[cA.LOOSEPLAIN]}|${gA[cA.XRANGEPLAIN]})`,!0);ds.comparatorTrimReplace="$1$2$3";JA("HYPHENRANGE",`^\\s*(${gA[cA.XRANGEPLAIN]})\\s+-\\s+(${gA[cA.XRANGEPLAIN]})\\s*$`);JA("HYPHENRANGELOOSE",`^\\s*(${gA[cA.XRANGEPLAINLOOSE]})\\s+-\\s+(${gA[cA.XRANGEPLAINLOOSE]})\\s*$`);JA("STAR","(<|>)?=?\\s*\\*");JA("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");JA("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var uD=$(($hA,cX)=>{"use strict";var yLe=Object.freeze({loose:!0}),mLe=Object.freeze({}),SLe=n=>n?typeof n!="object"?yLe:n:mLe;cX.exports=SLe});var bG=$((eEA,pX)=>{"use strict";var IX=/^[0-9]+$/,lX=(n,t)=>{if(typeof n=="number"&&typeof t=="number")return n===t?0:nlX(t,n);pX.exports={compareIdentifiers:lX,rcompareIdentifiers:DLe}});var Ba=$((AEA,hX)=>{"use strict";var BD=Ku(),{MAX_LENGTH:dX,MAX_SAFE_INTEGER:fD}=Gd(),{safeRe:QD,t:yD}=Fd(),wLe=uD(),{compareIdentifiers:MG}=bG(),OLe=(n,t)=>{let o=t.split(".");if(o.length>n.length)return!1;for(let i=0;idX)throw new TypeError(`version is longer than ${dX} characters`);BD("SemVer",t,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let i=t.trim().match(o.loose?QD[yD.LOOSE]:QD[yD.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>fD||this.major<0)throw new TypeError("Invalid major version");if(this.minor>fD||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>fD||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let a=+e;if(a>=0&&at.major?1:this.minort.minor?1:this.patcht.patch?1:0}comparePre(t){if(t instanceof n||(t=new n(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let o=0;do{let i=this.prerelease[o],e=t.prerelease[o];if(BD("prerelease compare",o,i,e),i===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(i===void 0)return-1;if(i===e)continue;return MG(i,e)}while(++o)}compareBuild(t){t instanceof n||(t=new n(t,this.options));let o=0;do{let i=this.build[o],e=t.build[o];if(BD("build compare",o,i,e),i===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(i===void 0)return-1;if(i===e)continue;return MG(i,e)}while(++o)}inc(t,o,i){if(t.startsWith("pre")){if(!o&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(o){let e=`-${o}`.match(this.options.loose?QD[yD.PRERELEASELOOSE]:QD[yD.PRERELEASE]);if(!e||e[1]!==o)throw new Error(`invalid identifier: ${o}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",o,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",o,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",o,i),this.inc("pre",o,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",o,i),this.inc("pre",o,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let e=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let a=this.prerelease.length;for(;--a>=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(o===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(o){let a=[o,e];if(i===!1&&(a=[o]),OLe(this.prerelease,o)){let A=this.prerelease[o.split(".").length];isNaN(A)&&(this.prerelease=a)}else this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};hX.exports=_G});var Oc=$((tEA,CX)=>{"use strict";var EX=Ba(),bLe=(n,t,o=!1)=>{if(n instanceof EX)return n;try{return new EX(n,t)}catch(i){if(!o)return null;throw i}};CX.exports=bLe});var BX=$((rEA,uX)=>{"use strict";var MLe=Oc(),_Le=(n,t)=>{let o=MLe(n,t);return o?o.version:null};uX.exports=_Le});var QX=$((aEA,fX)=>{"use strict";var TLe=Oc(),NLe=(n,t)=>{let o=TLe(n.trim().replace(/^[=v]+/,""),t);return o?o.version:null};fX.exports=NLe});var SX=$((iEA,mX)=>{"use strict";var yX=Ba(),RLe=(n,t,o,i,e)=>{typeof o=="string"&&(e=i,i=o,o=void 0);try{return new yX(n instanceof yX?n.version:n,o).inc(t,i,e).version}catch{return null}};mX.exports=RLe});var OX=$((oEA,wX)=>{"use strict";var DX=Oc(),kLe=(n,t)=>{let o=DX(n,null,!0),i=DX(t,null,!0),e=o.compare(i);if(e===0)return null;let a=e>0,A=a?o:i,r=a?i:o,s=!!A.prerelease.length;if(!!r.prerelease.length&&!s){if(!r.patch&&!r.minor)return"major";if(r.compareMain(A)===0)return r.minor&&!r.patch?"minor":"patch"}let c=s?"pre":"";return o.major!==i.major?c+"major":o.minor!==i.minor?c+"minor":o.patch!==i.patch?c+"patch":"prerelease"};wX.exports=kLe});var MX=$((nEA,bX)=>{"use strict";var vLe=Ba(),PLe=(n,t)=>new vLe(n,t).major;bX.exports=PLe});var TX=$((sEA,_X)=>{"use strict";var GLe=Ba(),FLe=(n,t)=>new GLe(n,t).minor;_X.exports=FLe});var RX=$((gEA,NX)=>{"use strict";var LLe=Ba(),ULe=(n,t)=>new LLe(n,t).patch;NX.exports=ULe});var vX=$((cEA,kX)=>{"use strict";var HLe=Oc(),KLe=(n,t)=>{let o=HLe(n,t);return o&&o.prerelease.length?o.prerelease:null};kX.exports=KLe});var vo=$((IEA,GX)=>{"use strict";var PX=Ba(),xLe=(n,t,o)=>new PX(n,o).compare(new PX(t,o));GX.exports=xLe});var LX=$((lEA,FX)=>{"use strict";var YLe=vo(),jLe=(n,t,o)=>YLe(t,n,o);FX.exports=jLe});var HX=$((pEA,UX)=>{"use strict";var JLe=vo(),qLe=(n,t)=>JLe(n,t,!0);UX.exports=qLe});var mD=$((dEA,xX)=>{"use strict";var KX=Ba(),zLe=(n,t,o)=>{let i=new KX(n,o),e=new KX(t,o);return i.compare(e)||i.compareBuild(e)};xX.exports=zLe});var jX=$((hEA,YX)=>{"use strict";var VLe=mD(),WLe=(n,t)=>n.sort((o,i)=>VLe(o,i,t));YX.exports=WLe});var qX=$((EEA,JX)=>{"use strict";var ZLe=mD(),XLe=(n,t)=>n.sort((o,i)=>ZLe(i,o,t));JX.exports=XLe});var xu=$((CEA,zX)=>{"use strict";var $Le=vo(),e2e=(n,t,o)=>$Le(n,t,o)>0;zX.exports=e2e});var SD=$((uEA,VX)=>{"use strict";var A2e=vo(),t2e=(n,t,o)=>A2e(n,t,o)<0;VX.exports=t2e});var TG=$((BEA,WX)=>{"use strict";var r2e=vo(),a2e=(n,t,o)=>r2e(n,t,o)===0;WX.exports=a2e});var NG=$((fEA,ZX)=>{"use strict";var i2e=vo(),o2e=(n,t,o)=>i2e(n,t,o)!==0;ZX.exports=o2e});var DD=$((QEA,XX)=>{"use strict";var n2e=vo(),s2e=(n,t,o)=>n2e(n,t,o)>=0;XX.exports=s2e});var wD=$((yEA,$X)=>{"use strict";var g2e=vo(),c2e=(n,t,o)=>g2e(n,t,o)<=0;$X.exports=c2e});var RG=$((mEA,e7)=>{"use strict";var I2e=TG(),l2e=NG(),p2e=xu(),d2e=DD(),h2e=SD(),E2e=wD(),C2e=(n,t,o,i)=>{switch(t){case"===":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n===o;case"!==":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n!==o;case"":case"=":case"==":return I2e(n,o,i);case"!=":return l2e(n,o,i);case">":return p2e(n,o,i);case">=":return d2e(n,o,i);case"<":return h2e(n,o,i);case"<=":return E2e(n,o,i);default:throw new TypeError(`Invalid operator: ${t}`)}};e7.exports=C2e});var t7=$((SEA,A7)=>{"use strict";var u2e=Ba(),B2e=Oc(),{safeRe:OD,t:bD}=Fd(),f2e=(n,t)=>{if(n instanceof u2e)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;t=t||{};let o=null;if(!t.rtl)o=n.match(t.includePrerelease?OD[bD.COERCEFULL]:OD[bD.COERCE]);else{let s=t.includePrerelease?OD[bD.COERCERTLFULL]:OD[bD.COERCERTL],g;for(;(g=s.exec(n))&&(!o||o.index+o[0].length!==n.length);)(!o||g.index+g[0].length!==o.index+o[0].length)&&(o=g),s.lastIndex=g.index+g[1].length+g[2].length;s.lastIndex=-1}if(o===null)return null;let i=o[2],e=o[3]||"0",a=o[4]||"0",A=t.includePrerelease&&o[5]?`-${o[5]}`:"",r=t.includePrerelease&&o[6]?`+${o[6]}`:"";return B2e(`${i}.${e}.${a}${A}${r}`,t)};A7.exports=f2e});var a7=$((DEA,r7)=>{"use strict";var Q2e=Oc(),y2e=Gd(),m2e=Ba(),S2e=(n,t,o)=>{if(!y2e.RELEASE_TYPES.includes(t))return null;let i=D2e(n,o);return i&&w2e(i,t)},D2e=(n,t)=>{let o=n instanceof m2e?n.version:n;return Q2e(o,t)},w2e=(n,t)=>{if(O2e(t))return n.version;switch(n.prerelease=[],t){case"major":n.minor=0,n.patch=0;break;case"minor":n.patch=0;break}return n.format()},O2e=n=>n.startsWith("pre");r7.exports=S2e});var o7=$((wEA,i7)=>{"use strict";var kG=class{constructor(){this.max=1e3,this.map=new Map}get(t){let o=this.map.get(t);if(o!==void 0)return this.map.delete(t),this.map.set(t,o),o}delete(t){return this.map.delete(t)}set(t,o){if(!this.delete(t)&&o!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(t,o)}return this}};i7.exports=kG});var Po=$((OEA,c7)=>{"use strict";var b2e=/\s+/g,vG=class n{constructor(t,o){if(o=_2e(o),t instanceof n)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new n(t.raw,o);if(t instanceof PG)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t.trim().replace(b2e," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(e=>!s7(e[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&L2e(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t0&&(this.formatted+="||");let o=this.set[t];for(let i=0;i0&&(this.formatted+=" "),this.formatted+=o[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(F2e,"");let i=((this.options.includePrerelease&&P2e)|(this.options.loose&&G2e))+":"+t,e=n7.get(i);if(e)return e;let a=this.options.loose,A=a?Za[fa.HYPHENRANGELOOSE]:Za[fa.HYPHENRANGE];t=t.replace(A,W2e(this.options.includePrerelease)),xt("hyphen replace",t),t=t.replace(Za[fa.COMPARATORTRIM],R2e),xt("comparator trim",t),t=t.replace(Za[fa.TILDETRIM],k2e),xt("tilde trim",t),t=t.replace(Za[fa.CARETTRIM],v2e),xt("caret trim",t);let r=t.split(" ").map(I=>U2e(I,this.options)).join(" ").split(/\s+/).map(I=>V2e(I,this.options));a&&(r=r.filter(I=>(xt("loose invalid filter",I,this.options),!!I.match(Za[fa.COMPARATORLOOSE])))),xt("range list",r);let s=new Map,g=r.map(I=>new PG(I,this.options));for(let I of g){if(s7(I))return[I];s.set(I.value,I)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return n7.set(i,c),c}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Range is required");return this.set.some(i=>g7(i,o)&&t.set.some(e=>g7(e,o)&&i.every(a=>e.every(A=>a.intersects(A,o)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new T2e(t,this.options)}catch{return!1}for(let o=0;on.value==="<0.0.0-0",L2e=n=>n.value==="",g7=(n,t)=>{let o=!0,i=n.slice(),e=i.pop();for(;o&&i.length;)o=i.every(a=>e.intersects(a,t)),e=i.pop();return o},U2e=(n,t)=>(n=n.replace(Za[fa.BUILD],""),xt("comp",n,t),n=Y2e(n,t),xt("caret",n),n=K2e(n,t),xt("tildes",n),n=J2e(n,t),xt("xrange",n),n=z2e(n,t),xt("stars",n),n),Ur=n=>!n||n.toLowerCase()==="x"||n==="*",H2e=(n,t,o)=>Ur(n)&&!Ur(t)||Ur(t)&&o&&!Ur(o),K2e=(n,t)=>n.trim().split(/\s+/).map(o=>x2e(o,t)).join(" "),x2e=(n,t)=>{let o=t.loose?Za[fa.TILDELOOSE]:Za[fa.TILDE],i=t.includePrerelease?"-0":"";return n.replace(o,(e,a,A,r,s)=>{xt("tilde",n,e,a,A,r,s);let g;return Ur(a)?g="":Ur(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Ur(r)?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:s?(xt("replaceTilde pr",s),g=`>=${a}.${A}.${r}-${s} <${a}.${+A+1}.0-0`):g=`>=${a}.${A}.${r} <${a}.${+A+1}.0-0`,xt("tilde return",g),g})},Y2e=(n,t)=>n.trim().split(/\s+/).map(o=>j2e(o,t)).join(" "),j2e=(n,t)=>{xt("caret",n,t);let o=t.loose?Za[fa.CARETLOOSE]:Za[fa.CARET],i=t.includePrerelease?"-0":"";return n.replace(o,(e,a,A,r,s)=>{xt("caret",n,e,a,A,r,s);let g;return Ur(a)?g="":Ur(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Ur(r)?a==="0"?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.0${i} <${+a+1}.0.0-0`:s?(xt("replaceCaret pr",s),a==="0"?A==="0"?g=`>=${a}.${A}.${r}-${s} <${a}.${A}.${+r+1}-0`:g=`>=${a}.${A}.${r}-${s} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.${r}-${s} <${+a+1}.0.0-0`):(xt("no pr"),a==="0"?A==="0"?g=`>=${a}.${A}.${r} <${a}.${A}.${+r+1}-0`:g=`>=${a}.${A}.${r} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.${r} <${+a+1}.0.0-0`),xt("caret return",g),g})},J2e=(n,t)=>(xt("replaceXRanges",n,t),n.split(/\s+/).map(o=>q2e(o,t)).join(" ")),q2e=(n,t)=>{n=n.trim();let o=t.loose?Za[fa.XRANGELOOSE]:Za[fa.XRANGE];return n.replace(o,(i,e,a,A,r,s)=>{if(xt("xRange",n,i,e,a,A,r,s),H2e(a,A,r))return n;let g=Ur(a),c=g||Ur(A),I=c||Ur(r),d=I;return e==="="&&d&&(e=""),s=t.includePrerelease?"-0":"",g?e===">"||e==="<"?i="<0.0.0-0":i="*":e&&d?(c&&(A=0),r=0,e===">"?(e=">=",c?(a=+a+1,A=0,r=0):(A=+A+1,r=0)):e==="<="&&(e="<",c?a=+a+1:A=+A+1),e==="<"&&(s="-0"),i=`${e+a}.${A}.${r}${s}`):c?i=`>=${a}.0.0${s} <${+a+1}.0.0-0`:I&&(i=`>=${a}.${A}.0${s} <${a}.${+A+1}.0-0`),xt("xRange return",i),i})},z2e=(n,t)=>(xt("replaceStars",n,t),n.trim().replace(Za[fa.STAR],"")),V2e=(n,t)=>(xt("replaceGTE0",n,t),n.trim().replace(Za[t.includePrerelease?fa.GTE0PRE:fa.GTE0],"")),W2e=n=>(t,o,i,e,a,A,r,s,g,c,I,d)=>(Ur(i)?o="":Ur(e)?o=`>=${i}.0.0${n?"-0":""}`:Ur(a)?o=`>=${i}.${e}.0${n?"-0":""}`:A?o=`>=${o}`:o=`>=${o}${n?"-0":""}`,Ur(g)?s="":Ur(c)?s=`<${+g+1}.0.0-0`:Ur(I)?s=`<${g}.${+c+1}.0-0`:d?s=`<=${g}.${c}.${I}-${d}`:n?s=`<${g}.${c}.${+I+1}-0`:s=`<=${s}`,`${o} ${s}`.trim()),Z2e=(n,t,o)=>{for(let i=0;i0){let e=n[i].semver;if(e.major===t.major&&e.minor===t.minor&&e.patch===t.patch)return!0}return!1}return!0}});var Yu=$((bEA,E7)=>{"use strict";var ju=Symbol("SemVer ANY"),LG=class n{static get ANY(){return ju}constructor(t,o){if(o=I7(o),t instanceof n){if(t.loose===!!o.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),FG("comparator",t,o),this.options=o,this.loose=!!o.loose,this.parse(t),this.semver===ju?this.value="":this.value=this.operator+this.semver.version,FG("comp",this)}parse(t){let o=this.options.loose?l7[p7.COMPARATORLOOSE]:l7[p7.COMPARATOR],i=t.match(o);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new d7(i[2],this.options.loose):this.semver=ju}toString(){return this.value}test(t){if(FG("Comparator.test",t,this.options.loose),this.semver===ju||t===ju)return!0;if(typeof t=="string")try{t=new d7(t,this.options)}catch{return!1}return GG(t,this.operator,this.semver,this.options)}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new h7(t.value,o).test(this.value):t.operator===""?t.value===""?!0:new h7(this.value,o).test(t.semver):(o=I7(o),o.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!o.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||GG(this.semver,"<",t.semver,o)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||GG(this.semver,">",t.semver,o)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};E7.exports=LG;var I7=uD(),{safeRe:l7,t:p7}=Fd(),GG=RG(),FG=Ku(),d7=Ba(),h7=Po()});var Ju=$((MEA,C7)=>{"use strict";var X2e=Po(),$2e=(n,t,o)=>{try{t=new X2e(t,o)}catch{return!1}return t.test(n)};C7.exports=$2e});var B7=$((_EA,u7)=>{"use strict";var eUe=Po(),AUe=(n,t)=>new eUe(n,t).set.map(o=>o.map(i=>i.value).join(" ").trim().split(" "));u7.exports=AUe});var Q7=$((TEA,f7)=>{"use strict";var tUe=Ba(),rUe=Po(),aUe=(n,t,o)=>{let i=null,e=null,a=null;try{a=new rUe(t,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===-1)&&(i=A,e=new tUe(i,o))}),i};f7.exports=aUe});var m7=$((NEA,y7)=>{"use strict";var iUe=Ba(),oUe=Po(),nUe=(n,t,o)=>{let i=null,e=null,a=null;try{a=new oUe(t,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===1)&&(i=A,e=new iUe(i,o))}),i};y7.exports=nUe});var w7=$((REA,D7)=>{"use strict";var UG=Ba(),sUe=Po(),S7=xu(),gUe=(n,t)=>{n=new sUe(n,t);let o=new UG("0.0.0");if(n.test(o)||(o=new UG("0.0.0-0"),n.test(o)))return o;o=null;for(let i=0;i{let r=new UG(A.semver.version);switch(A.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!a||S7(r,a))&&(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),a&&(!o||S7(o,a))&&(o=a)}return o&&n.test(o)?o:null};D7.exports=gUe});var b7=$((kEA,O7)=>{"use strict";var cUe=Po(),IUe=(n,t)=>{try{return new cUe(n,t).range||"*"}catch{return null}};O7.exports=IUe});var MD=$((vEA,N7)=>{"use strict";var lUe=Ba(),T7=Yu(),{ANY:pUe}=T7,dUe=Po(),hUe=Ju(),M7=xu(),_7=SD(),EUe=wD(),CUe=DD(),uUe=(n,t,o,i)=>{n=new lUe(n,i),t=new dUe(t,i);let e,a,A,r,s;switch(o){case">":e=M7,a=EUe,A=_7,r=">",s=">=";break;case"<":e=_7,a=CUe,A=M7,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(hUe(n,t,i))return!1;for(let g=0;g{B.semver===pUe&&(B=new T7(">=0.0.0")),I=I||B,d=d||B,e(B.semver,I.semver,i)?I=B:A(B.semver,d.semver,i)&&(d=B)}),I.operator===r||I.operator===s||(!d.operator||d.operator===r)&&a(n,d.semver))return!1;if(d.operator===s&&A(n,d.semver))return!1}return!0};N7.exports=uUe});var k7=$((PEA,R7)=>{"use strict";var BUe=MD(),fUe=(n,t,o)=>BUe(n,t,">",o);R7.exports=fUe});var P7=$((GEA,v7)=>{"use strict";var QUe=MD(),yUe=(n,t,o)=>QUe(n,t,"<",o);v7.exports=yUe});var L7=$((FEA,F7)=>{"use strict";var G7=Po(),mUe=(n,t,o)=>(n=new G7(n,o),t=new G7(t,o),n.intersects(t,o));F7.exports=mUe});var H7=$((LEA,U7)=>{"use strict";var SUe=Ju(),DUe=vo();U7.exports=(n,t,o)=>{let i=[],e=null,a=null,A=n.sort((c,I)=>DUe(c,I,o));for(let c of A)SUe(c,t,o)?(a=c,e||(e=c)):(a&&i.push([e,a]),a=null,e=null);e&&i.push([e,null]);let r=[];for(let[c,I]of i)c===I?r.push(c):!I&&c===A[0]?r.push("*"):I?c===A[0]?r.push(`<=${I}`):r.push(`${c} - ${I}`):r.push(`>=${c}`);let s=r.join(" || "),g=typeof t.raw=="string"?t.raw:String(t);return s.length{"use strict";var K7=Po(),xG=Yu(),{ANY:HG}=xG,KG=Ju(),YG=vo(),wUe=(n,t,o={})=>{if(n===t)return!0;n=new K7(n,o),t=new K7(t,o);let i=!1;e:for(let e of n.set){for(let a of t.set){let A=bUe(e,a,o);if(i=i||A!==null,A)continue e}if(i)return!1}return!0},OUe=[new xG(">=0.0.0-0")],x7=[new xG(">=0.0.0")],bUe=(n,t,o)=>{if(n===t)return!0;if(n.length===1&&n[0].semver===HG){if(t.length===1&&t[0].semver===HG)return!0;o.includePrerelease?n=OUe:n=x7}if(t.length===1&&t[0].semver===HG){if(o.includePrerelease)return!0;t=x7}let i=new Set,e,a;for(let B of n)B.operator===">"||B.operator===">="?e=Y7(e,B,o):B.operator==="<"||B.operator==="<="?a=j7(a,B,o):i.add(B.semver);if(i.size>1)return null;let A;if(e&&a){if(A=YG(e.semver,a.semver,o),A>0)return null;if(A===0&&(e.operator!==">="||a.operator!=="<="))return null}for(let B of i){if(e&&!KG(B,String(e),o)||a&&!KG(B,String(a),o))return null;for(let f of t)if(!KG(B,String(f),o))return!1;return!0}let r,s,g,c,I=a&&!o.includePrerelease&&a.semver.prerelease.length?a.semver:!1,d=e&&!o.includePrerelease&&e.semver.prerelease.length?e.semver:!1;I&&I.prerelease.length===1&&a.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let B of t){if(c=c||B.operator===">"||B.operator===">=",g=g||B.operator==="<"||B.operator==="<=",e){if(d&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===d.major&&B.semver.minor===d.minor&&B.semver.patch===d.patch&&(d=!1),B.operator===">"||B.operator===">="){if(r=Y7(e,B,o),r===B&&r!==e)return!1}else if(e.operator===">="&&!B.test(e.semver))return!1}if(a){if(I&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===I.major&&B.semver.minor===I.minor&&B.semver.patch===I.patch&&(I=!1),B.operator==="<"||B.operator==="<="){if(s=j7(a,B,o),s===B&&s!==a)return!1}else if(a.operator==="<="&&!B.test(a.semver))return!1}if(!B.operator&&(a||e)&&A!==0)return!1}return!(e&&g&&!a&&A!==0||a&&c&&!e&&A!==0||d||I)},Y7=(n,t,o)=>{if(!n)return t;let i=YG(n.semver,t.semver,o);return i>0?n:i<0||t.operator===">"&&n.operator===">="?t:n},j7=(n,t,o)=>{if(!n)return t;let i=YG(n.semver,t.semver,o);return i<0?n:i>0||t.operator==="<"&&n.operator==="<="?t:n};J7.exports=wUe});var Z7=$((HEA,W7)=>{"use strict";var jG=Fd(),z7=Gd(),MUe=Ba(),V7=bG(),_Ue=Oc(),TUe=BX(),NUe=QX(),RUe=SX(),kUe=OX(),vUe=MX(),PUe=TX(),GUe=RX(),FUe=vX(),LUe=vo(),UUe=LX(),HUe=HX(),KUe=mD(),xUe=jX(),YUe=qX(),jUe=xu(),JUe=SD(),qUe=TG(),zUe=NG(),VUe=DD(),WUe=wD(),ZUe=RG(),XUe=t7(),$Ue=a7(),eHe=Yu(),AHe=Po(),tHe=Ju(),rHe=B7(),aHe=Q7(),iHe=m7(),oHe=w7(),nHe=b7(),sHe=MD(),gHe=k7(),cHe=P7(),IHe=L7(),lHe=H7(),pHe=q7();W7.exports={parse:_Ue,valid:TUe,clean:NUe,inc:RUe,diff:kUe,major:vUe,minor:PUe,patch:GUe,prerelease:FUe,compare:LUe,rcompare:UUe,compareLoose:HUe,compareBuild:KUe,sort:xUe,rsort:YUe,gt:jUe,lt:JUe,eq:qUe,neq:zUe,gte:VUe,lte:WUe,cmp:ZUe,coerce:XUe,truncate:$Ue,Comparator:eHe,Range:AHe,satisfies:tHe,toComparators:rHe,maxSatisfying:aHe,minSatisfying:iHe,minVersion:oHe,validRange:nHe,outside:sHe,gtr:gHe,ltr:cHe,intersects:IHe,simplifyRange:lHe,subset:pHe,SemVer:MUe,re:jG.re,src:jG.src,tokens:jG.t,SEMVER_SPEC_VERSION:z7.SEMVER_SPEC_VERSION,RELEASE_TYPES:z7.RELEASE_TYPES,compareIdentifiers:V7.compareIdentifiers,rcompareIdentifiers:V7.rcompareIdentifiers}});var fg,_D=ue(()=>{fg={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.35.3",author:"Lovell Fuller ",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert ","Jonathan Ong ","Chanon Sajjamanochai ","Juliano Julio ","Daniel Gasienica ","Julian Walker ","Amit Pitaru ","Brandon Aaron ","Andreas Lind ","Maurus Cuelenaere ","Linus Unneb\xE4ck ","Victor Mateevitsi ","Alaric Holloway ","Bernhard K. Weisshuhn ","Chris Riley ","David Carley ","John Tobin ","Kenton Gray ","Felix B\xFCnemann ","Samy Al Zahrani ","Chintan Thakkar ","F. Orlando Galashan ","Kleis Auke Wolthuizen ","Matt Hirsch ","Matthias Thoemmes ","Patrick Paskaris ","J\xE9r\xE9my Lal ","Rahul Nanwani ","Alice Monday ","Kristo Jorgenson ","YvesBos ","Guy Maliar ","Nicolas Coden ","Matt Parrish ","Marcel Bretschneider ","Matthew McEachen ","Jarda Kot\u011B\u0161ovec ","Kenric D'Souza ","Oleh Aleinyk ","Marcel Bretschneider ","Andrea Bianco ","Rik Heywood ","Thomas Parisot ","Nathan Graves ","Tom Lokhorst ","Espen Hovlandsdal ","Sylvain Dumont ","Alun Davies ","Aidan Hoolachan ","Axel Eirola ","Freezy ","Daiz ","Julian Aubourg ","Keith Belovay ","Michael B. Klein ","Jordan Prudhomme ","Ilya Ovdin ","Andargor ","Paul Neave ","Brendan Kennedy ","Brychan Bennett-Odlum ","Edward Silverton ","Roman Malieiev ","Tomas Szabo ","Robert O'Rourke ","Guillermo Alfonso Varela Chouci\xF1o ","Christian Flintrup ","Manan Jadhav ","Leon Radley ","alza54 ","Jacob Smith ","Michael Nutt ","Brad Parham ","Taneli Vatanen ","Joris Dugu\xE9 ","Chris Banks ","Ompal Singh ","Brodan ","Ankur Parihar ","Brahim Ait elhaj ","Mart Jansink ","Lachlan Newman ","Dennis Beatty ","Ingvar Stepanyan ","Don Denton ","Dmytro Tiapukhin ","Florian Lefebvre "],scripts:{build:"node install/build.js","build:dist":"node scripts/build.mjs",clean:"rm -rf src/build/ test/fixtures/output.*",test:"npm run lint && npm run test-unit",lint:"npm run lint-cpp && npm run lint-js && npm run lint-types && npm run lint-publish","lint-cpp":"cpplint --quiet src/*.h src/*.cc","lint-js":"biome lint","lint-publish":"publint --strict","lint-types":"tsd --files ./test/types/sharp.test-d.{cts,mts}","test-leak":"./test/leak/leak.sh","test-unit":"node --experimental-test-coverage test/unit.mjs","package-from-local-build":"node npm/from-local-build.js","package-wasm-wrappers":"node npm/wasm-wrappers.js","package-release-notes":"node npm/release-notes.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",files:["dist","install","lib/index.d.ts","src/*.{cc,h,gyp}"],main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.mts",exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}}},sideEffects:!0,repository:{type:"git",url:"git+https://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{"@img/colour":"^1.1.0","detect-libc":"^2.1.2",semver:"^7.8.5"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.35.3","@img/sharp-darwin-x64":"0.35.3","@img/sharp-freebsd-wasm32":"0.35.3","@img/sharp-libvips-darwin-arm64":"1.3.2","@img/sharp-libvips-darwin-x64":"1.3.2","@img/sharp-libvips-linux-arm":"1.3.2","@img/sharp-libvips-linux-arm64":"1.3.2","@img/sharp-libvips-linux-ppc64":"1.3.2","@img/sharp-libvips-linux-riscv64":"1.3.2","@img/sharp-libvips-linux-s390x":"1.3.2","@img/sharp-libvips-linux-x64":"1.3.2","@img/sharp-libvips-linuxmusl-arm64":"1.3.2","@img/sharp-libvips-linuxmusl-x64":"1.3.2","@img/sharp-linux-arm":"0.35.3","@img/sharp-linux-arm64":"0.35.3","@img/sharp-linux-ppc64":"0.35.3","@img/sharp-linux-riscv64":"0.35.3","@img/sharp-linux-s390x":"0.35.3","@img/sharp-linux-x64":"0.35.3","@img/sharp-linuxmusl-arm64":"0.35.3","@img/sharp-linuxmusl-x64":"0.35.3","@img/sharp-webcontainers-wasm32":"0.35.3","@img/sharp-win32-arm64":"0.35.3","@img/sharp-win32-ia32":"0.35.3","@img/sharp-win32-x64":"0.35.3"},peerDependenciesMeta:{"@types/node":{optional:!0}},devDependencies:{"@biomejs/biome":"^2.5.1","@cpplint/cli":"^0.1.0","@emnapi/runtime":"^1.11.1","@img/sharp-libvips-dev":"1.3.2","@img/sharp-libvips-dev-wasm32":"1.3.2","@img/sharp-libvips-win32-arm64":"1.3.2","@img/sharp-libvips-win32-ia32":"1.3.2","@img/sharp-libvips-win32-x64":"1.3.2","@types/node":"*",emnapi:"^1.11.1","exif-reader":"^2.0.3","extract-zip":"^2.0.1",icc:"^4.0.0","node-addon-api":"^8.9.0","node-gyp":"^12.4.0",publint:"^0.3.21","tar-fs":"^3.1.3",tsd:"^0.33.0"},license:"Apache-2.0",engines:{node:">=20.9.0"},config:{libvips:">=8.18.3"},funding:{url:"https://opencollective.com/libvips"}}});import{spawnSync as qu}from"node:child_process";import{createHash as hHe}from"node:crypto";var zu,qG,EHe,$7,CHe,zG,uHe,e$,BHe,Ld,fHe,QHe,yHe,mHe,A$,SHe,X7,DHe,wHe,t$,OHe,bHe,r$,JG,MHe,TD,VG=ue(()=>{zu=Ve(Z7(),1),qG=Ve(CD(),1);_D();EHe=process.env.npm_package_config_libvips||fg.config.libvips,$7=zu.default.coerce(EHe).version,CHe=["darwin-arm64","darwin-x64","freebsd-arm64","freebsd-x64","linux-arm","linux-arm64","linux-ppc64","linux-riscv64","linux-s390x","linux-wasm32","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],zG={encoding:"utf8",shell:!0},uHe=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},e$=()=>qG.default.isNonGlibcLinuxSync()?qG.default.familySync():"",BHe=()=>`${process.platform}${e$()}-${process.arch}`,Ld=()=>{if(A$())return"wasm32";let{npm_config_arch:n,npm_config_platform:t,npm_config_libc:o}=process.env,i=typeof o=="string"?o:e$();return`${t||process.platform}${i}-${n||process.arch}`},fHe=()=>{try{return Xe(`@img/sharp-libvips-dev-${Ld()}/include`)}catch{try{return Xe("@img/sharp-libvips-dev/include")}catch{}}return""},QHe=()=>{try{return Xe("@img/sharp-libvips-dev/cplusplus")}catch{}return""},yHe=()=>{try{return Xe(`@img/sharp-libvips-dev-${Ld()}/lib`)}catch{try{return Xe(`@img/sharp-libvips-${Ld()}/lib`)}catch{}}return""},mHe=()=>{if(process.release?.name==="node"&&process.versions&&!zu.default.satisfies(process.versions.node,fg.engines.node))return{found:process.versions.node,expected:fg.engines.node}},A$=()=>{let{CC:n}=process.env;return!!n?.endsWith("/emcc")},SHe=()=>process.platform==="darwin"&&process.arch==="x64"?(qu("sysctl sysctl.proc_translated",zG).stdout||"").trim()==="sysctl.proc_translated: 1":!1,X7=n=>hHe("sha512").update(n).digest("hex"),DHe=()=>{try{let n=X7(`imgsharp-libvips-${Ld()}`),t=zu.default.coerce(fg.optionalDependencies[`@img/sharp-libvips-${Ld()}`],{includePrerelease:!0}).version;return X7(`${n}npm:${t}`).slice(0,10)}catch{}return""},wHe=()=>qu(`node-gyp rebuild --directory=src ${A$()?"--nodedir=emscripten":""}`,{...zG,stdio:"inherit"}).status,t$=()=>process.platform!=="win32"?(qu("pkg-config --modversion vips-cpp",{...zG,env:{...process.env,PKG_CONFIG_PATH:r$()}}).stdout||"").trim():"",OHe=()=>{try{let n=(qu("brew",["--prefix"],{encoding:"utf8"}).stdout||"").trim();if(n)return`${n}/lib/pkgconfig`}catch{}},bHe=()=>{try{let n=(qu("pkg-config",["--variable","pc_path","pkg-config"],{encoding:"utf8"}).stdout||"").trim();if(n)return n}catch{}},r$=()=>process.platform!=="win32"?[OHe(),bHe(),process.env.PKG_CONFIG_PATH].filter(Boolean).join(":"):"",JG=(n,t,o)=>(o&&o(`Detected ${t}, skipping search for globally-installed libvips`),n),MHe=n=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return JG(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return JG(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(SHe())return JG(!1,"Rosetta",n);let t=t$();return!!t&&zu.default.gte(t,$7)},TD={minimumLibvipsVersion:$7,prebuiltPlatforms:CHe,buildPlatformArch:Ld,buildSharpLibvipsIncludeDir:fHe,buildSharpLibvipsCPlusPlusDir:QHe,buildSharpLibvipsLibDir:yHe,isUnsupportedNodeRuntime:mHe,runtimePlatformArch:BHe,log:uHe,yarnLocator:DHe,spawnRebuild:wHe,globalLibvipsVersion:t$,pkgConfigPath:r$,useGlobalLibvips:MHe}});import{createRequire as _He}from"node:module";var ND,Hr,i$,THe,a$,NHe,RHe,Qg,vt,bc,mt,Vu=ue(()=>{ND=Ve(CD(),1);VG();_D();Hr=_He(import.meta.url),{version:i$}=fg,{runtimePlatformArch:THe,isUnsupportedNodeRuntime:a$,prebuiltPlatforms:NHe,minimumLibvipsVersion:RHe}=TD,Qg=THe(),bc=[];try{vt=Hr(`../src/build/Release/sharp-${Qg}-${i$}.node`)}catch(n){bc.push(n)}if(!vt)try{vt=Hr(`../src/build/Release/sharp-wasm32-${i$}.node`)}catch(n){bc.push(n)}if(!vt)try{switch(Qg){case"darwin-arm64":vt=Hr("@img/sharp-darwin-arm64/sharp.node");break;case"darwin-x64":vt=Hr("@img/sharp-darwin-x64/sharp.node");break;case"linux-arm":vt=Hr("@img/sharp-linux-arm/sharp.node");break;case"linux-arm64":vt=Hr("@img/sharp-linux-arm64/sharp.node");break;case"linux-ppc64":vt=Hr("@img/sharp-linux-ppc64/sharp.node");break;case"linux-riscv64":vt=Hr("@img/sharp-linux-riscv64/sharp.node");break;case"linux-s390x":vt=Hr("@img/sharp-linux-s390x/sharp.node");break;case"linux-x64":vt=Hr("@img/sharp-linux-x64/sharp.node");break;case"linuxmusl-arm64":vt=Hr("@img/sharp-linuxmusl-arm64/sharp.node");break;case"linuxmusl-x64":vt=Hr("@img/sharp-linuxmusl-x64/sharp.node");break;case"win32-arm64":vt=Hr("@img/sharp-win32-arm64/sharp.node");break;case"win32-ia32":vt=Hr("@img/sharp-win32-ia32/sharp.node");break;case"win32-x64":vt=Hr("@img/sharp-win32-x64/sharp.node");break;case"freebsd-arm64":case"freebsd-x64":vt=Hr("@img/sharp-freebsd-wasm32/sharp.node");break;case"linux-wasm32":vt=Hr("@img/sharp-webcontainers-wasm32/sharp.node");break}if(vt&&["linux-x64","linuxmusl-x64"].includes(Qg)&&!vt._isUsingX64V2()){let n=new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");n.code="Unsupported CPU",bc.push(n),vt=null}vt&&process.versions.electron&&Qg.startsWith("linux")&&process.emitWarning("Binaries provided by Electron for use on Linux may be incompatible with sharp - see https://sharp.pixelplumbing.com/install#electron-and-linux",{code:"SharpElectronLinux"})}catch(n){bc.push(n)}if(!vt)try{vt=Hr("@img/sharp-wasm32/sharp.node")}catch(n){bc.push(n)}if(!vt){let[n,t,o]=["linux","darwin","win32"].map(a=>Qg.startsWith(a)),i=[`Could not load the "sharp" module using the ${Qg} runtime`];bc.forEach(a=>{a.code.endsWith("MODULE_NOT_FOUND")||i.push(`${a.code}: ${a.message}`)});let e=bc.map(a=>a.message).join(" ");if(i.push("Possible solutions:"),a$()){let{found:a,expected:A}=a$();i.push("- Please upgrade Node.js:",` Found ${a}`,` Requires ${A}`)}else if(NHe.includes(Qg)){let[a,A]=Qg.split("-"),r=a.endsWith("musl")?" --libc=musl":"";i.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${a.replace("musl","")}${r} --cpu=${A} sharp`)}else i.push(`- Manually install libvips >= ${RHe}`," See https://sharp.pixelplumbing.com/install#building-from-source","- Add WebAssembly-based dependencies:"," npm install sharp @img/sharp-wasm32");if(n&&/(symbol not found|CXXABI_)/i.test(e))try{let{config:a}=Hr(`@img/sharp-libvips-${Qg}/package`),A=`${(0,ND.familySync)()} ${(0,ND.versionSync)()}`,r=`${a.musl?"musl":"glibc"} ${a.musl||a.glibc}`;i.push("- Update your OS:",` Found ${A}`,` Requires ${r}`)}catch{}throw n&&/\/snap\/core[0-9]{2}/.test(e)&&i.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),t&&/Incompatible library version/.test(e)&&i.push("- Update Homebrew:"," brew update && brew upgrade vips"),bc.some(a=>a.code==="ERR_DLOPEN_DISABLED")&&i.push("- Run Node.js without using the --no-addons flag"),o&&/The specified procedure could not be found/.test(e)&&i.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),i.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(i.join(` -`))}mt=vt});import kHe from"node:util";import WG from"node:stream";function GHe(){let n=this.constructor.call(),{debuglog:t,queueListener:o,...i}=this.options;return n.options=structuredClone(i),n.options.debuglog=t,n.options.queueListener=o,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),n.options.input.buffer=this.options.input.buffer,n.emit("finish")}),n}var vHe,PHe,ol,hs,o$=ue(()=>{cs();Vu();vHe=kHe.debuglog("sharp"),PHe=n=>{ol.queue.emit("change",n)},ol=function(n,t){if(arguments.length===1&&!O.defined(n))throw new Error("Invalid input");return this instanceof ol?(WG.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBefore:!1,orientBefore:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,trimMargin:0,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,typedArrayOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",keepGainMap:!1,withGainMap:!1,resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,webpExact:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffBigtiff:!1,tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:0,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,heifTune:"auto",jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:o=>{this.emit("warning",o),vHe(o)},queueListener:PHe},this.options.input=this._createInputDescriptor(n,t,{allowStream:!0}),this):new ol(n,t)};Object.setPrototypeOf(ol.prototype,WG.Duplex.prototype);Object.setPrototypeOf(ol,WG.Duplex);Object.assign(ol.prototype,{clone:GHe});hs=ol});function n$(n){let t=LHe.filter(o=>O.defined(n[o])).map(o=>[o,n[o]]);return t.length?Object.fromEntries(t):void 0}function UHe(n,t,o){let i={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,limitInputChannels:5,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(O.string(n))i.file=n;else if(O.buffer(n)){if(n.length===0)throw Error("Input Buffer is empty");i.buffer=n}else if(O.arrayBuffer(n)){if(n.byteLength===0)throw Error("Input bit Array is empty");i.buffer=Buffer.from(n,0,n.byteLength)}else if(O.typedArray(n)){if(n.length===0)throw Error("Input Bit Array is empty");i.buffer=Buffer.from(n.buffer,n.byteOffset,n.byteLength)}else if(O.plainObject(n)&&!O.defined(t))t=n,n$(t)&&(i.buffer=[]);else if(!O.defined(n)&&!O.defined(t)&&O.object(o)&&o.allowStream)i.buffer=[];else if(Array.isArray(n))if(n.length>1)if(!this.options.joining)this.options.joining=!0,this.options.join=n.map(e=>this._createInputDescriptor(e));else throw new Error("Recursive join is unsupported");else throw new Error("Expected at least two images to join");else throw new Error(`Unsupported input '${n}' of type ${typeof n}${O.defined(t)?` when also providing options of type ${typeof t}`:""}`);if(O.object(t)){if(O.defined(t.failOn))if(O.string(t.failOn)&&O.inArray(t.failOn,["none","truncated","error","warning"]))i.failOn=t.failOn;else throw O.invalidParameterError("failOn","one of: none, truncated, error, warning",t.failOn);if(O.defined(t.autoOrient))if(O.bool(t.autoOrient))i.autoOrient=t.autoOrient;else throw O.invalidParameterError("autoOrient","boolean",t.autoOrient);if(O.defined(t.density))if(O.number(t.density)&&O.inRange(t.density,1,1e5))i.density=t.density;else throw O.invalidParameterError("density","number between 1 and 100000",t.density);if(O.defined(t.ignoreIcc))if(O.bool(t.ignoreIcc))i.ignoreIcc=t.ignoreIcc;else throw O.invalidParameterError("ignoreIcc","boolean",t.ignoreIcc);if(O.defined(t.limitInputPixels))if(O.bool(t.limitInputPixels))i.limitInputPixels=t.limitInputPixels?16383**2:0;else if(O.integer(t.limitInputPixels)&&O.inRange(t.limitInputPixels,0,Number.MAX_SAFE_INTEGER))i.limitInputPixels=t.limitInputPixels;else throw O.invalidParameterError("limitInputPixels","positive integer",t.limitInputPixels);if(O.defined(t.limitInputChannels))if(O.bool(t.limitInputChannels))i.limitInputChannels=t.limitInputChannels?5:0;else if(O.integer(t.limitInputChannels)&&O.inRange(t.limitInputChannels,0,Number.MAX_SAFE_INTEGER))i.limitInputChannels=t.limitInputChannels;else throw O.invalidParameterError("limitInputChannels","positive integer",t.limitInputChannels);if(O.defined(t.unlimited))if(O.bool(t.unlimited))i.unlimited=t.unlimited;else throw O.invalidParameterError("unlimited","boolean",t.unlimited);if(O.defined(t.sequentialRead))if(O.bool(t.sequentialRead))i.sequentialRead=t.sequentialRead;else throw O.invalidParameterError("sequentialRead","boolean",t.sequentialRead);if(O.defined(t.raw)){if(O.object(t.raw)&&O.integer(t.raw.width)&&O.inRange(t.raw.width,1,1e8)&&O.integer(t.raw.height)&&O.inRange(t.raw.height,1,1e8)&&O.integer(t.raw.channels)&&O.inRange(t.raw.channels,1,4))switch(i.rawWidth=t.raw.width,i.rawHeight=t.raw.height,i.rawChannels=t.raw.channels,n.constructor){case Uint8Array:case Uint8ClampedArray:i.rawDepth="uchar";break;case Int8Array:i.rawDepth="char";break;case Uint16Array:i.rawDepth="ushort";break;case Int16Array:i.rawDepth="short";break;case Uint32Array:i.rawDepth="uint";break;case Int32Array:i.rawDepth="int";break;case Float32Array:i.rawDepth="float";break;case Float64Array:i.rawDepth="double";break;default:i.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(i.rawPremultiplied=!1,O.defined(t.raw.premultiplied))if(O.bool(t.raw.premultiplied))i.rawPremultiplied=t.raw.premultiplied;else throw O.invalidParameterError("raw.premultiplied","boolean",t.raw.premultiplied);if(i.rawPageHeight=0,O.defined(t.raw.pageHeight))if(O.integer(t.raw.pageHeight)&&t.raw.pageHeight>0&&t.raw.pageHeight<=t.raw.height){if(t.raw.height%t.raw.pageHeight!==0)throw new Error(`Expected raw.height ${t.raw.height} to be a multiple of raw.pageHeight ${t.raw.pageHeight}`);i.rawPageHeight=t.raw.pageHeight}else throw O.invalidParameterError("raw.pageHeight","positive integer",t.raw.pageHeight)}if(O.defined(t.animated))if(O.bool(t.animated))i.pages=t.animated?-1:1;else throw O.invalidParameterError("animated","boolean",t.animated);if(O.defined(t.pages))if(O.integer(t.pages)&&O.inRange(t.pages,-1,1e5))i.pages=t.pages;else throw O.invalidParameterError("pages","integer between -1 and 100000",t.pages);if(O.defined(t.page))if(O.integer(t.page)&&O.inRange(t.page,0,1e5))i.page=t.page;else throw O.invalidParameterError("page","integer between 0 and 100000",t.page);if(O.object(t.openSlide)&&O.defined(t.openSlide.level))if(O.integer(t.openSlide.level)&&O.inRange(t.openSlide.level,0,256))i.openSlideLevel=t.openSlide.level;else throw O.invalidParameterError("openSlide.level","integer between 0 and 256",t.openSlide.level);else if(O.defined(t.level))if(O.integer(t.level)&&O.inRange(t.level,0,256))i.openSlideLevel=t.level;else throw O.invalidParameterError("level","integer between 0 and 256",t.level);if(O.object(t.tiff)&&O.defined(t.tiff.subifd))if(O.integer(t.tiff.subifd)&&O.inRange(t.tiff.subifd,-1,1e5))i.tiffSubifd=t.tiff.subifd;else throw O.invalidParameterError("tiff.subifd","integer between -1 and 100000",t.tiff.subifd);else if(O.defined(t.subifd))if(O.integer(t.subifd)&&O.inRange(t.subifd,-1,1e5))i.tiffSubifd=t.subifd;else throw O.invalidParameterError("subifd","integer between -1 and 100000",t.subifd);if(O.object(t.svg)){if(O.defined(t.svg.stylesheet))if(O.string(t.svg.stylesheet))i.svgStylesheet=t.svg.stylesheet;else throw O.invalidParameterError("svg.stylesheet","string",t.svg.stylesheet);if(O.defined(t.svg.highBitdepth))if(O.bool(t.svg.highBitdepth))i.svgHighBitdepth=t.svg.highBitdepth;else throw O.invalidParameterError("svg.highBitdepth","boolean",t.svg.highBitdepth)}if(O.object(t.pdf)&&O.defined(t.pdf.background)?i.pdfBackground=this._getBackgroundColourOption(t.pdf.background):O.defined(t.pdfBackground)&&(i.pdfBackground=this._getBackgroundColourOption(t.pdfBackground)),O.object(t.jp2)&&O.defined(t.jp2.oneshot))if(O.bool(t.jp2.oneshot))i.jp2Oneshot=t.jp2.oneshot;else throw O.invalidParameterError("jp2.oneshot","boolean",t.jp2.oneshot);if(O.defined(t.create))if(O.object(t.create)&&O.integer(t.create.width)&&O.inRange(t.create.width,1,1e8)&&O.integer(t.create.height)&&O.inRange(t.create.height,1,1e8)&&O.integer(t.create.channels)){if(i.createWidth=t.create.width,i.createHeight=t.create.height,i.createChannels=t.create.channels,i.createPageHeight=0,O.defined(t.create.pageHeight))if(O.integer(t.create.pageHeight)&&t.create.pageHeight>0&&t.create.pageHeight<=t.create.height){if(t.create.height%t.create.pageHeight!==0)throw new Error(`Expected create.height ${t.create.height} to be a multiple of create.pageHeight ${t.create.pageHeight}`);i.createPageHeight=t.create.pageHeight}else throw O.invalidParameterError("create.pageHeight","positive integer",t.create.pageHeight);if(O.defined(t.create.noise)){if(!O.object(t.create.noise))throw new Error("Expected noise to be an object");if(t.create.noise.type!=="gaussian")throw new Error("Only gaussian noise is supported at the moment");if(i.createNoiseType=t.create.noise.type,!O.inRange(t.create.channels,1,4))throw O.invalidParameterError("create.channels","number between 1 and 4",t.create.channels);if(i.createNoiseMean=128,O.defined(t.create.noise.mean))if(O.number(t.create.noise.mean)&&O.inRange(t.create.noise.mean,0,1e4))i.createNoiseMean=t.create.noise.mean;else throw O.invalidParameterError("create.noise.mean","number between 0 and 10000",t.create.noise.mean);if(i.createNoiseSigma=30,O.defined(t.create.noise.sigma))if(O.number(t.create.noise.sigma)&&O.inRange(t.create.noise.sigma,0,1e4))i.createNoiseSigma=t.create.noise.sigma;else throw O.invalidParameterError("create.noise.sigma","number between 0 and 10000",t.create.noise.sigma)}else if(O.defined(t.create.background)){if(!O.inRange(t.create.channels,3,4))throw O.invalidParameterError("create.channels","number between 3 and 4",t.create.channels);i.createBackground=this._getBackgroundColourOption(t.create.background)}else throw new Error("Expected valid noise or background to create a new input image");delete i.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(O.defined(t.text))if(O.object(t.text)&&O.string(t.text.text)){if(i.textValue=t.text.text,O.defined(t.text.height)&&O.defined(t.text.dpi))throw new Error("Expected only one of dpi or height");if(O.defined(t.text.font))if(O.string(t.text.font))i.textFont=t.text.font;else throw O.invalidParameterError("text.font","string",t.text.font);if(O.defined(t.text.fontfile))if(O.string(t.text.fontfile))i.textFontfile=t.text.fontfile;else throw O.invalidParameterError("text.fontfile","string",t.text.fontfile);if(O.defined(t.text.width))if(O.integer(t.text.width)&&O.inRange(t.text.width,1,1e6))i.textWidth=t.text.width;else throw O.invalidParameterError("text.width","integer between 1 and 1000000",t.text.width);if(O.defined(t.text.height))if(O.integer(t.text.height)&&O.inRange(t.text.height,1,1e6))i.textHeight=t.text.height;else throw O.invalidParameterError("text.height","integer between 1 and 1000000",t.text.height);if(O.defined(t.text.align))if(O.string(t.text.align)&&O.string(this.constructor.align[t.text.align]))i.textAlign=this.constructor.align[t.text.align];else throw O.invalidParameterError("text.align","valid alignment",t.text.align);if(O.defined(t.text.justify))if(O.bool(t.text.justify))i.textJustify=t.text.justify;else throw O.invalidParameterError("text.justify","boolean",t.text.justify);if(O.defined(t.text.dpi))if(O.integer(t.text.dpi)&&O.inRange(t.text.dpi,1,1e6))i.textDpi=t.text.dpi;else throw O.invalidParameterError("text.dpi","integer between 1 and 1000000",t.text.dpi);if(O.defined(t.text.rgba))if(O.bool(t.text.rgba))i.textRgba=t.text.rgba;else throw O.invalidParameterError("text.rgba","bool",t.text.rgba);if(O.defined(t.text.spacing))if(O.integer(t.text.spacing)&&O.inRange(t.text.spacing,-1e6,1e6))i.textSpacing=t.text.spacing;else throw O.invalidParameterError("text.spacing","integer between -1000000 and 1000000",t.text.spacing);if(O.defined(t.text.wrap))if(O.string(t.text.wrap)&&O.inArray(t.text.wrap,["word","char","word-char","none"]))i.textWrap=t.text.wrap;else throw O.invalidParameterError("text.wrap","one of: word, char, word-char, none",t.text.wrap);delete i.buffer}else throw new Error("Expected a valid string to create an image with text.");if(O.defined(t.join))if(O.defined(this.options.join)){if(O.defined(t.join.animated))if(O.bool(t.join.animated))i.joinAnimated=t.join.animated;else throw O.invalidParameterError("join.animated","boolean",t.join.animated);if(O.defined(t.join.across))if(O.integer(t.join.across)&&O.inRange(t.join.across,1,1e6))i.joinAcross=t.join.across;else throw O.invalidParameterError("join.across","integer between 1 and 100000",t.join.across);if(O.defined(t.join.shim))if(O.integer(t.join.shim)&&O.inRange(t.join.shim,0,1e6))i.joinShim=t.join.shim;else throw O.invalidParameterError("join.shim","integer between 0 and 100000",t.join.shim);if(O.defined(t.join.background)&&(i.joinBackground=this._getBackgroundColourOption(t.join.background)),O.defined(t.join.halign))if(O.string(t.join.halign)&&O.string(this.constructor.align[t.join.halign]))i.joinHalign=this.constructor.align[t.join.halign];else throw O.invalidParameterError("join.halign","valid alignment",t.join.halign);if(O.defined(t.join.valign))if(O.string(t.join.valign)&&O.string(this.constructor.align[t.join.valign]))i.joinValign=this.constructor.align[t.join.valign];else throw O.invalidParameterError("join.valign","valid alignment",t.join.valign)}else throw new Error("Expected input to be an array of images to join")}else if(O.defined(t))throw new Error(`Invalid input options ${t}`);return i}function HHe(n,t,o){Array.isArray(this.options.input.buffer)?O.buffer(n)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(n),o()):o(new Error("Non-Buffer data on Writable Stream")):o(new Error("Unexpected data on Writable Stream"))}function KHe(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function xHe(){return Array.isArray(this.options.input.buffer)}function YHe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),mt.metadata(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)})}):mt.metadata(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)}),this):this._isStreamInput()?new Promise((o,i)=>{let e=()=>{this._flattenBufferIn(),mt.metadata(this.options,(a,A)=>{a?i(O.nativeError(a,t)):o(A)})};this.writableFinished?e():this.once("finish",e)}):new Promise((o,i)=>{mt.metadata(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}function jHe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),mt.stats(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)})}):mt.stats(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)}),this):this._isStreamInput()?new Promise((o,i)=>{this.on("finish",function(){this._flattenBufferIn(),mt.stats(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}):new Promise((o,i)=>{mt.stats(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}var FHe,LHe,s$,g$=ue(()=>{cs();Vu();FHe={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},LHe=["failOn","limitInputPixels","limitInputChannels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","openSlideLevel","pdfBackground","tiffSubifd"];s$=n=>{Object.assign(n.prototype,{_inputOptionsFromObject:n$,_createInputDescriptor:UHe,_write:HHe,_flattenBufferIn:KHe,_isStreamInput:xHe,metadata:YHe,stats:jHe}),n.align=FHe}});function XG(n){return n.angle%360!==0||n.rotationAngle!==0}function RD(n){return n.width!==-1||n.height!==-1}function zHe(n,t,o){if(RD(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),O.defined(n))if(O.object(n)&&!O.defined(o))o=n;else if(O.integer(n)&&n>0)this.options.width=n;else throw O.invalidParameterError("width","positive integer",n);else this.options.width=-1;if(O.defined(t))if(O.integer(t)&&t>0)this.options.height=t;else throw O.invalidParameterError("height","positive integer",t);else this.options.height=-1;if(O.object(o)){if(O.defined(o.width))if(O.integer(o.width)&&o.width>0)this.options.width=o.width;else throw O.invalidParameterError("width","positive integer",o.width);if(O.defined(o.height))if(O.integer(o.height)&&o.height>0)this.options.height=o.height;else throw O.invalidParameterError("height","positive integer",o.height);if(O.defined(o.fit)){let i=qHe[o.fit];if(O.string(i))this.options.canvas=i;else throw O.invalidParameterError("fit","valid fit",o.fit)}if(O.defined(o.position)){let i=O.integer(o.position)?o.position:p$[o.position]||l$[o.position]||I$[o.position];if(O.integer(i)&&(O.inRange(i,0,8)||O.inRange(i,16,17)))this.options.position=i;else throw O.invalidParameterError("position","valid position/gravity/strategy",o.position)}if(this._setBackgroundColourOption("resizeBackground",o.background),O.defined(o.kernel))if(O.string(ZG[o.kernel]))this.options.kernel=ZG[o.kernel];else throw O.invalidParameterError("kernel","valid kernel name",o.kernel);O.defined(o.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",o.withoutEnlargement),O.defined(o.withoutReduction)&&this._setBooleanOption("withoutReduction",o.withoutReduction),O.defined(o.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",o.fastShrinkOnLoad)}return XG(this.options)&&RD(this.options)&&(this.options.rotateBefore=!0),this}function VHe(n){if(O.integer(n))if(O.inRange(n,1,1e4))this.options.extendTop=n,this.options.extendBottom=n,this.options.extendLeft=n,this.options.extendRight=n;else throw O.invalidParameterError("extend","integer between 1 and 10000",n);else if(O.object(n)){if(O.defined(n.top))if(O.integer(n.top)&&O.inRange(n.top,0,1e4))this.options.extendTop=n.top;else throw O.invalidParameterError("top","integer between 0 and 10000",n.top);if(O.defined(n.bottom))if(O.integer(n.bottom)&&O.inRange(n.bottom,0,1e4))this.options.extendBottom=n.bottom;else throw O.invalidParameterError("bottom","integer between 0 and 10000",n.bottom);if(O.defined(n.left))if(O.integer(n.left)&&O.inRange(n.left,0,1e4))this.options.extendLeft=n.left;else throw O.invalidParameterError("left","integer between 0 and 10000",n.left);if(O.defined(n.right))if(O.integer(n.right)&&O.inRange(n.right,0,1e4))this.options.extendRight=n.right;else throw O.invalidParameterError("right","integer between 0 and 10000",n.right);if(this._setBackgroundColourOption("extendBackground",n.background),O.defined(n.extendWith))if(O.string(c$[n.extendWith]))this.options.extendWith=c$[n.extendWith];else throw O.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",n.extendWith)}else throw O.invalidParameterError("extend","integer or object",n);return this}function WHe(n){let t=RD(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${t}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(o){let i=n[o];if(O.integer(i)&&O.inRange(i,0,1e8))this.options[o+(o==="left"||o==="top"?"Offset":"")+t]=i;else throw O.invalidParameterError(o,"integer between 0 and 100000000",i)},this),XG(this.options)&&!RD(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function ZHe(n){if(this.options.trimThreshold=10,O.defined(n))if(O.object(n)){if(O.defined(n.background)&&this._setBackgroundColourOption("trimBackground",n.background),O.defined(n.threshold))if(O.number(n.threshold)&&n.threshold>=0)this.options.trimThreshold=n.threshold;else throw O.invalidParameterError("threshold","positive number",n.threshold);if(O.defined(n.lineArt)&&this._setBooleanOption("trimLineArt",n.lineArt),O.defined(n.margin))if(O.integer(n.margin)&&O.inRange(n.margin,0,1e7))this.options.trimMargin=n.margin;else throw O.invalidParameterError("margin","integer between 0 and 10000000",n.margin)}else throw O.invalidParameterError("trim","object",n);return XG(this.options)&&(this.options.rotateBefore=!0),this}var I$,l$,c$,p$,ZG,JHe,qHe,d$,h$=ue(()=>{cs();I$={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},l$={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},c$={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},p$={entropy:16,attention:17},ZG={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},JHe={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},qHe={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};d$=n=>{Object.assign(n.prototype,{resize:zHe,extend:VHe,extract:WHe,trim:ZHe}),n.gravity=I$,n.strategy=p$,n.kernel=ZG,n.fit=JHe,n.position=l$}});function XHe(n){if(!Array.isArray(n))throw O.invalidParameterError("images to composite","array",n);return this.options.composite=n.map(t=>{if(!O.object(t))throw O.invalidParameterError("image to composite","object",t);let o=this._inputOptionsFromObject(t),i={input:this._createInputDescriptor(t.input,o,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(O.defined(t.blend))if(O.string($G[t.blend]))i.blend=$G[t.blend];else throw O.invalidParameterError("blend","valid blend name",t.blend);if(O.defined(t.tile))if(O.bool(t.tile))i.tile=t.tile;else throw O.invalidParameterError("tile","boolean",t.tile);if(O.defined(t.left))if(O.integer(t.left))i.left=t.left;else throw O.invalidParameterError("left","integer",t.left);if(O.defined(t.top))if(O.integer(t.top))i.top=t.top;else throw O.invalidParameterError("top","integer",t.top);if(O.defined(t.top)!==O.defined(t.left))throw new Error("Expected both left and top to be set");if(i.hasOffset=O.integer(t.top)&&O.integer(t.left),O.defined(t.gravity))if(O.integer(t.gravity)&&O.inRange(t.gravity,0,8))i.gravity=t.gravity;else if(O.string(t.gravity)&&O.integer(this.constructor.gravity[t.gravity]))i.gravity=this.constructor.gravity[t.gravity];else throw O.invalidParameterError("gravity","valid gravity",t.gravity);if(O.defined(t.premultiplied))if(O.bool(t.premultiplied))i.premultiplied=t.premultiplied;else throw O.invalidParameterError("premultiplied","boolean",t.premultiplied);return i}),this}var $G,E$,C$=ue(()=>{cs();$G={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};E$=n=>{n.prototype.composite=XHe,n.blend=$G}});function $He(n,t){if(!O.defined(n))return this.autoOrient();if((this.options.angle||this.options.rotationAngle)&&(this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0),O.integer(n)&&!(n%90))this.options.angle=n;else if(O.number(n))this.options.rotationAngle=n,O.object(t)&&t.background&&this._setBackgroundColourOption("rotationBackground",t.background);else throw O.invalidParameterError("angle","numeric",n);return this}function eKe(){return this.options.input.autoOrient=!0,this}function AKe(n){return this.options.flip=O.bool(n)?n:!0,this}function tKe(n){return this.options.flop=O.bool(n)?n:!0,this}function rKe(n,t){let i=Array.isArray(n)&&(n.length===4&&n.every(O.number)||n.length===2&&n.every(e=>Array.isArray(e)&&e.length===2))?n.flat():[];if(i.length===4&&i.every(O.number))this.options.affineMatrix=i;else throw O.invalidParameterError("matrix","1x4 or 2x2 array",n);if(O.defined(t))if(O.object(t)){if(this._setBackgroundColourOption("affineBackground",t.background),O.defined(t.idx))if(O.number(t.idx))this.options.affineIdx=t.idx;else throw O.invalidParameterError("options.idx","number",t.idx);if(O.defined(t.idy))if(O.number(t.idy))this.options.affineIdy=t.idy;else throw O.invalidParameterError("options.idy","number",t.idy);if(O.defined(t.odx))if(O.number(t.odx))this.options.affineOdx=t.odx;else throw O.invalidParameterError("options.odx","number",t.odx);if(O.defined(t.ody))if(O.number(t.ody))this.options.affineOdy=t.ody;else throw O.invalidParameterError("options.ody","number",t.ody);if(O.defined(t.interpolator))if(O.inArray(t.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=t.interpolator;else throw O.invalidParameterError("options.interpolator","valid interpolator name",t.interpolator)}else throw O.invalidParameterError("options","object",t);return this}function aKe(n){if(O.plainObject(n)){if(O.number(n.sigma)&&O.inRange(n.sigma,1e-6,10))this.options.sharpenSigma=n.sigma;else throw O.invalidParameterError("options.sigma","number between 0.000001 and 10",n.sigma);if(O.defined(n.m1))if(O.number(n.m1)&&O.inRange(n.m1,0,1e6))this.options.sharpenM1=n.m1;else throw O.invalidParameterError("options.m1","number between 0 and 1000000",n.m1);if(O.defined(n.m2))if(O.number(n.m2)&&O.inRange(n.m2,0,1e6))this.options.sharpenM2=n.m2;else throw O.invalidParameterError("options.m2","number between 0 and 1000000",n.m2);if(O.defined(n.x1))if(O.number(n.x1)&&O.inRange(n.x1,0,1e6))this.options.sharpenX1=n.x1;else throw O.invalidParameterError("options.x1","number between 0 and 1000000",n.x1);if(O.defined(n.y2))if(O.number(n.y2)&&O.inRange(n.y2,0,1e6))this.options.sharpenY2=n.y2;else throw O.invalidParameterError("options.y2","number between 0 and 1000000",n.y2);if(O.defined(n.y3))if(O.number(n.y3)&&O.inRange(n.y3,0,1e6))this.options.sharpenY3=n.y3;else throw O.invalidParameterError("options.y3","number between 0 and 1000000",n.y3)}else this.options.sharpenSigma=-1;return this}function iKe(n){if(!O.defined(n))this.options.medianSize=3;else if(O.integer(n)&&O.inRange(n,1,1e3))this.options.medianSize=n;else throw O.invalidParameterError("size","integer between 1 and 1000",n);return this}function oKe(n){let t;if(O.number(n))t=n;else if(O.plainObject(n)){if(!O.number(n.sigma))throw O.invalidParameterError("options.sigma","number between 0.3 and 1000",t);if(t=n.sigma,"precision"in n)if(O.string(u$[n.precision]))this.options.precision=u$[n.precision];else throw O.invalidParameterError("precision","one of: integer, float, approximate",n.precision);if("minAmplitude"in n)if(O.number(n.minAmplitude)&&O.inRange(n.minAmplitude,.001,1))this.options.minAmpl=n.minAmplitude;else throw O.invalidParameterError("minAmplitude","number between 0.001 and 1",n.minAmplitude)}if(!O.defined(n))this.options.blurSigma=-1;else if(O.bool(n))this.options.blurSigma=n?-1:0;else if(O.number(t)&&O.inRange(t,.3,1e3))this.options.blurSigma=t;else throw O.invalidParameterError("sigma","number between 0.3 and 1000",t);return this}function nKe(n){if(!O.defined(n))this.options.dilateWidth=1;else if(O.integer(n)&&O.inRange(n,1,65536))this.options.dilateWidth=n;else throw O.invalidParameterError("width","integer between 1 and 65536",n);return this}function sKe(n){if(!O.defined(n))this.options.erodeWidth=1;else if(O.integer(n)&&O.inRange(n,1,65536))this.options.erodeWidth=n;else throw O.invalidParameterError("width","integer between 1 and 65536",n);return this}function gKe(n){return this.options.flatten=O.bool(n)?n:!0,O.object(n)&&this._setBackgroundColourOption("flattenBackground",n.background),this}function cKe(){return this.options.unflatten=!0,this}function IKe(n,t){if(!O.defined(n))this.options.gamma=2.2;else if(O.number(n)&&O.inRange(n,1,3))this.options.gamma=n;else throw O.invalidParameterError("gamma","number between 1.0 and 3.0",n);if(!O.defined(t))this.options.gammaOut=this.options.gamma;else if(O.number(t)&&O.inRange(t,1,3))this.options.gammaOut=t;else throw O.invalidParameterError("gammaOut","number between 1.0 and 3.0",t);return this}function lKe(n){if(this.options.negate=O.bool(n)?n:!0,O.plainObject(n)&&"alpha"in n)if(O.bool(n.alpha))this.options.negateAlpha=n.alpha;else throw O.invalidParameterError("alpha","should be boolean value",n.alpha);return this}function pKe(n){if(O.plainObject(n)){if(O.defined(n.lower))if(O.number(n.lower)&&O.inRange(n.lower,0,99))this.options.normaliseLower=n.lower;else throw O.invalidParameterError("lower","number between 0 and 99",n.lower);if(O.defined(n.upper))if(O.number(n.upper)&&O.inRange(n.upper,1,100))this.options.normaliseUpper=n.upper;else throw O.invalidParameterError("upper","number between 1 and 100",n.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw O.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function dKe(n){return this.normalise(n)}function hKe(n){if(O.plainObject(n)){if(O.integer(n.width)&&O.inRange(n.width,1,65536))this.options.claheWidth=n.width;else throw O.invalidParameterError("width","integer between 1 and 65536",n.width);if(O.integer(n.height)&&O.inRange(n.height,1,65536))this.options.claheHeight=n.height;else throw O.invalidParameterError("height","integer between 1 and 65536",n.height);if(O.defined(n.maxSlope))if(O.integer(n.maxSlope)&&O.inRange(n.maxSlope,0,100))this.options.claheMaxSlope=n.maxSlope;else throw O.invalidParameterError("maxSlope","integer between 0 and 100",n.maxSlope)}else throw O.invalidParameterError("options","plain object",n);return this}function EKe(n){if(!O.object(n)||!Array.isArray(n.kernel)||!O.integer(n.width)||!O.integer(n.height)||!O.inRange(n.width,3,1001)||!O.inRange(n.height,3,1001)||n.height*n.width!==n.kernel.length||!n.kernel.every(O.number))throw new Error("Invalid convolution kernel");return O.integer(n.scale)||(n.scale=n.kernel.reduce((t,o)=>t+o,0)),n.scale<1&&(n.scale=1),O.integer(n.offset)||(n.offset=0),this.options.convKernel=n,this}function CKe(n,t){if(!O.defined(n))this.options.threshold=128;else if(O.bool(n))this.options.threshold=n?128:0;else if(O.integer(n)&&O.inRange(n,0,255))this.options.threshold=n;else throw O.invalidParameterError("threshold","integer between 0 and 255",n);return!O.object(t)||t.greyscale===!0||t.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function uKe(n,t,o){if(this.options.boolean=this._createInputDescriptor(n,o),O.string(t)&&O.inArray(t,["and","or","eor"]))this.options.booleanOp=t;else throw O.invalidParameterError("operator","one of: and, or, eor",t);return this}function BKe(n,t){if(!O.defined(n)&&O.number(t)?n=1:O.number(n)&&!O.defined(t)&&(t=0),!O.defined(n))this.options.linearA=[];else if(O.number(n))this.options.linearA=[n];else if(Array.isArray(n)&&n.length&&n.every(O.number))this.options.linearA=n;else throw O.invalidParameterError("a","number or array of numbers",n);if(!O.defined(t))this.options.linearB=[];else if(O.number(t))this.options.linearB=[t];else if(Array.isArray(t)&&t.length&&t.every(O.number))this.options.linearB=t;else throw O.invalidParameterError("b","number or array of numbers",t);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function fKe(n){if(!Array.isArray(n))throw O.invalidParameterError("inputMatrix","array",n);let t=n.length;if(t!==3&&t!==4)throw O.invalidParameterError("inputMatrix","3x3 or 4x4 array",t);if(!n.every(i=>Array.isArray(i)&&i.length===t))throw O.invalidParameterError("inputMatrix",`array of ${t} arrays of length ${t}`,n);let o=n.flat();if(!o.every(O.number))throw O.invalidParameterError("inputMatrix","array of numbers",o);return this.options.recombMatrix=o,this}function QKe(n){if(!O.plainObject(n))throw O.invalidParameterError("options","plain object",n);if("brightness"in n)if(O.number(n.brightness)&&n.brightness>=0)this.options.brightness=n.brightness;else throw O.invalidParameterError("brightness","number above zero",n.brightness);if("saturation"in n)if(O.number(n.saturation)&&n.saturation>=0)this.options.saturation=n.saturation;else throw O.invalidParameterError("saturation","number above zero",n.saturation);if("hue"in n)if(O.integer(n.hue))this.options.hue=n.hue%360;else throw O.invalidParameterError("hue","number",n.hue);if("lightness"in n)if(O.number(n.lightness))this.options.lightness=n.lightness;else throw O.invalidParameterError("lightness","number",n.lightness);return this}var u$,B$,f$=ue(()=>{cs();u$={integer:"integer",float:"float",approximate:"approximate"};B$=n=>{Object.assign(n.prototype,{autoOrient:eKe,rotate:$He,flip:AKe,flop:tKe,affine:rKe,sharpen:aKe,erode:sKe,dilate:nKe,median:iKe,blur:oKe,flatten:gKe,unflatten:cKe,gamma:IKe,negate:lKe,normalise:pKe,normalize:dKe,clahe:hKe,convolve:EKe,threshold:CKe,boolean:uKe,linear:BKe,recomb:fKe,modulate:QKe})}});var w$=$((lCA,D$)=>{var aF=Object.defineProperty,yKe=Object.getOwnPropertyDescriptor,mKe=Object.getOwnPropertyNames,SKe=Object.prototype.hasOwnProperty,DKe=(n,t)=>{for(var o in t)aF(n,o,{get:t[o],enumerable:!0})},wKe=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of mKe(t))!SKe.call(n,e)&&e!==o&&aF(n,e,{get:()=>t[e],enumerable:!(i=yKe(t,e))||i.enumerable});return n},OKe=n=>wKe(aF({},"__esModule",{value:!0}),n),Q$={};DKe(Q$,{default:()=>HKe});D$.exports=OKe(Q$);var eF={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let n in eF)Object.freeze(eF[n]);var Es=Object.freeze(eF),y$=Object.create(null);for(let n in Es)Object.hasOwn(Es,n)&&(y$[Es[n]]=n);var _i={to:{},get:{}};_i.get=function(n){let t=n.slice(0,3).toLowerCase(),o,i;switch(t){case"hsl":{o=_i.get.hsl(n),i="hsl";break}case"hwb":{o=_i.get.hwb(n),i="hwb";break}default:{o=_i.get.rgb(n),i="rgb";break}}return o?{model:i,value:o}:null};_i.get.rgb=function(n){if(!n)return null;let t=/^#([a-f\d]{3,4})$/i,o=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,e=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,a=/^(\w+)$/,A=[0,0,0,1],r,s,g;if(r=n.match(o)){for(g=r[2],r=r[1],s=0;s<3;s++){let c=s*2;A[s]=Number.parseInt(r.slice(c,c+2),16)}g&&(A[3]=Number.parseInt(g,16)/255)}else if(r=n.match(t)){for(r=r[1],g=r[3],s=0;s<3;s++)A[s]=Number.parseInt(r[s]+r[s],16);g&&(A[3]=Number.parseInt(g+g,16)/255)}else if(r=n.match(i)){for(s=0;s<3;s++)A[s]=Number.parseFloat(r[s+1]);r[4]&&(A[3]=r[5]?Number.parseFloat(r[4])*.01:Number.parseFloat(r[4]))}else if(r=n.match(e)){for(s=0;s<3;s++)A[s]=Math.round(Number.parseFloat(r[s+1])*2.55);r[4]&&(A[3]=r[5]?Number.parseFloat(r[4])*.01:Number.parseFloat(r[4]))}else return(r=n.toLowerCase().match(a))?r[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Es,r[1])?(A=Es[r[1]].slice(),A[3]=1,A):null:null;for(s=0;s<3;s++)A[s]=Mc(A[s],0,255);return A[3]=Mc(A[3],0,1),A};_i.get.hsl=function(n){if(!n)return null;let t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(t);if(o){let i=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,a=Mc(Number.parseFloat(o[2]),0,100),A=Mc(Number.parseFloat(o[3]),0,100),r=Mc(Number.isNaN(i)?1:i,0,1);return[e,a,A,r]}return null};_i.get.hwb=function(n){if(!n)return null;let t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(t);if(o){let i=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,a=Mc(Number.parseFloat(o[2]),0,100),A=Mc(Number.parseFloat(o[3]),0,100),r=Mc(Number.isNaN(i)?1:i,0,1);return[e,a,A,r]}return null};_i.to.hex=function(...n){return"#"+kD(n[0])+kD(n[1])+kD(n[2])+(n[3]<1?kD(Math.round(n[3]*255)):"")};_i.to.rgb=function(...n){return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};_i.to.rgb.percent=function(...n){let t=Math.round(n[0]/255*100),o=Math.round(n[1]/255*100),i=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+t+"%, "+o+"%, "+i+"%)":"rgba("+t+"%, "+o+"%, "+i+"%, "+n[3]+")"};_i.to.hsl=function(...n){return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};_i.to.hwb=function(...n){let t="";return n.length>=4&&n[3]!==1&&(t=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+t+")"};_i.to.keyword=function(...n){return y$[n.slice(0,3)]};function Mc(n,t,o){return Math.min(Math.max(t,n),o)}function kD(n){let t=Math.round(n).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Ud=_i,m$={};for(let n of Object.keys(Es))m$[Es[n]]=n;var sA={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},nl=sA,yg=(6/29)**3;function Kd(n){let t=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,t),1)}function xd(n){return n>.04045?((n+.055)/1.055)**2.4:n/12.92}for(let n of Object.keys(sA)){if(!("channels"in sA[n]))throw new Error("missing channels property: "+n);if(!("labels"in sA[n]))throw new Error("missing channel labels property: "+n);if(sA[n].labels.length!==sA[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:t,labels:o}=sA[n];delete sA[n].channels,delete sA[n].labels,Object.defineProperty(sA[n],"channels",{value:t}),Object.defineProperty(sA[n],"labels",{value:o})}sA.rgb.hsl=function(n){let t=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.min(t,o,i),a=Math.max(t,o,i),A=a-e,r,s;switch(a){case e:{r=0;break}case t:{r=(o-i)/A;break}case o:{r=2+(i-t)/A;break}case i:{r=4+(t-o)/A;break}}r=Math.min(r*60,360),r<0&&(r+=360);let g=(e+a)/2;return a===e?s=0:g<=.5?s=A/(a+e):s=A/(2-a-e),[r,s*100,g*100]};sA.rgb.hsv=function(n){let t,o,i,e,a,A=n[0]/255,r=n[1]/255,s=n[2]/255,g=Math.max(A,r,s),c=g-Math.min(A,r,s),I=function(d){return(g-d)/6/c+1/2};if(c===0)e=0,a=0;else{switch(a=c/g,t=I(A),o=I(r),i=I(s),g){case A:{e=i-o;break}case r:{e=1/3+t-i;break}case s:{e=2/3+o-t;break}}e<0?e+=1:e>1&&(e-=1)}return[e*360,a*100,g*100]};sA.rgb.hwb=function(n){let t=n[0],o=n[1],i=n[2],e=sA.rgb.hsl(n)[0],a=1/255*Math.min(t,Math.min(o,i));return i=1-1/255*Math.max(t,Math.max(o,i)),[e,a*100,i*100]};sA.rgb.oklab=function(n){let t=xd(n[0]/255),o=xd(n[1]/255),i=xd(n[2]/255),e=Math.cbrt(.4122214708*t+.5363325363*o+.0514459929*i),a=Math.cbrt(.2119034982*t+.6806995451*o+.1073969566*i),A=Math.cbrt(.0883024619*t+.2817188376*o+.6299787005*i),r=.2104542553*e+.793617785*a-.0040720468*A,s=1.9779984951*e-2.428592205*a+.4505937099*A,g=.0259040371*e+.7827717662*a-.808675766*A;return[r*100,s*100,g*100]};sA.rgb.cmyk=function(n){let t=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.min(1-t,1-o,1-i),a=(1-t-e)/(1-e)||0,A=(1-o-e)/(1-e)||0,r=(1-i-e)/(1-e)||0;return[a*100,A*100,r*100,e*100]};function bKe(n,t){return(n[0]-t[0])**2+(n[1]-t[1])**2+(n[2]-t[2])**2}sA.rgb.keyword=function(n){let t=m$[n];if(t)return t;let o=Number.POSITIVE_INFINITY,i;for(let e of Object.keys(Es)){let a=Es[e],A=bKe(n,a);Ayg?o**(1/3):7.787*o+16/116,i=i>yg?i**(1/3):7.787*i+16/116,e=e>yg?e**(1/3):7.787*e+16/116;let a=116*i-16,A=500*(o-i),r=200*(i-e);return[a,A,r]};sA.hsl.rgb=function(n){let t=n[0]/360,o=n[1]/100,i=n[2]/100,e,a;if(o===0)return a=i*255,[a,a,a];let A=i<.5?i*(1+o):i+o-i*o,r=2*i-A,s=[0,0,0];for(let g=0;g<3;g++)e=t+1/3*-(g-1),e<0&&e++,e>1&&e--,6*e<1?a=r+(A-r)*6*e:2*e<1?a=A:3*e<2?a=r+(A-r)*(2/3-e)*6:a=r,s[g]=a*255;return s};sA.hsl.hsv=function(n){let t=n[0],o=n[1]/100,i=n[2]/100,e=o,a=Math.max(i,.01);i*=2,o*=i<=1?i:2-i,e*=a<=1?a:2-a;let A=(i+o)/2,r=i===0?2*e/(a+e):2*o/(i+o);return[t,r*100,A*100]};sA.hsv.rgb=function(n){let t=n[0]/60,o=n[1]/100,i=n[2]/100,e=Math.floor(t)%6,a=t-Math.floor(t),A=255*i*(1-o),r=255*i*(1-o*a),s=255*i*(1-o*(1-a));switch(i*=255,e){case 0:return[i,s,A];case 1:return[r,i,A];case 2:return[A,i,s];case 3:return[A,r,i];case 4:return[s,A,i];case 5:return[i,A,r]}};sA.hsv.hsl=function(n){let t=n[0],o=n[1]/100,i=n[2]/100,e=Math.max(i,.01),a,A;A=(2-o)*i;let r=(2-o)*e;return a=o*e,a/=r<=1?r:2-r,a=a||0,A/=2,[t,a*100,A*100]};sA.hwb.rgb=function(n){let t=n[0]/360,o=n[1]/100,i=n[2]/100,e=o+i,a;e>1&&(o/=e,i/=e);let A=Math.floor(6*t),r=1-i;a=6*t-A,(A&1)!==0&&(a=1-a);let s=o+a*(r-o),g,c,I;switch(A){default:case 6:case 0:{g=r,c=s,I=o;break}case 1:{g=s,c=r,I=o;break}case 2:{g=o,c=r,I=s;break}case 3:{g=o,c=s,I=r;break}case 4:{g=s,c=o,I=r;break}case 5:{g=r,c=o,I=s;break}}return[g*255,c*255,I*255]};sA.cmyk.rgb=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e=n[3]/100,a=1-Math.min(1,t*(1-e)+e),A=1-Math.min(1,o*(1-e)+e),r=1-Math.min(1,i*(1-e)+e);return[a*255,A*255,r*255]};sA.xyz.rgb=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e,a,A;return e=t*3.2404542+o*-1.5371385+i*-.4985314,a=t*-.969266+o*1.8760108+i*.041556,A=t*.0556434+o*-.2040259+i*1.0572252,e=Kd(e),a=Kd(a),A=Kd(A),[e*255,a*255,A*255]};sA.xyz.lab=function(n){let t=n[0],o=n[1],i=n[2];t/=95.047,o/=100,i/=108.883,t=t>yg?t**(1/3):7.787*t+16/116,o=o>yg?o**(1/3):7.787*o+16/116,i=i>yg?i**(1/3):7.787*i+16/116;let e=116*o-16,a=500*(t-o),A=200*(o-i);return[e,a,A]};sA.xyz.oklab=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e=Math.cbrt(.8189330101*t+.3618667424*o-.1288597137*i),a=Math.cbrt(.0329845436*t+.9293118715*o+.0361456387*i),A=Math.cbrt(.0482003018*t+.2643662691*o+.633851707*i),r=.2104542553*e+.793617785*a-.0040720468*A,s=1.9779984951*e-2.428592205*a+.4505937099*A,g=.0259040371*e+.7827717662*a-.808675766*A;return[r*100,s*100,g*100]};sA.oklab.oklch=function(n){return sA.lab.lch(n)};sA.oklab.xyz=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e=(.999999998*t+.396337792*o+.215803758*i)**3,a=(1.000000008*t-.105561342*o-.063854175*i)**3,A=(1.000000055*t-.089484182*o-1.291485538*i)**3,r=1.227013851*e-.55779998*a+.281256149*A,s=-.040580178*e+1.11225687*a-.071676679*A,g=-.076381285*e-.421481978*a+1.58616322*A;return[r*100,s*100,g*100]};sA.oklab.rgb=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e=(t+.3963377774*o+.2158037573*i)**3,a=(t-.1055613458*o-.0638541728*i)**3,A=(t-.0894841775*o-1.291485548*i)**3,r=Kd(4.0767416621*e-3.3077115913*a+.2309699292*A),s=Kd(-1.2684380046*e+2.6097574011*a-.3413193965*A),g=Kd(-.0041960863*e-.7034186147*a+1.707614701*A);return[r*255,s*255,g*255]};sA.oklch.oklab=function(n){return sA.lch.lab(n)};sA.lab.xyz=function(n){let t=n[0],o=n[1],i=n[2],e,a,A;a=(t+16)/116,e=o/500+a,A=a-i/200;let r=a**3,s=e**3,g=A**3;return a=r>yg?r:(a-16/116)/7.787,e=s>yg?s:(e-16/116)/7.787,A=g>yg?g:(A-16/116)/7.787,e*=95.047,a*=100,A*=108.883,[e,a,A]};sA.lab.lch=function(n){let t=n[0],o=n[1],i=n[2],e;e=Math.atan2(i,o)*360/2/Math.PI,e<0&&(e+=360);let A=Math.sqrt(o*o+i*i);return[t,A,e]};sA.lch.lab=function(n){let t=n[0],o=n[1],e=n[2]/360*2*Math.PI,a=o*Math.cos(e),A=o*Math.sin(e);return[t,a,A]};sA.rgb.ansi16=function(n,t=null){let[o,i,e]=n,a=t===null?sA.rgb.hsv(n)[2]:t;if(a=Math.round(a/50),a===0)return 30;let A=30+(Math.round(e/255)<<2|Math.round(i/255)<<1|Math.round(o/255));return a===2&&(A+=60),A};sA.hsv.ansi16=function(n){return sA.rgb.ansi16(sA.hsv.rgb(n),n[2])};sA.rgb.ansi256=function(n){let t=n[0],o=n[1],i=n[2];return t>>4===o>>4&&o>>4===i>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)};sA.ansi16.rgb=function(n){n=n[0];let t=n%10;if(t===0||t===7)return n>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let o=(Math.trunc(n>50)+1)*.5,i=(t&1)*o*255,e=(t>>1&1)*o*255,a=(t>>2&1)*o*255;return[i,e,a]};sA.ansi256.rgb=function(n){if(n=n[0],n>=232){let a=(n-232)*10+8;return[a,a,a]}n-=16;let t,o=Math.floor(n/36)/5*255,i=Math.floor((t=n%36)/6)/5*255,e=t%6/5*255;return[o,i,e]};sA.rgb.hex=function(n){let o=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".slice(o.length)+o};sA.hex.rgb=function(n){let t=n.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let o=t[0];t[0].length===3&&(o=[...o].map(r=>r+r).join(""));let i=Number.parseInt(o,16),e=i>>16&255,a=i>>8&255,A=i&255;return[e,a,A]};sA.rgb.hcg=function(n){let t=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.max(Math.max(t,o),i),a=Math.min(Math.min(t,o),i),A=e-a,r,s=A<1?a/(1-A):0;return A<=0?r=0:e===t?r=(o-i)/A%6:e===o?r=2+(i-t)/A:r=4+(t-o)/A,r/=6,r%=1,[r*360,A*100,s*100]};sA.hsl.hcg=function(n){let t=n[1]/100,o=n[2]/100,i=o<.5?2*t*o:2*t*(1-o),e=0;return i<1&&(e=(o-.5*i)/(1-i)),[n[0],i*100,e*100]};sA.hsv.hcg=function(n){let t=n[1]/100,o=n[2]/100,i=t*o,e=0;return i<1&&(e=(o-i)/(1-i)),[n[0],i*100,e*100]};sA.hcg.rgb=function(n){let t=n[0]/360,o=n[1]/100,i=n[2]/100;if(o===0)return[i*255,i*255,i*255];let e=[0,0,0],a=t%1*6,A=a%1,r=1-A,s=0;switch(Math.floor(a)){case 0:{e[0]=1,e[1]=A,e[2]=0;break}case 1:{e[0]=r,e[1]=1,e[2]=0;break}case 2:{e[0]=0,e[1]=1,e[2]=A;break}case 3:{e[0]=0,e[1]=r,e[2]=1;break}case 4:{e[0]=A,e[1]=0,e[2]=1;break}default:e[0]=1,e[1]=0,e[2]=r}return s=(1-o)*i,[(o*e[0]+s)*255,(o*e[1]+s)*255,(o*e[2]+s)*255]};sA.hcg.hsv=function(n){let t=n[1]/100,o=n[2]/100,i=t+o*(1-t),e=0;return i>0&&(e=t/i),[n[0],e*100,i*100]};sA.hcg.hsl=function(n){let t=n[1]/100,i=n[2]/100*(1-t)+.5*t,e=0;return i>0&&i<.5?e=t/(2*i):i>=.5&&i<1&&(e=t/(2*(1-i))),[n[0],e*100,i*100]};sA.hcg.hwb=function(n){let t=n[1]/100,o=n[2]/100,i=t+o*(1-t);return[n[0],(i-t)*100,(1-i)*100]};sA.hwb.hcg=function(n){let t=n[1]/100,i=1-n[2]/100,e=i-t,a=0;return e<1&&(a=(i-e)/(1-e)),[n[0],e*100,a*100]};sA.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};sA.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};sA.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};sA.gray.hsl=function(n){return[0,0,n[0]]};sA.gray.hsv=sA.gray.hsl;sA.gray.hwb=function(n){return[0,100,n[0]]};sA.gray.cmyk=function(n){return[0,0,0,n[0]]};sA.gray.lab=function(n){return[n[0],0,0]};sA.gray.hex=function(n){let t=Math.round(n[0]/100*255)&255,i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(i.length)+i};sA.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};function MKe(){let n={},t=Object.keys(nl);for(let{length:o}=t,i=0;i0;){let i=o.pop(),e=Object.keys(nl[i]);for(let{length:a}=e,A=0;A1&&(o=i),n(o))};return"conversion"in n&&(t.conversion=n.conversion),t}function GKe(n){let t=function(...o){let i=o[0];if(i==null)return i;i.length>1&&(o=i);let e=n(o);if(typeof e=="object")for(let{length:a}=e,A=0;A0){this.model=t||"rgb",i=eo[this.model].channels;let e=Array.prototype.slice.call(n,0,i);this.color=rF(e,i),this.valpha=typeof n[i]=="number"?n[i]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;let e=Object.keys(n);"alpha"in n&&(e.splice(e.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);let a=e.sort().join("");if(!(a in AF))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=AF[a];let{labels:A}=eo[this.model],r=[];for(o=0;o(n%360+360)%360),saturationl:ur("hsl",1,Kr(100)),lightness:ur("hsl",2,Kr(100)),saturationv:ur("hsv",1,Kr(100)),value:ur("hsv",2,Kr(100)),chroma:ur("hcg",1,Kr(100)),gray:ur("hcg",2,Kr(100)),white:ur("hwb",1,Kr(100)),wblack:ur("hwb",2,Kr(100)),cyan:ur("cmyk",0,Kr(100)),magenta:ur("cmyk",1,Kr(100)),yellow:ur("cmyk",2,Kr(100)),black:ur("cmyk",3,Kr(100)),x:ur("xyz",0,Kr(95.047)),y:ur("xyz",1,Kr(100)),z:ur("xyz",2,Kr(108.833)),l:ur("lab",0,Kr(100)),a:ur("lab",1),b:ur("lab",2),keyword(n){return n!==void 0?new oa(n):eo[this.model].keyword(this.color)},hex(n){return n!==void 0?new oa(n):Ud.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new oa(n);let t=this.rgb().round().color,o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),Ud.to.hex(...t)+o},rgbNumber(){let n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){let n=this.rgb().color,t=[];for(let[o,i]of n.entries()){let e=i/255;t[o]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(n){let t=this.luminosity(),o=n.luminosity();return t>o?(t+.05)/(o+.05):(o+.05)/(t+.05)},level(n){let t=this.contrast(n);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let n=this.rgb();for(let t=0;t<3;t++)n.color[t]=255-n.color[t];return n},lighten(n){let t=this.hsl();return t.color[2]+=t.color[2]*n,t},darken(n){let t=this.hsl();return t.color[2]-=t.color[2]*n,t},saturate(n){let t=this.hsl();return t.color[1]+=t.color[1]*n,t},desaturate(n){let t=this.hsl();return t.color[1]-=t.color[1]*n,t},whiten(n){let t=this.hwb();return t.color[1]+=t.color[1]*n,t},blacken(n){let t=this.hwb();return t.color[2]+=t.color[2]*n,t},grayscale(){let n=this.rgb().color,t=n[0]*.3+n[1]*.59+n[2]*.11;return oa.rgb(t,t,t)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){let t=this.hsl(),o=t.color[0];return o=(o+n)%360,o=o<0?360+o:o,t.color[0]=o,t},mix(n,t){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);let o=n.rgb(),i=this.rgb(),e=t===void 0?.5:t,a=2*e-1,A=o.alpha()-i.alpha(),r=((a*A===-1?a:(a+A)/(1+a*A))+1)/2,s=1-r;return oa.rgb(r*o.red()+s*i.red(),r*o.green()+s*i.green(),r*o.blue()+s*i.blue(),o.alpha()*e+i.alpha()*(1-e))}};for(let n of Object.keys(eo)){if(S$.includes(n))continue;let{channels:t}=eo[n];oa.prototype[n]=function(...o){return this.model===n?new oa(this):o.length>0?new oa(o,n):new oa([...UKe(eo[this.model][n].raw(this.color)),this.valpha],n)},oa[n]=function(...o){let i=o[0];return typeof i=="number"&&(i=rF(o,t)),new oa(i,n)}}function FKe(n,t){return Number(n.toFixed(t))}function LKe(n){return function(t){return FKe(t,n)}}function ur(n,t,o){n=Array.isArray(n)?n:[n];for(let i of n)(tF[i]||=[])[t]=o;return n=n[0],function(i){let e;return i!==void 0?(o&&(i=o(i)),e=this[n](),e.color[t]=i,e):(e=this[n]().color[t],o&&(e=o(e)),e)}}function Kr(n){return function(t){return Math.max(0,Math.min(n,t))}}function UKe(n){return Array.isArray(n)?n:[n]}function rF(n,t){for(let o=0;o{O$.exports=w$().default});function KKe(n){return this._setBackgroundColourOption("tint",n),this}function xKe(n){return this.options.greyscale=O.bool(n)?n:!0,this}function YKe(n){return this.greyscale(n)}function jKe(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspacePipeline=n,this}function JKe(n){return this.pipelineColourspace(n)}function qKe(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspace=n,this}function zKe(n){return this.toColourspace(n)}function T$(n){if(O.object(n)||O.string(n)&&n.length>=3&&n.length<=200){let t=(0,_$.default)(n),o=t.red(),i=t.green(),e=t.blue(),a=Math.round(t.alpha()*255);for(let[A,r]of[["red",o],["green",i],["blue",e],["alpha",a]])if(!O.number(r))throw O.invalidParameterError(`background.${A}`,"number",r);return[o,i,e,a]}else throw O.invalidParameterError("background","object or string",n)}function VKe(n,t){O.defined(t)&&(this.options[n]=T$(t))}var _$,M$,N$,R$=ue(()=>{_$=Ve(b$(),1);cs();M$={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};N$=n=>{Object.assign(n.prototype,{tint:KKe,greyscale:xKe,grayscale:YKe,pipelineColourspace:jKe,pipelineColorspace:JKe,toColourspace:qKe,toColorspace:zKe,_getBackgroundColourOption:T$,_setBackgroundColourOption:VKe}),n.colourspace=M$,n.colorspace=M$}});function ZKe(){return this.options.removeAlpha=!0,this}function XKe(n){if(O.defined(n))if(O.number(n)&&O.inRange(n,0,1))this.options.ensureAlpha=n;else throw O.invalidParameterError("alpha","number between 0 and 1",n);else this.options.ensureAlpha=1;return this}function $Ke(n){let t={red:0,green:1,blue:2,alpha:3};if(Object.keys(t).includes(n)&&(n=t[n]),O.integer(n)&&O.inRange(n,0,4))this.options.extractChannel=n;else throw O.invalidParameterError("channel","integer or one of: red, green, blue, alpha",n);return this}function exe(n,t){return Array.isArray(n)?n.forEach(function(o){this.options.joinChannelIn.push(this._createInputDescriptor(o,t))},this):this.options.joinChannelIn.push(this._createInputDescriptor(n,t)),this}function Axe(n){if(O.string(n)&&O.inArray(n,["and","or","eor"]))this.options.bandBoolOp=n;else throw O.invalidParameterError("boolOp","one of: and, or, eor",n);return this}var WKe,k$,v$=ue(()=>{cs();WKe={and:"and",or:"or",eor:"eor"};k$=n=>{Object.assign(n.prototype,{removeAlpha:ZKe,ensureAlpha:XKe,extractChannel:$Ke,joinChannel:exe,bandbool:Axe}),n.bool=WKe}});import iF from"node:path";function rxe(n,t){let o;if(O.string(n)?O.string(this.options.input.file)&&iF.resolve(this.options.input.file)===iF.resolve(n)?o=new Error("Cannot use same file for input and output"):txe.test(iF.extname(n))&&!this.constructor.format.jp2.output.file&&(o=G$()):o=new Error("Missing output file path"),o)if(O.fn(t))t(o);else return Promise.reject(o);else{this.options.fileOut=n;let i=Error();return this._pipeline(t,i)}return this}function axe(n,t){O.object(n)?this._setBooleanOption("resolveWithObject",n.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";let o=Error();return this._pipeline(O.fn(n)?n:t,o)}function ixe(){this.options.resolveWithObject=!0,this.options.typedArrayOut=!0;let n=Error();return this._pipeline(null,n)}function oxe(n){if(O.number(n)&&n>0)this.options.withMetadataDensity=n;else throw O.invalidParameterError("density","positive number",n);return this.keepExif()}function nxe(){return this.options.keepMetadata|=1,this}function sxe(n){if(O.object(n))for(let[t,o]of Object.entries(n))if(O.object(o))for(let[i,e]of Object.entries(o))if(O.string(e))this.options.withExif[`exif-${t.toLowerCase()}-${i}`]=e;else throw O.invalidParameterError(`${t}.${i}`,"string",e);else throw O.invalidParameterError(t,"object",o);else throw O.invalidParameterError("exif","object",n);return this.options.withExifMerge=!1,this.keepExif()}function gxe(n){return this.withExif(n),this.options.withExifMerge=!0,this}function cxe(){return this.options.keepMetadata|=8,this}function Ixe(n,t){if(O.string(n))this.options.withIccProfile=n;else throw O.invalidParameterError("icc","string",n);if(this.keepIccProfile(),O.object(t)&&O.defined(t.attach))if(O.bool(t.attach))t.attach||(this.options.keepMetadata&=-9);else throw O.invalidParameterError("attach","boolean",t.attach);return this}function lxe(){return this.options.keepGainMap=!0,this.options.withGainMap=!1,this.options.keepMetadata|=32,this}function pxe(){return this.options.withGainMap=!0,this.options.keepGainMap=!1,this.options.colourspace="scrgb",this}function dxe(){return this.options.keepMetadata|=2,this}function hxe(n){if(O.string(n)&&n.length>0)this.options.withXmp=n,this.options.keepMetadata|=2;else throw O.invalidParameterError("xmp","non-empty string",n);return this}function Exe(){return this.options.keepMetadata|=31,this}function Cxe(n){if(this.keepMetadata(),this.withIccProfile("srgb"),O.object(n)){if(O.defined(n.orientation))if(O.integer(n.orientation)&&O.inRange(n.orientation,1,8))this.options.withMetadataOrientation=n.orientation;else throw O.invalidParameterError("orientation","integer between 1 and 8",n.orientation);if(O.defined(n.density))if(O.number(n.density)&&n.density>0)this.options.withMetadataDensity=n.density;else throw O.invalidParameterError("density","positive number",n.density);O.defined(n.icc)&&this.withIccProfile(n.icc),O.defined(n.exif)&&this.withExifMerge(n.exif)}return this}function uxe(n,t){let o=P$.get((O.object(n)&&O.string(n.id)?n.id:n).toLowerCase());if(!o)throw O.invalidParameterError("format",`one of: ${[...P$.keys()].join(", ")}`,n);return this[o](t)}function Bxe(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jpegQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.progressive)&&this._setBooleanOption("jpegProgressive",n.progressive),O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);let t=O.bool(n.optimizeCoding)?n.optimizeCoding:n.optimiseCoding;if(O.defined(t)&&this._setBooleanOption("jpegOptimiseCoding",t),O.defined(n.mozjpeg))if(O.bool(n.mozjpeg))n.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw O.invalidParameterError("mozjpeg","boolean",n.mozjpeg);let o=O.bool(n.trellisQuantization)?n.trellisQuantization:n.trellisQuantisation;O.defined(o)&&this._setBooleanOption("jpegTrellisQuantisation",o),O.defined(n.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",n.overshootDeringing);let i=O.bool(n.optimizeScans)?n.optimizeScans:n.optimiseScans;O.defined(i)&&(this._setBooleanOption("jpegOptimiseScans",i),i&&(this.options.jpegProgressive=!0));let e=O.number(n.quantizationTable)?n.quantizationTable:n.quantisationTable;if(O.defined(e))if(O.integer(e)&&O.inRange(e,0,8))this.options.jpegQuantisationTable=e;else throw O.invalidParameterError("quantisationTable","integer between 0 and 8",e)}return this._updateFormatOut("jpeg",n)}function fxe(n){if(O.object(n)){if(O.defined(n.progressive)&&this._setBooleanOption("pngProgressive",n.progressive),O.defined(n.compressionLevel))if(O.integer(n.compressionLevel)&&O.inRange(n.compressionLevel,0,9))this.options.pngCompressionLevel=n.compressionLevel;else throw O.invalidParameterError("compressionLevel","integer between 0 and 9",n.compressionLevel);O.defined(n.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",n.adaptiveFiltering);let t=n.colours||n.colors;if(O.defined(t))if(O.integer(t)&&O.inRange(t,2,256))this.options.pngBitdepth=F$(t);else throw O.invalidParameterError("colours","integer between 2 and 256",t);if(O.defined(n.palette)?this._setBooleanOption("pngPalette",n.palette):[n.quality,n.effort,n.colours,n.colors,n.dither].some(O.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,0,100))this.options.pngQuality=n.quality;else throw O.invalidParameterError("quality","integer between 0 and 100",n.quality);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,10))this.options.pngEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 10",n.effort);if(O.defined(n.dither))if(O.number(n.dither)&&O.inRange(n.dither,0,1))this.options.pngDither=n.dither;else throw O.invalidParameterError("dither","number between 0.0 and 1.0",n.dither)}}return this._updateFormatOut("png",n)}function Qxe(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.webpQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.alphaQuality))if(O.integer(n.alphaQuality)&&O.inRange(n.alphaQuality,0,100))this.options.webpAlphaQuality=n.alphaQuality;else throw O.invalidParameterError("alphaQuality","integer between 0 and 100",n.alphaQuality);if(O.defined(n.lossless)&&this._setBooleanOption("webpLossless",n.lossless),O.defined(n.nearLossless)&&this._setBooleanOption("webpNearLossless",n.nearLossless),O.defined(n.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",n.smartSubsample),O.defined(n.smartDeblock)&&this._setBooleanOption("webpSmartDeblock",n.smartDeblock),O.defined(n.preset))if(O.string(n.preset)&&O.inArray(n.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=n.preset;else throw O.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",n.preset);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,0,6))this.options.webpEffort=n.effort;else throw O.invalidParameterError("effort","integer between 0 and 6",n.effort);O.defined(n.minSize)&&this._setBooleanOption("webpMinSize",n.minSize),O.defined(n.mixed)&&this._setBooleanOption("webpMixed",n.mixed),O.defined(n.exact)&&this._setBooleanOption("webpExact",n.exact)}return oF(n,this.options),this._updateFormatOut("webp",n)}function yxe(n){if(O.object(n)){O.defined(n.reuse)&&this._setBooleanOption("gifReuse",n.reuse),O.defined(n.progressive)&&this._setBooleanOption("gifProgressive",n.progressive);let t=n.colours||n.colors;if(O.defined(t))if(O.integer(t)&&O.inRange(t,2,256))this.options.gifBitdepth=F$(t);else throw O.invalidParameterError("colours","integer between 2 and 256",t);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,10))this.options.gifEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 10",n.effort);if(O.defined(n.dither))if(O.number(n.dither)&&O.inRange(n.dither,0,1))this.options.gifDither=n.dither;else throw O.invalidParameterError("dither","number between 0.0 and 1.0",n.dither);if(O.defined(n.interFrameMaxError))if(O.number(n.interFrameMaxError)&&O.inRange(n.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=n.interFrameMaxError;else throw O.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",n.interFrameMaxError);if(O.defined(n.interPaletteMaxError))if(O.number(n.interPaletteMaxError)&&O.inRange(n.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=n.interPaletteMaxError;else throw O.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",n.interPaletteMaxError);if(O.defined(n.keepDuplicateFrames))if(O.bool(n.keepDuplicateFrames))this._setBooleanOption("gifKeepDuplicateFrames",n.keepDuplicateFrames);else throw O.invalidParameterError("keepDuplicateFrames","boolean",n.keepDuplicateFrames)}return oF(n,this.options),this._updateFormatOut("gif",n)}function mxe(n){if(!this.constructor.format.jp2.output.buffer)throw G$();if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jp2Quality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.jp2Lossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.tileWidth))if(O.integer(n.tileWidth)&&O.inRange(n.tileWidth,1,32768))this.options.jp2TileWidth=n.tileWidth;else throw O.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(O.defined(n.tileHeight))if(O.integer(n.tileHeight)&&O.inRange(n.tileHeight,1,32768))this.options.jp2TileHeight=n.tileHeight;else throw O.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling)}return this._updateFormatOut("jp2",n)}function oF(n,t){if(O.object(n)&&O.defined(n.loop))if(O.integer(n.loop)&&O.inRange(n.loop,0,65535))t.loop=n.loop;else throw O.invalidParameterError("loop","integer between 0 and 65535",n.loop);if(O.object(n)&&O.defined(n.delay))if(O.integer(n.delay)&&O.inRange(n.delay,0,65535))t.delay=[n.delay];else if(Array.isArray(n.delay)&&n.delay.every(O.integer)&&n.delay.every(o=>O.inRange(o,0,65535)))t.delay=n.delay;else throw O.invalidParameterError("delay","integer or an array of integers between 0 and 65535",n.delay)}function Sxe(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.tiffQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.bitdepth))if(O.integer(n.bitdepth)&&O.inArray(n.bitdepth,[1,2,4]))this.options.tiffBitdepth=n.bitdepth;else throw O.invalidParameterError("bitdepth","1, 2 or 4",n.bitdepth);if(O.defined(n.tile)&&this._setBooleanOption("tiffTile",n.tile),O.defined(n.tileWidth))if(O.integer(n.tileWidth)&&O.inRange(n.tileWidth,1,32768))this.options.tiffTileWidth=n.tileWidth;else throw O.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(O.defined(n.tileHeight))if(O.integer(n.tileHeight)&&O.inRange(n.tileHeight,1,32768))this.options.tiffTileHeight=n.tileHeight;else throw O.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(O.defined(n.miniswhite)&&this._setBooleanOption("tiffMiniswhite",n.miniswhite),O.defined(n.pyramid)&&this._setBooleanOption("tiffPyramid",n.pyramid),O.defined(n.xres))if(O.number(n.xres)&&O.inRange(n.xres,.001,1e6))this.options.tiffXres=n.xres;else throw O.invalidParameterError("xres","number between 0.001 and 1000000",n.xres);if(O.defined(n.yres))if(O.number(n.yres)&&O.inRange(n.yres,.001,1e6))this.options.tiffYres=n.yres;else throw O.invalidParameterError("yres","number between 0.001 and 1000000",n.yres);if(O.defined(n.compression))if(O.string(n.compression)&&O.inArray(n.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=n.compression;else throw O.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",n.compression);if(O.defined(n.bigtiff)&&this._setBooleanOption("tiffBigtiff",n.bigtiff),O.defined(n.predictor))if(O.string(n.predictor)&&O.inArray(n.predictor,["none","horizontal","float"]))this.options.tiffPredictor=n.predictor;else throw O.invalidParameterError("predictor","one of: none, horizontal, float",n.predictor);if(O.defined(n.resolutionUnit))if(O.string(n.resolutionUnit)&&O.inArray(n.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=n.resolutionUnit;else throw O.invalidParameterError("resolutionUnit","one of: inch, cm",n.resolutionUnit)}return this._updateFormatOut("tiff",n)}function Dxe(n){return this.heif({...n,compression:"av1"})}function wxe(n){if(O.object(n)){if(O.string(n.compression)&&O.inArray(n.compression,["av1","hevc"]))this.options.heifCompression=n.compression;else throw O.invalidParameterError("compression","one of: av1, hevc",n.compression);if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.heifQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.heifLossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,0,9))this.options.heifEffort=n.effort;else throw O.invalidParameterError("effort","integer between 0 and 9",n.effort);if(O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);if(O.defined(n.bitdepth))if(O.integer(n.bitdepth)&&O.inArray(n.bitdepth,[8,10,12]))this.options.heifBitdepth=n.bitdepth;else throw O.invalidParameterError("bitdepth","8, 10 or 12",n.bitdepth);if(O.defined(n.tune))if(O.string(n.tune)&&O.inArray(n.tune,["auto","iq","psnr","ssim"]))this.options.heifLossless&&n.tune==="iq"?this.options.heifTune="ssim":this.options.heifTune=n.tune;else throw O.invalidParameterError("tune","one of: auto, iq, psnr, ssim",n.tune)}else throw O.invalidParameterError("options","Object",n);return this._updateFormatOut("heif",n)}function Oxe(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jxlDistance=n.quality>=30?.1+(100-n.quality)*.09:53/3e3*n.quality*n.quality-23/20*n.quality+25;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);else if(O.defined(n.distance))if(O.number(n.distance)&&O.inRange(n.distance,0,15))this.options.jxlDistance=n.distance;else throw O.invalidParameterError("distance","number between 0.0 and 15.0",n.distance);if(O.defined(n.decodingTier))if(O.integer(n.decodingTier)&&O.inRange(n.decodingTier,0,4))this.options.jxlDecodingTier=n.decodingTier;else throw O.invalidParameterError("decodingTier","integer between 0 and 4",n.decodingTier);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.jxlLossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,9))this.options.jxlEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 9",n.effort)}return oF(n,this.options),this._updateFormatOut("jxl",n)}function bxe(n){if(O.object(n)&&O.defined(n.depth))if(O.string(n.depth)&&O.inArray(n.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=n.depth;else throw O.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",n.depth);return this._updateFormatOut("raw")}function Mxe(n){if(O.object(n)){if(O.defined(n.size))if(O.integer(n.size)&&O.inRange(n.size,1,8192))this.options.tileSize=n.size;else throw O.invalidParameterError("size","integer between 1 and 8192",n.size);if(O.defined(n.overlap))if(O.integer(n.overlap)&&O.inRange(n.overlap,0,8192)){if(n.overlap>this.options.tileSize)throw O.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,n.overlap);this.options.tileOverlap=n.overlap}else throw O.invalidParameterError("overlap","integer between 0 and 8192",n.overlap);if(O.defined(n.container))if(O.string(n.container)&&O.inArray(n.container,["fs","zip"]))this.options.tileContainer=n.container;else throw O.invalidParameterError("container","one of: fs, zip",n.container);if(O.defined(n.layout))if(O.string(n.layout)&&O.inArray(n.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=n.layout;else throw O.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",n.layout);if(O.defined(n.angle))if(O.integer(n.angle)&&!(n.angle%90))this.options.tileAngle=n.angle;else throw O.invalidParameterError("angle","positive/negative multiple of 90",n.angle);if(this._setBackgroundColourOption("tileBackground",n.background),O.defined(n.depth))if(O.string(n.depth)&&O.inArray(n.depth,["onepixel","onetile","one"]))this.options.tileDepth=n.depth;else throw O.invalidParameterError("depth","one of: onepixel, onetile, one",n.depth);if(O.defined(n.skipBlanks))if(O.integer(n.skipBlanks)&&O.inRange(n.skipBlanks,-1,65535))this.options.tileSkipBlanks=n.skipBlanks;else throw O.invalidParameterError("skipBlanks","integer between -1 and 255/65535",n.skipBlanks);else O.defined(n.layout)&&n.layout==="google"&&(this.options.tileSkipBlanks=5);let t=O.bool(n.center)?n.center:n.centre;if(O.defined(t)&&this._setBooleanOption("tileCentre",t),O.defined(n.id))if(O.string(n.id))this.options.tileId=n.id;else throw O.invalidParameterError("id","string",n.id);if(O.defined(n.basename))if(O.string(n.basename))this.options.tileBasename=n.basename;else throw O.invalidParameterError("basename","string",n.basename)}if(O.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw O.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function _xe(n){if(!O.plainObject(n))throw O.invalidParameterError("options","object",n);if(O.integer(n.seconds)&&O.inRange(n.seconds,0,3600))this.options.timeoutSeconds=n.seconds;else throw O.invalidParameterError("seconds","integer between 0 and 3600",n.seconds);return this}function Txe(n,t){return O.object(t)&&t.force===!1||(this.options.formatOut=n),this}function Nxe(n,t){if(O.bool(t))this.options[n]=t;else throw O.invalidParameterError(n,"boolean",t)}function Rxe(){if(!this.options.streamOut){this.options.streamOut=!0;let n=Error();this._pipeline(void 0,n)}}function kxe(n,t){return typeof n=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),mt.pipeline(this.options,(o,i,e)=>{o?n(O.nativeError(o,t)):n(null,i,e)})}):mt.pipeline(this.options,(o,i,e)=>{o?n(O.nativeError(o,t)):n(null,i,e)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),mt.pipeline(this.options,(o,i,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):mt.pipeline(this.options,(o,i,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((o,i)=>{this.once("finish",()=>{this._flattenBufferIn(),mt.pipeline(this.options,(e,a,A)=>{e?i(O.nativeError(e,t)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}):new Promise((o,i)=>{mt.pipeline(this.options,(e,a,A)=>{e?i(O.nativeError(e,t)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}var P$,txe,G$,F$,L$,U$=ue(()=>{cs();Vu();P$=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),txe=/\.(jp[2x]|j2[kc])$/i,G$=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),F$=n=>1<<31-Math.clz32(Math.ceil(Math.log2(n)));L$=n=>{Object.assign(n.prototype,{toFile:rxe,toBuffer:axe,toUint8Array:ixe,withDensity:oxe,keepExif:nxe,withExif:sxe,withExifMerge:gxe,keepIccProfile:cxe,withIccProfile:Ixe,keepGainMap:lxe,withGainMap:pxe,keepXmp:dxe,withXmp:hxe,keepMetadata:Exe,withMetadata:Cxe,toFormat:uxe,jpeg:Bxe,jp2:mxe,png:fxe,webp:Qxe,tiff:Sxe,avif:Dxe,heif:wxe,jxl:Oxe,gif:yxe,raw:bxe,tile:Mxe,timeout:_xe,_updateFormatOut:Txe,_setBooleanOption:Nxe,_read:Rxe,_pipeline:kxe})}});import vxe from"node:events";import{createRequire as Pxe}from"node:module";import{availableParallelism as Gxe}from"node:os";function K$(n){if(O.bool(n))return n?mt.cache(50,20,100):mt.cache(0,0,0);if(O.object(n)){for(let t of["memory","files","items"]){let o=n[t];if(O.defined(o)&&!(O.integer(o)&&o>=0))throw O.invalidParameterError(t,"a positive integer",o)}return mt.cache(n.memory,n.files,n.items)}else return mt.cache()}function Lxe(n){return mt.concurrency(O.integer(n)?n:null)}function Hxe(){return mt.counters()}function Kxe(n){return mt.simd(O.bool(n)?n:null)}function xxe(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))mt.block(n.operation,!0);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}function Yxe(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))mt.block(n.operation,!1);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}var Wu,nF,H$,sF,_c,Fxe,Yd,Uxe,x$,Y$=ue(()=>{Wu=Ve(CD(),1);cs();VG();Vu();_D();nF=Pxe(import.meta.url),H$=TD.runtimePlatformArch(),sF=mt.libvipsVersion(),_c=mt.format();_c.heif.output.alias=["avif","heic"];_c.jpeg.output.alias=["jpe","jpg"];_c.tiff.output.alias=["tif"];_c.jp2.output.alias=["j2c","j2k","jp2","jpx"];Fxe={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},Yd={vips:sF.semver};if(!sF.isGlobal)if(sF.isWasm)try{Yd=nF("@img/sharp-wasm32/versions")}catch{}else try{Yd=nF(`@img/sharp-${H$}/versions`)}catch{try{Yd=nF(`@img/sharp-libvips-${H$}/versions`)}catch{}}Yd.sharp=fg.version;Yd.heif&&_c.heif&&(_c.heif.input.fileSuffix=[".avif"],_c.heif.output.alias=["avif"]);K$(!0);!process.env.MALLOC_ARENA_MAX&&Wu.default.familySync()===Wu.default.GLIBC&&!mt._isUsingJemalloc()?mt.concurrency(1):Wu.default.familySync()===Wu.default.MUSL&&mt.concurrency()===1024&&mt.concurrency(Gxe());Uxe=new vxe.EventEmitter;x$=n=>{n.cache=K$,n.concurrency=Lxe,n.counters=Hxe,n.simd=Kxe,n.format=_c,n.interpolators=Fxe,n.versions=Yd,n.queue=Uxe,n.block=xxe,n.unblock=Yxe}});var j$={};Mr(j$,{default:()=>jxe});var jxe,J$=ue(()=>{o$();g$();h$();C$();f$();R$();v$();U$();Y$();s$(hs);d$(hs);E$(hs);B$(hs);N$(hs);k$(hs);L$(hs);x$(hs);jxe=hs});var Jxe,kA,Tc,Zu=ue(()=>{Jxe="End-Of-Stream",kA=class extends Error{constructor(){super(Jxe),this.name="EndOfStreamError"}},Tc=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}});var vD,q$=ue(()=>{vD=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((t,o)=>{this.reject=o,this.resolve=t})}}});var Nc,PD=ue(()=>{Zu();Nc=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(t,o=!1){let i=await this.read(t,o);return this.peekQueue.push(t.subarray(0,i)),i}async read(t,o=!1){if(t.length===0)return 0;let i=this.readFromPeekBuffer(t);if(this.endOfStream||(i+=await this.readRemainderFromStream(t.subarray(i),o)),i===0&&!o)throw new kA;return i}readFromPeekBuffer(t){let o=t.length,i=0;for(;this.peekQueue.length>0&&o>0;){let e=this.peekQueue.pop();if(!e)throw new Error("peekData should be defined");let a=Math.min(e.length,o);t.set(e.subarray(0,a),i),i+=a,o-=a,a{Zu();q$();PD();Xu=class extends Nc{constructor(t){if(super(),this.s=t,this.deferred=null,!t.read||!t.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",o=>this.reject(o)),this.s.once("close",()=>this.abort())}async readFromStream(t,o){if(t.length===0)return 0;let i=this.s.read(t.length);if(i)return t.set(i),i.length;let e={buffer:t,mayBeLess:o,deferred:new vD};return this.deferred=e.deferred,this.s.once("readable",()=>{this.readDeferred(e)}),e.deferred.promise}readDeferred(t){let o=this.s.read(t.buffer.length);o?(t.buffer.set(o),t.deferred.resolve(o.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(t)})}reject(t){this.interrupted=!0,this.deferred&&(this.deferred.reject(t),this.deferred=null)}async abort(){this.reject(new Tc)}async close(){return this.abort()}}});var GD,V$=ue(()=>{PD();GD=class extends Nc{constructor(t){super(),this.reader=t}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var $u,gF=ue(()=>{V$();$u=class extends GD{async readFromStream(t,o){if(t.length===0)return 0;let i=await this.reader.read(new Uint8Array(t.length),{min:o?void 0:t.length});return i.done&&(this.endOfStream=i.done),i.value?(t.set(i.value),i.value.length):0}}});var jd,cF=ue(()=>{Zu();PD();jd=class extends Nc{constructor(t){super(),this.reader=t,this.buffer=null}writeChunk(t,o){let i=Math.min(o.length,t.length);return t.set(o.subarray(0,i)),i{gF();cF()});var Rc=ue(()=>{Zu();z$();gF();cF();W$()});var mn,Jd=ue(()=>{Rc();mn=class{constructor(t){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=t?.onClose,t?.abortSignal&&t.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(t,o=this.position){let i=new Uint8Array(t.len);if(await this.readBuffer(i,{position:o})o)return this.position+=o,o}return this.position+=t,t}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(t,o){if(!this.supportsRandomAccess()&&o&&o.position!==void 0&&o.position{Jd();Rc();qxe=256e3,eB=class extends mn{constructor(t,o){super(o),this.streamReader=t,this.fileInfo=o?.fileInfo??{}}async readBuffer(t,o){let i=this.normalizeOptions(t,o),e=i.position-this.position;if(e>0)return await this.ignore(e),this.readBuffer(t,o);if(e<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(i.length===0)return 0;let a=await this.streamReader.read(t.subarray(0,i.length),i.mayBeLess);if(this.position+=a,(!o||!o.mayBeLess)&&a0){let A=new Uint8Array(i.length+a);return e=await this.peekBuffer(A,{mayBeLess:i.mayBeLess}),t.set(A.subarray(a)),e-a}if(a<0)throw new Error("Cannot peek from a negative offset in a stream")}if(i.length>0){try{e=await this.streamReader.peek(t.subarray(0,i.length),i.mayBeLess)}catch(a){if(o?.mayBeLess&&a instanceof kA)return 0;throw a}if(!i.mayBeLess&&e{Rc();Jd();FD=class extends mn{constructor(t,o){super(o),this.uint8Array=t,this.fileInfo={...o?.fileInfo??{},size:t.length}}async readBuffer(t,o){o?.position&&(this.position=o.position);let i=await this.peekBuffer(t,o);return this.position+=i,i}async peekBuffer(t,o){let i=this.normalizeOptions(t,o),e=Math.min(this.uint8Array.length-i.position,i.length);if(!i.mayBeLess&&e{Rc();Jd();LD=class extends mn{constructor(t,o){super(o),this.blob=t,this.fileInfo={...o?.fileInfo??{},size:t.size,mimeType:t.type}}async readBuffer(t,o){o?.position&&(this.position=o.position);let i=await this.peekBuffer(t,o);return this.position+=i,i}async peekBuffer(t,o){let i=this.normalizeOptions(t,o),e=Math.min(this.blob.size-i.position,i.length);if(!i.mayBeLess&&e{if(await o.close(),e)return e()},new eB(o,i)}function UD(n,t){let o=IF(n),i=t??{},e=i.onClose;return i.onClose=async()=>{if(await o.close(),e)return e()},new eB(o,i)}function Ao(n,t){return new FD(n,t)}function HD(n,t){return new LD(n,t)}var KD=ue(()=>{Rc();Z$();X$();$$();Rc();Jd()});import{open as Vxe}from"node:fs/promises";var qd,lF=ue(()=>{Jd();Rc();qd=class n extends mn{static async fromFile(t){let o=await Vxe(t,"r"),i=await o.stat();return new n(o,{fileInfo:{path:t,size:i.size}})}constructor(t,o){super(o),this.fileHandle=t,this.fileInfo=o.fileInfo}async readBuffer(t,o){let i=this.normalizeOptions(t,o);if(this.position=i.position,i.length===0)return 0;let e=await this.fileHandle.read(t,0,i.length,i.position);if(this.position+=e.bytesRead,e.bytesRead{KD();lF();lF();KD();Aee=qd.fromFile});var tee=$(dF=>{dF.read=function(n,t,o,i,e){var a,A,r=e*8-i-1,s=(1<>1,c=-7,I=o?e-1:0,d=o?-1:1,B=n[t+I];for(I+=d,a=B&(1<<-c)-1,B>>=-c,c+=r;c>0;a=a*256+n[t+I],I+=d,c-=8);for(A=a&(1<<-c)-1,a>>=-c,c+=i;c>0;A=A*256+n[t+I],I+=d,c-=8);if(a===0)a=1-g;else{if(a===s)return A?NaN:(B?-1:1)*(1/0);A=A+Math.pow(2,i),a=a-g}return(B?-1:1)*A*Math.pow(2,a-i)};dF.write=function(n,t,o,i,e,a){var A,r,s,g=a*8-e-1,c=(1<>1,d=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=i?0:a-1,f=i?1:-1,Q=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,A=c):(A=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-A))<1&&(A--,s*=2),A+I>=1?t+=d/s:t+=d*Math.pow(2,1-I),t*s>=2&&(A++,s/=2),A+I>=c?(r=0,A=c):A+I>=1?(r=(t*s-1)*Math.pow(2,e),A=A+I):(r=t*Math.pow(2,I-1)*Math.pow(2,e),A=0));e>=8;n[o+B]=r&255,B+=f,r/=256,e-=8);for(A=A<0;n[o+B]=A&255,B+=f,A/=256,g-=8);n[o+B-f]|=Q*128}});function Zxe(){if(!(typeof globalThis.TextDecoder>"u"))return xD??(xD=new globalThis.TextDecoder("utf-8"))}function Xxe(){if(!(typeof globalThis.TextEncoder>"u"))return YD??(YD=new globalThis.TextEncoder)}function fr(n,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=Zxe();return o?o.decode(n):eYe(n)}case"utf-16le":return AYe(n);case"us-ascii":case"ascii":return tYe(n);case"latin1":case"iso-8859-1":return rYe(n);case"windows-1252":return aYe(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function aee(n="",t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=Xxe();return o?o.encode(n):iYe(n)}case"utf-16le":return oYe(n);case"us-ascii":case"ascii":return nYe(n);case"latin1":case"iso-8859-1":return sYe(n);case"windows-1252":return gYe(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function EF(n,t){t.length!==0&&(n.push(String.fromCharCode.apply(null,t)),t.length=0)}function wr(n,t,o){t.push(o),t.length>=zd&&EF(n,t)}function $xe(n,t,o){if(o<=65535){wr(n,t,o);return}o-=65536,wr(n,t,55296+(o>>10)),wr(n,t,56320+(o&1023))}function eYe(n){let t=[],o=[],i=0;for(n.length>=3&&n[0]===239&&n[1]===187&&n[2]===191&&(i=3);i244){wr(t,o,Qa),i++;continue}if(e<=223){if(i+1>=n.length){wr(t,o,Qa),i++;continue}let c=n[i+1];if((c&192)!==128){wr(t,o,Qa),i++;continue}let I=(e&31)<<6|c&63;wr(t,o,I),i+=2;continue}if(e<=239){if(i+2>=n.length){wr(t,o,Qa),i++;continue}let c=n[i+1],I=n[i+2];if(!((c&192)===128&&(I&192)===128&&!(e===224&&c<160)&&!(e===237&&c>=160))){wr(t,o,Qa),i++;continue}let B=(e&15)<<12|(c&63)<<6|I&63;wr(t,o,B),i+=3;continue}if(i+3>=n.length){wr(t,o,Qa),i++;continue}let a=n[i+1],A=n[i+2],r=n[i+3];if(!((a&192)===128&&(A&192)===128&&(r&192)===128&&!(e===240&&a<144)&&!(e===244&&a>143))){wr(t,o,Qa),i++;continue}let g=(e&7)<<18|(a&63)<<12|(A&63)<<6|r&63;$xe(t,o,g),i+=4}return EF(t,o),t.join("")}function AYe(n){let t=[],o=[],i=n.length,e=0;for(;e+1=55296&&a<=56319){if(e+1=56320&&A<=57343?(wr(t,o,a),wr(t,o,A),e+=2):wr(t,o,Qa)}else wr(t,o,Qa);continue}if(a>=56320&&a<=57343){wr(t,o,Qa);continue}wr(t,o,a)}return e=128&&e<=159?ree[e]:void 0;o+=a??String.fromCharCode(e),o.length>=zd&&(t.push(o),o="")}return o&&t.push(o),t.join("")}function iYe(n){let t=[];for(let o=0;o=55296&&i<=56319)if(o+1=56320&&e<=57343?(i=65536+(i-55296<<10)+(e-56320),o++):i=Qa}else i=Qa;else i>=56320&&i<=57343&&(i=Qa);i<128?t.push(i):i<2048?t.push(192|i>>6,128|i&63):i<65536?t.push(224|i>>12,128|i>>6&63,128|i&63):t.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63)}return new Uint8Array(t)}function oYe(n){let t=[];for(let i=0;i=55296&&e<=56319){if(i+1=56320&&a<=57343?(t.push(e,a),i++):t.push(Qa)}else t.push(Qa);continue}if(e>=56320&&e<=57343){t.push(Qa);continue}t.push(e)}let o=new Uint8Array(t.length*2);for(let i=0;i>>8}return o}function nYe(n){let t=new Uint8Array(n.length);for(let o=0;o=0&&e<=127||e>=160&&e<=255){t[o]=e;continue}t[o]=63}return t}var ree,hF,xD,YD,zd,Qa,Cs=ue(()=>{ree={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},hF={};for(let[n,t]of Object.entries(ree))hF[t]=Number.parseInt(n,10);zd=32*1024,Qa=65533});var VA={};Mr(VA,{AnsiStringType:()=>uF,Float16_BE:()=>lYe,Float16_LE:()=>pYe,Float32_BE:()=>fF,Float32_LE:()=>dYe,Float64_BE:()=>JD,Float64_LE:()=>hYe,Float80_BE:()=>EYe,Float80_LE:()=>CYe,INT16_BE:()=>Fo,INT16_LE:()=>cYe,INT24_BE:()=>jD,INT24_LE:()=>IYe,INT32_BE:()=>Xa,INT32_LE:()=>sr,INT64_BE:()=>BF,INT64_LE:()=>rB,INT8:()=>Bs,IgnoreType:()=>CF,StringType:()=>ze,UINT16_BE:()=>LA,UINT16_LE:()=>SA,UINT24_BE:()=>Or,UINT24_LE:()=>tB,UINT32_BE:()=>xe,UINT32_LE:()=>Fe,UINT64_BE:()=>fs,UINT64_LE:()=>br,UINT8:()=>fA,Uint8ArrayType:()=>Dt});function zA(n){return new DataView(n.buffer,n.byteOffset)}var us,fA,SA,LA,tB,Or,Fe,xe,Bs,Fo,cYe,IYe,jD,Xa,sr,br,rB,fs,BF,lYe,pYe,fF,dYe,JD,hYe,EYe,CYe,CF,Dt,ze,uF,wA=ue(()=>{us=Ve(tee(),1);Cs();fA={len:1,get(n,t){return zA(n).getUint8(t)},put(n,t,o){return zA(n).setUint8(t,o),t+1}},SA={len:2,get(n,t){return zA(n).getUint16(t,!0)},put(n,t,o){return zA(n).setUint16(t,o,!0),t+2}},LA={len:2,get(n,t){return zA(n).getUint16(t)},put(n,t,o){return zA(n).setUint16(t,o),t+2}},tB={len:3,get(n,t){let o=zA(n);return o.getUint8(t)+(o.getUint16(t+1,!0)<<8)},put(n,t,o){let i=zA(n);return i.setUint8(t,o&255),i.setUint16(t+1,o>>8,!0),t+3}},Or={len:3,get(n,t){let o=zA(n);return(o.getUint16(t)<<8)+o.getUint8(t+2)},put(n,t,o){let i=zA(n);return i.setUint16(t,o>>8),i.setUint8(t+2,o&255),t+3}},Fe={len:4,get(n,t){return zA(n).getUint32(t,!0)},put(n,t,o){return zA(n).setUint32(t,o,!0),t+4}},xe={len:4,get(n,t){return zA(n).getUint32(t)},put(n,t,o){return zA(n).setUint32(t,o),t+4}},Bs={len:1,get(n,t){return zA(n).getInt8(t)},put(n,t,o){return zA(n).setInt8(t,o),t+1}},Fo={len:2,get(n,t){return zA(n).getInt16(t)},put(n,t,o){return zA(n).setInt16(t,o),t+2}},cYe={len:2,get(n,t){return zA(n).getInt16(t,!0)},put(n,t,o){return zA(n).setInt16(t,o,!0),t+2}},IYe={len:3,get(n,t){let o=tB.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let i=zA(n);return i.setUint8(t,o&255),i.setUint16(t+1,o>>8,!0),t+3}},jD={len:3,get(n,t){let o=Or.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let i=zA(n);return i.setUint16(t,o>>8),i.setUint8(t+2,o&255),t+3}},Xa={len:4,get(n,t){return zA(n).getInt32(t)},put(n,t,o){return zA(n).setInt32(t,o),t+4}},sr={len:4,get(n,t){return zA(n).getInt32(t,!0)},put(n,t,o){return zA(n).setInt32(t,o,!0),t+4}},br={len:8,get(n,t){return zA(n).getBigUint64(t,!0)},put(n,t,o){return zA(n).setBigUint64(t,o,!0),t+8}},rB={len:8,get(n,t){return zA(n).getBigInt64(t,!0)},put(n,t,o){return zA(n).setBigInt64(t,o,!0),t+8}},fs={len:8,get(n,t){return zA(n).getBigUint64(t)},put(n,t,o){return zA(n).setBigUint64(t,o),t+8}},BF={len:8,get(n,t){return zA(n).getBigInt64(t)},put(n,t,o){return zA(n).setBigInt64(t,o),t+8}},lYe={len:2,get(n,t){return us.read(n,t,!1,10,this.len)},put(n,t,o){return us.write(n,o,t,!1,10,this.len),t+this.len}},pYe={len:2,get(n,t){return us.read(n,t,!0,10,this.len)},put(n,t,o){return us.write(n,o,t,!0,10,this.len),t+this.len}},fF={len:4,get(n,t){return zA(n).getFloat32(t)},put(n,t,o){return zA(n).setFloat32(t,o),t+4}},dYe={len:4,get(n,t){return zA(n).getFloat32(t,!0)},put(n,t,o){return zA(n).setFloat32(t,o,!0),t+4}},JD={len:8,get(n,t){return zA(n).getFloat64(t)},put(n,t,o){return zA(n).setFloat64(t,o),t+8}},hYe={len:8,get(n,t){return zA(n).getFloat64(t,!0)},put(n,t,o){return zA(n).setFloat64(t,o,!0),t+8}},EYe={len:10,get(n,t){return us.read(n,t,!1,63,this.len)},put(n,t,o){return us.write(n,o,t,!1,63,this.len),t+this.len}},CYe={len:10,get(n,t){return us.read(n,t,!0,63,this.len)},put(n,t,o){return us.write(n,o,t,!0,63,this.len),t+this.len}},CF=class{constructor(t){this.len=t}get(t,o){}},Dt=class{constructor(t){this.len=t}get(t,o){return t.subarray(o,o+this.len)}},ze=class{constructor(t,o){this.len=t,this.encoding=o}get(t,o=0){let i=t.subarray(o,o+this.len);return fr(i,this.encoding)}},uF=class extends ze{constructor(t){super(t,"windows-1252")}}});var sl,QF,iee,oee,nee,see=ue(()=>{wA();sl={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},QF={get(n){return{signature:Fe.get(n,0),compressedSize:Fe.get(n,8),uncompressedSize:Fe.get(n,12)}},len:16},iee={get(n){let t=SA.get(n,6);return{signature:Fe.get(n,0),minVersion:SA.get(n,4),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,8),compressedSize:Fe.get(n,18),uncompressedSize:Fe.get(n,22),filenameLength:SA.get(n,26),extraFieldLength:SA.get(n,28),filename:null}},len:30},oee={get(n){return{signature:Fe.get(n,0),nrOfThisDisk:SA.get(n,4),nrOfThisDiskWithTheStart:SA.get(n,6),nrOfEntriesOnThisDisk:SA.get(n,8),nrOfEntriesOfSize:SA.get(n,10),sizeOfCd:Fe.get(n,12),offsetOfStartOfCd:Fe.get(n,16),zipFileCommentLength:SA.get(n,20)}},len:22},nee={get(n){let t=SA.get(n,8);return{signature:Fe.get(n,0),minVersion:SA.get(n,6),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,10),compressedSize:Fe.get(n,20),uncompressedSize:Fe.get(n,24),filenameLength:SA.get(n,28),extraFieldLength:SA.get(n,30),fileCommentLength:SA.get(n,32),relativeOffsetOfLocalHeader:Fe.get(n,42),filename:null}},len:46}});function cee(n){let t=new Uint8Array(Fe.len);return Fe.put(t,0,n),t}function BYe(n,t){let o=n.length,i=t.length;if(i>o)return-1;for(let e=0;e<=o-i;e++){let a=!0;for(let A=0;Ae+a.length,0),o=new Uint8Array(t),i=0;for(let e of n)o.set(e,i),i+=e.length;return o}var gee,Qs,yF,uYe,qD,gl,Iee=ue(()=>{wA();gee=Ve(ct(),1);see();Qs=(0,gee.default)("tokenizer:inflate"),yF=256*1024,uYe=cee(sl.DataDescriptor),qD=cee(sl.EndOfCentralDirectory),gl=class n{constructor(t){this.tokenizer=t,this.syncBuffer=new Uint8Array(yF)}async isZip(){return await this.peekSignature()===sl.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(Fe)}async findEndOfCentralDirectoryLocator(){let t=this.tokenizer,o=Math.min(16*1024,t.fileInfo.size),i=this.syncBuffer.subarray(0,o);await this.tokenizer.readBuffer(i,{position:t.fileInfo.size-o});for(let e=i.length-4;e>=0;e--)if(i[e]===qD[0]&&i[e+1]===qD[1]&&i[e+2]===qD[2]&&i[e+3]===qD[3])return t.fileInfo.size-o+e;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Qs("Cannot reading central-directory without random-read support");return}Qs("Reading central-directory...");let t=this.tokenizer.position,o=await this.findEndOfCentralDirectoryLocator();if(o>0){Qs("Central-directory 32-bit signature found");let i=await this.tokenizer.readToken(oee,o),e=[];this.tokenizer.setPosition(i.offsetOfStartOfCd);for(let a=0;a=0?g:s;if(a.handler){let I=new Uint8Array(c);await this.tokenizer.readBuffer(I),r.push(I)}else await this.tokenizer.ignore(c)}Qs(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),a.handler&&await this.inflate(e,fYe(r),a.handler)}else a.handler?(Qs(`Reading compressed-file-data: ${e.compressedSize} bytes`),A=new Uint8Array(e.compressedSize),await this.tokenizer.readBuffer(A),await this.inflate(e,A,a.handler)):(Qs(`Ignoring compressed-file-data: ${e.compressedSize} bytes`),await this.tokenizer.ignore(e.compressedSize));if(Qs(`Reading data-descriptor at pos=${this.tokenizer.position}`),e.dataDescriptor&&(await this.tokenizer.readToken(QF)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-QF.len}`)}while(!i)}async iterateOverCentralDirectory(t,o){for(let i of t){let e=o(i);if(e.handler){this.tokenizer.setPosition(i.relativeOffsetOfLocalHeader);let a=await this.readLocalFileHeader();if(a){await this.tokenizer.ignore(a.extraFieldLength);let A=new Uint8Array(i.compressedSize);await this.tokenizer.readBuffer(A),await this.inflate(a,A,e.handler)}}if(e.stop)break}}async inflate(t,o,i){if(t.compressedMethod===0)return i(o);if(t.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${t.compressedMethod}`);Qs(`Decompress filename=${t.filename}, compressed-size=${o.length}`);let e=await n.decompressDeflateRaw(o);return i(e)}static async decompressDeflateRaw(t){let o=new ReadableStream({start(a){a.enqueue(t),a.close()}}),i=new DecompressionStream("deflate-raw"),e=o.pipeThrough(i);try{let A=await new Response(e).arrayBuffer();return new Uint8Array(A)}catch(a){let A=a instanceof Error?`Failed to deflate ZIP entry: ${a.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(A)}}async readLocalFileHeader(){let t=await this.tokenizer.peekToken(Fe);if(t===sl.LocalFileHeader){let o=await this.tokenizer.readToken(iee);return o.filename=await this.tokenizer.readToken(new ze(o.filenameLength,"utf-8")),o}if(t===sl.CentralFileHeader)return!1;throw t===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var aB,lee=ue(()=>{aB=class{constructor(t){this.tokenizer=t}inflate(){let t=this.tokenizer;return new ReadableStream({async pull(o){let i=new Uint8Array(1024),e=await t.readBuffer(i,{mayBeLess:!0});if(e===0){o.close();return}o.enqueue(i.subarray(0,e))}}).pipeThrough(new DecompressionStream("gzip"))}}});var pee=ue(()=>{Iee();lee()});function mYe(n,t,o){return n?n.constructor===t?!0:QYe.call(n)===o:!1}function SYe(n){return mYe(n,Uint8Array,yYe)}function DYe(n){if(!SYe(n))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n}\``)}function zD(n){DYe(n);let t="";for(let o=0;o{QYe=Object.prototype.toString,yYe="[object Uint8Array]";quA={utf8:new globalThis.TextDecoder("utf8")},zuA=new globalThis.TextEncoder,wYe=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"))});function dee(n,t){if(t==="utf-16le"){let o=[];for(let i=0;i>8&255)}return o}if(t==="utf-16be"){let o=[];for(let i=0;i>8&255,e&255)}return o}return[...n].map(o=>o.charCodeAt(0))}function hee(n,t=0){let o=Number.parseInt(new ze(6).get(n,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(o))return!1;let i=256;for(let e=t;e{wA();Eee={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4}});var uee,Bee,fee=ue(()=>{uee=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],Bee=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"]});function UYe(n){let t=n?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return n;let{reader:o}=t,i=async()=>{await o.cancel(),o.releaseLock()};return t.close=i,t.abort=async()=>{t.interrupted=!0,await i()},n}function wF(n,t,o){if(!Number.isFinite(n)||n<0||n>t)throw new mg(`${o} has invalid size ${n} (maximum ${t} bytes)`);return n}async function kc(n,t,{maximumLength:o=Lo,reason:i="skip"}={}){let e=wF(t,o,i);await n.ignore(e)}async function SF(n,t,o,{maximumLength:i=t.length,reason:e="read"}={}){let a=o?.length??t.length,A=wF(a,i,e);return n.readBuffer(t,{...o,length:A})}async function HYe(n,{maximumLength:t=ms}={}){let e=new ReadableStream({start(g){g.enqueue(n),g.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),a=[],A=0;try{for(;;){let{done:g,value:c}=await e.read();if(g)break;if(A+=c.length,A>t)throw await e.cancel(),new Error(`ZIP entry decompressed data exceeds ${t} bytes`);a.push(c)}}finally{e.releaseLock()}let r=new Uint8Array(A),s=0;for(let g of a)r.set(g,s),s+=g.length;return r}function xYe(n,t){if(n.length=0?0:r===e?Math.min(KYe,r-1):0,c=s>=0?s:r-g;if(c===0)break;if(A+=c,A>o)throw new Error(`ZIP entry compressed data exceeds ${o} bytes`);if(t){let I=new Uint8Array(c);await n.tokenizer.readBuffer(I),a.push(I)}else await n.tokenizer.ignore(c);if(s>=0)break}if($a(n.tokenizer)||(n.knownSizeDescriptorScannedBytes+=A),!!t)return jYe(a,A)}function qYe(n,t){return $a(n.tokenizer)?Math.max(0,Lo-(n.tokenizer.position-t)):Math.max(0,ms-n.knownSizeDescriptorScannedBytes)}async function zYe(n,t,{shouldBuffer:o,maximumDescriptorLength:i=ms}={}){if(t.dataDescriptor&&t.compressedSize===0)return JYe(n,{shouldBuffer:o,maximumLength:i});if(!o){await kc(n.tokenizer,t.compressedSize,{maximumLength:$a(n.tokenizer)?ms:n.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let e=e1e(n.tokenizer);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>e)throw new Error(`ZIP entry compressed data exceeds ${e} bytes`);let a=new Uint8Array(t.compressedSize);return await n.tokenizer.readBuffer(a),a}function VYe(n,t){let o=n.getReader(),i=0,e=!1,a=!1,A=async r=>{e||a||(a=!0,await o.cancel(r))};return new ReadableStream({async pull(r){if(i>=t){r.close(),await A();return}let{done:s,value:g}=await o.read();if(s||!g){e=!0,r.close();return}let c=t-i;if(g.length>c){r.enqueue(g.subarray(0,c)),i+=c,r.close(),await A();return}r.enqueue(g),i+=g.length},async cancel(r){await A(r)}})}async function gB(n,t){return new DF(t).fromBuffer(n)}function _ee(n){switch(n=n.toLowerCase(),n){case"application/epub+zip":return{ext:"epub",mime:n};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:n};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:n};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:n};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:n};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:n};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:n};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:n};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:n};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:n};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:n};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:n};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:n};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:n};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:n};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:n};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function ys(n,t,o){o={offset:0,...o};for(let[i,e]of t.entries())if(o.mask){if(e!==(o.mask[i]&n[i+o.offset]))return!1}else if(e!==n[i+o.offset])return!1;return!0}function WYe(n){return Number.isFinite(n)?Math.max(1,Math.trunc(n)):nB}function ZYe(n,t,o){return o===void 0?n.read(t):(o.throwIfAborted(),new Promise((i,e)=>{let a=()=>{o.removeEventListener("abort",A)},A=()=>{let r=o.reason;a(),(async()=>{try{await n.cancel(r)}catch{}})(),e(r)};o.addEventListener("abort",A,{once:!0}),(async()=>{try{let r=await n.read(t);a(),i(r)}catch(r){a(),e(r)}})()}))}function XYe(n){return Number.isFinite(n)?Math.max(0,Math.min(OYe,Math.trunc(n))):0}function $Ye(n){return Number.isFinite(n)?Math.max(0,n):Number.MAX_SAFE_INTEGER}function $a(n){let t=n.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function sB(n,t,o){return $a(n)&&n.position-t>o}function e1e(n){let t=n.fileInfo.size,o=Number.isFinite(t)?Math.max(0,t-n.position):Number.MAX_SAFE_INTEGER;return Math.min(o,bYe)}function A1e(n){if(n instanceof kA||n instanceof mg)return!0;if(!(n instanceof Error))return!1;if(GYe.has(n.message)||LYe.has(n.code))return!0;for(let t of FYe)if(n.message.startsWith(t))return!0;return!1}function Tee(n,t=ms){let o=[n.compressedSize,n.uncompressedSize];for(let i of o)if(!Number.isFinite(i)||i<0||i>t)return!1;return!0}function t1e(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function r1e(n,t){t.startsWith("word/")&&(n.hasWordDirectory=!0),t.startsWith("ppt/")&&(n.hasPresentationDirectory=!0),t.startsWith("xl/")&&(n.hasSpreadsheetDirectory=!0),t.startsWith("3D/")&&t.endsWith(".model")&&(n.hasThreeDimensionalModelEntry=!0)}function Nee(n){if(!(!n.hasContentTypesEntry||n.hasUnparseableContentTypes||n.isParsingContentTypes||n.hasParsedContentTypesEntry)){if(n.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(n.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(n.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(n.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function a1e(n){let t=n.indexOf('.main+xml"');if(t===-1){let e="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return n.includes(`ContentType="${e}"`)?e:void 0}let o=n.slice(0,t),i=o.lastIndexOf('"');return o.slice(i+1)}var nB,OYe,ms,Qee,bYe,Lo,WD,yee,MYe,_Ye,mee,mF,See,Dee,TYe,NYe,RYe,kYe,vYe,wee,Oee,bee,PYe,Mee,GYe,FYe,LYe,mg,Ree,VD,KYe,DF,i1e,o1e,kee=ue(()=>{wA();KD();pee();oB();Cee();fee();nB=4100,OYe=nB-2,ms=1024*1024,Qee=1024,bYe=2**31-1,Lo=16*1024*1024,WD=ms,yee=ms,MYe=Lo,_Ye=1,mee=100,mF=Lo,See=64,Dee=WD,TYe=256,NYe=512,RYe=Lo,kYe=512,vYe=512,wee=256,Oee=WD,bee=WD,PYe=WD,Mee=Lo,GYe=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),FYe=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],LYe=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),mg=class extends Error{};Ree=134695760,VD=16,KYe=VD-1;gl.prototype.inflate=async function(n,t,o){if(n.compressedMethod===0)return o(t);if(n.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${n.compressedMethod}`);let i=await HYe(t,{maximumLength:ms});return o(i)};gl.prototype.unzip=async function(n){let t=!1,o=0,i=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(sB(this.tokenizer,i,Lo))throw new mg(`ZIP stream probing exceeds ${Lo} bytes`);let e=await this.readLocalFileHeader();if(!e)break;if(o++,o>Qee)throw new Error(`ZIP entry count exceeds ${Qee}`);let a=n(e);t=!!a.stop,await this.tokenizer.ignore(e.extraFieldLength);let A=await zYe(this,e,{shouldBuffer:!!a.handler,maximumDescriptorLength:Math.min(ms,qYe(this,i))});if(a.handler&&await this.inflate(e,A,a.handler),e.dataDescriptor){let r=new Uint8Array(VD);if(await this.tokenizer.readBuffer(r),Fe.get(r,0)!==Ree)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-r.length}`)}if(sB(this.tokenizer,i,Lo))throw new mg(`ZIP stream probing exceeds ${Lo} bytes`)}while(!t)};DF=class n{constructor(t){let o=XYe(t?.mpegOffsetTolerance);this.options={...t,mpegOffsetTolerance:o},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(t){return UYe(UD(t,this.getTokenizerOptions()))}async parseTokenizer(t,o=0){this.detectionReentryCount=o;let i=t.position;for(let e of this.detectors){let a;try{a=await e.detect(t)}catch(A){if(A instanceof kA||A instanceof mg)return;throw A}if(a)return a;if(i!==t.position)return}}async fromTokenizer(t){try{return await this.parseTokenizer(t)}finally{await t.close()}}async fromBuffer(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``);let o=t instanceof Uint8Array?t:new Uint8Array(t);if(o?.length>1)return this.fromTokenizer(Ao(o,this.getTokenizerOptions()))}async fromBlob(t){this.options.signal?.throwIfAborted();let o=HD(t,this.getTokenizerOptions());return this.fromTokenizer(o)}async fromStream(t){this.options.signal?.throwIfAborted();let o=this.createTokenizerFromWebStream(t);return this.fromTokenizer(o)}async toDetectionStream(t,o){let i=WYe(o?.sampleSize??nB),e,a,A=t.getReader({mode:"byob"});try{let{value:g,done:c}=await ZYe(A,new Uint8Array(i),this.options.signal);if(a=g,!c&&g)try{e=await this.fromBuffer(g.subarray(0,i))}catch(I){if(!(I instanceof kA))throw I;e=void 0}a=g}finally{A.releaseLock()}let r=new TransformStream({async start(g){g.enqueue(a)},transform(g,c){c.enqueue(g)}}),s=t.pipeThrough(r);return s.fileType=e,s}async detectGzip(t){if(this.gzipProbeDepth>=_Ye)return{ext:"gz",mime:"application/gzip"};let o=new aB(t),i=VYe(o.inflate(),MYe),e=$a(t),a,A,r,s;if(e){let g=new AbortController;a=setTimeout(()=>{g.abort(new DOMException(`Operation timed out after ${mee} ms`,"TimeoutError"))},mee),A=this.options.signal===void 0?g.signal:AbortSignal.any([this.options.signal,g.signal]),r=new n({...this.options,signal:A}),r.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{s=await(r??this).fromStream(i)}catch(g){if(g?.name==="AbortError"&&A?.reason?.name!=="TimeoutError")throw g}finally{clearTimeout(a),e||this.gzipProbeDepth--}return s?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(t,o){return ys(this.buffer,t,o)}checkString(t,o){return this.check(dee(t,o?.encoding),o)}detectConfident=async t=>{if(this.buffer=new Uint8Array(nB),t.fileInfo.size===void 0&&(t.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=t,$a(t)&&(await t.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(t);if(await t.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await t.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=wee?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(t));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(t);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await kc(t,6,{maximumLength:6,reason:"ID3 header prefix"});let o=await t.readToken(Eee),i=$a(t);if(!Number.isFinite(o)||o<0||i&&(o>mF||t.position+o>mF))return;if(t.position+o>t.fileInfo.size)return i?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await kc(t,o,{maximumLength:i?mF:t.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof kA)return;throw e}return this.detectionReentryCount>=wee?void 0:(this.detectionReentryCount++,this.parseTokenizer(t,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let o,i=t1e();try{await new gl(t).unzip(e=>{r1e(i,e.filename);let a=e.filename==="[Content_Types].xml",A=Nee(i);if(!a&&A)return o=A,{stop:!0};switch(e.filename){case"META-INF/mozilla.rsa":return o={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return o={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return Tee(e,yee)?{async handler(r){let s=new TextDecoder("utf-8").decode(r).trim();o=_ee(s)},stop:!0}:{};case"[Content_Types].xml":return i.hasContentTypesEntry=!0,Tee(e,yee)?(i.isParsingContentTypes=!0,{async handler(r){let s=new TextDecoder("utf-8").decode(r),g=a1e(s);g&&(o=_ee(g)),i.hasParsedContentTypesEntry=!0,i.isParsingContentTypes=!1},stop:!0}):(i.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(e.filename)?(o={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(e){if(!A1e(e))throw e;i.isParsingContentTypes&&(i.isParsingContentTypes=!1,i.hasUnparseableContentTypes=!0)}return o??Nee(i)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await t.ignore(28);let o=new Uint8Array(8);return await t.readBuffer(o),ys(o,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:ys(o,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:ys(o,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:ys(o,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:ys(o,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:ys(o,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let o=await this.readTiffHeader(!1);if(o)return o}if(this.check([77,77])){let o=await this.readTiffHeader(!0);if(o)return o}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function o(){let s=await t.peekNumber(fA),g=128,c=0;for(;(s&g)===0&&g!==0;)++c,g>>=1;let I=new Uint8Array(c+1);return await SF(t,I,void 0,{maximumLength:I.length,reason:"EBML field"}),I}async function i(){let s=await o(),g=await o();g[0]^=128>>g.length-1;let c=Math.min(6,g.length),I=new DataView(s.buffer),d=new DataView(g.buffer,g.length-c,c);return{id:iB(I),len:iB(d)}}async function e(s){let g=0;for(;s>0;){if(g++,g>TYe||sB(t,A,Lo))return;let c=t.position,I=await i();if(I.id===17026){if(I.len>See)return;let d=wF(I.len,See,"EBML DocType");return(await t.readToken(new ze(d))).replaceAll(/\00.*$/g,"")}if($a(t)&&(!Number.isFinite(I.len)||I.len<0||I.len>Dee)||(await kc(t,I.len,{maximumLength:$a(t)?Dee:t.fileInfo.size,reason:"EBML payload"}),--s,t.position<=c))return}}let a=await i(),A=t.position;switch(await e(a.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let o=xe.get(this.buffer,4),i=LA.get(this.buffer,6);if(o>0&&o<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(i>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("=1e3&&o<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!"))return await t.ignore(8),await t.readToken(new ze(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[` -`,"\r"," "," ","\0"].some(o=>this.checkString(o,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let o={ext:"png",mime:"image/png"},i={ext:"apng",mime:"image/apng"};await t.ignore(8);async function e(){return{length:await t.readToken(Xa),type:await t.readToken(new ze(4,"latin1"))}}let a=$a(t),A=t.position,r=0,s=!1;do{if(r++,r>NYe||sB(t,A,RYe))break;let g=t.position,c=await e();if(c.length<0)return;if(c.type==="IHDR"){if(c.length!==13)return;s=!0}switch(c.type){case"IDAT":return o;case"acTL":return i;default:if(!s&&c.type!=="CgBI")return;if(a&&c.length>Oee)return s&&YYe(c.type)?o:void 0;try{await kc(t,c.length+4,{maximumLength:a?Oee+4:t.fileInfo.size,reason:"PNG chunk payload"})}catch(I){if(!a&&(I instanceof mg||I instanceof kA))return o;throw I}}if(t.position<=g)break}while(t.position+8kYe||sB(t,a,Lo)));){let r=t.position,s=await i(),g=s.size-24;if(!Number.isFinite(g)||g<0){o=!0;break}if(ys(s.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let c=new Uint8Array(16);if(g-=await SF(t,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),ys(c,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(ys(c,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(e&&g>bee){o=!0;break}if(await kc(t,g,{maximumLength:e?bee:t.fileInfo.size,reason:"ASF header payload"}),t.position<=r){o=!0;break}}}catch(i){if(i instanceof kA||i instanceof mg)$a(t)&&(o=!0);else throw i}return o?void 0:{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await t.ignore(20),await t.readToken(new ze(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("=16){let o=new DataView(this.buffer.buffer).getUint32(12,!0);if(o>12&&this.buffer.length>=o+16)try{let i=new TextDecoder().decode(this.buffer.subarray(16,o+16));if(JSON.parse(i).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await t.peekBuffer(this.buffer,{length:Math.min(512,t.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&hee(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let o="utf-16le";return this.checkString("{this.buffer=new Uint8Array(nB);let o=$Ye(t.fileInfo.size);if(await t.peekBuffer(this.buffer,{length:Math.min(8,o),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await t.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,o),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let i=0;i<=this.options.mpegOffsetTolerance;++i){let e=this.scanMpeg(i);if(e)return e}};async readTiffTag(t){let o=await this.tokenizer.readToken(t?LA:SA);switch(await this.tokenizer.ignore(10),o){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(t){let o=await this.tokenizer.readToken(t?LA:SA);if(!(o>vYe)&&!($a(this.tokenizer)&&2+o*12>Mee))for(let i=0;i=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(e>=8){let r=(t?LA:SA).get(this.buffer,8),s=(t?LA:SA).get(this.buffer,10);if(r===28&&s===254||r===31&&s===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}if($a(this.tokenizer)&&e>PYe)return o;let a=$a(this.tokenizer)?Mee:this.tokenizer.fileInfo.size;try{await kc(this.tokenizer,e,{maximumLength:a,reason:"TIFF IFD offset"})}catch(r){if(r instanceof kA)return;throw r}let A;try{A=await this.readTiffIFD(t)}catch(r){if(r instanceof kA)return;throw r}return A??o}if(i===43)return o}scanMpeg(t){if(this.check([255,224],{offset:t,mask:[255,224]})){if(this.check([16],{offset:t+1,mask:[22]}))return this.check([8],{offset:t+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:t+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:t+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:t+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},i1e=new Set(uee),o1e=new Set(Bee)});var OF=ue(()=>{Go();kee()});var Hee=$(ZD=>{"use strict";Object.defineProperty(ZD,"__esModule",{value:!0});ZD.format=c1e;ZD.parse=I1e;var n1e=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,Pee=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,s1e=/[\\"]/g,g1e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Gee=(()=>{let n=function(){};return n.prototype=Object.create(null),n})();function c1e(n){let{type:t,parameters:o}=n;if(!t||!g1e.test(t))throw new TypeError(`Invalid type: ${t}`);let i=t;if(o)for(let e of Object.keys(o)){if(!Pee.test(e))throw new TypeError(`Invalid parameter name: ${e}`);i+=`; ${e}=${E1e(o[e])}`}return i}function I1e(n,t){let o=t?.comma===!0?d1e:65536,i=n.length,e=MF(n,t?.start??0,i),a=e;e=bF(n,e,i,o);let A=_F(n,a,e),r=n.slice(a,A).toLowerCase();return t?.parameters===!1?{type:r,index:e,parameters:new Gee}:h1e(n,r,e,i,o)}var Fee=32,Lee=9,Uee=59,l1e=61,vee=34,p1e=92,d1e=44;function h1e(n,t,o,i,e){let a=new Gee;e:for(;ot;){let i=n.charCodeAt(o-1);if(i!==Fee&&i!==Lee)break;o--}return o}function E1e(n){if(Pee.test(n))return n;if(n1e.test(n))return`"${n.replace(s1e,"\\$&")}"`;throw new TypeError(`Invalid parameter value: ${n}`)}});function Kee(n){if(!C1e.test(n))throw new TypeError(`Invalid media type: ${n}`);let t=n.indexOf("/"),o=n.slice(0,t).toLowerCase(),i=n.slice(t+1).toLowerCase(),e,a=i.lastIndexOf("+");return a!==-1&&(e=i.slice(a+1),i=i.slice(0,a)),{type:o,subtype:i,suffix:e}}var C1e,xee=ue(()=>{C1e=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/});var Yee,na,TF,NF=ue(()=>{Yee={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},na={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},TF={[na.video]:"video",[na.audio]:"audio",[na.complex]:"complex",[na.logo]:"logo",[na.subtitle]:"subtitle",[na.button]:"button",[na.control]:"control"}});var Vd,vc,Pc,RF,Uo,cl,Qt,Zt=ue(()=>{Vd=n=>class extends Error{constructor(o){super(o),this.name=n}},vc=class extends Vd("CouldNotDetermineFileTypeError"){},Pc=class extends Vd("UnsupportedFileTypeError"){},RF=class extends Vd("UnexpectedFileContentError"){constructor(t,o){super(o),this.fileType=t}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}},Uo=class extends Vd("FieldDecodingError"){},cl=class extends Vd("InternalParserError"){},Qt=n=>class extends RF{constructor(t){super(n,t)}}});function GA(n,t,o){return(n[t]&1<>a;let r=8-a,s=i-r;return s<0?A>>=8-a-i:s>0&&(A<<=s,A|=ZA(n,t,o+r,s)),A}function ya(n,t,o){return ZA(n,t,o,1)===1}function Jee(n){let t=[];for(let o=0,i=n.length;oo.trim().toLowerCase());if(t.length>=1){let o=Number.parseFloat(t[0]);return t.length===2&&t[1]==="db"?{dB:o,ratio:B1e(o)}:{dB:u1e(o),ratio:o}}}function kF(n){if(n.length===0)throw new Error("decodeUintBE: empty Uint8Array");let t=new DataView(n.buffer,n.byteOffset,n.byteLength);return iB(t)}var Xt=ue(()=>{wA();Zt();oB()});var Wd,Zd,Xd,vF,cB,PF,$d,$D,GF,Gc=ue(()=>{wA();Xt();Wd={0:"Other",1:"32x32 pixels 'file icon' (PNG only)",2:"Other file icon",3:"Cover (front)",4:"Cover (back)",5:"Leaflet page",6:"Media (e.g. label side of CD)",7:"Lead artist/lead performer/soloist",8:"Artist/performer",9:"Conductor",10:"Band/Orchestra",11:"Composer",12:"Lyricist/text writer",13:"Recording Location",14:"During recording",15:"During performance",16:"Movie/video screen capture",17:"A bright coloured fish",18:"Illustration",19:"Band/artist logotype",20:"Publisher/Studio logotype"},Zd={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},Xd={notSynchronized:0,mpegFrameNumber:1,milliseconds:2},vF={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4},cB={len:10,get:(n,t)=>({fileIdentifier:new ze(3,"ascii").get(n,t),version:{major:Bs.get(n,t+3),revision:Bs.get(n,t+4)},flags:{unsynchronisation:GA(n,t+5,7),isExtendedHeader:GA(n,t+5,6),expIndicator:GA(n,t+5,5),footer:GA(n,t+5,4)},size:vF.get(n,t+6)})},PF={len:10,get:(n,t)=>({size:xe.get(n,t),extendedFlags:LA.get(n,t+4),sizeOfPadding:xe.get(n,t+6),crcDataPresent:GA(n,t+4,31)})},$d={len:1,get:(n,t)=>{switch(n[t]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf-16le",bom:!0};case 2:return{encoding:"utf-16be",bom:!1};case 3:return{encoding:"utf8",bom:!1};default:return{encoding:"utf8",bom:!1}}}},$D={len:4,get:(n,t)=>({encoding:$d.get(n,t),language:new ze(3,"latin1").get(n,t+1)})},GF={len:6,get:(n,t)=>{let o=$D.get(n,t);return{encoding:o.encoding,language:o.language,timeStampFormat:fA.get(n,t+4),contentType:fA.get(n,t+5)}}}});var Il=ue(()=>{NF();Gc()});function zee(n){return ew[n]&&!ew[n].multiple}function Vee(n){return!ew[n].multiple||ew[n].unique||!1}var eA,ew,Wee=ue(()=>{eA={multiple:!1},ew={year:eA,track:eA,disk:eA,title:eA,artist:eA,artists:{multiple:!0,unique:!0},albumartist:eA,albumartists:{multiple:!0,unique:!0},album:eA,date:eA,originaldate:eA,originalyear:eA,releasedate:eA,comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:eA,subtitle:{multiple:!0},discsubtitle:eA,totaltracks:eA,totaldiscs:eA,compilation:eA,rating:{multiple:!0},bpm:eA,mood:eA,media:eA,catalognumber:{multiple:!0,unique:!0},tvShow:eA,tvShowSort:eA,tvSeason:eA,tvEpisode:eA,tvEpisodeId:eA,tvNetwork:eA,podcast:eA,podcasturl:eA,releasestatus:eA,releasetype:{multiple:!0},releasecountry:eA,script:eA,language:eA,copyright:eA,license:eA,encodedby:eA,encodersettings:eA,gapless:eA,barcode:eA,isrc:{multiple:!0},asin:eA,musicbrainz_recordingid:eA,musicbrainz_trackid:eA,musicbrainz_albumid:eA,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:eA,musicbrainz_workid:eA,musicbrainz_trmid:eA,musicbrainz_discid:eA,acoustid_id:eA,acoustid_fingerprint:eA,musicip_puid:eA,musicip_fingerprint:eA,website:eA,"performer:instrument":{multiple:!0,unique:!0},averageLevel:eA,peakLevel:eA,notes:{multiple:!0,unique:!1},key:eA,originalalbum:eA,originalartist:eA,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:eA,discogs_label_id:eA,discogs_master_release_id:eA,discogs_votes:eA,discogs_rating:eA,replaygain_track_peak:eA,replaygain_track_gain:eA,replaygain_album_peak:eA,replaygain_album_gain:eA,replaygain_track_minmax:eA,replaygain_album_minmax:eA,replaygain_undo:eA,description:{multiple:!0},longDescription:eA,category:{multiple:!0},hdVideo:eA,keywords:{multiple:!0},movement:eA,movementIndex:eA,movementTotal:eA,podcastId:eA,showMovement:eA,stik:eA,playCounter:eA}});var gr,Sg=ue(()=>{gr=class{static toIntOrNull(t){let o=Number.parseInt(t,10);return Number.isNaN(o)?null:o}static normalizeTrack(t){let o=t.toString().split("/");return{no:Number.parseInt(o[0],10)||null,of:Number.parseInt(o[1],10)||null}}constructor(t,o){this.tagTypes=t,this.tagMap=o}mapGenericTag(t,o){t={id:t.id,value:t.value},this.postMap(t,o);let i=this.getCommonName(t.id);return i?{id:i,value:t.value}:null}getCommonName(t){return this.tagMap[t]}postMap(t,o){}};gr.maxRatingScore=1});var f1e,Aw,Zee=ue(()=>{Sg();f1e={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"},Aw=class extends gr{constructor(){super(["ID3v1"],f1e)}}});var Ko,eh=ue(()=>{Sg();Ko=class extends gr{constructor(t,o){let i={};for(let e of Object.keys(o))i[e.toUpperCase()]=o[e];super(t,i)}getCommonName(t){return this.tagMap[t.toUpperCase()]}}});var Q1e,tw,Xee=ue(()=>{wA();Sg();eh();Xt();Q1e={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer",USLT:"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"composersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"releasedate",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl",GRP1:"grouping",PCNT:"playCounter"},tw=class n extends Ko{static toRating(t){return{source:t.email,rating:t.rating>0?(t.rating-1)/254*gr.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],Q1e)}postMap(t,o){switch(t.id){case"UFID":{let i=t.value;i.owner_identifier==="http://musicbrainz.org"&&(t.id+=`:${i.owner_identifier}`,t.value=sa(i.identifier,"latin1"))}break;case"PRIV":{let i=t.value;switch(i.owner_identifier){case"AverageLevel":case"PeakValue":t.id+=`:${i.owner_identifier}`,t.value=i.data.length===4?Fe.get(i.data,0):null,t.value===null&&o.addWarning("Failed to parse PRIV:PeakValue");break;default:o.addWarning(`Unknown PRIV owner-identifier: ${i.data}`)}}break;case"POPM":t.value=n.toRating(t.value);break;default:break}}}});var y1e,rw,$ee=ue(()=>{Sg();y1e={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"},rw=class n extends gr{static toRating(t){return{rating:Number.parseFloat(t+1)/5}}constructor(){super(["asf"],y1e)}postMap(t){switch(t.id){case"WM/SharedUserRating":{let o=t.id.split(":");t.value=n.toRating(t.value),t.id=o[0];break}}}}});var m1e,aw,eAe=ue(()=>{eh();m1e={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"copyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm",GP1:"grouping"},aw=class extends Ko{constructor(){super(["ID3v2.2"],m1e)}}});var S1e,iw,AAe=ue(()=>{eh();S1e={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Releasedate:"releasedate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"},iw=class extends Ko{constructor(){super(["APEv2"],S1e)}}});var D1e,w1e,IB,tAe=ue(()=>{eh();D1e={"\xA9nam":"title","\xA9ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","\xA9alb":"album","\xA9day":"date","\xA9cmt":"comment","\xA9com":"comment",trkn:"track",disk:"disk","\xA9gen":"genre",covr:"picture","\xA9wrt":"composer","\xA9lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","\xA9grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","\xA9cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","\xA9too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear","----:com.apple.iTunes:RELEASEDATE":"releasedate",desc:"description",ldes:"longDescription","\xA9mvn":"movement","\xA9mvi":"movementIndex","\xA9mvc":"movementTotal","\xA9wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"},w1e="iTunes",IB=class extends Ko{constructor(){super([w1e],D1e)}postMap(t,o){switch(t.id){case"rate":t.value={source:void 0,rating:Number.parseFloat(t.value)/100};break}}}});var O1e,ow,rAe=ue(()=>{Sg();O1e={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",RELEASEDATE:"releasedate",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"},ow=class n extends gr{static toRating(t,o,i){return{source:t?t.toLowerCase():void 0,rating:Number.parseFloat(o)/i*gr.maxRatingScore}}constructor(){super(["vorbis"],O1e)}postMap(t){if(t.id==="RATING")t.value=n.toRating(void 0,t.value,100);else if(t.id.indexOf("RATING:")===0){let o=t.id.split(":");t.value=n.toRating(o[1],t.value,1),t.id=o[0]}}}});var b1e,nw,aAe=ue(()=>{Sg();b1e={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"},nw=class extends gr{constructor(){super(["exif"],b1e)}}});var M1e,sw,iAe=ue(()=>{eh();M1e={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:DATE_RELEASED":"releasedate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"},sw=class extends Ko{constructor(){super(["matroska"],M1e)}}});var _1e,gw,oAe=ue(()=>{Sg();_1e={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"},gw=class extends gr{constructor(){super(["AIFF"],_1e)}}});var cw,nAe=ue(()=>{Zee();Xee();$ee();eAe();AAe();tAe();rAe();aAe();iAe();oAe();Zt();cw=class{constructor(){this.tagMappers={},[new Aw,new aw,new tw,new IB,new IB,new ow,new iw,new rw,new nw,new sw,new gw].forEach(t=>{this.registerTagMapper(t)})}mapTag(t,o,i){if(this.tagMappers[t])return this.tagMappers[t].mapGenericTag(o,i);throw new cl(`No generic tag mapper defined for tag-format: ${t}`)}registerTagMapper(t){for(let o of t.tagTypes)this.tagMappers[o]=t}}});function sAe(n){return FF.test(n)?N1e(n):T1e(n)}function T1e(n){return{contentType:Zd.lyrics,timeStampFormat:Xd.notSynchronized,text:n.trim(),syncText:[]}}function N1e(n){let t=n.split(` -`),o=[];for(let i of t){let e=i.match(FF);if(e){let a=Number.parseInt(e[1],10),A=Number.parseInt(e[2],10),r=e[3].length===3?Number.parseInt(e[3],10):Number.parseInt(e[3],10)*10,s=(a*60+A)*1e3+r,g=i.replace(FF,"").trim();o.push({timestamp:s,text:g})}}return{contentType:Zd.lyrics,timeStampFormat:Xd.milliseconds,text:o.map(i=>i.text).join(` -`),syncText:o}}var FF,gAe=ue(()=>{Il();FF=/\[(\d{2}):(\d{2})\.(\d{2,3})]/});function k1e(n){return n.length>2?`${n.slice(0,n.length-1).join(", ")} & ${n[n.length-1]}`:n.join(" & ")}var cAe,ll,R1e,Iw,IAe=ue(()=>{Il();cAe=Ve(ct(),1);Wee();nAe();Sg();Xt();OF();gAe();ll=(0,cAe.default)("music-metadata:collector"),R1e=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"],Iw=class{constructor(t){this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{no:null,of:null}},this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new cw,this.opts=t;let o=1;for(let i of R1e)this.originPriority[i]=o++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(t){ll(`streamInfo: type=${t.type?TF[t.type]:"?"}, codec=${t.codecName}`),this.format.trackInfo.push(t)}setFormat(t,o){ll(`format: ${t} = ${o}`),this.format[t]=o,this.opts?.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:t,value:o}})}setAudioOnly(){this.setFormat("hasAudio",!0),this.setFormat("hasVideo",!1)}async addTag(t,o,i){ll(`tag ${t}.${o} = ${i}`),this.native[t]||(this.format.tagTypes.push(t),this.native[t]=[]),this.native[t].push({id:o,value:i}),await this.toCommon(t,o,i)}addWarning(t){this.quality.warnings.push({message:t})}async postMap(t,o){switch(o.id){case"artist":return this.handleSingularArtistTag(t,o,"artist","artists");case"albumartist":return this.handleSingularArtistTag(t,o,"albumartist","albumartists");case"artists":return this.handlePluralArtistTag(t,o,"artist","artists");case"albumartists":return this.handlePluralArtistTag(t,o,"albumartist","albumartists");case"picture":return this.postFixPicture(o.value).then(i=>{i!==null&&(o.value=i,this.setGenericTag(t,o))});case"totaltracks":this.common.track.of=gr.toIntOrNull(o.value);return;case"totaldiscs":this.common.disk.of=gr.toIntOrNull(o.value);return;case"movementTotal":this.common.movementIndex.of=gr.toIntOrNull(o.value);return;case"track":case"disk":case"movementIndex":{let i=this.common[o.id].of;this.common[o.id]=gr.normalizeTrack(o.value),this.common[o.id].of=i??this.common[o.id].of;return}case"bpm":case"year":case"originalyear":o.value=Number.parseInt(o.value,10);break;case"date":{let i=Number.parseInt(o.value.substr(0,4),10);Number.isNaN(i)||(this.common.year=i);break}case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":o.value=typeof o.value=="string"?Number.parseInt(o.value,10):o.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":o.value=qee(o.value);break;case"replaygain_track_minmax":o.value=o.value.split(",").map(i=>Number.parseInt(i,10));break;case"replaygain_undo":{let i=o.value.split(",").map(e=>Number.parseInt(e,10));o.value={leftChannel:i[0],rightChannel:i[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":o.value=o.value==="1"||o.value===1;break;case"isrc":{let i=this.common[o.id];if(i&&i.indexOf(o.value)!==-1)return;break}case"comment":typeof o.value=="string"&&(o.value={text:o.value}),o.value.descriptor==="iTunPGAP"&&this.setGenericTag(t,{id:"gapless",value:o.value.text==="1"});break;case"lyrics":typeof o.value=="string"&&(o.value=sAe(o.value));break;default:}o.value!==null&&this.setGenericTag(t,o)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}handleSingularArtistTag(t,o,i,e){if(this.commonOrigin[i]===this.originPriority[t])return this.postMap("artificial",{id:e,value:o.value});this.common[e]||this.setGenericTag("artificial",{id:e,value:o.value}),this.setGenericTag(t,o)}handlePluralArtistTag(t,o,i,e){if((!this.common[i]||this.commonOrigin[i]===this.originPriority.artificial)&&(!this.common[e]||this.common[e].indexOf(o.value)===-1)){let a=(this.common[e]||[]).concat([o.value]),A=k1e(a);this.setGenericTag("artificial",{id:i,value:A})}this.setGenericTag(t,o)}async postFixPicture(t){if(t.data&&t.data.length>0){if(!t.format){let o=await gB(Uint8Array.from(t.data));if(o)t.format=o.mime;else return null}switch(t.format=t.format.toLocaleLowerCase(),t.format){case"image/jpg":t.format="image/jpeg"}return t}return this.addWarning("Empty picture tag found"),null}async toCommon(t,o,i){let e={id:o,value:i},a=this.tagMapper.mapTag(t,e,this);a&&await this.postMap(t,a)}setGenericTag(t,o){ll(`common.${o.id} = ${o.value}`);let i=this.commonOrigin[o.id]||1e3,e=this.originPriority[t];if(zee(o.id))if(e<=i)this.common[o.id]=o.value,this.commonOrigin[o.id]=e;else return ll(`Ignore native tag (singleton): ${t}.${o.id} = ${o.value}`);else if(e===i)!Vee(o.id)||this.common[o.id].indexOf(o.value)===-1?this.common[o.id].push(o.value):ll(`Ignore duplicate value: ${t}.${o.id} = ${o.value}`);else if(e{_t=class{constructor(t,o,i){this.metadata=t,this.tokenizer=o,this.options=i}}});var v1e,rt,ei=ue(()=>{Cs();Xt();Zt();v1e=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,rt={len:4,get:(n,t)=>{let o=fr(n.subarray(t,t+rt.len),"latin1");if(!o.match(v1e))throw new Uo(`FourCC contains invalid characters: ${Jee(o)} "${o}"`);return o},put:(n,t,o)=>{let i=aee(o,"latin1");if(i.length!==4)throw new cl("Invalid length");return n.set(i,t),t+4}}});function pAe(n){return{containsHeader:lw(n,31),containsFooter:lw(n,30),isHeader:lw(n,29),readOnly:lw(n,0),dataType:(n&6)>>1}}function lw(n,t){return(n&1<{wA();ei();lB={text_utf8:0,binary:1,external_info:2,reserved:3},LF={len:52,get:(n,t)=>({ID:rt.get(n,t),version:Fe.get(n,t+4)/1e3,descriptorBytes:Fe.get(n,t+8),headerBytes:Fe.get(n,t+12),seekTableBytes:Fe.get(n,t+16),headerDataBytes:Fe.get(n,t+20),apeFrameDataBytes:Fe.get(n,t+24),apeFrameDataBytesHigh:Fe.get(n,t+28),terminatingDataBytes:Fe.get(n,t+32),fileMD5:new Dt(16).get(n,t+36)})},lAe={len:24,get:(n,t)=>({compressionLevel:SA.get(n,t),formatFlags:SA.get(n,t+2),blocksPerFrame:Fe.get(n,t+4),finalFrameBlocks:Fe.get(n,t+8),totalFrames:Fe.get(n,t+12),bitsPerSample:SA.get(n,t+16),channel:SA.get(n,t+18),sampleRate:Fe.get(n,t+20)})},Ni={len:32,get:(n,t)=>({ID:new ze(8,"ascii").get(n,t),version:Fe.get(n,t+8),size:Fe.get(n,t+12),fields:Fe.get(n,t+16),flags:pAe(Fe.get(n,t+20))})},pw={len:8,get:(n,t)=>({size:Fe.get(n,t),flags:pAe(Fe.get(n,t+4))})}});var uAe={};Mr(uAe,{APEv2Parser:()=>Lc,ApeContentError:()=>Ah,tryParseApeHeader:()=>pl});function pl(n,t,o){return new Lc(n,t,o).tryParseApeHeader()}var CAe,Fc,hAe,EAe,Ah,Lc,dl=ue(()=>{CAe=Ve(ct(),1);Go();wA();Xt();Ti();dAe();Zt();Cs();Fc=(0,CAe.default)("music-metadata:parser:APEv2"),hAe="APEv2",EAe="APETAGEX",Ah=class extends Qt("APEv2"){};Lc=class n extends _t{constructor(){super(...arguments),this.ape={}}static calculateDuration(t){let o=t.totalFrames>1?t.blocksPerFrame*(t.totalFrames-1):0;return o+=t.finalFrameBlocks,o/t.sampleRate}static async findApeFooterOffset(t,o){let i=new Uint8Array(Ni.len),e=t.position;if(o<=Ni.len){Fc(`Offset is too small to read APE footer: offset=${o}`);return}if(o>Ni.len){await t.readBuffer(i,{position:o-Ni.len}),t.setPosition(e);let a=Ni.get(i,0);if(a.ID==="APETAGEX")return a.flags.isHeader?Fc(`APE Header found at offset=${o-Ni.len}`):(Fc(`APE Footer found at offset=${o-Ni.len}`),o-=a.size),{footer:a,offset:o}}}static parseTagFooter(t,o,i){let e=Ni.get(o,o.length-Ni.len);if(e.ID!==EAe)throw new Ah("Unexpected APEv2 Footer ID preamble value");return Ao(o),new n(t,Ao(o),i).parseTags(e)}async tryParseApeHeader(){if(this.tokenizer.fileInfo.size&&this.tokenizer.fileInfo.size-this.tokenizer.position0?this.parseDescriptorExpansion(o):this.parseHeader());return this.metadata.setAudioOnly(),await this.tokenizer.ignore(i.forwardBytes),this.tryParseApeHeader()}async parseTags(t){let o=new Uint8Array(256),i=t.size-Ni.len;Fc(`Parse APE tags at offset=${this.tokenizer.position}, size=${i}`);for(let e=0;ethis.metadata.addTag(hAe,r,c)));break}case lB.binary:if(this.options.skipCovers)await this.tokenizer.ignore(a.size);else{let s=new Uint8Array(a.size);await this.tokenizer.readBuffer(s),A=Ss(s);let g=fr(s.subarray(0,A),"utf-8"),c=s.subarray(A+1);await this.metadata.addTag(hAe,r,{description:g,data:c})}break;case lB.external_info:Fc(`Ignore external info ${r}`),await this.tokenizer.ignore(a.size);break;case lB.reserved:Fc(`Ignore external info ${r}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${r}"`),await this.tokenizer.ignore(a.size);break}}}async parseDescriptorExpansion(t){return await this.tokenizer.ignore(t),this.parseHeader()}async parseHeader(){let t=await this.tokenizer.readToken(lAe);if(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("container","Monkey's Audio"),this.metadata.setFormat("bitsPerSample",t.bitsPerSample),this.metadata.setFormat("sampleRate",t.sampleRate),this.metadata.setFormat("numberOfChannels",t.channel),this.metadata.setFormat("duration",n.calculateDuration(t)),!this.ape.descriptor)throw new Ah("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}});async function fAe(n){if(n.fileInfo.size>=128){let t=new Uint8Array(3),o=n.position;return await n.readBuffer(t,{position:n.fileInfo.size-128}),n.setPosition(o),fr(t,"latin1")==="TAG"}return!1}var BAe,dw,th,hw,Uc,Ew,pB=ue(()=>{BAe=Ve(ct(),1);wA();Xt();Ti();dl();Cs();dw=(0,BAe.default)("music-metadata:parser:ID3v1"),th=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"],hw={len:128,get:(n,t)=>{let o=new Uc(3).get(n,t);return o==="TAG"?{header:o,title:new Uc(30).get(n,t+3),artist:new Uc(30).get(n,t+33),album:new Uc(30).get(n,t+63),year:new Uc(4).get(n,t+93),comment:new Uc(28).get(n,t+97),zeroByte:fA.get(n,t+127),track:fA.get(n,t+126),genre:fA.get(n,t+127)}:null}},Uc=class{constructor(t){this.len=t,this.stringType=new ze(t,"latin1")}get(t,o){let i=this.stringType.get(t,o);return i=XD(i),i=i.trim(),i.length>0?i:void 0}},Ew=class n extends _t{constructor(t,o,i){super(t,o,i),this.apeHeader=i.apeHeader}static getGenre(t){if(tt){dw("Already consumed the last 128 bytes");return}let o=await this.tokenizer.readToken(hw,t);if(o){dw("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-hw.len);let i=["title","artist","album","comment","track","year"];for(let a of i)o[a]&&o[a]!==""&&await this.addTag(a,o[a]);let e=n.getGenre(o.genre);e&&await this.addTag("genre",e)}else dw("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-hw.len)}async addTag(t,o){await this.metadata.addTag("ID3v1",t,o)}}});var UF,QAe=ue(()=>{wA();UF={len:16,get:(n,t)=>{let o=xe.get(n,t+8),i=xe.get(n,t+12);return{startTime:xe.get(n,t),endTime:xe.get(n,t+4),startOffset:o===4294967295?void 0:o,endOffset:i===4294967295?void 0:i}}}});function dB(n){switch(n){case 2:return 6;case 3:case 4:return 10;default:throw yAe(n)}}function P1e(n,t){return t===3?{status:{tag_alter_preservation:GA(n,0,7),file_alter_preservation:GA(n,0,6),read_only:GA(n,0,5)},format:{compression:GA(n,1,7),encryption:GA(n,1,6),grouping_identity:GA(n,1,5),unsynchronisation:!1,data_length_indicator:!1}}:{status:{tag_alter_preservation:GA(n,0,6),file_alter_preservation:GA(n,0,5),read_only:GA(n,0,4)},format:{grouping_identity:GA(n,1,6),compression:GA(n,1,3),encryption:GA(n,1,2),unsynchronisation:GA(n,1,1),data_length_indicator:GA(n,1,0)}}}function hB(n,t,o){switch(t){case 2:return G1e(n,t,o);case 3:case 4:return F1e(n,t,o);default:throw yAe(t)}}function G1e(n,t,o){let i={id:fr(n.subarray(0,3),"ascii"),length:Or.get(n,3)};return i.id.match(/^[A-Z0-9]{3}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${i.id}`),i}function F1e(n,t,o){let i={id:fr(n.subarray(0,4),"ascii"),length:(t===4?vF:xe).get(n,4),flags:P1e(n.subarray(8,10),t)};return i.id.match(/^[A-Z0-9]{4}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${i.id}`),i}function yAe(n){throw new Hc(`Unexpected majorVer: ${n}`)}var HF=ue(()=>{wA();Xt();Gc();Cs();KF()});function L1e(n){let t=[],o,i="";for(let e of n)if(typeof o=="string")if(e==="("&&o==="")i+="(",o=void 0;else if(e===")"){i!==""&&(t.push(i),i="");let a=mAe(o);a&&t.push(a),o=void 0}else o+=e;else e==="("?o="":i+=e;return i&&(t.length===0&&i.match(/^\d*$/)&&(i=mAe(i)),i&&t.push(i)),t}function mAe(n){if(n==="RX")return"Remix";if(n==="CR")return"Cover";if(n.match(/^\d*$/))return th[Number.parseInt(n,10)]}function U1e(n){throw new Hc(`Unexpected majorVer: ${n}`)}var SAe,Cw,xo,xF,uw,Hc,KF=ue(()=>{SAe=Ve(ct(),1);wA();Xt();Gc();pB();Zt();Xt();QAe();HF();Cw=(0,SAe.default)("music-metadata:id3v2:frame-parser"),xo="latin1",xF={encoding:xo,bom:!1};uw=class n{constructor(t,o){this.major=t,this.warningCollector=o}readData(t,o,i){if(t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${o}`);return}let{encoding:e,bom:a}=$d.get(t,0),A=t.length,r=0,s=[],g=n.getNullTerminatorLength(e),c;switch(Cw(`Parsing tag type=${o}, encoding=${e}, bom=${a}`),o!=="TXXX"&&o[0]==="T"?"T*":o){case"T*":case"GRP1":case"GP1":case"IPLS":case"MVIN":case"MVNM":case"PCS":case"PCST":{let I;try{I=n.trimNullPadding(sa(t.subarray(1),e))}catch(d){if(d instanceof Error){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} header has invalid string value: ${d.message}`);break}throw d}switch(o){case"TMCL":case"TIPL":case"IPLS":s=n.functionList(this.splitValue(o,I));break;case"TRK":case"TRCK":case"TPOS":case"TIT1":case"TIT2":case"TIT3":s=I;break;case"TCOM":case"TEXT":case"TOLY":case"TOPE":case"TPE1":case"TSRC":s=this.splitValue(o,I);break;case"TCO":case"TCON":s=this.splitValue(o,I).map(d=>L1e(d)).reduce((d,B)=>d.concat(B),[]);break;case"PCS":case"PCST":s=this.major>=4?this.splitValue(o,I):[I],s=Array.isArray(s)&&s[0]===""?1:0;break;default:s=this.major>=4?this.splitValue(o,I):[I]}break}case"TXXX":{let I=n.readIdentifierAndData(t.subarray(1),e);s={description:I.id,text:this.splitValue(o,sa(I.data,e).replace(/\x00+$/,""))};break}case"PIC":case"APIC":if(i){let I={};switch(t=t.subarray(1),this.major){case 2:I.format=sa(t.subarray(0,3),"latin1"),t=t.subarray(3);break;case 3:case 4:c=Ss(t,xo),I.format=sa(t.subarray(0,c),xo),t=t.subarray(c+1);break;default:throw U1e(this.major)}I.format=n.fixPictureMimeType(I.format),I.type=Wd[t[0]],t=t.subarray(1),c=Ss(t,e),I.description=sa(t.subarray(0,c),e),t=t.subarray(c+g),I.data=t,s=I}break;case"CNT":case"PCNT":s=kF(t);break;case"SYLT":{let I=GF.get(t,0);t=t.subarray(GF.len);let d={descriptor:"",language:I.language,contentType:I.contentType,timeStampFormat:I.timeStampFormat,syncText:[]},B=!1;for(;t.length>0;){let f=n.readNullTerminatedString(t,I.encoding);if(t=t.subarray(f.len),B){let Q=xe.get(t,0);t=t.subarray(xe.len),d.syncText.push({text:f.text,timestamp:Q})}else d.descriptor=f.text,B=!0}s=d;break}case"ULT":case"USLT":case"COM":case"COMM":{let I=$D.get(t,r);r+=$D.len;let d=n.readNullTerminatedString(t.subarray(r),I.encoding);r+=d.len;let B=n.readNullTerminatedString(t.subarray(r),I.encoding);s={language:I.language,descriptor:d.text,text:B.text};break}case"UFID":{let I=n.readIdentifierAndData(t,xo);s={owner_identifier:I.id,identifier:I.data};break}case"PRIV":{let I=n.readIdentifierAndData(t,xo);s={owner_identifier:I.id,data:I.data};break}case"POPM":{t=t.subarray(r);let I=n.readNullTerminatedString(t,xF),d=I.text;if(t=t.subarray(I.len),t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} POPM frame missing rating byte`),s={email:d,rating:0,counter:void 0};break}let B=fA.get(t,0),f=t.subarray(fA.len);s={email:d,rating:B,counter:f.length>0?kF(f):void 0};break}case"GEOB":{let I=$d.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,xF),B=d.text;t=t.subarray(d.len);let f=n.readNullTerminatedString(t,I),Q=f.text;t=t.subarray(f.len);let y=n.readNullTerminatedString(t,I),m=y.text;t=t.subarray(y.len),s={type:B,filename:Q,description:m,data:t};break}case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":s=n.readNullTerminatedString(t,xF).text;break;case"WXXX":{let I=$d.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,I),B=d.text;t=t.subarray(d.len),s={description:B,url:n.trimNullPadding(sa(t,xo))};break}case"WFD":case"WFED":{let I=$d.get(t,0);t=t.subarray(1),s=n.readNullTerminatedString(t,I).text;break}case"MCDI":{s=t.subarray(0,A);break}case"CHAP":{Cw("Reading CHAP"),c=Ss(t,xo);let I={label:sa(t.subarray(0,c),xo),info:UF.get(t,c+1),frames:new Map};for(r+=c+1+UF.len;r=a.length)return{text:sa(t,o.encoding),len:e};let r=t.subarray(0,i+A);return{text:sa(r,o.encoding),len:i+A+n.getNullTerminatorLength(o.encoding)}}static fixPictureMimeType(t){switch(t=t.toLocaleLowerCase(),t){case"jpg":return"image/jpeg";case"png":return"image/png"}return t}static functionList(t){let o={};for(let i=0;i+11?this.warningCollector.addWarning(`ID3v2.${this.major} ${t} uses non standard null-separator.`):i=o.split(/\//g)):i=o.split(/\x00/g),n.trimArray(i)}static trimArray(t){return t.map(o=>n.trimNullPadding(o).trim())}static trimNullPadding(t){let o=t.length;for(;o>0&&t.charCodeAt(o-1)===0;)o--;return o===t.length?t:t.slice(0,o)}static readIdentifierAndData(t,o){let i=n.readNullTerminatedString(t,{encoding:o,bom:!1});return{id:i.text,data:t.subarray(i.len)}}static getNullTerminatorLength(t){return t.startsWith("utf-16")?2:1}},Hc=class extends Qt("id3v2"){}});function H1e(n){throw new Hc(`Unexpected majorVer: ${n}`)}var Yo,rh=ue(()=>{wA();KF();Gc();HF();Yo=class n{constructor(){this.tokenizer=void 0,this.id3Header=void 0,this.metadata=void 0,this.headerType=void 0,this.options=void 0}static removeUnsyncBytes(t){let o=0,i=0;for(;o0?this.parseExtendedHeaderData(o,t.size):this.parseId3Data(this.id3Header.size-t.size)}async parseExtendedHeaderData(t,o){return await this.tokenizer.ignore(t),this.parseId3Data(this.id3Header.size-o)}async parseId3Data(t){let o=await this.tokenizer.readToken(new Dt(t));for(let i of this.parseMetadata(o))switch(i.id){case"TXXX":i.value&&await this.handleTag(i,i.value.text,()=>i.value.description);break;default:await(Array.isArray(i.value)?Promise.all(i.value.map(e=>this.addTag(i.id,e))):this.addTag(i.id,i.value))}}async handleTag(t,o,i,e=a=>a){await Promise.all(o.map(a=>this.addTag(n.makeDescriptionTagName(t.id,i(a)),e(a))))}async addTag(t,o){await this.metadata.addTag(this.headerType,t,o)}parseMetadata(t){let o=0,i=[];for(;o!==t.length;){let e=dB(this.id3Header.version.major);if(o+e>t.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}let a=t.subarray(o,o+e);o+=e;let A=hB(a,this.id3Header.version.major,this.metadata),r=t.subarray(o,o+A.length);o+=A.length;let s=n.readFrameData(r,A,this.id3Header.version.major,!this.options.skipCovers,this.metadata);s&&i.push({id:A.id,value:s})}return i}static mapId3v2Chapters(t){if(!t)return;let o=t.filter(g=>g.id==="CHAP");if(!o?.length)return;let e=t.filter(g=>g.id==="CTOC")?.find(g=>g.value.flags?.topLevel),a=new Map;for(let g of o)a.set(g.value.label,g.value);let A=e?.value.childElementIds,r=[],s=A??[...a.keys()];for(let g of s){let c=a.get(g);if(!c)continue;let I=c.frames,d=I.get("TIT2");d&&r.push({id:g,title:d,url:I.get("WXXX"),start:c.info.startTime/1e3,end:c.info.endTime/1e3,image:I.get("APIC")})}return A||r.sort((g,c)=>g.start-c.start),r.length?r:void 0}}});var DAe,YF,Ds,EB=ue(()=>{Go();DAe=Ve(ct(),1);Gc();rh();pB();Ti();YF=(0,DAe.default)("music-metadata:parser:ID3"),Ds=class extends _t{constructor(){super(...arguments),this.id3parser=new Yo}static async startsWithID3v2Header(t){return(await t.peekToken(cB)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(t){if(t instanceof kA)YF("End-of-stream");else throw t}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),YF("End of ID3v2 header, go to MPEG-parser: pos=%s",this.tokenizer.position),await this.postId3v2Parse(),this.options.skipPostHeaders&&this.metadata.hasAny()?this.finalize():(await new Ew(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(cB)).fileIdentifier==="ID3")return YF("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}});var jF,wAe=ue(()=>{Xt();jF={len:2,get:(n,t)=>{let o=ZA(n,t,0,3),i=ZA(n,t,6,1),e=ZA(n,t,7,9)/10;if(o>0)return{type:ZA(n,t,0,3),origin:ZA(n,t,3,3),adjustment:i?-e:e}}}});var OAe,bAe=ue(()=>{wA();Xt();wAe();OAe={len:27,get:(n,t)=>{let o=xe.get(n,t+2);return{revision:ZA(n,t,0,4),vbr_method:ZA(n,t,4,4),lowpass_filter:100*fA.get(n,t+1),track_peak:o===0?null:o/2**23,track_gain:jF.get(n,6),album_gain:jF.get(n,8),music_length:xe.get(n,t+20),music_crc:fA.get(n,t+24),header_crc:LA.get(n,t+24)}}}});async function MAe(n){let t=await n.readToken(K1e),o={numFrames:null,streamSize:null,vbrScale:null};if(t.frames&&(o.numFrames=await n.readToken(xe)),t.bytes&&(o.streamSize=await n.readToken(xe)),t.toc&&(o.toc=new Uint8Array(100),await n.readBuffer(o.toc)),t.vbrScale&&(o.vbrScale=await n.readToken(xe)),await n.peekToken(new ze(4,"ascii"))==="LAME"){await n.ignore(4),o.lame={version:await n.readToken(new ze(5,"ascii"))};let e=o.lame.version.match(/\d+.\d+/g);if(e!==null){let A=e[0].split(".").map(r=>Number.parseInt(r,10));A[0]>=3&&A[1]>=90&&(o.lame.extended=await n.readToken(OAe))}}return o}var JF,Bw,K1e,_Ae=ue(()=>{wA();Xt();bAe();JF=new ze(4,"ascii"),Bw=new ze(6,"ascii"),K1e={len:4,get:(n,t)=>({frames:ya(n,t,31),bytes:ya(n,t,30),toc:ya(n,t,29),vbrScale:ya(n,t,28)})}});var vAe={};Mr(vAe,{MpegContentError:()=>hl,MpegParser:()=>qF});function Y1e(n){return`V${Math.floor((100-n)/10)}`}var kAe,to,hl,TAe,NAe,x1e,ro,RAe,qF,PAe=ue(()=>{wA();Go();kAe=Ve(ct(),1);Xt();EB();_Ae();Zt();to=(0,kAe.default)("music-metadata:parser:mpeg"),hl=class extends Qt("MPEG"){},TAe=1024,NAe={AudioObjectTypes:["AAC Main","AAC LC","AAC SSR","AAC LTP"],SamplingFrequencies:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,null,null,null]},x1e=[void 0,["front-center"],["front-left","front-right"],["front-center","front-left","front-right"],["front-center","front-left","front-right","back-center"],["front-center","front-left","front-right","back-left","back-right"],["front-center","front-left","front-right","back-left","back-right","LFE-channel"],["front-center","front-left","front-right","side-left","side-right","back-left","back-right","LFE-channel"]],ro=class n{constructor(t,o){this.bitrateIndex=null,this.sampRateFreqIndex=null,this.padding=null,this.privateBit=null,this.channelModeIndex=null,this.modeExtension=null,this.isOriginalMedia=null,this.version=null,this.bitrate=null,this.samplingRate=null,this.frameLength=0,this.versionIndex=ZA(t,o+1,3,2),this.layer=n.LayerDescription[ZA(t,o+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(t,o):this.parseMpegHeader(t,o),this.isProtectedByCRC=!ya(t,o+1,7)}calcDuration(t){return this.samplingRate==null?null:t*this.calcSamplesPerFrame()/this.samplingRate}calcSamplesPerFrame(){return n.samplesInFrameTable[this.version===1?0:1][this.layer]}calculateSideInfoLength(){if(this.layer!==3)return 2;if(this.channelModeIndex===3){if(this.version===1)return 17;if(this.version===2||this.version===2.5)return 9}else{if(this.version===1)return 32;if(this.version===2||this.version===2.5)return 17}return null}calcSlotSize(){return[null,4,1,1][this.layer]}parseMpegHeader(t,o){this.container="MPEG",this.bitrateIndex=ZA(t,o+2,0,4),this.sampRateFreqIndex=ZA(t,o+2,4,2),this.padding=ya(t,o+2,6),this.privateBit=ya(t,o+2,7),this.channelModeIndex=ZA(t,o+3,0,2),this.modeExtension=ZA(t,o+3,2,2),this.isCopyrighted=ya(t,o+3,4),this.isOriginalMedia=ya(t,o+3,5),this.emphasis=ZA(t,o+3,7,2),this.version=n.VersionID[this.versionIndex],this.channelMode=n.ChannelMode[this.channelModeIndex],this.codec=`MPEG ${this.version} Layer ${this.layer}`;let i=this.calcBitrate();if(!i)throw new hl("Cannot determine bit-rate");if(this.bitrate=i*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new hl("Cannot determine sampling-rate")}parseAdtsHeader(t,o){to("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;let i=ZA(t,o+2,0,2);this.codec="AAC",this.codecProfile=NAe.AudioObjectTypes[i],to(`MPEG-4 audio-codec=${this.codec}`);let e=ZA(t,o+2,2,4);this.samplingRate=NAe.SamplingFrequencies[e],to(`sampling-rate=${this.samplingRate}`);let a=ZA(t,o+2,7,3);this.mp4ChannelConfig=x1e[a],to(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=ZA(t,o+3,6,2)<<11}calcBitrate(){if(this.bitrateIndex===0||this.bitrateIndex===15)return null;if(this.version&&this.bitrateIndex){let t=10*Math.floor(this.version)+this.layer;return n.bitrate_index[this.bitrateIndex][t]}return null}calcSamplingRate(){return this.sampRateFreqIndex===3||this.version===null||this.sampRateFreqIndex==null?null:n.sampling_rate_freq_index[this.version][this.sampRateFreqIndex]}};ro.SyncByte1=255;ro.SyncByte2=224;ro.VersionID=[2.5,null,2,1];ro.LayerDescription=[0,3,2,1];ro.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];ro.bitrate_index={1:{11:32,12:32,13:32,21:32,22:8,23:8},2:{11:64,12:48,13:40,21:48,22:16,23:16},3:{11:96,12:56,13:48,21:56,22:24,23:24},4:{11:128,12:64,13:56,21:64,22:32,23:32},5:{11:160,12:80,13:64,21:80,22:40,23:40},6:{11:192,12:96,13:80,21:96,22:48,23:48},7:{11:224,12:112,13:96,21:112,22:56,23:56},8:{11:256,12:128,13:112,21:128,22:64,23:64},9:{11:288,12:160,13:128,21:144,22:80,23:80},10:{11:320,12:192,13:160,21:160,22:96,23:96},11:{11:352,12:224,13:192,21:176,22:112,23:112},12:{11:384,12:256,13:224,21:192,22:128,23:128},13:{11:416,12:320,13:256,21:224,22:144,23:144},14:{11:448,12:384,13:320,21:256,22:160,23:160}};ro.sampling_rate_freq_index={1:{0:44100,1:48e3,2:32e3},2:{0:22050,1:24e3,2:16e3},2.5:{0:11025,1:12e3,2:8e3}};ro.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];RAe={len:4,get:(n,t)=>new ro(n,t)};qF=class extends Ds{constructor(){super(...arguments),this.frameCount=0,this.syncFrameCount=-1,this.totalDataLength=0,this.bitrates=[],this.offset=0,this.frame_size=0,this.calculateEofDuration=!1,this.samplesPerFrame=null,this.buf_frame_header=new Uint8Array(4),this.mpegOffset=null,this.syncPeek={buf:new Uint8Array(TAe),len:0}}async postId3v2Parse(){this.metadata.setFormat("lossless",!1),this.metadata.setAudioOnly();try{let t=!1;for(;!t;)await this.sync(),t=await this.parseCommonMpegHeader()}catch(t){if(t instanceof kA){if(to("End-of-stream"),this.calculateEofDuration&&this.samplesPerFrame!==null){let o=this.frameCount*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.format.sampleRate){let i=o/this.metadata.format.sampleRate;to(`Calculate duration at EOF: ${i} sec.`,i),this.metadata.setFormat("duration",i)}}}else throw t}}finalize(){let t=this.metadata.format,o=!!this.metadata.native.ID3v1;if(this.mpegOffset!==null){if(t.duration&&this.tokenizer.fileInfo.size){let i=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);t.codecProfile&&t.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",i*8/t.duration)}if(this.tokenizer.fileInfo.size&&t.codecProfile==="CBR"){let i=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);if(this.frame_size!==null&&this.samplesPerFrame!==null){let e=Math.round(i/this.frame_size)*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",e),t.sampleRate&&!t.duration){let a=e/t.sampleRate;to("Calculate CBR duration based on file size: %s",a),this.metadata.setFormat("duration",a)}}}}}async sync(){let t=!1;for(;;){let o=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:TAe,mayBeLess:!0}),this.syncPeek.len<=163)throw new kA;for(;;){if(t&&(this.syncPeek.buf[o]&224)===224){this.buf_frame_header[0]=ro.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[o],await this.tokenizer.ignore(o),to(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(to(`Re-synced MPEG stream, frameCount=${this.frameCount}`),this.frameCount=0,this.frame_size=0),this.syncFrameCount=this.frameCount;return}if(t=!1,o=this.syncPeek.buf.indexOf(ro.SyncByte1,o),o===-1){if(this.syncPeek.len=2&&t.layer===0?this.parseAdts(t):this.parseAudioFrameHeader(t)}async parseAudioFrameHeader(t){this.metadata.setFormat("numberOfChannels",t.channelMode==="mono"?1:2),this.metadata.setFormat("bitrate",t.bitrate),this.frameCount<20*1e4&&to("offset=%s MP%s bitrate=%s sample-rate=%s",this.tokenizer.position-4,t.layer,t.bitrate,t.samplingRate);let o=t.calcSlotSize();if(o===null)throw new hl("invalid slot_size");let i=t.calcSamplesPerFrame();to(`samples_per_frame=${i}`);let e=i/8;if(t.bitrate!==null&&t.samplingRate!=null){let a=e*t.bitrate/t.samplingRate+(t.padding?o:0);this.frame_size=Math.floor(a)}if(this.audioFrameHeader=t,t.bitrate!==null&&this.bitrates.push(t.bitrate),this.frameCount===1)return this.offset=RAe.len,await this.skipSideInformation(),!1;if(this.frameCount===4){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=i,this.metadata.setFormat("codecProfile","CBR"),this.tokenizer.fileInfo.size)return!0}else if(this.metadata.format.duration)return!0;if(!this.options.duration)return!0}return this.options.duration&&this.frameCount===4&&(this.samplesPerFrame=i,this.calculateEofDuration=!0),this.offset=4,t.isProtectedByCRC?(await this.parseCrc(),!1):(await this.skipSideInformation(),!1)}async parseAdts(t){let o=new Uint8Array(3);if(await this.tokenizer.readBuffer(o),t.frameLength+=ZA(o,0,0,11),this.totalDataLength+=t.frameLength,this.samplesPerFrame=1024,t.samplingRate!==null){let i=t.samplingRate/this.samplesPerFrame,a=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*i+.5;this.metadata.setFormat("bitrate",a),to(`frame-count=${this.frameCount}, size=${t.frameLength} bytes, bit-rate=${a}`)}if(await this.tokenizer.ignore(t.frameLength>7?t.frameLength-7:1),this.frameCount===3)if(this.metadata.setFormat("codecProfile",t.codecProfile),t.mp4ChannelConfig&&this.metadata.setFormat("numberOfChannels",t.mp4ChannelConfig.length),this.options.duration)this.calculateEofDuration=!0;else return!0;return!1}async parseCrc(){return await this.tokenizer.ignore(Fo.len),this.offset+=Fo.len,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){let t=this.audioFrameHeader.calculateSideInfoLength();if(t!==null){await this.tokenizer.readToken(new Dt(t)),this.offset+=t,await this.readXtraInfoHeader();return}}}async readXtraInfoHeader(){let t=await this.tokenizer.readToken(JF);switch(this.offset+=JF.len,t){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":{let i=await this.readXingInfoHeader();if(i.vbrScale!==null){let e=Y1e(i.vbrScale);this.metadata.setFormat("codecProfile",e)}return null}case"Xtra":break;case"LAME":{let i=await this.tokenizer.readToken(Bw);if(this.frame_size!==null&&this.frame_size>=this.offset+Bw.len)return this.offset+=Bw.len,this.metadata.setFormat("tool",`LAME ${i}`),await this.skipFrameData(this.frame_size-this.offset),null;this.metadata.addWarning("Corrupt LAME header");break}}let o=this.frame_size-this.offset;return o<0?this.metadata.addWarning(`Frame ${this.frameCount}corrupt: negative frameDataLeft`):await this.skipFrameData(o),null}async readXingInfoHeader(){let t=this.tokenizer.position,o=await MAe(this.tokenizer);if(this.offset+=this.tokenizer.position-t,o.lame&&(this.metadata.setFormat("tool",`LAME ${Ho(o.lame.version)}`),o.lame.extended&&(this.metadata.setFormat("trackPeakLevel",o.lame.extended.track_peak),o.lame.extended.track_gain&&this.metadata.setFormat("trackGain",o.lame.extended.track_gain.adjustment),o.lame.extended.album_gain&&this.metadata.setFormat("albumGain",o.lame.extended.album_gain.adjustment),this.metadata.setFormat("duration",o.lame.extended.music_length/1e3))),o.streamSize&&this.audioFrameHeader&&o.numFrames!==null){let e=this.audioFrameHeader.calcDuration(o.numFrames);return this.metadata.setFormat("duration",e),to("Get duration from Xing header: %s",this.metadata.format.duration),o}let i=this.frame_size-this.offset;return await this.skipFrameData(i),o}async skipFrameData(t){if(t<0)throw new hl("frame-data-left cannot be negative");await this.tokenizer.ignore(t)}areAllSame(t){let o=t[0];return t.every(i=>i===o)}}});var GAe,FAe=ue(()=>{GAe={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],async load(){return(await Promise.resolve().then(()=>(PAe(),vAe))).MpegParser}}});var LAe,UAe=ue(()=>{LAe={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],async load(){return(await Promise.resolve().then(()=>(dl(),uAe))).APEv2Parser}}});function zF(n){let t=n.trim();if(t.length!==36||t[8]!=="-"||t[13]!=="-"||t[18]!=="-"||t[23]!=="-")throw new Error(`Invalid GUID format: ${n}`);let o,i=new Uint8Array(16);o=parseInt(t.slice(0,8),16),i[0]=o&255,i[1]=o>>>8&255,i[2]=o>>>16&255,i[3]=o>>>24&255,o=parseInt(t.slice(9,13),16),i[4]=o&255,i[5]=o>>>8&255,o=parseInt(t.slice(14,18),16),i[6]=o&255,i[7]=o>>>8&255,o=parseInt(t.slice(19,23),16),i[8]=o>>>8&255,i[9]=o&255,o=parseInt(t.slice(24,32),16),i[10]=o>>>24&255,i[11]=o>>>16&255,i[12]=o>>>8&255,i[13]=o&255,o=parseInt(t.slice(32,36),16),i[14]=o>>>8&255,i[15]=o&255;for(let e=0;e<16;e++)if(!Number.isFinite(i[e]))throw new Error(`Invalid GUID format: ${n}`);if(!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(t))throw new Error(`Invalid GUID format: ${n}`);return i}var fw,HAe=ue(()=>{fw=class n{constructor(t){if(t.length!==16)throw new Error("GUID must be exactly 16 bytes");this.bytes=t}static fromString(t){return new n(zF(t))}toString(){let t=this.bytes,o=s=>s.toString(16).padStart(2,"0"),i=o(t[3])+o(t[2])+o(t[1])+o(t[0]),e=o(t[5])+o(t[4]),a=o(t[7])+o(t[6]),A=o(t[8])+o(t[9]),r=o(t[10])+o(t[11])+o(t[12])+o(t[13])+o(t[14])+o(t[15]);return`${i}-${e}-${a}-${A}-${r}`.toUpperCase()}equals(t,o=0){if(o<0||t.length-o<16)return!1;let i=this.bytes;for(let e=0;e<16;e++)if(t[o+e]!==i[e])return!1;return!0}}});var Ye,$t,VF=ue(()=>{HAe();Ye=class n{static fromBin(t,o=0){return new n(n.decode(t,o))}static decode(t,o=0){return new fw(t.subarray(o,o+16)).toString()}static decodeMediaType(t){switch(t.str){case n.AudioMedia.str:return"audio";case n.VideoMedia.str:return"video";case n.CommandMedia.str:return"command";case n.Degradable_JPEG_Media.str:return"degradable-jpeg";case n.FileTransferMedia.str:return"file-transfer";case n.BinaryMedia.str:return"binary"}}static encode(t){return zF(t)}constructor(t){this.str=t}equals(t){return this.str===t.str}toBin(){return n.encode(this.str)}};Ye.HeaderObject=new Ye("75B22630-668E-11CF-A6D9-00AA0062CE6C");Ye.DataObject=new Ye("75B22636-668E-11CF-A6D9-00AA0062CE6C");Ye.SimpleIndexObject=new Ye("33000890-E5B1-11CF-89F4-00A0C90349CB");Ye.IndexObject=new Ye("D6E229D3-35DA-11D1-9034-00A0C90349BE");Ye.MediaObjectIndexObject=new Ye("FEB103F8-12AD-4C64-840F-2A1D2F7AD48C");Ye.TimecodeIndexObject=new Ye("3CB73FD0-0C4A-4803-953D-EDF7B6228F0C");Ye.FilePropertiesObject=new Ye("8CABDCA1-A947-11CF-8EE4-00C00C205365");Ye.StreamPropertiesObject=new Ye("B7DC0791-A9B7-11CF-8EE6-00C00C205365");Ye.HeaderExtensionObject=new Ye("5FBF03B5-A92E-11CF-8EE3-00C00C205365");Ye.CodecListObject=new Ye("86D15240-311D-11D0-A3A4-00A0C90348F6");Ye.ScriptCommandObject=new Ye("1EFB1A30-0B62-11D0-A39B-00A0C90348F6");Ye.MarkerObject=new Ye("F487CD01-A951-11CF-8EE6-00C00C205365");Ye.BitrateMutualExclusionObject=new Ye("D6E229DC-35DA-11D1-9034-00A0C90349BE");Ye.ErrorCorrectionObject=new Ye("75B22635-668E-11CF-A6D9-00AA0062CE6C");Ye.ContentDescriptionObject=new Ye("75B22633-668E-11CF-A6D9-00AA0062CE6C");Ye.ExtendedContentDescriptionObject=new Ye("D2D0A440-E307-11D2-97F0-00A0C95EA850");Ye.ContentBrandingObject=new Ye("2211B3FA-BD23-11D2-B4B7-00A0C955FC6E");Ye.StreamBitratePropertiesObject=new Ye("7BF875CE-468D-11D1-8D82-006097C9A2B2");Ye.ContentEncryptionObject=new Ye("2211B3FB-BD23-11D2-B4B7-00A0C955FC6E");Ye.ExtendedContentEncryptionObject=new Ye("298AE614-2622-4C17-B935-DAE07EE9289C");Ye.DigitalSignatureObject=new Ye("2211B3FC-BD23-11D2-B4B7-00A0C955FC6E");Ye.PaddingObject=new Ye("1806D474-CADF-4509-A4BA-9AABCB96AAE8");Ye.ExtendedStreamPropertiesObject=new Ye("14E6A5CB-C672-4332-8399-A96952065B5A");Ye.AdvancedMutualExclusionObject=new Ye("A08649CF-4775-4670-8A16-6E35357566CD");Ye.GroupMutualExclusionObject=new Ye("D1465A40-5A79-4338-B71B-E36B8FD6C249");Ye.StreamPrioritizationObject=new Ye("D4FED15B-88D3-454F-81F0-ED5C45999E24");Ye.BandwidthSharingObject=new Ye("A69609E6-517B-11D2-B6AF-00C04FD908E9");Ye.LanguageListObject=new Ye("7C4346A9-EFE0-4BFC-B229-393EDE415C85");Ye.MetadataObject=new Ye("C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA");Ye.MetadataLibraryObject=new Ye("44231C94-9498-49D1-A141-1D134E457054");Ye.IndexParametersObject=new Ye("D6E229DF-35DA-11D1-9034-00A0C90349BE");Ye.MediaObjectIndexParametersObject=new Ye("6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7");Ye.TimecodeIndexParametersObject=new Ye("F55E496D-9797-4B5D-8C8B-604DFE9BFB24");Ye.CompatibilityObject=new Ye("26F18B5D-4584-47EC-9F5F-0E651F0452C9");Ye.AdvancedContentEncryptionObject=new Ye("43058533-6981-49E6-9B74-AD12CB86D58C");Ye.AudioMedia=new Ye("F8699E40-5B4D-11CF-A8FD-00805F5C442B");Ye.VideoMedia=new Ye("BC19EFC0-5B4D-11CF-A8FD-00805F5C442B");Ye.CommandMedia=new Ye("59DACFC0-59E6-11D0-A3AC-00A0C90348F6");Ye.JFIF_Media=new Ye("B61BE100-5B4E-11CF-A8FD-00805F5C442B");Ye.Degradable_JPEG_Media=new Ye("35907DE0-E415-11CF-A917-00805F5C442B");Ye.FileTransferMedia=new Ye("91BD222C-F21C-497A-8B6D-5AA86BFC0185");Ye.BinaryMedia=new Ye("3AFB65E2-47EF-40F2-AC2C-70A90D71D343");Ye.ASF_Index_Placeholder_Object=new Ye("D9AADE20-7C17-4F9C-BC28-8555DD98E2A2");$t=Ye});function xAe(n){return j1e[n]}function CB(n){return Ho(sa(n,"utf-16le"))}function KAe(n){return new Uint8Array(n)}function J1e(n,t=0){return YAe(n,t)===1}function q1e(n,t=0){return Fe.get(n,t)}function z1e(n,t=0){return br.get(n,t)}function YAe(n,t=0){return SA.get(n,t)}var j1e,jAe=ue(()=>{wA();Xt();j1e=[CB,KAe,J1e,q1e,z1e,YAe,KAe]});async function JAe(n){let t=await n.readNumber(SA);return(await n.readToken(new ze(t*2,"utf-16le"))).replace("\0","")}async function zAe(n){let t=await n.readToken(V1e),o=[];for(let i=0;i{wA();Xt();VF();jAe();Gc();Zt();ah=class extends Qt("ASF"){},qAe={len:30,get:(n,t)=>({objectId:$t.fromBin(n,t),objectSize:Number(br.get(n,t+16)),numberOfHeaderObjects:Fe.get(n,t+24)})},Kc={len:24,get:(n,t)=>({objectId:$t.fromBin(n,t),objectSize:Number(br.get(n,t+16))})},Dg=class{constructor(t){this.len=Number(t.objectSize)-Kc.len}postProcessTag(t,o,i,e){if(o==="WM/Picture")t.push({id:o,value:WF.fromBuffer(e)});else{let a=xAe(i);if(!a)throw new ah(`unexpected value headerType: ${i}`);t.push({id:o,value:a(e)})}}},uB=class extends Dg{get(t,o){return null}},ih=class extends Dg{get(t,o){return{fileId:$t.fromBin(t,o),fileSize:br.get(t,o+16),creationDate:br.get(t,o+24),dataPacketsCount:br.get(t,o+32),playDuration:br.get(t,o+40),sendDuration:br.get(t,o+48),preroll:br.get(t,o+56),flags:{broadcast:GA(t,o+64,24),seekable:GA(t,o+64,25)},minimumDataPacketSize:Fe.get(t,o+68),maximumDataPacketSize:Fe.get(t,o+72),maximumBitrate:Fe.get(t,o+76)}}};ih.guid=$t.FilePropertiesObject;oh=class extends Dg{get(t,o){return{streamType:$t.decodeMediaType($t.fromBin(t,o)),errorCorrectionType:$t.fromBin(t,o+8)}}};oh.guid=$t.StreamPropertiesObject;nh=class{constructor(){this.len=22}get(t,o){let i=new DataView(t.buffer,o);return{reserved1:$t.fromBin(t,o),reserved2:i.getUint16(16,!0),extensionDataSize:i.getUint16(18,!0)}}};nh.guid=$t.HeaderExtensionObject;V1e={len:20,get:(n,t)=>({entryCount:new DataView(n.buffer,t).getUint16(16,!0)})};El=class n extends Dg{get(t,o){let i=[],e=new DataView(t.buffer,o),a=10;for(let A=0;A0){let s=n.contentDescTags[A],g=a+r;i.push({id:s,value:CB(t.subarray(o+a,o+g))}),a=g}}return i}};El.guid=$t.ContentDescriptionObject;El.contentDescTags=["Title","Author","Copyright","Description","Rating"];sh=class extends Dg{get(t,o){let i=[],e=new DataView(t.buffer,o),a=e.getUint16(0,!0),A=2;for(let r=0;r$F});var VAe,XF,$1e,$F,ZAe=ue(()=>{VAe=Ve(ct(),1);Il();VF();ZF();Ti();ZF();XF=(0,VAe.default)("music-metadata:parser:ASF"),$1e="asf",$F=class extends _t{async parse(){let t=await this.tokenizer.readToken(qAe);if(!t.objectId.equals($t.HeaderObject))throw new ah(`expected asf header; but was not found; got: ${t.objectId.str}`);await this.parseObjectHeader(t.numberOfHeaderObjects)}async parseObjectHeader(t){let o;do{let i=await this.tokenizer.readToken(Kc);switch(XF("header GUID=%s",i.objectId.str),i.objectId.str){case ih.guid.str:{let e=await this.tokenizer.readToken(new ih(i));this.metadata.setFormat("duration",Number(e.playDuration/BigInt(1e3))/1e4-Number(e.preroll)/1e3),this.metadata.setFormat("bitrate",e.maximumBitrate);break}case oh.guid.str:{let e=await this.tokenizer.readToken(new oh(i));this.metadata.setFormat("container",`ASF/${e.streamType}`);break}case nh.guid.str:{let e=await this.tokenizer.readToken(new nh);await this.parseExtensionObject(e.extensionDataSize);break}case El.guid.str:o=await this.tokenizer.readToken(new El(i)),await this.addTags(o);break;case sh.guid.str:o=await this.tokenizer.readToken(new sh(i)),await this.addTags(o);break;case $t.CodecListObject.str:{let e=await zAe(this.tokenizer);e.forEach(A=>{this.metadata.addStreamInfo({type:A.type.videoCodec?na.video:na.audio,codecName:A.codecName})});let a=e.filter(A=>A.type.audioCodec).map(A=>A.codecName).join("/");this.metadata.setFormat("codec",a);break}case $t.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(i.objectSize-Kc.len);break;case $t.PaddingObject.str:XF("Padding: %s bytes",i.objectSize-Kc.len),await this.tokenizer.ignore(i.objectSize-Kc.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${i.objectId.str}`),XF("Ignore ASF-Object-GUID: %s",i.objectId.str),await this.tokenizer.readToken(new uB(i))}}while(--t)}async addTags(t){await Promise.all(t.map(({id:o,value:i})=>this.metadata.addTag($1e,o,i)))}async parseExtensionObject(t){do{let o=await this.tokenizer.readToken(Kc),i=o.objectSize-Kc.len;if(i<0)throw new ah(`Invalid ASF header object size: ${o.objectSize}`);switch(o.objectId.str){case gh.guid.str:await this.tokenizer.readToken(new gh(o));break;case Cl.guid.str:{let e=await this.tokenizer.readToken(new Cl(o));await this.addTags(e);break}case ch.guid.str:{let e=await this.tokenizer.readToken(new ch(o));await this.addTags(e);break}case $t.PaddingObject.str:await this.tokenizer.ignore(i);break;case $t.CompatibilityObject.str:await this.tokenizer.ignore(i);break;case $t.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(i);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${o.objectId.str}`),await this.tokenizer.readToken(new uB(o));break}t-=o.objectSize}while(t>0)}}});var XAe,$Ae=ue(()=>{XAe={parserType:"asf",extensions:[".asf",".wma",".wmv"],mimeTypes:["audio/ms-wma","video/ms-wmv","audio/ms-asf","video/ms-asf","application/vnd.ms-asf"],async load(){return(await Promise.resolve().then(()=>(ZAe(),WAe))).AsfParser}}});var ul,ete=ue(()=>{wA();ei();ul={len:12,get:(n,t)=>({chunkID:rt.get(n,t),chunkSize:BF.get(n,t+4)})}});var tte={};Mr(tte,{DsdiffContentParseError:()=>Ih,DsdiffParser:()=>eL});var Ate,Ai,Ih,eL,rte=ue(()=>{wA();Ate=Ve(ct(),1);Go();ei();Ti();rh();ete();Zt();Ai=(0,Ate.default)("music-metadata:parser:aiff"),Ih=class extends Qt("DSDIFF"){},eL=class extends _t{async parse(){let t=await this.tokenizer.readToken(ul);if(t.chunkID!=="FRM8")throw new Ih("Unexpected chunk-ID");this.metadata.setAudioOnly();let o=(await this.tokenizer.readToken(rt)).trim();switch(o){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${o}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(t.chunkSize-BigInt(rt.len));default:throw new Ih(`Unsupported DSDIFF type: ${o}`)}}async readFmt8Chunks(t){for(;t>=ul.len;){let o=await this.tokenizer.readToken(ul);Ai(`Chunk id=${o.chunkID}`),await this.readData(o),t-=BigInt(ul.len)+o.chunkSize}}async readData(t){Ai(`Reading data of chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);let o=this.tokenizer.position;switch(t.chunkID.trim()){case"FVER":{let e=await this.tokenizer.readToken(Fe);Ai(`DSDIFF version=${e}`);break}case"PROP":{if(await this.tokenizer.readToken(rt)!=="SND ")throw new Ih("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(t.chunkSize-BigInt(rt.len));break}case"ID3":{let e=await this.tokenizer.readToken(new Dt(Number(t.chunkSize))),a=Ao(e);await new Yo().parse(this.metadata,a,this.options);break}case"DSD":this.metadata.format.numberOfChannels&&this.metadata.setFormat("numberOfSamples",Number(t.chunkSize*BigInt(8)/BigInt(this.metadata.format.numberOfChannels))),this.metadata.format.numberOfSamples&&this.metadata.format.sampleRate&&this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate);break;default:Ai(`Ignore chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);break}let i=t.chunkSize-BigInt(this.tokenizer.position-o);i>0&&(Ai(`After Parsing chunk, remaining ${i} bytes`),await this.tokenizer.ignore(Number(i)))}async handleSoundPropertyChunks(t){for(Ai(`Parsing sound-property-chunks, remainingSize=${t}`);t>0;){let o=await this.tokenizer.readToken(ul);Ai(`Sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`);let i=this.tokenizer.position;switch(o.chunkID.trim()){case"FS":{let a=await this.tokenizer.readToken(xe);this.metadata.setFormat("sampleRate",a);break}case"CHNL":{let a=await this.tokenizer.readToken(LA);this.metadata.setFormat("numberOfChannels",a),await this.handleChannelChunks(o.chunkSize-BigInt(LA.len));break}case"CMPR":{let a=(await this.tokenizer.readToken(rt)).trim(),A=await this.tokenizer.readToken(fA),r=await this.tokenizer.readToken(new ze(A,"ascii"));a==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${a} (${r})`);break}case"ABSS":{let a=await this.tokenizer.readToken(LA),A=await this.tokenizer.readToken(fA),r=await this.tokenizer.readToken(fA),s=await this.tokenizer.readToken(xe);Ai(`ABSS ${a}:${A}:${r}.${s}`);break}case"LSCO":{let a=await this.tokenizer.readToken(LA);Ai(`LSCO lsConfig=${a}`);break}default:Ai(`Unknown sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`),await this.tokenizer.ignore(Number(o.chunkSize))}let e=o.chunkSize-BigInt(this.tokenizer.position-i);e>0&&(Ai(`After Parsing sound-property-chunk ${o.chunkSize}, remaining ${e} bytes`),await this.tokenizer.ignore(Number(e))),t-=BigInt(ul.len)+o.chunkSize,Ai(`Parsing sound-property-chunks, remainingSize=${t}`)}if(this.metadata.format.lossless&&this.metadata.format.sampleRate&&this.metadata.format.numberOfChannels&&this.metadata.format.bitsPerSample){let o=this.metadata.format.sampleRate*this.metadata.format.numberOfChannels*this.metadata.format.bitsPerSample;this.metadata.setFormat("bitrate",o)}}async handleChannelChunks(t){Ai(`Parsing channel-chunks, remainingSize=${t}`);let o=[];for(;t>=rt.len;){let i=await this.tokenizer.readToken(rt);Ai(`Channel[ID=${i}]`),o.push(i),t-=BigInt(rt.len)}return Ai(`Channels: ${o.join(", ")}`),o}}});var ate,ite=ue(()=>{ate={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],async load(){return(await Promise.resolve().then(()=>(rte(),tte))).DsdiffParser}}});var ote,xc,Qw,AL=ue(()=>{wA();ei();Zt();ote={NONE:"not compressed PCM Apple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl64:"64-bit floating point IEEE 64-bit float Apple Computer",alaw:"ALaw 2:1 8-bit ITU-T G.711 A-law",ulaw:"\xB5Law 2:1 8-bit ITU-T G.711 \xB5-law Apple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 \xB5-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32 IEEE 32-bit float "},xc=class extends Qt("AIFF"){},Qw=class{constructor(t,o){this.isAifc=o;let i=o?22:18;if(t.chunkSize>Math.abs(i):e<22){let A=fA.get(t,o+22);if(A>0){let r=(A+1)%2;if(23+A+r===this.len)a.compressionName=new ze(A,"latin1").get(t,o+23);else throw new xc("Illegal pstring length")}else a.compressionName=void 0}}else a.compressionName="PCM";return a}}});var yw,nte=ue(()=>{wA();ei();yw={len:8,get:(n,t)=>({chunkID:rt.get(n,t),chunkSize:Number(BigInt(xe.get(n,t+4)))})}});var gte={};Mr(gte,{AIFFParser:()=>rL});var ste,tL,rL,cte=ue(()=>{wA();ste=Ve(ct(),1);Go();rh();ei();Ti();AL();AL();nte();tL=(0,ste.default)("music-metadata:parser:aiff"),rL=class extends _t{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(yw)).chunkID!=="FORM")throw new xc("Invalid Chunk-ID, expected 'FORM'");let o=await this.tokenizer.readToken(rt);switch(o){case"AIFF":this.metadata.setFormat("container",o),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw new xc(`Unsupported AIFF type: ${o}`)}this.metadata.setFormat("lossless",!this.isCompressed),this.metadata.setAudioOnly();try{for(;!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=yw.len;){tL(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(yw),e=2*Math.round(i.chunkSize/2),a=await this.readData(i);await this.tokenizer.ignore(e-a)}}catch(i){if(i instanceof kA)tL("End-of-stream");else throw i}}async readData(t){switch(t.chunkID){case"COMM":{if(this.isCompressed===null)throw new xc("Failed to parse AIFF.COMM chunk when compression type is unknown");let o=await this.tokenizer.readToken(new Qw(t,this.isCompressed));return this.metadata.setFormat("bitsPerSample",o.sampleSize),this.metadata.setFormat("sampleRate",o.sampleRate),this.metadata.setFormat("numberOfChannels",o.numChannels),this.metadata.setFormat("numberOfSamples",o.numSampleFrames),this.metadata.setFormat("duration",o.numSampleFrames/o.sampleRate),(o.compressionName||o.compressionType)&&this.metadata.setFormat("codec",o.compressionName??ote[o.compressionType]),t.chunkSize}case"ID3 ":{let o=await this.tokenizer.readToken(new Dt(t.chunkSize)),i=Ao(o);return await new Yo().parse(this.metadata,i,this.options),t.chunkSize}case"SSND":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*t.chunkSize/this.metadata.format.duration),0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(t);default:return tL(`Ignore chunk id=${t.chunkID}, size=${t.chunkSize}`),0}}async readTextChunk(t){let i=(await this.tokenizer.readToken(new ze(t.chunkSize,"ascii"))).split("\0").map(e=>e.trim()).filter(e=>e?.length);return await Promise.all(i.map(e=>this.metadata.addTag("AIFF",t.chunkID,e))),t.chunkSize}}});var Ite,lte=ue(()=>{Ite={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],async load(){return(await Promise.resolve().then(()=>(cte(),gte))).AIFFParser}}});var BB,pte,dte,hte=ue(()=>{wA();ei();BB={len:12,get:(n,t)=>({id:rt.get(n,t),size:br.get(n,t+4)})},pte={len:16,get:(n,t)=>({fileSize:rB.get(n,t),metadataPointer:rB.get(n,t+8)})},dte={len:40,get:(n,t)=>({formatVersion:sr.get(n,t),formatID:sr.get(n,t+4),channelType:sr.get(n,t+8),channelNum:sr.get(n,t+12),samplingFrequency:sr.get(n,t+16),bitsPerSample:sr.get(n,t+20),sampleCount:rB.get(n,t+24),blockSizePerChannel:sr.get(n,t+32)})}});var Cte={};Mr(Cte,{DsdContentParseError:()=>mw,DsfParser:()=>iL});var Ete,aL,mw,iL,ute=ue(()=>{Ete=Ve(ct(),1);EB();hte();rh();Zt();aL=(0,Ete.default)("music-metadata:parser:DSF"),mw=class extends Qt("DSD"){},iL=class extends Ds{async postId3v2Parse(){let t=this.tokenizer.position,o=await this.tokenizer.readToken(BB);if(o.id!=="DSD ")throw new mw("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();let i=await this.tokenizer.readToken(pte);if(i.metadataPointer===BigInt(0))aL("No ID3v2 tag present");else return aL(`expect ID3v2 at offset=${i.metadataPointer}`),await this.parseChunks(i.fileSize-o.size),await this.tokenizer.ignore(Number(i.metadataPointer)-this.tokenizer.position-t),new Yo().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(t){for(;t>=BB.len;){let o=await this.tokenizer.readToken(BB);switch(aL(`Parsing chunk name=${o.id} size=${o.size}`),o.id){case"fmt ":{let i=await this.tokenizer.readToken(dte);this.metadata.setFormat("numberOfChannels",i.channelNum),this.metadata.setFormat("sampleRate",i.samplingFrequency),this.metadata.setFormat("bitsPerSample",i.bitsPerSample),this.metadata.setFormat("numberOfSamples",i.sampleCount),this.metadata.setFormat("duration",Number(i.sampleCount)/i.samplingFrequency);let e=i.bitsPerSample*i.samplingFrequency*i.channelNum;this.metadata.setFormat("bitrate",e);return}default:this.tokenizer.ignore(Number(o.size)-BB.len);break}t-=o.size}}}});var Bte,fte=ue(()=>{Bte={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],async load(){return(await Promise.resolve().then(()=>(ute(),Cte))).DsfParser}}});var Yc,fB,Qte,Sw=ue(()=>{wA();Gc();Yc=class n{static fromBase64(t){return n.fromBuffer(Uint8Array.from(atob(t),o=>o.charCodeAt(0)))}static fromBuffer(t){return new n(t.length).get(t,0)}constructor(t){this.len=t}get(t,o){let i=Wd[xe.get(t,o)];o+=4;let e=xe.get(t,o);o+=4;let a=new ze(e,"utf-8").get(t,o);o+=e;let A=xe.get(t,o);o+=4;let r=new ze(A,"utf-8").get(t,o);o+=A;let s=xe.get(t,o);o+=4;let g=xe.get(t,o);o+=4;let c=xe.get(t,o);o+=4;let I=xe.get(t,o);o+=4;let d=xe.get(t,o);o+=4;let B=t.slice(o,o+d);return{type:i,format:a,description:r,width:s,height:g,colour_depth:c,indexed_color:I,data:B}}},fB={len:7,get:(n,t)=>({packetType:fA.get(n,t),vorbis:new ze(6,"ascii").get(n,t+1)})},Qte={len:23,get:(n,t)=>({version:Fe.get(n,t+0),channelMode:fA.get(n,t+4),sampleRate:Fe.get(n,t+5),bitrateMax:Fe.get(n,t+9),bitrateNominal:Fe.get(n,t+13),bitrateMin:Fe.get(n,t+17)})}});var lh,oL=ue(()=>{wA();Cs();lh=class{constructor(t,o){this.data=t,this.offset=o}readInt32(){let t=Fe.get(this.data,this.offset);return this.offset+=4,t}readStringUtf8(){let t=this.readInt32(),o=fr(this.data.subarray(this.offset,this.offset+t),"utf-8");return this.offset+=t,o}parseUserComment(){let t=this.offset,o=this.readStringUtf8(),i=o.indexOf("=");return{key:o.substring(0,i).toUpperCase(),value:o.substring(i+1),len:this.offset-t}}}});var yte,ph,QB,ws,yB=ue(()=>{wA();yte=Ve(ct(),1);oL();Sw();Zt();ph=(0,yte.default)("music-metadata:parser:ogg:vorbis1"),QB=class extends Qt("Vorbis"){},ws=class n{constructor(t,o){this.pageSegments=[],this.durationOnLastPage=!0,this.metadata=t,this.options=o}async parsePage(t,o){if(this.lastPageHeader=t,t.headerType.firstPage)this.parseFirstPage(t,o);else{if(t.headerType.continued){if(this.pageSegments.length===0)throw new QB("Cannot continue on previous page");this.pageSegments.push(o)}if(t.headerType.lastPage||!t.headerType.continued){if(this.pageSegments.length>0){let i=n.mergeUint8Arrays(this.pageSegments);await this.parseFullPage(i)}this.pageSegments=t.headerType.lastPage?[]:[o]}}}static mergeUint8Arrays(t){let o=t.reduce((e,a)=>e+a.length,0),i=new Uint8Array(o);return t.forEach((e,a,A)=>{let r=A.slice(0,a).reduce((s,g)=>s+g.length,0);i.set(e,r)}),i}async flush(){await this.parseFullPage(n.mergeUint8Arrays(this.pageSegments))}async parseUserComment(t,o){let e=new lh(t,o).parseUserComment();return await this.addTag(e.key,e.value),e.len}async addTag(t,o){if(t==="METADATA_BLOCK_PICTURE"&&typeof o=="string"){if(this.options.skipCovers){ph("Ignore picture");return}o=Yc.fromBase64(o),ph(`Push picture: id=${t}, format=${o.format}`)}else ph(`Push tag: id=${t}, value=${o}`);await this.metadata.addTag("vorbis",t,o)}calculateDuration(t){this.lastPageHeader&&(t||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0&&(this.metadata.setFormat("numberOfSamples",this.lastPageHeader.absoluteGranulePosition),this.metadata.setFormat("duration",this.lastPageHeader.absoluteGranulePosition/this.metadata.format.sampleRate))}parseFirstPage(t,o){this.metadata.setFormat("codec","Vorbis I"),this.metadata.setFormat("hasAudio",!0),ph("Parse first page");let i=fB.get(o,0);if(i.vorbis!=="vorbis")throw new QB("Metadata does not look like Vorbis");if(i.packetType===1){let e=Qte.get(o,fB.len);this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("bitrate",e.bitrateNominal),this.metadata.setFormat("numberOfChannels",e.channelMode),ph("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",e.sampleRate,e.bitrateNominal,e.channelMode)}else throw new QB("First Ogg page should be type 1: the identification header")}async parseFullPage(t){let o=fB.get(t,0);switch(ph("Parse full page: type=%s, byteLength=%s",o.packetType,t.byteLength),o.packetType){case 3:return this.parseUserCommentList(t,fB.len);case 1:case 5:break}}async parseUserCommentList(t,o){let i=Fe.get(t,o);o+=4,o+=i;let e=Fe.get(t,o);for(o+=4;e-- >0;)o+=await this.parseUserComment(t,o)}}});var ti,mB,SB,nL=ue(()=>{Xt();wA();ti={STREAMINFO:0,PADDING:1,APPLICATION:2,SEEKTABLE:3,VORBIS_COMMENT:4,CUESHEET:5,PICTURE:6},mB={len:4,get:(n,t)=>({lastBlock:GA(n,t,7),type:ZA(n,t,1,7),length:Or.get(n,t+1)})},SB={len:34,get:(n,t)=>({minimumBlockSize:LA.get(n,t),maximumBlockSize:LA.get(n,t+2)/1e3,minimumFrameSize:Or.get(n,t+4),maximumFrameSize:Or.get(n,t+7),sampleRate:Or.get(n,t+10)>>4,channels:ZA(n,t+12,4,3)+1,bitsPerSample:ZA(n,t+12,7,5)+1,totalSamples:ZA(n,t+13,4,36),fileMD5:new Dt(16).get(n,t+18)})}});var Dte={};Mr(Dte,{FlacParser:()=>DB});var Ste,t3e,Dw,DB,sL=ue(()=>{Ste=Ve(ct(),1);wA();Sw();EB();ei();yB();oL();Zt();nL();t3e=(0,Ste.default)("music-metadata:parser:FLAC"),Dw=class extends Qt("FLAC"){},DB=class extends Ds{constructor(){super(...arguments),this.vorbisParser=new ws(this.metadata,this.options)}async postId3v2Parse(){if((await this.tokenizer.readToken(rt)).toString()!=="fLaC")throw new Dw("Invalid FLAC preamble");let o;do o=await this.tokenizer.readToken(mB),await this.parseDataBlock(o);while(!o.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){let i=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*i/this.metadata.format.duration)}}async parseDataBlock(t){switch(t3e(`blockHeader type=${t.type}, length=${t.length}`),t.type){case ti.STREAMINFO:return this.readBlockStreamInfo(t.length);case ti.PADDING:break;case ti.APPLICATION:break;case ti.SEEKTABLE:break;case ti.VORBIS_COMMENT:return this.readComment(t.length);case ti.CUESHEET:break;case ti.PICTURE:await this.parsePicture(t.length);return;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}async readBlockStreamInfo(t){if(t!==SB.len)throw new Dw("Unexpected block-stream-info length");let o=await this.tokenizer.readToken(SB);this.metadata.setFormat("container","FLAC"),this.processsStreamInfo(o)}processsStreamInfo(t){this.metadata.setFormat("codec","FLAC"),this.metadata.setFormat("hasAudio",!0),this.metadata.setFormat("lossless",!0),this.metadata.setFormat("numberOfChannels",t.channels),this.metadata.setFormat("bitsPerSample",t.bitsPerSample),this.metadata.setFormat("sampleRate",t.sampleRate),t.totalSamples>0&&this.metadata.setFormat("duration",t.totalSamples/t.sampleRate)}async readComment(t){let o=await this.tokenizer.readToken(new Dt(t));return this.parseComment(o)}async parseComment(t){let o=new lh(t,0),i=o.readStringUtf8();i.length>0&&this.metadata.setFormat("tool",i);let e=o.readInt32(),a=new Array(e);for(let A=0;A(A.key==="ENCODER"&&this.metadata.setFormat("tool",A.value),this.addTag(A.key,A.value))))}async parsePicture(t){return this.options.skipCovers?this.tokenizer.ignore(t):this.addPictureTag(await this.tokenizer.readToken(new Yc(t)))}addPictureTag(t){return this.addTag("METADATA_BLOCK_PICTURE",t)}addTag(t,o){return this.vorbisParser.addTag(t,o)}}});var wte,Ote=ue(()=>{wte={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],async load(){return(await Promise.resolve().then(()=>(sL(),Dte))).FlacParser}}});var Me,gL=ue(()=>{Me={string:0,uint:1,uid:2,bool:3,binary:4,float:5}});var bte,Mte=ue(()=>{gL();bte={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:Me.uint},17143:{name:"ebmlReadVersion",value:Me.uint},17138:{name:"ebmlMaxIDWidth",value:Me.uint},17139:{name:"ebmlMaxSizeWidth",value:Me.uint},17026:{name:"docType",value:Me.string},17031:{name:"docTypeVersion",value:Me.uint},17029:{name:"docTypeReadVersion",value:Me.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:Me.binary},21420:{name:"position",value:Me.uint}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:Me.uid},29572:{name:"filename",value:Me.string},3979555:{name:"prevUID",value:Me.uid},3965867:{name:"prevFilename",value:Me.string},4110627:{name:"nextUID",value:Me.uid},4096955:{name:"nextFilename",value:Me.string},2807729:{name:"timecodeScale",value:Me.uint},17545:{name:"duration",value:Me.float},17505:{name:"dateUTC",value:Me.uint},31657:{name:"title",value:Me.string},19840:{name:"muxingApp",value:Me.string},22337:{name:"writingApp",value:Me.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:Me.uid},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:Me.uid},171:{name:"prevSize",value:Me.uid},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:Me.uint},29637:{name:"uid",value:Me.uid},131:{name:"trackType",value:Me.uint},185:{name:"flagEnabled",value:Me.bool},136:{name:"flagDefault",value:Me.bool},21930:{name:"flagForced",value:Me.bool},156:{name:"flagLacing",value:Me.bool},28135:{name:"minCache",value:Me.uint},28136:{name:"maxCache",value:Me.uint},2352003:{name:"defaultDuration",value:Me.uint},2306383:{name:"timecodeScale",value:Me.float},21358:{name:"name",value:Me.string},2274716:{name:"language",value:Me.string},134:{name:"codecID",value:Me.string},25506:{name:"codecPrivate",value:Me.binary},2459272:{name:"codecName",value:Me.string},3839639:{name:"codecSettings",value:Me.string},3883072:{name:"codecInfoUrl",value:Me.string},2536e3:{name:"codecDownloadUrl",value:Me.string},170:{name:"codecDecodeAll",value:Me.bool},28587:{name:"trackOverlay",value:Me.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:Me.bool},21432:{name:"stereoMode",value:Me.uint},176:{name:"pixelWidth",value:Me.uint},186:{name:"pixelHeight",value:Me.uint},21680:{name:"displayWidth",value:Me.uint},21690:{name:"displayHeight",value:Me.uint},21683:{name:"aspectRatioType",value:Me.uint},3061028:{name:"colourSpace",value:Me.uint},3126563:{name:"gammaValue",value:Me.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:Me.float},30901:{name:"outputSamplingFrequency",value:Me.float},159:{name:"channels",value:Me.uint},148:{name:"channels",value:Me.uint},32123:{name:"channelPositions",value:Me.binary},25188:{name:"bitDepth",value:Me.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:Me.uint},20530:{name:"scope",value:Me.bool},20531:{name:"type",value:Me.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:Me.uint},16981:{name:"contentCompSettings",value:Me.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:Me.uint},18402:{name:"contentEncKeyID",value:Me.binary},18403:{name:"contentSignature ",value:Me.binary},18404:{name:"ContentSigKeyID ",value:Me.binary},18405:{name:"contentSigAlgo ",value:Me.uint},18406:{name:"contentSigHashAlgo ",value:Me.uint}}},25188:{name:"bitDepth",value:Me.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:Me.uid},183:{name:"positions",container:{247:{name:"track",value:Me.uint},241:{name:"clusterPosition",value:Me.uint},21368:{name:"blockNumber",value:Me.uint},234:{name:"codecState",value:Me.uint},219:{name:"reference",container:{150:{name:"time",value:Me.uint},151:{name:"cluster",value:Me.uint},21343:{name:"number",value:Me.uint},235:{name:"codecState",value:Me.uint}}},240:{name:"relativePosition",value:Me.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:Me.string},18030:{name:"name",value:Me.string},18016:{name:"mimeType",value:Me.string},18012:{name:"data",value:Me.binary},18094:{name:"uid",value:Me.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:Me.uid},145:{name:"timeStart",value:Me.uint},146:{name:"timeEnd",value:Me.uid},152:{name:"hidden",value:Me.bool},17816:{name:"enabled",value:Me.uid},143:{name:"track",container:{137:{name:"trackNumber",value:Me.uid},128:{name:"display",container:{133:{name:"string",value:Me.string},17276:{name:"language ",value:Me.string},17278:{name:"country ",value:Me.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:Me.uid},25540:{name:"tagChapterUID",value:Me.uint},25542:{name:"tagAttachmentUID",value:Me.uid},25546:{name:"targetType",value:Me.string},26826:{name:"targetTypeValue",value:Me.uint},25545:{name:"tagEditionUID",value:Me.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:Me.string},17543:{name:"string",value:Me.string},17541:{name:"binary",value:Me.binary},17530:{name:"language",value:Me.string},17531:{name:"languageIETF",value:Me.string},17540:{name:"default",value:Me.bool}}}}}}}}}}}});function cL(n,t){return Number(r3e(n,t))}function r3e(n,t){let o=new Uint8Array(8),i=n.subarray(0,t);try{return o.set(i,8-t),fs.get(o,0)}catch{return BigInt(-1)}}function Tte(n){return n.container&&Object.keys(n.container).map(t=>{let o=n.container[t];return o.id=Number.parseInt(t,10),o}).forEach(t=>{t.parent=n,Tte(t)}),n}function Bl(n){let t="";return n.parent&&n.parent.name!=="dtd"&&(t+=`${Bl(n.parent)}/`),t+n.name}var _te,dh,ww,Os,Ow,Nte=ue(()=>{wA();_te=Ve(ct(),1);Go();gL();wA();Zt();dh=(0,_te.default)("music-metadata:parser:ebml"),ww=class extends Qt("EBML"){},Os={ReadNext:0,IgnoreElement:2,SkipSiblings:3,TerminateParsing:4,SkipElement:5},Ow=class{constructor(t){this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=t,this.parserMap.set(Me.uint,o=>this.readUint(o)),this.parserMap.set(Me.string,o=>this.readString(o)),this.parserMap.set(Me.binary,o=>this.readBuffer(o)),this.parserMap.set(Me.uid,async o=>this.readBuffer(o)),this.parserMap.set(Me.bool,o=>this.readFlag(o)),this.parserMap.set(Me.float,o=>this.readFloat(o))}async iterate(t,o,i){return this.parseContainer(Tte(t),o,i)}async parseContainer(t,o,i){let e={};for(;this.tokenizer.position=0?this.tokenizer.position+a.len:-1,i);r.multiple?(e[r.name]||(e[r.name]=[]),e[r.name].push(g)):e[r.name]=g,await i.elementValue(r,g,A)}else{let g=this.parserMap.get(r.value);if(typeof g=="function"){let c=await g(a);e[r.name]=c,await i.elementValue(r,c,A)}}break;case Os.SkipElement:dh(`Go to next element: name=${Bl(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`);break;case Os.IgnoreElement:dh(`Ignore element: name=${Bl(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(a.len);break;case Os.SkipSiblings:dh(`Ignore remaining container, at: name=${Bl(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(o-this.tokenizer.position);break;case Os.TerminateParsing:return dh(`Terminate parsing at element: name=${Bl(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`),e}else switch(a.id){case 236:await this.tokenizer.ignore(a.len);break;default:dh(`parseEbml: parent=${Bl(t)}, unknown child: id=${a.id.toString(16)} at position=${A}`),await this.tokenizer.ignore(a.len)}}return e}async readVintData(t){let o=await this.tokenizer.peekNumber(fA),i=128,e=1;for(;(o&i)===0;){if(e>t)throw new ww("VINT value exceeding maximum size");++e,i>>=1}let a=new Uint8Array(e);return await this.tokenizer.readBuffer(a),a}async readElement(){let t=await this.readVintData(this.ebmlMaxIDLength),o=await this.readVintData(this.ebmlMaxSizeLength);return o[0]^=128>>o.length-1,{id:cL(t,t.length),len:cL(o,o.length)}}async readFloat(t){switch(t.len){case 0:return 0;case 4:return this.tokenizer.readNumber(fF);case 8:return this.tokenizer.readNumber(JD);case 10:return this.tokenizer.readNumber(JD);default:throw new ww(`Invalid IEEE-754 float length: ${t.len}`)}}async readFlag(t){return await this.readUint(t)===1}async readUint(t){let o=await this.readBuffer(t);return cL(o,t.len)}async readString(t){return(await this.tokenizer.readToken(new ze(t.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(t){let o=new Uint8Array(t.len);return await this.tokenizer.readBuffer(o),o}}});var kte={};Mr(kte,{MatroskaParser:()=>IL});var Rte,bw,IL,vte=ue(()=>{Rte=Ve(ct(),1);Ti();Mte();NF();Nte();bw=(0,Rte.default)("music-metadata:parser:matroska"),IL=class extends _t{constructor(){super(...arguments),this.seekHeadOffset=0,this.flagUseIndexToSkipClusters=this.options.mkvUseIndex??!1}async parse(){let t=this.tokenizer.fileInfo.size??Number.MAX_SAFE_INTEGER,o=new Ow(this.tokenizer);bw("Initializing DTD end MatroskaIterator"),await o.iterate(bte,t,{startNext:i=>{switch(i.id){case 475249515:return bw(`Skip element: name=${i.name}, id=0x${i.id.toString(16)}`),Os.IgnoreElement;case 524531317:if(this.flagUseIndexToSkipClusters&&this.seekHead){let e=this.seekHead.seek.find(a=>a.position+this.seekHeadOffset>this.tokenizer.position);if(e){let a=e.position+this.seekHeadOffset-this.tokenizer.position;return bw(`Use index to go to next position, ignoring ${a} bytes`),this.tokenizer.ignore(a),Os.SkipElement}}return Os.IgnoreElement;default:return Os.ReadNext}},elementValue:async(i,e,a)=>{switch(bw(`Received: name=${i.name}, value=${e}`),i.id){case 17026:this.metadata.setFormat("container",`EBML/${e}`);break;case 290298740:this.seekHead=e,this.seekHeadOffset=a;break;case 357149030:{let A=e,r=A.timecodeScale?A.timecodeScale:1e6;if(typeof A.duration=="number"){let s=A.duration*r/1e9;await this.addTag("segment:title",A.title),this.metadata.setFormat("duration",Number(s))}}break;case 374648427:{let A=e;if(A?.entries){A.entries.forEach(s=>{let g={codecName:s.codecID.replace("A_","").replace("V_",""),codecSettings:s.codecSettings,flagDefault:s.flagDefault,flagLacing:s.flagLacing,flagEnabled:s.flagEnabled,language:s.language,name:s.name,type:s.trackType,audio:s.audio,video:s.video};this.metadata.addStreamInfo(g)});let r=A.entries.filter(s=>s.trackType===na.audio).reduce((s,g)=>!s||g.flagDefault&&!s.flagDefault||g.trackNumber{let s=r.target,g=s?.targetTypeValue?Yee[s.targetTypeValue]:s?.targetType?s.targetType:"track";await Promise.all(r.simpleTags.map(async c=>{let I=c.string?c.string:c.binary;await this.addTag(`${g}:${c.name}`,I)}))}))}break;case 423732329:{let A=e;await Promise.all(A.attachedFiles.filter(r=>r.mimeType.startsWith("image/")).map(r=>this.addTag("picture",{data:r.data,format:r.mimeType,description:r.description,name:r.name})))}break}}})}async addTag(t,o){await this.metadata.addTag("matroska",t,o)}}});var Pte,Gte=ue(()=>{Pte={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],async load(){return(await Promise.resolve().then(()=>(vte(),kte))).MatroskaParser}}});function Kte(n,t,o,i,e){if(pL(`remainingLen=${i}, numberOfEntries=${e} * token-len=${t.len}`),i===0)return[];if(i!==e*t.len)throw new wg("mismatch number-of-entries with remaining atom-length");let a=[];for(let A=0;A{wA();Lte=Ve(ct(),1);ei();Zt();Xt();Zt();pL=(0,Lte.default)("music-metadata:parser:MP4:atom"),wg=class extends Qt("MP4"){},fl={len:8,get:(n,t)=>{let o=xe.get(n,t);if(o<0)throw new wg("Invalid atom header length");return{length:BigInt(o),name:new ze(4,"latin1").get(n,t+4)}},put:(n,t,o)=>(xe.put(n,t,Number(o.length)),rt.put(n,t+4,o.name))},Ute=fs,dL={len:4,get:(n,t)=>({type:new ze(4,"ascii").get(n,t)})},Mw=class{constructor(t,o,i){if(to&&pL(`Warning: atom ${i} expected to be ${o}, but was actually ${t} bytes long.`),this.len=t}},hh={len:4,get:(n,t)=>{let o=xe.get(n,t)-2082844800;return new Date(o*1e3)}},Eh={len:8,get:(n,t)=>{let o=Number(fs.get(n,t))-2082844800;return new Date(o*1e3)}},_w=class extends Mw{constructor(t){super(t,24,"mdhd")}get(t,o){let i=fA.get(t,o+0),e=Or.get(t,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:hh.get(t,o+4),modificationTime:hh.get(t,o+8),timeScale:xe.get(t,o+12),duration:xe.get(t,o+16),language:LA.get(t,o+20),quality:LA.get(t,o+22)};case 1:return{version:i,flags:e,creationTime:Eh.get(t,o+4),modificationTime:Eh.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(fs.get(t,o+24)),language:LA.get(t,o+32),quality:LA.get(t,o+34)};default:throw new Uo("Invalid mdhd version header")}}},Tw=class extends Mw{constructor(t){super(t,100,"mvhd")}get(t,o){let i=fA.get(t,o),e=Or.get(t,o+1);return i===1?{version:i,flags:e,creationTime:Eh.get(t,o+4),modificationTime:Eh.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(fs.get(t,o+24)),preferredRate:xe.get(t,o+32),preferredVolume:LA.get(t,o+36),previewTime:xe.get(t,o+84),previewDuration:xe.get(t,o+88),posterTime:xe.get(t,o+92),selectionTime:xe.get(t,o+96),selectionDuration:xe.get(t,o+100),currentTime:xe.get(t,o+104),nextTrackID:xe.get(t,o+108)}:{version:i,flags:e,creationTime:hh.get(t,o+4),modificationTime:hh.get(t,o+8),timeScale:xe.get(t,o+12),duration:xe.get(t,o+16),preferredRate:xe.get(t,o+20),preferredVolume:LA.get(t,o+24),previewTime:xe.get(t,o+72),previewDuration:xe.get(t,o+76),posterTime:xe.get(t,o+80),selectionTime:xe.get(t,o+84),selectionDuration:xe.get(t,o+88),currentTime:xe.get(t,o+92),nextTrackID:xe.get(t,o+96)}}},Nw=class{constructor(t){this.len=t}get(t,o){return{type:{set:fA.get(t,o+0),type:Or.get(t,o+1)},locale:Or.get(t,o+4),value:new Dt(this.len-8).get(t,o+8)}}},Rw=class{constructor(t){this.len=t}get(t,o){return{version:fA.get(t,o),flags:Or.get(t,o+1),name:new ze(this.len-4,"utf-8").get(t,o+4)}}},kw=class{constructor(t){this.len=t}get(t,o){let i=fA.get(t,o),e=Or.get(t,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:hh.get(t,o+4),modificationTime:hh.get(t,o+8),trackId:xe.get(t,o+12),duration:xe.get(t,o+20),layer:LA.get(t,o+32),alternateGroup:LA.get(t,o+34),volume:LA.get(t,o+36)};case 1:return{version:i,flags:e,creationTime:Eh.get(t,o+4),modificationTime:Eh.get(t,o+12),trackId:xe.get(t,o+20),duration:Number(fs.get(t,o+28)),layer:LA.get(t,o+44),alternateGroup:LA.get(t,o+46),volume:LA.get(t,o+48)};default:throw new Uo("Invalid tkhd version header")}}},Fte={len:8,get:(n,t)=>({version:fA.get(n,t),flags:Or.get(n,t+1),numberOfEntries:xe.get(n,t+4)})},lL=class{constructor(t){this.len=t}get(t,o){let i=this.len-12;return{dataFormat:rt.get(t,o),dataReferenceIndex:LA.get(t,o+10),description:i>0?new Dt(i).get(t,o+12):void 0}}},wB=class{constructor(t){this.len=t}get(t,o){let i=Fte.get(t,o);o+=Fte.len;let e=[];for(let a=0;a=this.len){pL("TrackRunBox size mismatch");break}let r={};e.flags.sampleDurationPresent&&(r.sampleDuration=xe.get(t,a),a+=4),e.flags.sampleSizePresent&&(r.sampleSize=xe.get(t,a),a+=4),e.flags.sampleFlagsPresent&&(r.sampleFlags=xe.get(t,a),a+=4),e.flags.sampleCompositionTimeOffsetsPresent&&(r.sampleCompositionTimeOffset=xe.get(t,a),a+=4),e.samples.push(r)}return e}},Hw=class{constructor(t){this.len=t}get(t,o){let i=o+1,e=new ze(4,"utf-8");return{version:Bs.get(t,o),flags:Or.get(t,o+1),componentType:e.get(t,o+4),handlerType:e.get(t,o+8),componentName:new ze(this.len-28,"utf-8").get(t,o+28)}}},Kw=class{constructor(t){this.len=t}get(t,o){let i=0,e=[];for(;i{jte=Ve(ct(),1);MB();MB();Yte=(0,jte.default)("music-metadata:parser:MP4:Atom"),xw=class n{static async readAtom(t,o,i,e){let a=t.position;Yte(`Reading next token on offset=${a}...`);let A=await t.readToken(fl),r=A.length===1n;r&&(A.length=await t.readToken(Ute));let s=new n(A,r,i),g=s.getPayloadLength(e);return Yte(`parse atom name=${s.atomPath}, extended=${s.extended}, offset=${a}, len=${s.header.length}`),await s.readData(t,o,g),s}constructor(t,o,i){this.header=t,this.extended=o,this.parent=i,this.children=[],this.atomPath=(this.parent?`${this.parent.atomPath}.`:"")+this.header.name}getHeaderLength(){return this.extended?16:8}getPayloadLength(t){return(this.header.length===0n?t:Number(this.header.length))-this.getHeaderLength()}async readAtoms(t,o,i){for(;i>0;){let e=await n.readAtom(t,o,this,i);this.children.push(e),i-=e.header.length===0n?i:Number(e.header.length)}}async readData(t,o,i){switch(this.header.name){case"moov":case"udta":case"mdia":case"minf":case"stbl":case"":case"ilst":case"tref":case"moof":return this.readAtoms(t,o,this.getPayloadLength(i));case"meta":{let a=(await t.peekToken(fl)).name==="hdlr"?0:4;return await t.ignore(a),this.readAtoms(t,o,this.getPayloadLength(i)-a)}default:return o(this,i)}}}});var Wte={};Mr(Wte,{MP4Parser:()=>EL});function zte(n,t,o){return o.indexOf(n)===t}var Vte,Ri,o3e,qte,EL,Zte=ue(()=>{Vte=Ve(ct(),1);wA();Ti();pB();Jte();MB();MB();Il();oB();Cs();Ri=(0,Vte.default)("music-metadata:parser:MP4"),o3e="iTunes",qte={raw:{lossy:!1,format:"raw"},MAC3:{lossy:!0,format:"MACE 3:1"},MAC6:{lossy:!0,format:"MACE 6:1"},ima4:{lossy:!0,format:"IMA 4:1"},ulaw:{lossy:!0,format:"uLaw 2:1"},alaw:{lossy:!0,format:"uLaw 2:1"},Qclp:{lossy:!0,format:"QUALCOMM PureVoice"},".mp3":{lossy:!0,format:"MPEG-1 layer 3"},alac:{lossy:!1,format:"ALAC"},"ac-3":{lossy:!0,format:"AC-3"},mp4a:{lossy:!0,format:"MPEG-4/AAC"},mp4s:{lossy:!0,format:"MP4S"},c608:{lossy:!0,format:"CEA-608"},c708:{lossy:!0,format:"CEA-708"}};EL=class n extends _t{constructor(){super(...arguments),this.tracks=new Map,this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.atomParsers={mvhd:async t=>{let o=await this.tokenizer.readToken(new Tw(t));this.metadata.setFormat("creationTime",o.creationTime),this.metadata.setFormat("modificationTime",o.modificationTime)},chap:async t=>{let o=this.getTrackDescription(),i=[];for(;t>=xe.len;)i.push(await this.tokenizer.readNumber(xe)),t-=xe.len;o.chapterList=i},mdat:async t=>{if(this.options.includeChapters){let o=[...this.tracks.values()].filter(i=>i.chapterList);if(o.length===1){let i=o[0].chapterList,e=[...this.tracks.values()].filter(a=>i.indexOf(a.header.trackId)!==-1);if(e.length===1)return this.parseChapterTrack(e[0],o[0],t)}}await this.tokenizer.ignore(t)},ftyp:async t=>{let o=[];for(;t>0;){let e=await this.tokenizer.readToken(dL);t-=dL.len;let a=e.type.replace(/\W/g,"");a.length>0&&o.push(a)}Ri(`ftyp: ${o.join("/")}`);let i=o.filter(zte).join("/");this.metadata.setFormat("container",i)},stsd:async t=>{let o=await this.tokenizer.readToken(new wB(t)),i=this.getTrackDescription();i.soundSampleDescription=o.table.map(e=>this.parseSoundSampleDescription(e))},stsz:async t=>{let o=await this.tokenizer.readToken(new bB(t)),i=this.getTrackDescription();i.sampleSize=o.sampleSize,i.sampleSizeTable=o.entries},date:async t=>{let o=await this.tokenizer.readToken(new ze(t,"utf-8"));await this.addTag("date",o)}}}static read_BE_Integer(t,o){let i=(o?"INT":"UINT")+t.length*8+(t.length>1?"_BE":""),e=VA[i];if(!e)throw new wg(`Token for integer type not found: "${i}"`);return Number(e.get(t,0))}async parse(){this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.tracks.clear();let t=this.tokenizer.fileInfo.size||0;for(;!this.tokenizer.fileInfo.size||t>0;){try{if((await this.tokenizer.peekToken(fl)).name==="\0\0\0\0"){let A=`Error at offset=${this.tokenizer.position}: box.id=0`;Ri(A),this.addWarning(A);break}}catch(a){if(a instanceof Error){let A=`Error at offset=${this.tokenizer.position}: ${a.message}`;Ri(A),this.addWarning(A)}else throw a;break}let e=await xw.readAtom(this.tokenizer,(a,A)=>this.handleAtom(a,A),null,t);t-=e.header.length===BigInt(0)?t:Number(e.header.length)}let o=[];this.tracks.forEach(e=>{let a=[];e.soundSampleDescription.forEach(A=>{let r={},s=qte[A.dataFormat];if(s?(a.push(s.format),r.codecName=s.format):r.codecName=`<${A.dataFormat}>`,A.description){let{description:g}=A;g.sampleRate>0&&(r.type=na.audio,r.audio={samplingFrequency:g.sampleRate,bitDepth:g.sampleSize,channels:g.numAudioChannels})}this.metadata.addStreamInfo(r)}),a.length>=1&&o.push(a.join("/"))}),o.length>0&&this.metadata.setFormat("codec",o.filter(zte).join("+"));let i=[...this.tracks.values()].filter(e=>e.soundSampleDescription.length>=1&&e.soundSampleDescription[0].description&&e.soundSampleDescription[0].description.numAudioChannels>0);for(let e of i){if(e.media.header&&e.media.header.timeScale>0)if(e.sampleRate=e.media.header.timeScale,e.media.header.duration>0&&(Ri("Using duration defined on audio track"),e.samples=e.media.header.duration,e.duration=e.samples/e.sampleRate),e.fragments.length>0){Ri("Calculate duration defined in track fragments");let r=0;e.sizeInBytes=0;for(let s of e.fragments)for(let g of s.trackRun.samples){let c=g.sampleDuration??s.header.defaultSampleDuration??0,I=g.sampleSize??s.header.defaultSampleSize??0;if(c===0)throw new Error("Missing sampleDuration and no defaultSampleDuration in track fragment header");if(I===0)throw new Error("Missing sampleSize and no defaultSampleSize in track fragment header");r+=c,e.sizeInBytes+=I}e.samples||(e.samples=r),e.duration||(e.duration=r/e.sampleRate)}else e.sampleSizeTable.length>0&&(e.sizeInBytes=e.sampleSizeTable.reduce((r,s)=>r+s,0));let a=e.soundSampleDescription[0];if(a.description&&e.media.header&&(this.metadata.setFormat("sampleRate",a.description.sampleRate),this.metadata.setFormat("bitsPerSample",a.description.sampleSize),this.metadata.setFormat("numberOfChannels",a.description.numAudioChannels),e.media.header.timeScale===0&&e.timeToSampleTable.length>0)){let r=e.timeToSampleTable.map(s=>s.count*s.duration).reduce((s,g)=>s+g);e.duration=r/a.description.sampleRate}let A=qte[a.dataFormat];A&&this.metadata.setFormat("lossless",!A.lossy)}if(i.length>=1){let e=i[0];e.duration&&(this.metadata.setFormat("duration",e.duration),e.sizeInBytes&&this.metadata.setFormat("bitrate",8*e.sizeInBytes/e.duration))}this.metadata.setFormat("hasAudio",this.hasAudioTrack),this.metadata.setFormat("hasVideo",this.hasVideoTrack)}async handleAtom(t,o){if(t.parent)switch(t.parent.header.name){case"ilst":case"":return this.parseMetadataItemData(t);case"moov":switch(t.header.name){case"trak":return this.parseTrackBox(t);case"udta":return this.parseTrackBox(t)}break;case"moof":switch(t.header.name){case"traf":return this.parseTrackFragmentBox(t)}}if(this.atomParsers[t.header.name])return this.atomParsers[t.header.name](o);Ri(`No parser for atom path=${t.atomPath}, payload-len=${o}, ignoring atom`),await this.tokenizer.ignore(o)}getTrackDescription(){let t=[...this.tracks.values()];return t[t.length-1]}async addTag(t,o){await this.metadata.addTag(o3e,t,o)}addWarning(t){Ri(`Warning: ${t}`),this.metadata.addWarning(t)}parseMetadataItemData(t){let o=t.header.name;return t.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"data":return this.parseValueAtom(o,i);case"name":case"mean":case"rate":{let A=await this.tokenizer.readToken(new Rw(a));o+=`:${A.name}`;break}default:{let A=await this.tokenizer.readToken(new Dt(a));this.addWarning(`Unsupported meta-item: ${o}[${i.header.name}] => value=${zD(A)} ascii=${fr(A,"ascii")}`)}}},t.getPayloadLength(0))}async parseValueAtom(t,o){let i=await this.tokenizer.readToken(new Nw(Number(o.header.length)-fl.len));if(i.type.set!==0)throw new wg(`Unsupported type-set != 0: ${i.type.set}`);switch(i.type.type){case 0:switch(t){case"trkn":case"disk":{let e=fA.get(i.value,3),a=fA.get(i.value,5);await this.addTag(t,`${e}/${a}`);break}case"gnre":{let e=fA.get(i.value,1),a=th[e-1];await this.addTag(t,a);break}case"rate":{let e=fr(i.value,"ascii");await this.addTag(t,e);break}default:Ri(`unknown proprietary value type for: ${o.atomPath}`)}break;case 1:case 18:await this.addTag(t,fr(i.value));break;case 13:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/jpeg",data:Uint8Array.from(i.value)});break;case 14:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/png",data:Uint8Array.from(i.value)});break;case 21:await this.addTag(t,n.read_BE_Integer(i.value,!0));break;case 22:await this.addTag(t,n.read_BE_Integer(i.value,!1));break;case 65:await this.addTag(t,fA.get(i.value,0));break;case 66:await this.addTag(t,LA.get(i.value,0));break;case 67:await this.addTag(t,xe.get(i.value,0));break;default:this.addWarning(`atom key=${t}, has unknown well-known-type (data-type): ${i.type.type}`)}}async parseTrackBox(t){let o={media:{},fragments:[]};await t.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"chap":{let A=await this.tokenizer.readToken(new Kw(e));o.chapterList=A;break}case"tkhd":o.header=await this.tokenizer.readToken(new kw(a));break;case"hdlr":o.handler=await this.tokenizer.readToken(new Hw(a)),o.isAudio=()=>o.handler.handlerType==="audi"||o.handler.handlerType==="soun",o.isVideo=()=>o.handler.handlerType==="vide",o.isAudio()?this.hasAudioTrack=!0:o.isVideo()&&(this.hasVideoTrack=!0);break;case"mdhd":{let A=await this.tokenizer.readToken(new _w(a));o.media.header=A;break}case"stco":{let A=await this.tokenizer.readToken(new Gw(a));o.chunkOffsetTable=A.entries;break}case"stsc":{let A=await this.tokenizer.readToken(new Pw(a));o.sampleToChunkTable=A.entries;break}case"stsd":{let A=await this.tokenizer.readToken(new wB(a));o.soundSampleDescription=A.table.map(r=>this.parseSoundSampleDescription(r));break}case"stts":{let A=await this.tokenizer.readToken(new vw(a));o.timeToSampleTable=A.entries;break}case"stsz":{let A=await this.tokenizer.readToken(new bB(a));o.sampleSize=A.sampleSize,o.sampleSizeTable=A.entries;break}case"dinf":case"vmhd":case"smhd":Ri(`Ignoring: ${i.header.name}`),await this.tokenizer.ignore(a);break;default:Ri(`Unexpected track box: ${i.header.name}`),await this.tokenizer.ignore(a)}},t.getPayloadLength(0)),this.tracks.set(o.header.trackId,o)}parseTrackFragmentBox(t){let o;return t.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"tfhd":{let A=new Lw(i.getPayloadLength(e));o=await this.tokenizer.readToken(A);break}case"tfdt":await this.tokenizer.ignore(a);break;case"trun":{let A=new Uw(a),r=await this.tokenizer.readToken(A);o&&this.tracks.get(o.trackId)?.fragments.push({header:o,trackRun:r});break}default:Ri(`Unexpected box: ${i.header.name}`),await this.tokenizer.ignore(a)}},t.getPayloadLength(0))}parseSoundSampleDescription(t){let o={dataFormat:t.dataFormat,dataReferenceIndex:t.dataReferenceIndex},i=0;if(t.description){let e=hL.get(t.description,i);i+=hL.len,e.version===0||e.version===1?o.description=Hte.get(t.description,i):Ri(`Warning: sound-sample-description ${e} not implemented`)}return o}async parseChapterTrack(t,o,i){if(!t.sampleSize&&t.chunkOffsetTable.length!==t.sampleSizeTable.length)throw new Error("Expected equal chunk-offset-table & sample-size-table length.");let e=[];for(let a=0;a0;++a){let A=t.timeToSampleTable.slice(0,a).reduce((d,B)=>d+B.duration,0),s=t.chunkOffsetTable[a]-this.tokenizer.position,g=t.sampleSize>0?t.sampleSize:t.sampleSizeTable[a];if(i-=s+g,i<0)throw new wg("Chapter chunk exceeding token length");await this.tokenizer.ignore(s);let c=await this.tokenizer.readToken(new Fw(g));Ri(`Chapter ${a+1}: ${c}`);let I={title:c,timeScale:t.media.header?t.media.header.timeScale:0,start:A,sampleOffset:this.findSampleOffset(o,this.tokenizer.position)};Ri(`Chapter title=${I.title}, offset=${I.sampleOffset}/${o.header.duration}`),e.push(I)}this.metadata.setFormat("chapters",e),await this.tokenizer.ignore(i)}findSampleOffset(t,o){let i=0;for(;i=o[i].firstChunk&&t{Xte={parserType:"mp4",extensions:[".mp4",".m4a",".m4b",".m4pa","m4v","m4r","3gp",".mov",".movie",".qt"],mimeTypes:["audio/mp4","audio/m4a","video/m4v","video/mp4","video/quicktime"],async load(){return(await Promise.resolve().then(()=>(Zte(),Wte))).MP4Parser}}});var rre,ere,n3e,Are,tre,Yw,are=ue(()=>{wA();rre=Ve(ct(),1);Xt();ere=(0,rre.default)("music-metadata:parser:musepack:sv8"),n3e=new ze(2,"latin1"),Are={len:5,get:(n,t)=>({crc:Fe.get(n,t),streamVersion:fA.get(n,t+4)})},tre={len:2,get:(n,t)=>({sampleFrequency:[44100,48e3,37800,32e3][ZA(n,t,0,3)],maxUsedBands:ZA(n,t,3,5),channelCount:ZA(n,t+1,0,4)+1,msUsed:ya(n,t+1,4),audioBlockFrames:ZA(n,t+1,5,3)})},Yw=class{get tokenizer(){return this._tokenizer}set tokenizer(t){this._tokenizer=t}constructor(t){this._tokenizer=t}async readPacketHeader(){let t=await this.tokenizer.readToken(n3e),o=await this.readVariableSizeField();return{key:t,payloadLength:o.value-2-o.len}}async readStreamHeader(t){let o={};ere(`Reading SH at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(Are);t-=Are.len,Object.assign(o,i),ere(`SH.streamVersion = ${i.streamVersion}`);let e=await this.readVariableSizeField();t-=e.len,o.sampleCount=e.value;let a=await this.readVariableSizeField();t-=a.len,o.beginningOfSilence=a.value;let A=await this.tokenizer.readToken(tre);return t-=tre.len,Object.assign(o,A),await this.tokenizer.ignore(t),o}async readVariableSizeField(t=1,o=0){let i=await this.tokenizer.readNumber(fA);return(i&128)===0?{len:t,value:o+i}:(i&=127,i+=o,this.readVariableSizeField(t+1,i<<7))}}});var Og,jw=ue(()=>{Zt();Og=class extends Qt("Musepack"){}});var ire,g3e,Jw,ore=ue(()=>{ire=Ve(ct(),1);Ti();dl();ei();are();jw();g3e=(0,ire.default)("music-metadata:parser:musepack"),Jw=class extends _t{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(rt)!=="MPCK")throw new Og("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){let t=new Yw(this.tokenizer);do{let o=await t.readPacketHeader();switch(g3e(`packet-header key=${o.key}, payloadLength=${o.payloadLength}`),o.key){case"SH":{let i=await t.readStreamHeader(o.payloadLength);this.metadata.setFormat("numberOfSamples",i.sampleCount),this.metadata.setFormat("sampleRate",i.sampleFrequency),this.metadata.setFormat("duration",i.sampleCount/i.sampleFrequency),this.metadata.setFormat("numberOfChannels",i.channelCount);break}case"AP":this.audioLength+=o.payloadLength,await this.tokenizer.ignore(o.payloadLength);break;case"RG":case"EI":case"SO":case"ST":case"CT":await this.tokenizer.ignore(o.payloadLength);break;case"SE":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioLength*8/this.metadata.format.duration),pl(this.metadata,this.tokenizer,this.options);default:throw new Og(`Unexpected header: ${o.key}`)}}while(!0)}}});var qw,nre=ue(()=>{wA();qw=class{constructor(t){this.pos=0,this.dword=null,this.tokenizer=t}async read(t){for(;this.dword===null;)this.dword=await this.tokenizer.readToken(Fe);let o=this.dword;return this.pos+=t,this.pos<32?(o>>>=32-this.pos,o&(1<>>32-this.pos),o&(1<0){let e=32-this.pos;this.dword=null,t-=e,this.pos=0}let o=t%32,i=(t-o)/32;return await this.tokenizer.ignore(i*4),this.read(o)}}});var sre,gre=ue(()=>{wA();Xt();Cs();sre={len:24,get:(n,t)=>{let o={signature:fr(n.subarray(t,t+3),"latin1"),streamMinorVersion:ZA(n,t+3,0,4),streamMajorVersion:ZA(n,t+3,4,4),frameCount:Fe.get(n,t+4),maxLevel:SA.get(n,t+8),sampleFrequency:[44100,48e3,37800,32e3][ZA(n,t+10,0,2)],link:ZA(n,t+10,2,2),profile:ZA(n,t+10,4,4),maxBand:ZA(n,t+11,0,6),intensityStereo:ya(n,t+11,6),midSideStereo:ya(n,t+11,7),titlePeak:SA.get(n,t+12),titleGain:SA.get(n,t+14),albumPeak:SA.get(n,t+16),albumGain:SA.get(n,t+18),lastFrameLength:Fe.get(n,t+20)>>>20&2047,trueGapless:ya(n,t+23,0)};return o.lastFrameLength=o.trueGapless?Fe.get(n,20)>>>20&2047:0,o}}});var Ire,cre,zw,lre=ue(()=>{Ire=Ve(ct(),1);Ti();dl();nre();gre();jw();cre=(0,Ire.default)("music-metadata:parser:musepack"),zw=class extends _t{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){let t=await this.tokenizer.readToken(sre);if(t.signature!=="MP+")throw new Og("Unexpected magic number");cre(`stream-version=${t.streamMajorVersion}.${t.streamMinorVersion}`),this.metadata.setFormat("container","Musepack, SV7"),this.metadata.setFormat("sampleRate",t.sampleFrequency);let o=1152*(t.frameCount-1)+t.lastFrameLength;this.metadata.setFormat("numberOfSamples",o),this.duration=o/t.sampleFrequency,this.metadata.setFormat("duration",this.duration),this.bitreader=new qw(this.tokenizer),this.metadata.setFormat("numberOfChannels",t.midSideStereo||t.intensityStereo?2:1);let i=await this.bitreader.read(8);return this.metadata.setFormat("codec",(i/100).toFixed(2)),await this.skipAudioData(t.frameCount),cre(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),pl(this.metadata,this.tokenizer,this.options)}async skipAudioData(t){for(;t-- >0;){let i=await this.bitreader.read(20);this.audioLength+=20+i,await this.bitreader.ignore(i)}let o=await this.bitreader.read(11);this.audioLength+=o,this.duration!==null&&this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}});var hre={};Mr(hre,{MusepackParser:()=>CL});var dre,pre,CL,Ere=ue(()=>{dre=Ve(ct(),1);wA();EB();ore();lre();jw();pre=(0,dre.default)("music-metadata:parser:musepack"),CL=class extends Ds{async postId3v2Parse(){let t=await this.tokenizer.peekToken(new ze(3,"latin1")),o;switch(t){case"MP+":{pre("Stream-version 7"),o=new zw(this.metadata,this.tokenizer,this.options);break}case"MPC":{pre("Stream-version 8"),o=new Jw(this.metadata,this.tokenizer,this.options);break}default:throw new Og("Invalid signature prefix")}return this.metadata.setAudioOnly(),o.parse()}}});var Cre,ure=ue(()=>{Cre={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],async load(){return(await Promise.resolve().then(()=>(Ere(),hre))).MusepackParser}}});var _B,Vw,uL=ue(()=>{wA();Zt();_B=class extends Qt("Opus"){},Vw=class{constructor(t){if(t<19)throw new _B("ID-header-page 0 should be at least 19 bytes long");this.len=t}get(t,o){return{magicSignature:new ze(8,"ascii").get(t,o+0),version:fA.get(t,o+8),channelCount:fA.get(t,o+9),preSkip:SA.get(t,o+10),inputSampleRate:Fe.get(t,o+12),outputGain:SA.get(t,o+16),channelMapping:fA.get(t,o+18)}}}});var Ww,Bre=ue(()=>{wA();yB();uL();uL();Ww=class extends ws{constructor(t,o,i){super(t,o),this.idHeader=null,this.lastPos=-1,this.tokenizer=i,this.durationOnLastPage=!0}parseFirstPage(t,o){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new Vw(o.length).get(o,0),this.idHeader.magicSignature!=="OpusHead")throw new _B("Illegal ogg/Opus magic-signature");this.metadata.setFormat("sampleRate",this.idHeader.inputSampleRate),this.metadata.setFormat("numberOfChannels",this.idHeader.channelCount),this.metadata.setAudioOnly()}async parseFullPage(t){switch(new ze(8,"ascii").get(t,0)){case"OpusTags":await this.parseUserCommentList(t,8),this.lastPos=this.tokenizer.position-t.length;break;default:break}}calculateDuration(t){if(this.lastPageHeader&&(t||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0){let o=this.lastPageHeader.absoluteGranulePosition-this.idHeader.preSkip;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.setFormat("duration",o/48e3),this.lastPos!==-1&&this.tokenizer.fileInfo.size&&this.metadata.format.duration){let i=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*i/this.metadata.format.duration)}}}}});var fre,Qre=ue(()=>{wA();Xt();fre={len:80,get:(n,t)=>({speex:new ze(8,"ascii").get(n,t+0),version:XD(new ze(20,"ascii").get(n,t+8)),version_id:sr.get(n,t+28),header_size:sr.get(n,t+32),rate:sr.get(n,t+36),mode:sr.get(n,t+40),mode_bitstream_version:sr.get(n,t+44),nb_channels:sr.get(n,t+48),bitrate:sr.get(n,t+52),frame_size:sr.get(n,t+56),vbr:sr.get(n,t+60),frames_per_packet:sr.get(n,t+64),extra_headers:sr.get(n,t+68),reserved1:sr.get(n,t+72),reserved2:sr.get(n,t+76)})}});var yre,p3e,Zw,mre=ue(()=>{yre=Ve(ct(),1);yB();Qre();p3e=(0,yre.default)("music-metadata:parser:ogg:speex"),Zw=class extends ws{constructor(t,o,i){super(t,o)}parseFirstPage(t,o){p3e("First Ogg/Speex page");let i=fre.get(o,0);this.metadata.setFormat("codec",`Speex ${i.version}`),this.metadata.setFormat("numberOfChannels",i.nb_channels),this.metadata.setFormat("sampleRate",i.rate),i.bitrate!==-1&&this.metadata.setFormat("bitrate",i.bitrate),this.metadata.setAudioOnly()}}});var Sre,Dre=ue(()=>{wA();Sre={len:42,get:(n,t)=>({id:new ze(7,"ascii").get(n,t),vmaj:fA.get(n,t+7),vmin:fA.get(n,t+8),vrev:fA.get(n,t+9),vmbw:LA.get(n,t+10),vmbh:LA.get(n,t+17),nombr:Or.get(n,t+37),nqual:fA.get(n,t+40)})}});var Ore,wre,Xw,bre=ue(()=>{Ore=Ve(ct(),1);Dre();wre=(0,Ore.default)("music-metadata:parser:ogg:theora"),Xw=class{constructor(t,o,i){this.durationOnLastPage=!1,this.metadata=t}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){wre("duration calculation not implemented")}async parseFirstPage(t,o){wre("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");let i=Sre.get(o,0);this.metadata.setFormat("bitrate",i.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}});var Mre,$w,_re=ue(()=>{wA();Xt();wA();Mre={len:27,get:(n,t)=>({capturePattern:new ze(4,"latin1").get(n,t),version:fA.get(n,t+4),headerType:{continued:GA(n,t+5,0),firstPage:GA(n,t+5,1),lastPage:GA(n,t+5,2)},absoluteGranulePosition:Number(br.get(n,t+6)),streamSerialNumber:Fe.get(n,t+14),pageSequenceNo:Fe.get(n,t+18),pageChecksum:Fe.get(n,t+22),page_segments:fA.get(n,t+26)})},$w=class n{static sum(t,o,i){let e=new DataView(t.buffer,0),a=0;for(let A=o;A{Tre=Ve(ct(),1);nL();sL();ei();Sw();BL=(0,Tre.default)("music-metadata:parser:ogg:theora"),eO=class{constructor(t,o,i){this.durationOnLastPage=!1,this.metadata=t,this.options=o,this.tokenizer=i,this.flacParser=new DB(this.metadata,this.tokenizer,o)}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){BL("duration calculation not implemented")}async parseFirstPage(t,o){if(BL("First Ogg/FLAC page"),(await rt.get(o,9)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let e=await mB.get(o,13);await this.parseDataBlock(e,o.subarray(13+mB.len))}async parseDataBlock(t,o){switch(BL(`blockHeader type=${t.type}, length=${t.length}`),t.type){case ti.STREAMINFO:{let i=SB.get(o,0);return this.flacParser.processsStreamInfo(i)}case ti.PADDING:break;case ti.APPLICATION:break;case ti.SEEKTABLE:break;case ti.VORBIS_COMMENT:return this.flacParser.parseComment(o);case ti.PICTURE:if(!this.options.skipCovers){let i=new Yc(o.length).get(o,0);return this.flacParser.addPictureTag(i)}break;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}flush(){return Promise.resolve()}}});var kre={};Mr(kre,{OggContentError:()=>Ch,OggParser:()=>QL});var Rre,Ch,bs,fL,QL,vre=ue(()=>{wA();Go();Rre=Ve(ct(),1);Ti();yB();Bre();mre();bre();Zt();_re();Nre();Ch=class extends Qt("Ogg"){},bs=(0,Rre.default)("music-metadata:parser:ogg"),fL=class{constructor(t,o,i){this.pageNumber=0,this.closed=!1,this.metadata=t,this.streamSerial=o,this.options=i}async parsePage(t,o){this.pageNumber=o.pageSequenceNo,bs("serial=%s page#=%s, Ogg.id=%s",o.streamSerialNumber,o.pageSequenceNo,o.capturePattern);let i=await t.readToken(new $w(o));bs("totalPageSize=%s",i.totalPageSize);let e=await t.readToken(new Dt(i.totalPageSize));if(bs("firstPage=%s, lastPage=%s, continued=%s",o.headerType.firstPage,o.headerType.lastPage,o.headerType.continued),o.headerType.firstPage){this.metadata.setFormat("container","Ogg");let a=e.subarray(0,7),A=Array.from(a).filter(r=>r>=32&&r<=126).map(r=>String.fromCharCode(r)).join("");switch(A){case"vorbis":bs(`Set Ogg stream serial ${o.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new ws(this.metadata,this.options);break;case"OpusHea":bs("Set page consumer to Ogg/Opus"),this.pageConsumer=new Ww(this.metadata,this.options,t);break;case"Speex ":bs("Set page consumer to Ogg/Speex"),this.pageConsumer=new Zw(this.metadata,this.options,t);break;case"fishead":case"theora":bs("Set page consumer to Ogg/Theora"),this.pageConsumer=new Xw(this.metadata,this.options,t);break;case"FLAC":bs("Set page consumer to Vorbis"),this.pageConsumer=new eO(this.metadata,this.options,t);break;default:throw new Ch(`Ogg codec not recognized (id=${A}`)}}if(o.headerType.lastPage&&(this.closed=!0),this.pageConsumer)await this.pageConsumer.parsePage(o,e);else throw new Error("pageConsumer should be initialized")}},QL=class extends _t{constructor(){super(...arguments),this.streams=new Map}async parse(){this.streams=new Map;let t=!1,o;try{do{if(o=await this.tokenizer.readToken(Mre),o.capturePattern!=="OggS")throw new Ch("Invalid Ogg capture pattern");let i=this.streams.get(o.streamSerialNumber);if(i||(i=new fL(this.metadata,o.streamSerialNumber,this.options),this.streams.set(o.streamSerialNumber,i)),await i.parsePage(this.tokenizer,o),i.pageNumber>12&&!(this.options.duration&&[...this.streams.values()].find(e=>e.pageConsumer?.durationOnLastPage))){bs("Stop processing Ogg stream");break}}while(![...this.streams.values()].every(i=>i.closed))}catch(i){if(i instanceof kA)bs("Reached end-of-stream"),t=!0;else if(i instanceof Ch)this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`);else throw i}for(let i of this.streams.values())i.closed||(this.metadata.addWarning(`End-of-stream reached before reaching last page in Ogg stream serial=${i.streamSerial}`),await i.pageConsumer?.flush()),i.pageConsumer?.calculateDuration(t)}}});var Pre,Gre=ue(()=>{Pre={parserType:"ogg",extensions:[".ogg",".ogv",".oga",".ogm",".ogx",".opus",".spx"],mimeTypes:["audio/ogg","audio/opus","audio/speex","video/ogg"],async load(){return(await Promise.resolve().then(()=>(vre(),kre))).OggParser}}});function Ms(n,t){return AO(n,t,1)===1}function AO(n,t,o){return n>>>t&4294967295>>>32-o}var d3e,TB,tO,Fre=ue(()=>{wA();ei();d3e=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],TB={len:32,get:(n,t)=>{let o=Fe.get(n,t+24),i={BlockID:rt.get(n,t),blockSize:Fe.get(n,t+4),version:SA.get(n,t+8),totalSamples:Fe.get(n,t+12),blockIndex:Fe.get(n,t+16),blockSamples:Fe.get(n,t+20),flags:{bitsPerSample:(1+AO(o,0,2))*8,isMono:Ms(o,2),isHybrid:Ms(o,3),isJointStereo:Ms(o,4),crossChannel:Ms(o,5),hybridNoiseShaping:Ms(o,6),floatingPoint:Ms(o,7),samplingRate:d3e[AO(o,23,4)],isDSD:Ms(o,31)},crc:new Dt(4).get(n,t+28)};return i.flags.isDSD&&(i.totalSamples*=8),i}},tO={len:1,get:(n,t)=>({functionId:AO(n[t],0,6),isOptional:Ms(n[t],5),isOddSize:Ms(n[t],6),largeBlock:Ms(n[t],7)})}});var Ure={};Mr(Ure,{WavPackContentError:()=>uh,WavPackParser:()=>yL});var Lre,Ql,uh,yL,Hre=ue(()=>{wA();dl();ei();Ti();Fre();Lre=Ve(ct(),1);oB();Zt();Ql=(0,Lre.default)("music-metadata:parser:WavPack"),uh=class extends Qt("WavPack"){},yL=class extends _t{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),pl(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(rt)!=="wvpk")break;let o=await this.tokenizer.readToken(TB);if(o.BlockID!=="wvpk")throw new uh("Invalid WavPack Block-ID");Ql(`WavPack header blockIndex=${o.blockIndex}, len=${TB.len}`),o.blockIndex===0&&!this.metadata.format.container&&(this.metadata.setFormat("container","WavPack"),this.metadata.setFormat("lossless",!o.flags.isHybrid),this.metadata.setFormat("bitsPerSample",o.flags.bitsPerSample),o.flags.isDSD||(this.metadata.setFormat("sampleRate",o.flags.samplingRate),this.metadata.setFormat("duration",o.totalSamples/o.flags.samplingRate)),this.metadata.setFormat("numberOfChannels",o.flags.isMono?1:2),this.metadata.setFormat("numberOfSamples",o.totalSamples),this.metadata.setFormat("codec",o.flags.isDSD?"DSD":"PCM"));let i=o.blockSize-(TB.len-8);await(o.blockIndex===0?this.parseMetadataSubBlock(o,i):this.tokenizer.ignore(i)),o.blockSamples>0&&(this.audioDataSize+=o.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=TB.len);this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioDataSize*8/this.metadata.format.duration)}async parseMetadataSubBlock(t,o){let i=o;for(;i>tO.len;){let e=await this.tokenizer.readToken(tO),a=await this.tokenizer.readNumber(e.largeBlock?tB:fA),A=new Uint8Array(a*2-(e.isOddSize?1:0));switch(await this.tokenizer.readBuffer(A),Ql(`Metadata Sub-Blocks functionId=0x${e.functionId.toString(16)}, id.largeBlock=${e.largeBlock},data-size=${A.length}`),e.functionId){case 0:break;case 14:{Ql("ID_DSD_BLOCK");let r=1<{Kre={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],async load(){return(await Promise.resolve().then(()=>(Hre(),Ure))).WavPackParser}}});var Bh,rO,Yre=ue(()=>{wA();Bh={len:8,get:(n,t)=>({chunkID:new ze(4,"latin1").get(n,t),chunkSize:Fe.get(n,t+4)})},rO=class{constructor(t){this.tagHeader=t,this.len=t.chunkSize,this.len+=this.len&1}get(t,o){return new ze(this.tagHeader.chunkSize,"ascii").get(t,o)}}});var yl,ga,jre,aO,iO,mL=ue(()=>{wA();Zt();yl=class extends Qt("Wave"){},ga={PCM:1,ADPCM:2,IEEE_FLOAT:3,ALAW:6,MULAW:7,DVI_ADPCM:17,GSM610:49,MPEG_ADTS_AAC:5632,MPEG_LOAS:5634,RAW_AAC1:255,DOLBY_AC3_SPDIF:146,DVM:8192,RAW_SPORT:576,ESST_AC3:577,DRM:9,DTS2:8193,MPEG:80,MPEGLAYER3:85},jre={[ga.PCM]:"PCM",[ga.ADPCM]:"ADPCM",[ga.IEEE_FLOAT]:"IEEE_FLOAT",[ga.ALAW]:"ALAW",[ga.MULAW]:"MULAW",[ga.DVI_ADPCM]:"DVI_ADPCM",[ga.GSM610]:"GSM610",[ga.MPEG_ADTS_AAC]:"MPEG_ADTS_AAC",[ga.MPEG_LOAS]:"MPEG_LOAS",[ga.RAW_AAC1]:"RAW_AAC1",[ga.DOLBY_AC3_SPDIF]:"DOLBY_AC3_SPDIF",[ga.DVM]:"DVM",[ga.RAW_SPORT]:"RAW_SPORT",[ga.ESST_AC3]:"ESST_AC3",[ga.DRM]:"DRM",[ga.DTS2]:"DTS2",[ga.MPEG]:"MPEG",[ga.MPEGLAYER3]:"MPEGLAYER3"},aO=class{constructor(t){if(t.chunkSize<16)throw new yl("Invalid chunk size");this.len=t.chunkSize}get(t,o){return{wFormatTag:SA.get(t,o),nChannels:SA.get(t,o+2),nSamplesPerSec:Fe.get(t,o+4),nAvgBytesPerSec:Fe.get(t,o+8),nBlockAlign:SA.get(t,o+12),wBitsPerSample:SA.get(t,o+14)}}},iO=class{constructor(t){if(t.chunkSize<4)throw new yl("Invalid fact chunk size.");this.len=t.chunkSize}get(t,o){return{dwSampleLength:Fe.get(t,o)}}}});var SL,Jre=ue(()=>{wA();Xt();SL={len:420,get:(n,t)=>({description:Ho(new ze(256,"ascii").get(n,t)).trim(),originator:Ho(new ze(32,"ascii").get(n,t+256)).trim(),originatorReference:Ho(new ze(32,"ascii").get(n,t+288)).trim(),originationDate:Ho(new ze(10,"ascii").get(n,t+320)).trim(),originationTime:Ho(new ze(8,"ascii").get(n,t+330)).trim(),timeReferenceLow:Fe.get(n,t+338),timeReferenceHigh:Fe.get(n,t+342),version:SA.get(n,t+346),umid:new Dt(64).get(n,t+348),loudnessValue:SA.get(n,t+412),maxTruePeakLevel:SA.get(n,t+414),maxMomentaryLoudness:SA.get(n,t+416),maxShortTermLoudness:SA.get(n,t+418)})}});var zre={};Mr(zre,{WaveParser:()=>DL});var qre,jc,DL,Vre=ue(()=>{Go();wA();qre=Ve(ct(),1);Yre();mL();rh();Xt();ei();Ti();Jre();mL();jc=(0,qre.default)("music-metadata:parser:RIFF"),DL=class extends _t{constructor(){super(...arguments),this.blockAlign=0,this.avgBytesPerSec=0}async parse(){let t=await this.tokenizer.readToken(Bh);if(jc(`pos=${this.tokenizer.position}, parse: chunkID=${t.chunkID}`),t.chunkID==="RIFF")return this.metadata.setAudioOnly(),this.parseRiffChunk(t.chunkSize).catch(o=>{if(!(o instanceof kA))throw o})}async parseRiffChunk(t){let o=await this.tokenizer.readToken(rt);switch(this.metadata.setFormat("container",o),o){case"WAVE":return this.readWaveChunk(t-rt.len);default:throw new yl(`Unsupported RIFF format: RIFF/${o}`)}}async readWaveChunk(t){for(;t>=Bh.len;){let o=await this.tokenizer.readToken(Bh);switch(t-=Bh.len+o.chunkSize,o.chunkSize>t&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=o,jc(`pos=${this.tokenizer.position}, readChunk: chunkID=RIFF/WAVE/${o.chunkID}`),o.chunkID){case"LIST":await this.parseListTag(o);break;case"fact":this.metadata.setFormat("lossless",!1),this.fact=await this.tokenizer.readToken(new iO(o));break;case"fmt ":{let i=await this.tokenizer.readToken(new aO(o)),e=jre[i.wFormatTag];e||(jc(`WAVE/non-PCM format=${i.wFormatTag}`),e=`non-PCM (${i.wFormatTag})`),this.metadata.setFormat("codec",e),this.metadata.setFormat("bitsPerSample",i.wBitsPerSample),this.metadata.setFormat("sampleRate",i.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",i.nChannels),this.blockAlign=i.nBlockAlign,this.avgBytesPerSec=i.nAvgBytesPerSec;break}case"id3 ":case"ID3 ":{let i=await this.tokenizer.readToken(new Dt(o.chunkSize)),e=Ao(i);await new Yo().parse(this.metadata,e,this.options);break}case"data":{this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let i=o.chunkSize;if(this.tokenizer.fileInfo.size){let a=this.tokenizer.fileInfo.size-this.tokenizer.position;a0?this.metadata.setFormat("bitrate",this.avgBytesPerSec*8):this.metadata.format.duration&&this.metadata.setFormat("bitrate",i*8/this.metadata.format.duration),await this.tokenizer.ignore(o.chunkSize);break}case"bext":{let i=await this.tokenizer.readToken(SL);Object.keys(i).forEach(a=>{this.metadata.addTag("exif",`bext.${a}`,i[a])});let e=o.chunkSize-SL.len;await this.tokenizer.ignore(e);break}case"\0\0\0\0":jc(`Ignore padding chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize);break;default:jc(`Ignore chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize)}this.header.chunkSize%2===1&&(jc("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(t){let o=await this.tokenizer.readToken(new ze(4,"latin1"));switch(jc("pos=%s, parseListTag: chunkID=RIFF/WAVE/LIST/%s",this.tokenizer.position,o),o){case"INFO":return this.parseRiffInfoTags(t.chunkSize-4);default:return this.metadata.addWarning(`Ignore chunk: RIFF/WAVE/LIST/${o}`),jc(`Ignoring chunkID=RIFF/WAVE/LIST/${o}`),this.tokenizer.ignore(t.chunkSize-4).then()}}async parseRiffInfoTags(t){for(;t>=8;){let o=await this.tokenizer.readToken(Bh),i=new rO(o),e=await this.tokenizer.readToken(i);this.addTag(o.chunkID,Ho(e)),t-=8+i.len}if(t!==0)throw new yl(`Illegal remaining size: ${t}`)}addTag(t,o){this.metadata.addTag("exif",t,o)}}});var Wre,Zre=ue(()=>{Wre={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],async load(){return(await Promise.resolve().then(()=>(Vre(),zre))).WaveParser}}});function C3e(n){let t=Xre.default.parse(n),o=Kee(t.type);return{type:o.type,subtype:o.subtype,suffix:o.suffix,parameters:t.parameters}}function u3e(n){let t=n.lastIndexOf(".");return t===-1?"":n.substring(t)}var Xre,$re,ml,Sl,wL=ue(()=>{OF();Xre=Ve(Hee(),1);xee();$re=Ve(ct(),1);IAe();Il();FAe();Zt();UAe();$Ae();ite();lte();fte();Ote();Gte();$te();ure();Gre();xre();Zre();oO();ml=(0,$re.default)("music-metadata:parser:factory");Sl=class{constructor(){this.parsers=[],[wte,GAe,LAe,Xte,Pte,Wre,Pre,XAe,Ite,Kre,Cre,Bte,ate].forEach(t=>{this.registerParser(t)})}registerParser(t){this.parsers.push(t)}async parse(t,o,i){if(t.supportsRandomAccess()?(ml("tokenizer supports random-access, scanning for appending headers"),await OL(t,i)):ml("tokenizer does not support random-access, cannot scan for appending headers"),!o){let r=new Uint8Array(4100);if(t.fileInfo.mimeType&&(o=this.findLoaderForContentType(t.fileInfo.mimeType)),!o&&t.fileInfo.path&&(o=this.findLoaderForExtension(t.fileInfo.path)),!o){ml("Guess parser on content..."),await t.peekBuffer(r,{mayBeLess:!0});let s=await gB(r,{mpegOffsetTolerance:10});if(!s||!s.mime)throw new vc("Failed to determine audio format");if(ml(`Guessed file type is mime=${s.mime}, extension=${s.ext}`),o=this.findLoaderForContentType(s.mime),!o)throw new Pc(`Guessed MIME-type not supported: ${s.mime}`)}}ml(`Loading ${o.parserType} parser...`);let e=new Iw(i),a=await o.load(),A=new a(e,t,i??{});return ml(`Parser ${o.parserType} loaded`),await A.parse(),e.format.trackInfo&&(e.format.hasAudio===void 0&&e.setFormat("hasAudio",!!e.format.trackInfo.find(r=>r.type===na.audio)),e.format.hasVideo===void 0&&e.setFormat("hasVideo",!!e.format.trackInfo.find(r=>r.type===na.video))),e.toCommonMetadata()}findLoaderForExtension(t){if(!t)return;let o=u3e(t).toLocaleLowerCase()||t;return this.parsers.find(i=>i.extensions.indexOf(o)!==-1)}findLoaderForContentType(t){let o;if(!t)return;try{o=C3e(t)}catch{ml(`Invalid HTTP Content-Type header value: ${t}`);return}let i=o.subtype.indexOf("x-")===0?o.subtype.substring(2):o.subtype;return this.parsers.find(e=>e.mimeTypes.find(a=>a.indexOf(`${o.type}/${i}`)!==-1))}getSupportedMimeTypes(){let t=new Set;return this.parsers.forEach(o=>{o.mimeTypes.forEach(i=>{t.add(i),t.add(i.replace("/","/x-"))})}),Array.from(t)}}});async function eae(n){let t=n.fileInfo.size;if(t>=143){let o=new Uint8Array(15),i=n.position;await n.readBuffer(o,{position:t-143}),n.setPosition(i);let e=fr(o,"latin1");if(e.substring(6)===B3e)return Number.parseInt(e.substring(0,6),10)+15}return 0}var B3e,Aae=ue(()=>{Cs();B3e="LYRICS200"});async function f3e(n,t={}){let o=HD(n);try{return await fh(o,t)}finally{await o.close()}}async function Q3e(n,t,o={}){let i=UD(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await fh(i,o)}finally{await i.close()}}async function y3e(n,t,o={}){let i=Ao(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});return fh(i,o)}function fh(n,t){return new Sl().parse(n,void 0,t)}function m3e(n){let t={};for(let{id:o,value:i}of n)(t[o]||(t[o]=[])).push(i);return t}function S3e(n){return n===void 0?0:1+Math.round(n*4)}function D3e(n){return n?n.reduce((t,o)=>o.name&&o.name.toLowerCase()in["front","cover","cover (front)"]?o:t):null}async function OL(n,t={}){let o=n.fileInfo.size;if(await fAe(n)){o-=128;let i=await eae(n);o-=i}t.apeHeader=await Lc.findApeFooterOffset(n,o)}function w3e(){return new Sl().getSupportedMimeTypes()}var oO=ue(()=>{Go();wL();dl();pB();Aae();Il();Zt();Zt()});var aae={};Mr(aae,{CouldNotDetermineFileTypeError:()=>vc,FieldDecodingError:()=>Uo,InternalParserError:()=>cl,LyricsContentType:()=>Zd,TimestampFormat:()=>Xd,UnsupportedFileTypeError:()=>Pc,getSupportedMimeTypes:()=>w3e,makeParseError:()=>Vd,makeUnexpectedFileContentError:()=>Qt,orderTags:()=>m3e,parseBlob:()=>f3e,parseBuffer:()=>y3e,parseFile:()=>b3e,parseFromTokenizer:()=>fh,parseStream:()=>O3e,parseWebStream:()=>Q3e,ratingToStars:()=>S3e,scanAppendingHeaders:()=>OL,selectCover:()=>D3e});async function O3e(n,t,o={}){let i=await pF(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await fh(i,o)}finally{await i.close()}}async function b3e(n,t={}){tae(`parseFile: ${n}`);let o=await Aee(n),i=new Sl;try{let e=i.findLoaderForExtension(n);e||tae("Parser could not be determined by file extension");try{return await i.parse(o,e,t)}catch(a){throw(a instanceof vc||a instanceof Pc)&&(a.message+=`: ${n}`),a}}finally{await o.close()}}var rae,tae,iae=ue(()=>{Go();rae=Ve(ct(),1);oO();wL();oO();tae=(0,rae.default)("music-metadata:parser")});var Bie=$((zwA,n2)=>{"use strict";var Gje=Object.prototype.hasOwnProperty,ri="~";function YB(){}Object.create&&(YB.prototype=Object.create(null),new YB().__proto__||(ri=!1));function Fje(n,t,o){this.fn=n,this.context=t,this.once=o||!1}function uie(n,t,o,i,e){if(typeof o!="function")throw new TypeError("The listener must be a function");var a=new Fje(o,i||n,e),A=ri?ri+t:t;return n._events[A]?n._events[A].fn?n._events[A]=[n._events[A],a]:n._events[A].push(a):(n._events[A]=a,n._eventsCount++),n}function fO(n,t){--n._eventsCount===0?n._events=new YB:delete n._events[t]}function ja(){this._events=new YB,this._eventsCount=0}ja.prototype.eventNames=function(){var t=[],o,i;if(this._eventsCount===0)return t;for(i in o=this._events)Gje.call(o,i)&&t.push(ri?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};ja.prototype.listeners=function(t){var o=ri?ri+t:t,i=this._events[o];if(!i)return[];if(i.fn)return[i.fn];for(var e=0,a=i.length,A=new Array(a);e{"use strict";var zB=n=>n&&typeof n.message=="string",Q2=n=>{if(!n)return;let t=n.cause;if(typeof t=="function"){let o=n.cause();return zB(o)?o:void 0}else return zB(t)?t:void 0},qie=(n,t)=>{if(!zB(n))return"";let o=n.stack||"";if(t.has(n))return o+` -causes have become circular...`;let i=Q2(n);return i?(t.add(n),o+` -caused by: `+qie(i,t)):o},fJe=n=>qie(n,new Set),zie=(n,t,o)=>{if(!zB(n))return"";let i=o?"":n.message||"";if(t.has(n))return i+": ...";let e=Q2(n);if(e){t.add(n);let a=typeof n.cause=="function";return i+(a?"":": ")+zie(e,t,a)}else return i},QJe=n=>zie(n,new Set);Vie.exports={isErrorLike:zB,getErrorCause:Q2,stackWithCauses:fJe,messageWithCauses:QJe}});var m2=$((mMA,Zie)=>{"use strict";var yJe=Symbol("circular-ref-tag"),NO=Symbol("pino-raw-err-ref"),Wie=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[NO]},set:function(n){this[NO]=n}}});Object.defineProperty(Wie,NO,{writable:!0,value:{}});Zie.exports={pinoErrProto:Wie,pinoErrorSymbols:{seen:yJe,rawSymbol:NO}}});var eoe=$((SMA,$ie)=>{"use strict";$ie.exports=D2;var{messageWithCauses:mJe,stackWithCauses:SJe,isErrorLike:Xie}=y2(),{pinoErrProto:DJe,pinoErrorSymbols:wJe}=m2(),{seen:S2}=wJe,{toString:OJe}=Object.prototype;function D2(n){if(!Xie(n))return n;n[S2]=void 0;let t=Object.create(DJe);t.type=OJe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=mJe(n),t.stack=SJe(n),Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>D2(o)));for(let o in n)if(t[o]===void 0){let i=n[o];Xie(i)?o!=="cause"&&!Object.prototype.hasOwnProperty.call(i,S2)&&(t[o]=D2(i)):t[o]=i}return delete n[S2],t.raw=n,t}});var toe=$((DMA,Aoe)=>{"use strict";Aoe.exports=kO;var{isErrorLike:w2}=y2(),{pinoErrProto:bJe,pinoErrorSymbols:MJe}=m2(),{seen:RO}=MJe,{toString:_Je}=Object.prototype;function kO(n){if(!w2(n))return n;n[RO]=void 0;let t=Object.create(bJe);t.type=_Je.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=n.message,t.stack=n.stack,Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>kO(o))),w2(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,RO)&&(t.cause=kO(n.cause));for(let o in n)if(t[o]===void 0){let i=n[o];w2(i)?Object.prototype.hasOwnProperty.call(i,RO)||(t[o]=kO(i)):t[o]=i}return delete n[RO],t.raw=n,t}});var ooe=$((wMA,ioe)=>{"use strict";ioe.exports={mapHttpRequest:TJe,reqSerializer:aoe};var O2=Symbol("pino-raw-req-ref"),roe=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[O2]},set:function(n){this[O2]=n}}});Object.defineProperty(roe,O2,{writable:!0,value:{}});function aoe(n){let t=n.info||n.socket,o=Object.create(roe);if(o.id=typeof n.id=="function"?n.id():n.id||(n.info?n.info.id:void 0),o.method=n.method,n.originalUrl)o.url=n.originalUrl;else{let i=n.path;o.url=typeof i=="string"?i:n.url?n.url.path||n.url:void 0}return n.query&&(o.query=n.query),n.params&&(o.params=n.params),o.headers=n.headers,o.remoteAddress=t&&t.remoteAddress,o.remotePort=t&&t.remotePort,o.raw=n.raw||n,o}function TJe(n){return{req:aoe(n)}}});var coe=$((OMA,goe)=>{"use strict";goe.exports={mapHttpResponse:NJe,resSerializer:soe};var b2=Symbol("pino-raw-res-ref"),noe=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[b2]},set:function(n){this[b2]=n}}});Object.defineProperty(noe,b2,{writable:!0,value:{}});function soe(n){let t=Object.create(noe);return t.statusCode=n.headersSent?n.statusCode:null,t.headers=n.getHeaders?n.getHeaders():n._headers,t.raw=n,t}function NJe(n){return{res:soe(n)}}});var _2=$((bMA,Ioe)=>{"use strict";var M2=eoe(),RJe=toe(),vO=ooe(),PO=coe();Ioe.exports={err:M2,errWithCause:RJe,mapHttpRequest:vO.mapHttpRequest,mapHttpResponse:PO.mapHttpResponse,req:vO.reqSerializer,res:PO.resSerializer,wrapErrorSerializer:function(t){return t===M2?t:function(i){return t(M2(i))}},wrapRequestSerializer:function(t){return t===vO.reqSerializer?t:function(i){return t(vO.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===PO.resSerializer?t:function(i){return t(PO.resSerializer(i))}}}});var T2=$((MMA,loe)=>{"use strict";function kJe(n,t){return t}loe.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=kJe;let o=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(o))return;let i=o.slice(2),e=[];for(let a of i)a&&e.push(a.getFileName());return e}});var uoe=$((_MA,Coe)=>{"use strict";function N2(n){if(n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array){let t=[];for(let o=0;o{let Q=[...s.slice(0,I),...f];return o(B,Q)}:o,e,a);else if(a)hoe(c,r);else{let d=typeof o=="function"?o(PJe(c,r),[...s.slice(0,I),...r]):o;doe(c,r,d)}}if(A.length===0)g(n,0);else{let c=n;for(let I=0;I0)o?a===i&&(o=!1,i=""):(o=!0,i=a);else if(a==="["&&!o)t++;else if(a==="]"&&!o&&(t--,t<0))throw new Error(`Invalid redaction path (${n})`)}if(t!==0)throw new Error(`Invalid redaction path (${n})`)}function KJe(n){if(!Array.isArray(n))throw new TypeError("paths must be an array");for(let t of n)HJe(t)}function xJe(n={}){let{paths:t=[],censor:o="[REDACTED]",serialize:i=JSON.stringify,strict:e=!0,remove:a=!1}=n;KJe(t);let A=LJe(t);return function(s){if(e&&(s===null||typeof s!="object")&&(s==null||typeof s!="object"))return i?i(s):s;let g=UJe(s,A),c=s,I=o;return typeof o=="function"&&(I=o),GJe(g,t,I,a),i===!1?(g.restore=function(){return N2(c)},g):typeof i=="function"?i(g):JSON.stringify(g)}}Coe.exports=xJe});var Rh=$((TMA,Boe)=>{"use strict";var YJe=Symbol("pino.setLevel"),jJe=Symbol("pino.getLevel"),JJe=Symbol("pino.levelVal"),qJe=Symbol("pino.levelComp"),zJe=Symbol("pino.useLevelLabels"),VJe=Symbol("pino.useOnlyCustomLevels"),WJe=Symbol("pino.mixin"),ZJe=Symbol("pino.lsCache"),XJe=Symbol("pino.chindings"),$Je=Symbol("pino.asJson"),eqe=Symbol("pino.write"),Aqe=Symbol("pino.redactFmt"),tqe=Symbol("pino.time"),rqe=Symbol("pino.timeSliceIndex"),aqe=Symbol("pino.stream"),iqe=Symbol("pino.stringify"),oqe=Symbol("pino.stringifySafe"),nqe=Symbol("pino.stringifiers"),sqe=Symbol("pino.end"),gqe=Symbol("pino.formatOpts"),cqe=Symbol("pino.messageKey"),Iqe=Symbol("pino.errorKey"),lqe=Symbol("pino.nestedKey"),pqe=Symbol("pino.nestedKeyStr"),dqe=Symbol("pino.mixinMergeStrategy"),hqe=Symbol("pino.msgPrefix"),Eqe=Symbol("pino.wildcardFirst"),Cqe=Symbol.for("pino.serializers"),uqe=Symbol.for("pino.formatters"),Bqe=Symbol.for("pino.hooks"),fqe=Symbol.for("pino.metadata");Boe.exports={setLevelSym:YJe,getLevelSym:jJe,levelValSym:JJe,levelCompSym:qJe,useLevelLabelsSym:zJe,mixinSym:WJe,lsCacheSym:ZJe,chindingsSym:XJe,asJsonSym:$Je,writeSym:eqe,serializersSym:Cqe,redactFmtSym:Aqe,timeSym:tqe,timeSliceIndexSym:rqe,streamSym:aqe,stringifySym:iqe,stringifySafeSym:oqe,stringifiersSym:nqe,endSym:sqe,formatOptsSym:gqe,messageKeySym:cqe,errorKeySym:Iqe,nestedKeySym:lqe,wildcardFirstSym:Eqe,needsMetadataGsym:fqe,useOnlyCustomLevelsSym:VJe,formattersSym:uqe,hooksSym:Bqe,nestedKeyStrSym:pqe,mixinMergeStrategySym:dqe,msgPrefixSym:hqe}});var k2=$((NMA,moe)=>{"use strict";var foe=uoe(),{redactFmtSym:Qqe,wildcardFirstSym:FO}=Rh(),R2=/[^.[\]]+|\[([^[\]]*?)\]/g,Qoe="[Redacted]",yoe=!1;function yqe(n,t){let{paths:o,censor:i,remove:e}=mqe(n),a=o.reduce((s,g)=>{R2.lastIndex=0;let c=R2.exec(g),I=R2.exec(g),d=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(d==="*"&&(d=FO),I===null)return s[d]=null,s;if(s[d]===null)return s;let{index:B}=I,f=`${g.substr(B,g.length-1)}`;return s[d]=s[d]||[],d!==FO&&s[d].length===0&&s[d].push(...s[FO]||[]),d===FO&&Object.keys(s).forEach(function(Q){s[Q]&&s[Q].push(f)}),s[d].push(f),s},{}),A={[Qqe]:foe({paths:o,censor:i,serialize:t,strict:yoe,remove:e})},r=(...s)=>t(typeof i=="function"?i(...s):i);return[...Object.keys(a),...Object.getOwnPropertySymbols(a)].reduce((s,g)=>{if(a[g]===null)s[g]=c=>r(c,[g]);else{let c=typeof i=="function"?(I,d)=>i(I,[g,...d]):i;s[g]=foe({paths:a[g],censor:c,serialize:t,strict:yoe,remove:e})}return s},A)}function mqe(n){if(Array.isArray(n))return n={paths:n,censor:Qoe},n;let{paths:t,censor:o=Qoe,remove:i}=n;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(o=void 0),{paths:t,censor:o,remove:i}}moe.exports=yqe});var woe=$((RMA,Doe)=>{"use strict";var Sqe=()=>"",Dqe=()=>`,"time":${Date.now()}`,wqe=()=>`,"time":${Math.round(Date.now()/1e3)}`,Oqe=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,bqe=1000000n,Soe=1000000000n,Mqe=BigInt(Date.now())*bqe,_qe=process.hrtime.bigint(),Tqe=()=>{let n=process.hrtime.bigint()-_qe,t=Mqe+n,o=t/Soe,i=t%Soe,e=Number(o*1000n+i/1000000n),a=new Date(e),A=a.getUTCFullYear(),r=(a.getUTCMonth()+1).toString().padStart(2,"0"),s=a.getUTCDate().toString().padStart(2,"0"),g=a.getUTCHours().toString().padStart(2,"0"),c=a.getUTCMinutes().toString().padStart(2,"0"),I=a.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${A}-${r}-${s}T${g}:${c}:${I}.${i.toString().padStart(9,"0")}Z"`};Doe.exports={nullTime:Sqe,epochTime:Dqe,unixTime:wqe,isoTime:Oqe,isoTimeNano:Tqe}});var boe=$((kMA,Ooe)=>{"use strict";function Nqe(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}Ooe.exports=Rqe;function Rqe(n,t,o){var i=o&&o.stringify||Nqe,e=1;if(typeof n=="object"&&n!==null){var a=t.length+e;if(a===1)return n;var A=new Array(a);A[0]=i(n);for(var r=1;r-1?I:0,n.charCodeAt(B+1)){case 100:case 102:if(c>=s||t[c]==null)break;I=s||t[c]==null)break;I=s||t[c]===void 0)break;I",I=B+2,B++;break}g+=i(t[c]),I=B+2,B++;break;case 115:if(c>=s)break;I{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(o){if((o>0&&o<1/0)===!1)throw typeof o!="number"&&typeof o!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(n,0,0,Number(o))},n=new Int32Array(new SharedArrayBuffer(4));v2.exports=t}else{let n=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(t);for(;i>Date.now(););};v2.exports=n}});var Poe=$((PMA,voe)=>{"use strict";var Yt=Xe("fs"),kqe=Xe("events"),vqe=Xe("util").inherits,Moe=Xe("path"),F2=P2(),Pqe=Xe("assert"),LO=100,UO=Buffer.allocUnsafe(0),Gqe=16*1024,_oe="buffer",Toe="utf8",[Fqe,Lqe]=(process.versions.node||"0.0").split(".").map(Number),Uqe=Fqe>=22&&Lqe>=7;function Noe(n,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function o(a,A){if(a){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",a)}):t.emit("error",a);return}let r=t._reopening;t.fd=A,t.file=n,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():r&&process.nextTick(()=>t.emit("drain")))}let i=t.append?"a":"w",e=t.mode;if(t.sync)try{t.mkdir&&Yt.mkdirSync(Moe.dirname(n),{recursive:!0});let a=Yt.openSync(n,i,e);o(null,a)}catch(a){throw o(a),a}else t.mkdir?Yt.mkdir(Moe.dirname(n),{recursive:!0},a=>{if(a)return o(a);Yt.open(n,i,e,o)}):Yt.open(n,i,e,o)}function On(n){if(!(this instanceof On))return new On(n);let{fd:t,dest:o,minLength:i,maxLength:e,maxWrite:a,periodicFlush:A,sync:r,append:s=!0,mkdir:g,retryEAGAIN:c,fsync:I,contentMode:d,mode:B}=n||{};t=t||o,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=e||0,this.maxWrite=a||Gqe,this._periodicFlush=A||0,this._periodicFlushTimer=void 0,this.sync=r||!1,this.writable=!0,this._fsync=I||!1,this.append=s||!1,this.mode=B,this.retryEAGAIN=c||(()=>!0),this.mkdir=g||!1;let f,Q;if(d===_oe)this._writingBuf=UO,this.write=xqe,this.flush=jqe,this.flushSync=qqe,this._actualWrite=Vqe,f=()=>Yt.writeSync(this.fd,this._writingBuf),Q=()=>Yt.write(this.fd,this._writingBuf,this.release);else if(d===void 0||d===Toe)this._writingBuf="",this.write=Kqe,this.flush=Yqe,this.flushSync=Jqe,this._actualWrite=zqe,f=()=>Buffer.isBuffer(this._writingBuf)?Yt.writeSync(this.fd,this._writingBuf):Yt.writeSync(this.fd,this._writingBuf,"utf8"),Q=()=>Buffer.isBuffer(this._writingBuf)?Yt.write(this.fd,this._writingBuf,this.release):Yt.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Toe}" and "${_oe}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")Noe(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,m)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{F2(LO),this.release(void 0,0)}catch(G){this.release(G)}else setTimeout(Q,LO);else this._writing=!1,this.emit("error",y);return}this.emit("write",m);let _=G2(this._writingBuf,this._len,m);if(this._len=_.len,this._writingBuf=_.writingBuf,this._writingBuf.length){if(!this.sync){Q();return}try{do{let G=f(),x=G2(this._writingBuf,this._len,G);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(G){this.release(G);return}}this._fsync&&Yt.fsyncSync(this.fd);let T=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):T>this.minLength?this._actualWrite():this._ending?T>0?this._actualWrite():(this._writing=!1,HO(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Hqe,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function G2(n,t,o){return typeof n=="string"&&(n=Buffer.from(n)),t=Math.max(t-o,0),n=n.subarray(o),{writingBuf:n,len:t}}function Hqe(n){n.listenerCount("drain")>0&&(n._asyncDrainScheduled=!1,n.emit("drain"))}vqe(On,kqe);function Roe(n,t){return n.length===0?UO:n.length===1?n[0]:Buffer.concat(n,t)}function Kqe(n){if(this.destroyed)throw new Error("SonicBoom destroyed");n=""+n;let t=Buffer.byteLength(n),o=this._len+t,i=this._bufs;return this.maxLength&&o>this.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?i.push(n):i[i.length-1]+=n,this._len=o,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._lenthis.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?(o.push([n]),i.push(n.length)):(o[o.length-1].push(n),i[i.length-1]+=n.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len{if(this._fsync)this._flushPending=!1,n();else try{Yt.fsync(this.fd,i=>{this._flushPending=!1,n(i)})}catch(i){n(i)}this.off("error",o)},o=i=>{this._flushPending=!1,n(i),this.off("drain",t)};this.once("drain",t),this.once("error",o)}function Yqe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(n){n(t);return}throw t}if(this.minLength<=0){n?.();return}n&&koe.call(this,n),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function jqe(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(n){n(t);return}throw t}if(this.minLength<=0){n?.();return}n&&koe.call(this,n),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}On.prototype.reopen=function(n){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(n)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(n&&(this.file=n),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&Yt.close(t,o=>{if(o)return this.emit("error",o)})}),Noe(this.file,this)};On.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():HO(this)))};function Jqe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let n="";for(;this._bufs.length||n.length;){n.length<=0&&(n=this._bufs[0]);try{let t=Buffer.isBuffer(n)?Yt.writeSync(this.fd,n):Yt.writeSync(this.fd,n,"utf8"),o=G2(n,this._len,t);n=o.writingBuf,this._len=o.len,n.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,n.length,this._len-n.length))throw t;F2(LO)}}try{Yt.fsyncSync(this.fd)}catch{}}function qqe(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=UO);let n=UO;for(;this._bufs.length||n.length;){n.length<=0&&(n=Roe(this._bufs[0],this._lens[0]));try{let t=Yt.writeSync(this.fd,n);n=n.subarray(t),this._len=Math.max(this._len-t,0),n.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,n.length,this._len-n.length))throw t;F2(LO)}}}On.prototype.destroy=function(){this.destroyed||HO(this)};function zqe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let t=Buffer.isBuffer(this._writingBuf)?Yt.writeSync(this.fd,this._writingBuf):Yt.writeSync(this.fd,this._writingBuf,"utf8");n(null,t)}catch(t){n(t)}else Yt.write(this.fd,this._writingBuf,n)}function Vqe(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Roe(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=Yt.writeSync(this.fd,this._writingBuf);n(null,t)}catch(t){n(t)}else Uqe&&(this._writingBuf=Buffer.from(this._writingBuf)),Yt.write(this.fd,this._writingBuf,n)}function HO(n){if(n.fd===-1){n.once("ready",HO.bind(null,n));return}n._periodicFlushTimer!==void 0&&clearInterval(n._periodicFlushTimer),n.destroyed=!0,n._bufs=[],n._lens=[],Pqe(typeof n.fd=="number",`sonic.fd must be a number, got ${typeof n.fd}`);try{Yt.fsync(n.fd,t)}catch{}function t(){n.fd!==1&&n.fd!==2?Yt.close(n.fd,o):o()}function o(i){if(i){n.emit("error",i);return}n._ending&&!n._writing&&n.emit("finish"),n.emit("close")}}On.SonicBoom=On;On.default=On;voe.exports=On});var L2=$((GMA,Hoe)=>{"use strict";var bn={exit:[],beforeExit:[]},Goe={exit:Xqe,beforeExit:$qe},kh;function Wqe(){kh===void 0&&(kh=new FinalizationRegistry(e4e))}function Zqe(n){bn[n].length>0||process.on(n,Goe[n])}function Foe(n){bn[n].length>0||(process.removeListener(n,Goe[n]),bn.exit.length===0&&bn.beforeExit.length===0&&(kh=void 0))}function Xqe(){Loe("exit")}function $qe(){Loe("beforeExit")}function Loe(n){for(let t of bn[n]){let o=t.deref(),i=t.fn;o!==void 0&&i(o,n)}bn[n]=[]}function e4e(n){for(let t of["exit","beforeExit"]){let o=bn[t].indexOf(n);bn[t].splice(o,o+1),Foe(t)}}function Uoe(n,t,o){if(t===void 0)throw new Error("the object can't be undefined");Zqe(n);let i=new WeakRef(t);i.fn=o,Wqe(),kh.register(t,i),bn[n].push(i)}function A4e(n,t){Uoe("exit",n,t)}function t4e(n,t){Uoe("beforeExit",n,t)}function r4e(n){if(kh!==void 0){kh.unregister(n);for(let t of["exit","beforeExit"])bn[t]=bn[t].filter(o=>{let i=o.deref();return i&&i!==n}),Foe(t)}}Hoe.exports={register:A4e,registerBeforeExit:t4e,unregister:r4e}});var Koe=$((FMA,a4e)=>{a4e.exports={name:"thread-stream",version:"3.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina ",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Yoe=$((LMA,xoe)=>{"use strict";function i4e(n,t,o,i,e){let a=Date.now()+i,A=Atomics.load(n,t);if(A===o){e(null,"ok");return}let r=A,s=g=>{Date.now()>a?e(null,"timed-out"):setTimeout(()=>{r=A,A=Atomics.load(n,t),A===r?s(g>=1e3?1e3:g*2):A===o?e(null,"ok"):e(null,"not-equal")},g)};s(1)}function o4e(n,t,o,i,e){let a=Date.now()+i,A=Atomics.load(n,t);if(A!==o){e(null,"ok");return}let r=s=>{Date.now()>a?e(null,"timed-out"):setTimeout(()=>{A=Atomics.load(n,t),A!==o?e(null,"ok"):r(s>=1e3?1e3:s*2)},s)};r(1)}xoe.exports={wait:i4e,waitDiff:o4e}});var Joe=$((UMA,joe)=>{"use strict";joe.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var Zoe=$((HMA,Woe)=>{"use strict";var{version:n4e}=Koe(),{EventEmitter:s4e}=Xe("events"),{Worker:g4e}=Xe("worker_threads"),{join:c4e}=Xe("path"),{pathToFileURL:I4e}=Xe("url"),{wait:l4e}=Yoe(),{WRITE_INDEX:Jo,READ_INDEX:ki,SEQ_INDEX:U2}=Joe(),p4e=Xe("buffer"),d4e=Xe("assert"),_e=Symbol("kImpl"),h4e=p4e.constants.MAX_STRING_LENGTH;function vh(n,t){Atomics.add(n[_e].state,U2,1),t(),Atomics.add(n[_e].state,U2,1),Atomics.notify(n[_e].state,U2)}var VB=class{constructor(t){this._value=t}deref(){return this._value}},xO=class{register(){}unregister(){}},E4e=process.env.NODE_V8_COVERAGE?xO:global.FinalizationRegistry||xO,C4e=process.env.NODE_V8_COVERAGE?VB:global.WeakRef||VB,qoe=new E4e(n=>{n.exited||n.terminate()});function u4e(n,t){let{filename:o,workerData:i}=t,a=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||c4e(__dirname,"lib","worker.js"),A=new g4e(a,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:o.indexOf("file://")===0?o:I4e(o).href,dataBuf:n[_e].dataBuf,stateBuf:n[_e].stateBuf,workerData:{$context:{threadStreamVersion:n4e},...i}}});return A.stream=new VB(n),A.on("message",B4e),A.on("exit",Voe),qoe.register(n,A),A}function zoe(n){d4e(!n[_e].sync),n[_e].needDrain&&(n[_e].needDrain=!1,n.emit("drain"))}function KO(n){let t=Atomics.load(n[_e].state,Jo),o=n[_e].data.length-t;if(o>0){if(n[_e].buf.length===0){n[_e].flushing=!1,n[_e].ending?j2(n):n[_e].needDrain&&process.nextTick(zoe,n);return}let i=n[_e].buf.slice(0,o),e=Buffer.byteLength(i);e<=o?(n[_e].buf=n[_e].buf.slice(o),YO(n,i,KO.bind(null,n))):n.flush(()=>{if(!n.destroyed){for(vh(n,()=>{Atomics.store(n[_e].state,ki,0),Atomics.store(n[_e].state,Jo,0)}),Atomics.notify(n[_e].state,ki);e>n[_e].data.length;)o=o/2,i=n[_e].buf.slice(0,o),e=Buffer.byteLength(i);n[_e].buf=n[_e].buf.slice(o),YO(n,i,KO.bind(null,n))}})}else if(o===0){if(t===0&&n[_e].buf.length===0)return;n.flush(()=>{vh(n,()=>{Atomics.store(n[_e].state,ki,0),Atomics.store(n[_e].state,Jo,0)}),Atomics.notify(n[_e].state,ki),KO(n)})}else Rs(n,new Error("overwritten"))}function B4e(n){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}if(n?.code!=null)switch(n.code){case"READY":this.stream=new C4e(t),t.flush(()=>{t[_e].ready=!0,t.emit("ready")});break;case"ERROR":Rs(t,n.err);break;case"EVENT":Array.isArray(n.args)?t.emit(n.name,...n.args):t.emit(n.name,n.args);break;case"WARNING":process.emitWarning(n.err);break;default:Rs(t,new Error("this should not happen: "+n.code))}}function Voe(n){let t=this.stream.deref();t!==void 0&&(qoe.unregister(t),t.worker.exited=!0,t.worker.off("exit",Voe),Rs(t,n!==0?new Error("the worker thread exited"):null))}var K2=class extends s4e{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[_e]={},this[_e].stateBuf=new SharedArrayBuffer(128),this[_e].state=new Int32Array(this[_e].stateBuf),this[_e].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[_e].data=Buffer.from(this[_e].dataBuf),this[_e].sync=t.sync||!1,this[_e].ending=!1,this[_e].ended=!1,this[_e].needDrain=!1,this[_e].destroyed=!1,this[_e].flushing=!1,this[_e].ready=!1,this[_e].finished=!1,this[_e].errored=null,this[_e].closed=!1,this[_e].buf="",this.worker=u4e(this,t),this.on("message",(o,i)=>{this.worker.postMessage(o,i)})}write(t){if(this[_e].destroyed)return x2(this,new Error("the worker has exited")),!1;if(this[_e].ending)return x2(this,new Error("the worker is ending")),!1;if(this[_e].flushing&&this[_e].buf.length+t.length>=h4e)try{H2(this),this[_e].flushing=!0}catch(o){return Rs(this,o),!1}if(this[_e].buf+=t,this[_e].sync)try{return H2(this),!0}catch(o){return Rs(this,o),!1}return this[_e].flushing||(this[_e].flushing=!0,setImmediate(KO,this)),this[_e].needDrain=this[_e].data.length-this[_e].buf.length-Atomics.load(this[_e].state,Jo)<=0,!this[_e].needDrain}end(){this[_e].destroyed||(this[_e].ending=!0,j2(this))}flush(t){if(this[_e].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let o=Atomics.load(this[_e].state,Jo);l4e(this[_e].state,ki,o,1/0,(i,e)=>{if(i){Rs(this,i),process.nextTick(t,i);return}if(e==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[_e].destroyed||(H2(this),Y2(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[_e].ready}get destroyed(){return this[_e].destroyed}get closed(){return this[_e].closed}get writable(){return!this[_e].destroyed&&!this[_e].ending}get writableEnded(){return this[_e].ending}get writableFinished(){return this[_e].finished}get writableNeedDrain(){return this[_e].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[_e].errored}};function x2(n,t){setImmediate(()=>{n.emit("error",t)})}function Rs(n,t){n[_e].destroyed||(n[_e].destroyed=!0,t&&(n[_e].errored=t,x2(n,t)),n.worker.exited?setImmediate(()=>{n[_e].closed=!0,n.emit("close")}):n.worker.terminate().catch(()=>{}).then(()=>{n[_e].closed=!0,n.emit("close")}))}function YO(n,t,o){let i=Atomics.load(n[_e].state,Jo),e=Buffer.byteLength(t);return n[_e].data.write(t,i),vh(n,()=>{Atomics.store(n[_e].state,Jo,i+e)}),o(),!0}function j2(n){if(!(n[_e].ended||!n[_e].ending||n[_e].flushing)){n[_e].ended=!0;try{n.flushSync();let t=Atomics.load(n[_e].state,ki);vh(n,()=>{Atomics.store(n[_e].state,Jo,-1)});let o=0;for(;t!==-1;){if(Atomics.wait(n[_e].state,ki,t,1e3),t=Atomics.load(n[_e].state,ki),t===-2){Rs(n,new Error("end() failed"));return}if(++o===10){Rs(n,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{n[_e].finished=!0,n.emit("finish")})}catch(t){Rs(n,t)}}}function H2(n){let t=()=>{n[_e].ending?j2(n):n[_e].needDrain&&process.nextTick(zoe,n)};for(n[_e].flushing=!1;n[_e].buf.length!==0;){let o=Atomics.load(n[_e].state,Jo),i=n[_e].data.length-o;if(i===0){Y2(n),vh(n,()=>{Atomics.store(n[_e].state,ki,0),Atomics.store(n[_e].state,Jo,0)}),Atomics.notify(n[_e].state,ki);continue}else if(i<0)throw new Error("overwritten");let e=n[_e].buf.slice(0,i),a=Buffer.byteLength(e);if(a<=i)n[_e].buf=n[_e].buf.slice(i),YO(n,e,t);else{for(Y2(n),vh(n,()=>{Atomics.store(n[_e].state,ki,0),Atomics.store(n[_e].state,Jo,0)}),Atomics.notify(n[_e].state,ki);a>n[_e].buf.length;)i=i/2,e=n[_e].buf.slice(0,i),a=Buffer.byteLength(e);n[_e].buf=n[_e].buf.slice(i),YO(n,e,t)}}}function Y2(n){if(n[_e].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(n[_e].state,Jo),o=0;for(;;){let i=Atomics.load(n[_e].state,ki);if(i===-2)throw Error("_flushSync failed");if(i!==t)Atomics.wait(n[_e].state,ki,i,1e3);else break;if(++o===10)throw new Error("_flushSync took too long (10s)")}}Woe.exports=K2});var z2=$((KMA,Xoe)=>{"use strict";var{createRequire:f4e}=Xe("module"),Q4e=T2(),{join:J2,isAbsolute:y4e,sep:m4e}=Xe("node:path"),S4e=P2(),q2=L2(),D4e=Zoe();function w4e(n){q2.register(n,b4e),q2.registerBeforeExit(n,M4e),n.on("close",function(){q2.unregister(n)})}function O4e(n,t,o,i){let e=new D4e({filename:n,workerData:t,workerOpts:o,sync:i});e.on("ready",a),e.on("close",function(){process.removeListener("exit",A)}),process.on("exit",A);function a(){process.removeListener("exit",A),e.unref(),o.autoEnd!==!1&&w4e(e)}function A(){e.closed||(e.flushSync(),S4e(100),e.end())}return e}function b4e(n){n.ref(),n.flushSync(),n.end(),n.once("close",function(){n.unref()})}function M4e(n){n.flushSync()}function _4e(n){let{pipeline:t,targets:o,levels:i,dedupe:e,worker:a={},caller:A=Q4e(),sync:r=!1}=n,s={...n.options},g=typeof A=="string"?[A]:A,c="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},I=n.target;if(I&&o)throw new Error("only one of target or targets can be specified");return o?(I=c["pino-worker"]||J2(__dirname,"worker.js"),s.targets=o.filter(B=>B.target).map(B=>({...B,target:d(B.target)})),s.pipelines=o.filter(B=>B.pipeline).map(B=>B.pipeline.map(f=>({...f,level:B.level,target:d(f.target)})))):t&&(I=c["pino-worker"]||J2(__dirname,"worker.js"),s.pipelines=[t.map(B=>({...B,target:d(B.target)}))]),i&&(s.levels=i),e&&(s.dedupe=e),s.pinoWillSendConfig=!0,O4e(d(I),s,a,r);function d(B){if(B=c[B]||B,y4e(B)||B.indexOf("file://")===0)return B;if(B==="pino/file")return J2(__dirname,"..","file.js");let f;for(let Q of g)try{let y=Q==="node:repl"?process.cwd()+m4e:Q;f=f4e(y).resolve(B);break}catch{continue}if(!f)throw new Error(`unable to determine transport target for "${B}"`);return f}}Xoe.exports=_4e});var zO=$((xMA,Ine)=>{"use strict";var $oe=Xe("node:diagnostics_channel"),ene=boe(),{mapHttpRequest:T4e,mapHttpResponse:N4e}=_2(),W2=Poe(),Ane=L2(),{lsCacheSym:R4e,chindingsSym:ine,writeSym:tne,serializersSym:one,formatOptsSym:rne,endSym:k4e,stringifiersSym:nne,stringifySym:sne,stringifySafeSym:Z2,wildcardFirstSym:gne,nestedKeySym:v4e,formattersSym:cne,messageKeySym:P4e,errorKeySym:G4e,nestedKeyStrSym:F4e,msgPrefixSym:jO}=Rh(),{isMainThread:L4e}=Xe("worker_threads"),U4e=z2(),qO;typeof $oe.tracingChannel=="function"?qO=$oe.tracingChannel("pino_asJson"):qO={hasSubscribers:!1,traceSync(n,t,o,...i){return n.call(o,...i)}};function Ph(){}function H4e(n,t){if(!t)return o;return function(...e){t.call(this,e,o,n)};function o(i,...e){if(typeof i=="object"){let a=i;i!==null&&(i.method&&i.headers&&i.socket?i=T4e(i):typeof i.setHeader=="function"&&(i=N4e(i)));let A;a===null&&e.length===0?A=[null]:(a=e.shift(),A=e),typeof this[jO]=="string"&&a!==void 0&&a!==null&&(a=this[jO]+a),this[tne](i,ene(a,A,this[rne]),n)}else{let a=i===void 0?e.shift():i;typeof this[jO]=="string"&&a!==void 0&&a!==null&&(a=this[jO]+a),this[tne](null,ene(a,e,this[rne]),n)}}}function V2(n){let t="",o=0,i=!1,e=255,a=n.length;if(a>100)return JSON.stringify(n);for(var A=0;A=32;A++)e=n.charCodeAt(A),(e===34||e===92)&&(t+=n.slice(o,A)+"\\",o=A,i=!0);return i?t+=n.slice(o):t=n,e<32?JSON.stringify(n):'"'+t+'"'}function K4e(n,t,o,i){if(qO.hasSubscribers===!1)return ane.call(this,n,t,o,i);let e={instance:this,arguments};return qO.traceSync(ane,e,this,n,t,o,i)}function ane(n,t,o,i){let e=this[sne],a=this[Z2],A=this[nne],r=this[k4e],s=this[ine],g=this[one],c=this[cne],I=this[P4e],d=this[G4e],B=this[R4e][o]+i;B=B+s;let f;c.log&&(n=c.log(n));let Q=A[gne],y="";for(let _ in n)if(f=n[_],Object.prototype.hasOwnProperty.call(n,_)&&f!==void 0){g[_]?f=g[_](f):_===d&&g.err&&(f=g.err(f));let T=A[_]||Q;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":T&&(f=T(f));break;case"string":f=(T||V2)(f);break;default:f=(T||e)(f,a)}if(f===void 0)continue;let G=V2(_);y+=","+G+":"+f}let m="";if(t!==void 0){f=g[I]?g[I](t):t;let _=A[I]||Q;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":_&&(f=_(f)),m=',"'+I+'":'+f;break;case"string":f=(_||V2)(f),m=',"'+I+'":'+f;break;default:f=(_||e)(f,a),m=',"'+I+'":'+f}}return this[v4e]&&y?B+this[F4e]+y.slice(1)+"}"+m+r:B+y+m+r}function x4e(n,t){let o,i=n[ine],e=n[sne],a=n[Z2],A=n[nne],r=A[gne],s=n[one],g=n[cne].bindings;t=g(t);for(let c in t)if(o=t[c],((c.length<5||c!=="level"&&c!=="serializers"&&c!=="formatters"&&c!=="customLevels")&&t.hasOwnProperty(c)&&o!==void 0)===!0){if(o=s[c]?s[c](o):o,o=(A[c]||r||e)(o,a),o===void 0)continue;i+=',"'+c+'":'+o}return i}function Y4e(n){return n.write!==n.constructor.prototype.write}function JO(n){let t=new W2(n);return t.on("error",o),!n.sync&&L4e&&(Ane.register(t,j4e),t.on("close",function(){Ane.unregister(t)})),t;function o(i){if(i.code==="EPIPE"){t.write=Ph,t.end=Ph,t.flushSync=Ph,t.destroy=Ph;return}t.removeListener("error",o),t.emit("error",i)}}function j4e(n,t){n.destroyed||(t==="beforeExit"?(n.flush(),n.on("drain",function(){n.end()})):n.flushSync())}function J4e(n){return function(o,i,e={},a){if(typeof e=="string")a=JO({dest:e}),e={};else if(typeof a=="string"){if(e&&e.transport)throw Error("only one of option.transport or stream can be specified");a=JO({dest:a})}else if(e instanceof W2||e.writable||e._writableState)a=e,e={};else if(e.transport){if(e.transport instanceof W2||e.transport.writable||e.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(e.transport.targets&&e.transport.targets.length&&e.formatters&&typeof e.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let s;e.customLevels&&(s=e.useOnlyCustomLevels?e.customLevels:Object.assign({},e.levels,e.customLevels)),a=U4e({caller:i,...e.transport,levels:s})}if(e=Object.assign({},n,e),e.serializers=Object.assign({},n.serializers,e.serializers),e.formatters=Object.assign({},n.formatters,e.formatters),e.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:A,onChild:r}=e;return A===!1&&(e.level="silent"),r||(e.onChild=Ph),a||(Y4e(process.stdout)?a=process.stdout:a=JO({fd:process.stdout.fd||1})),{opts:e,stream:a}}}function q4e(n,t){try{return JSON.stringify(n)}catch{try{return(t||this[Z2])(n)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function z4e(n,t,o){return{level:n,bindings:t,log:o}}function V4e(n){let t=Number(n);return typeof n=="string"&&Number.isFinite(t)?t:n===void 0?1:n}Ine.exports={noop:Ph,buildSafeSonicBoom:JO,asChindings:x4e,asJson:K4e,genLog:H4e,createArgsNormalizer:J4e,stringify:q4e,buildFormatters:z4e,normalizeDestFileDescriptor:V4e}});var VO=$((YMA,lne)=>{var W4e={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Z4e={ASC:"ASC",DESC:"DESC"};lne.exports={DEFAULT_LEVELS:W4e,SORTING_ORDER:Z4e}});var eU=$((jMA,Ene)=>{"use strict";var{lsCacheSym:X4e,levelValSym:X2,useOnlyCustomLevelsSym:$4e,streamSym:e8e,formattersSym:A8e,hooksSym:t8e,levelCompSym:pne}=Rh(),{noop:r8e,genLog:Rl}=zO(),{DEFAULT_LEVELS:ks,SORTING_ORDER:dne}=VO(),hne={fatal:n=>{let t=Rl(ks.fatal,n);return function(...o){let i=this[e8e];if(t.call(this,...o),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:n=>Rl(ks.error,n),warn:n=>Rl(ks.warn,n),info:n=>Rl(ks.info,n),debug:n=>Rl(ks.debug,n),trace:n=>Rl(ks.trace,n)},$2=Object.keys(ks).reduce((n,t)=>(n[ks[t]]=t,n),{}),a8e=Object.keys($2).reduce((n,t)=>(n[t]='{"level":'+Number(t),n),{});function i8e(n){let t=n[A8e].level,{labels:o}=n.levels,i={};for(let e in o){let a=t(o[e],Number(e));i[e]=JSON.stringify(a).slice(0,-1)}return n[X4e]=i,n}function o8e(n,t){if(t)return!1;switch(n){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function n8e(n){let{labels:t,values:o}=this.levels;if(typeof n=="number"){if(t[n]===void 0)throw Error("unknown level value"+n);n=t[n]}if(o[n]===void 0)throw Error("unknown level "+n);let i=this[X2],e=this[X2]=o[n],a=this[$4e],A=this[pne],r=this[t8e].logMethod;for(let s in o){if(A(o[s],e)===!1){this[s]=r8e;continue}this[s]=o8e(s,a)?hne[s](r):Rl(o[s],r)}this.emit("level-change",n,e,t[i],i,this)}function s8e(n){let{levels:t,levelVal:o}=this;return t&&t.labels?t.labels[o]:""}function g8e(n){let{values:t}=this.levels,o=t[n];return o!==void 0&&this[pne](o,this[X2])}function c8e(n,t,o){return n===dne.DESC?t<=o:t>=o}function I8e(n){return typeof n=="string"?c8e.bind(null,n):n}function l8e(n=null,t=!1){let o=n?Object.keys(n).reduce((a,A)=>(a[n[A]]=A,a),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:$2,o),e=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:ks,n);return{labels:i,values:e}}function p8e(n,t,o){if(typeof n=="number"){if(![].concat(Object.keys(t||{}).map(a=>t[a]),o?[]:Object.keys($2).map(a=>+a),1/0).includes(n))throw Error(`default level:${n} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),o?null:ks,t);if(!(n in i))throw Error(`default level:${n} must be included in custom levels`)}function d8e(n,t){let{labels:o,values:i}=n;for(let e in t){if(e in i)throw Error("levels cannot be overridden");if(t[e]in o)throw Error("pre-existing level values cannot be used for new levels")}}function h8e(n){if(typeof n!="function"&&!(typeof n=="string"&&Object.values(dne).includes(n)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Ene.exports={initialLsCache:a8e,genLsCache:i8e,levelMethods:hne,getLevel:s8e,setLevel:n8e,isLevelEnabled:g8e,mappings:l8e,assertNoLevelCollisions:d8e,assertDefaultLevelFound:p8e,genLevelComparison:I8e,assertLevelComparison:h8e}});var AU=$((JMA,Cne)=>{"use strict";Cne.exports={version:"9.14.0"}});var Dne=$((zMA,Sne)=>{"use strict";var{EventEmitter:E8e}=Xe("node:events"),{lsCacheSym:C8e,levelValSym:u8e,setLevelSym:ZO,getLevelSym:une,chindingsSym:XO,parsedChindingsSym:B8e,mixinSym:f8e,asJsonSym:fne,writeSym:Q8e,mixinMergeStrategySym:y8e,timeSym:m8e,timeSliceIndexSym:S8e,streamSym:Qne,serializersSym:kl,formattersSym:WB,errorKeySym:D8e,messageKeySym:w8e,useOnlyCustomLevelsSym:O8e,needsMetadataGsym:b8e,redactFmtSym:M8e,stringifySym:_8e,formatOptsSym:T8e,stringifiersSym:N8e,msgPrefixSym:rU,hooksSym:R8e}=Rh(),{getLevel:k8e,setLevel:v8e,isLevelEnabled:P8e,mappings:G8e,initialLsCache:F8e,genLsCache:L8e,assertNoLevelCollisions:U8e}=eU(),{asChindings:aU,asJson:H8e,buildFormatters:tU,stringify:Bne,noop:yne}=zO(),{version:K8e}=AU(),x8e=k2(),Y8e=class{},mne={constructor:Y8e,child:j8e,bindings:J8e,setBindings:q8e,flush:W8e,isLevelEnabled:P8e,version:K8e,get level(){return this[une]()},set level(n){this[ZO](n)},get levelVal(){return this[u8e]},set levelVal(n){throw Error("levelVal is read-only")},get msgPrefix(){return this[rU]},get[Symbol.toStringTag](){return"Pino"},[C8e]:F8e,[Q8e]:V8e,[fne]:H8e,[une]:k8e,[ZO]:v8e};Object.setPrototypeOf(mne,E8e.prototype);Sne.exports=function(){return Object.create(mne)};var WO=n=>n;function j8e(n,t){if(!n)throw Error("missing bindings for child Pino");let o=this[kl],i=this[WB],e=Object.create(this);if(t==null)return e[WB].bindings!==WO&&(e[WB]=tU(i.level,WO,i.log)),e[XO]=aU(e,n),e[ZO](this.level),this.onChild!==yne&&this.onChild(e),e;if(t.hasOwnProperty("serializers")===!0){e[kl]=Object.create(null);for(let c in o)e[kl][c]=o[c];let s=Object.getOwnPropertySymbols(o);for(var a=0;a{"use strict";var{hasOwnProperty:ZB}=Object.prototype,Pl=nU();Pl.configure=nU;Pl.stringify=Pl;Pl.default=Pl;sU.stringify=Pl;sU.configure=nU;bne.exports=Pl;var Z8e=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Wc(n){return n.length<5e3&&!Z8e.test(n)?`"${n}"`:JSON.stringify(n)}function iU(n,t){if(n.length>200||t)return n.sort(t);for(let o=1;oi;)n[e]=n[e-1],e--;n[e]=i}return n}var X8e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function oU(n){return X8e.call(n)!==void 0&&n.length!==0}function wne(n,t,o){n.length= 1`)}return o===void 0?1/0:o}function vl(n){return n===1?"1 item":`${n} items`}function tze(n){let t=new Set;for(let o of n)(typeof o=="string"||typeof o=="number")&&t.add(String(o));return t}function rze(n){if(ZB.call(n,"strict")){let t=n.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return o=>{let i=`Object can not safely be stringified. Received type ${typeof o}`;throw typeof o!="function"&&(i+=` (${o.toString()})`),new Error(i)}}}function nU(n){n={...n};let t=rze(n);t&&(n.bigint===void 0&&(n.bigint=!1),"circularValue"in n||(n.circularValue=Error));let o=$8e(n),i=Aze(n,"bigint"),e=eze(n),a=typeof e=="function"?e:void 0,A=One(n,"maximumDepth"),r=One(n,"maximumBreadth");function s(B,f,Q,y,m,_){let T=f[B];switch(typeof T=="object"&&T!==null&&typeof T.toJSON=="function"&&(T=T.toJSON(B)),T=y.call(f,B,T),typeof T){case"string":return Wc(T);case"object":{if(T===null)return"null";if(Q.indexOf(T)!==-1)return o;let G="",x=",",J=_;if(Array.isArray(T)){if(T.length===0)return"[]";if(Ar){let P=T.length-r-1;G+=`${x}"... ${vl(P)} not stringified"`}return m!==""&&(G+=` -${J}`),Q.pop(),`[${G}]`}let L=Object.keys(T),q=L.length;if(q===0)return"{}";if(Ar){let W=q-r;G+=`${K}"...":${j}"${vl(W)} not stringified"`,K=x}return m!==""&&K.length>1&&(G=` -${_}${G} -${J}`),Q.pop(),`{${G}}`}case"number":return isFinite(T)?String(T):t?t(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(T);default:return t?t(T):void 0}}function g(B,f,Q,y,m,_){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(B)),typeof f){case"string":return Wc(f);case"object":{if(f===null)return"null";if(Q.indexOf(f)!==-1)return o;let T=_,G="",x=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let v=f.length-r-1;G+=`${x}"... ${vl(v)} not stringified"`}return m!==""&&(G+=` -${T}`),Q.pop(),`[${G}]`}Q.push(f);let J="";m!==""&&(_+=m,x=`, -${_}`,J=" ");let L="";for(let q of y){let j=g(q,f[q],Q,y,m,_);j!==void 0&&(G+=`${L}${Wc(q)}:${J}${j}`,L=x)}return m!==""&&L.length>1&&(G=` -${_}${G} -${T}`),Q.pop(),`{${G}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function c(B,f,Q,y,m){switch(typeof f){case"string":return Wc(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return c(B,f,Q,y,m);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let _=m;if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let N=f.length-r-1;j+=`${K}"... ${vl(N)} not stringified"`}return j+=` -${_}`,Q.pop(),`[${j}]`}let T=Object.keys(f),G=T.length;if(G===0)return"{}";if(Ar){let j=G-r;J+=`${L}"...": "${vl(j)} not stringified"`,L=x}return L!==""&&(J=` -${m}${J} -${_}`),Q.pop(),`{${J}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function I(B,f,Q){switch(typeof f){case"string":return Wc(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return I(B,f,Q);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let y="",m=f.length!==void 0;if(m&&Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let j=f.length-r-1;y+=`,"... ${vl(j)} not stringified"`}return Q.pop(),`[${y}]`}let _=Object.keys(f),T=_.length;if(T===0)return"{}";if(Ar){let J=T-r;y+=`${G}"...":"${vl(J)} not stringified"`}return Q.pop(),`{${y}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function d(B,f,Q){if(arguments.length>1){let y="";if(typeof Q=="number"?y=" ".repeat(Math.min(Q,10)):typeof Q=="string"&&(y=Q.slice(0,10)),f!=null){if(typeof f=="function")return s("",{"":B},[],f,y,"");if(Array.isArray(f))return g("",B,[],tze(f),y,"")}if(y.length!==0)return c("",B,[],y,"")}return I("",B,[])}return d}});var Rne=$((VMA,Nne)=>{"use strict";var gU=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Tne}=VO(),aze=Tne.info;function ize(n,t){n=n||[],t=t||{dedupe:!1};let o=Object.create(Tne);o.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(I=>{o[I]=t.levels[I]});let i={write:e,add:r,remove:s,emit:a,flushSync:A,end:g,minLevel:0,lastId:0,streams:[],clone:c,[gU]:!0,streamLevels:o};return Array.isArray(n)?n.forEach(r,i):r.call(i,n),n=null,i;function e(I){let d,B=this.lastLevel,{streams:f}=this,Q=0,y;for(let m=oze(f.length,t.dedupe);sze(m,f.length,t.dedupe);m=nze(m,t.dedupe))if(d=f[m],d.level<=B){if(Q!==0&&Q!==d.level)break;if(y=d.stream,y[gU]){let{lastTime:_,lastMsg:T,lastObj:G,lastLogger:x}=this;y.lastLevel=B,y.lastTime=_,y.lastMsg=T,y.lastObj=G,y.lastLogger=x}y.write(I),t.dedupe&&(Q=d.level)}else if(!t.dedupe)break}function a(...I){for(let{stream:d}of this.streams)typeof d.emit=="function"&&d.emit(...I)}function A(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync()}function r(I){if(!I)return i;let d=typeof I.write=="function"||I.stream,B=I.write?I:I.stream;if(!d)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:Q}=this,y;typeof I.levelVal=="number"?y=I.levelVal:typeof I.level=="string"?y=Q[I.level]:typeof I.level=="number"?y=I.level:y=aze;let m={stream:B,level:y,levelVal:void 0,id:++i.lastId};return f.unshift(m),f.sort(_ne),this.minLevel=f[0].level,i}function s(I){let{streams:d}=this,B=d.findIndex(f=>f.id===I);return B>=0&&(d.splice(B,1),d.sort(_ne),this.minLevel=d.length>0?d[0].level:-1),i}function g(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync(),I.end()}function c(I){let d=new Array(this.streams.length);for(let B=0;B=0:n{"use strict";var gze=Xe("node:os"),Hne=_2(),cze=T2(),Ize=k2(),Kne=woe(),lze=Dne(),xne=Rh(),{configure:pze}=Mne(),{assertDefaultLevelFound:dze,mappings:Yne,genLsCache:hze,genLevelComparison:Eze,assertLevelComparison:Cze}=eU(),{DEFAULT_LEVELS:jne,SORTING_ORDER:uze}=VO(),{createArgsNormalizer:Bze,asChindings:fze,buildSafeSonicBoom:kne,buildFormatters:Qze,stringify:cU,normalizeDestFileDescriptor:vne,noop:yze}=zO(),{version:mze}=AU(),{chindingsSym:Pne,redactFmtSym:Sze,serializersSym:Gne,timeSym:Dze,timeSliceIndexSym:wze,streamSym:Oze,stringifySym:Fne,stringifySafeSym:IU,stringifiersSym:Lne,setLevelSym:bze,endSym:Mze,formatOptsSym:_ze,messageKeySym:Tze,errorKeySym:Nze,nestedKeySym:Rze,mixinSym:kze,levelCompSym:vze,useOnlyCustomLevelsSym:Pze,formattersSym:Une,hooksSym:Gze,nestedKeyStrSym:Fze,mixinMergeStrategySym:Lze,msgPrefixSym:Uze}=xne,{epochTime:Jne,nullTime:Hze}=Kne,{pid:Kze}=process,xze=gze.hostname(),Yze=Hne.err,jze={level:"info",levelComparison:uze.ASC,levels:jne,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Kze,hostname:xze},serializers:Object.assign(Object.create(null),{err:Yze}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:Jne,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Jze=Bze(jze),qze=Object.assign(Object.create(null),Hne);function lU(...n){let t={},{opts:o,stream:i}=Jze(t,cze(),...n);o.level&&typeof o.level=="string"&&jne[o.level.toLowerCase()]!==void 0&&(o.level=o.level.toLowerCase());let{redact:e,crlf:a,serializers:A,timestamp:r,messageKey:s,errorKey:g,nestedKey:c,base:I,name:d,level:B,customLevels:f,levelComparison:Q,mixin:y,mixinMergeStrategy:m,useOnlyCustomLevels:_,formatters:T,hooks:G,depthLimit:x,edgeLimit:J,onChild:L,msgPrefix:q}=o,j=pze({maximumDepth:x,maximumBreadth:J}),K=Qze(T.level,T.bindings,T.log),v=cU.bind({[IU]:j}),W=e?Ize(e,v):{},Y=e?{stringify:W[Sze]}:{stringify:v},N="}"+(a?`\r +Check the top-level render call using <`+pe+">.")}return te}function dH(L,te){if(!(!L._store||L._store.validated||L.key!=null)){L._store.validated=!0;var pe=Rge(te);if(!pH[pe]){pH[pe]=!0;var me="";L&&L._owner&&L._owner!==R.current&&(me=" It was passed a child from "+Be(L._owner.type)+"."),jl(L),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',pe,me),jl(null)}}}function hH(L,te){if(typeof L=="object"){if(je(L))for(var pe=0;pe",ze=" Did you accidentally export a JSX literal instead of a component?"):EA=typeof L,k("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",EA,ze)}var xA=Qe.apply(this,arguments);if(xA==null)return xA;if(me)for(var pt=2;pt10&&N("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),me._updatedFibers.clear()}}}var BH=!1,yf=null;function Fge(L){if(yf===null)try{var te=("require"+Math.random()).slice(0,7),pe=Gm&&Gm[te];yf=pe.call(Gm,"timers").setImmediate}catch{yf=function(ze){BH===!1&&(BH=!0,typeof MessageChannel>"u"&&k("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var TA=new MessageChannel;TA.port1.onmessage=ze,TA.port2.postMessage(void 0)}}return yf(L)}var Jl=0,fH=!1;function QH(L){{var te=Jl;Jl++,T.current===null&&(T.current=[]);var pe=T.isBatchingLegacy,me;try{if(T.isBatchingLegacy=!0,me=L(),!pe&&T.didScheduleLegacyUpdate){var ze=T.current;ze!==null&&(T.didScheduleLegacyUpdate=!1,Hb(ze))}}catch(rr){throw mf(te),rr}finally{T.isBatchingLegacy=pe}if(me!==null&&typeof me=="object"&&typeof me.then=="function"){var TA=me,EA=!1,xA={then:function(rr,yr){EA=!0,TA.then(function(la){mf(te),Jl===0?Lb(la,rr,yr):rr(la)},function(la){mf(te),yr(la)})}};return!fH&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){EA||(fH=!0,k("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),xA}else{var pt=me;if(mf(te),Jl===0){var Rt=T.current;Rt!==null&&(Hb(Rt),T.current=null);var Jt={then:function(rr,yr){T.current===null?(T.current=[],Lb(pt,rr,yr)):rr(pt)}};return Jt}else{var qt={then:function(rr,yr){rr(pt)}};return qt}}}}function mf(L){L!==Jl-1&&k("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Jl=L}function Lb(L,te,pe){{var me=T.current;if(me!==null)try{Hb(me),Fge(function(){me.length===0?(T.current=null,te(L)):Lb(L,te,pe)})}catch(ze){pe(ze)}else te(L)}}var Ub=!1;function Hb(L){if(!Ub){Ub=!0;var te=0;try{for(;te{"use strict";process.env.NODE_ENV==="production"?Qv.exports=lW():Qv.exports=pW()});var rl=$((XdA,u5)=>{"use strict";var jS=Xe("crypto"),bGe=Xe("assert");function Ro(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}function MGe(n,t,o){Ro(n),Ro(t),Ro(o);let i=jS.createCipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(t),i.final()])}function _Ge(n,t,o){Ro(n),Ro(t),Ro(o);let i=jS.createDecipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(t),i.final()])}function Sd(n,t){Ro(n),Ro(t);let o=jS.createHmac("sha256",n);return o.update(t),Buffer.from(o.digest())}function TGe(n){Ro(n);let t=jS.createHash("sha512");return t.update(n),t.digest()}function NGe(n,t,o,i){if(Ro(n),Ro(t),Ro(o),t.byteLength!=32)throw new Error("Got salt of incorrect length");i=i||3,bGe(i>=1&&i<=3);let e=Sd(t,n),a=new Uint8Array(o.byteLength+1+32);a.set(o,32),a[a.length-1]=1;let A=[Sd(e,Buffer.from(a.slice(32)))];return i>1&&(a.set(A[A.length-1]),a[a.length-1]=2,A.push(Sd(e,Buffer.from(a)))),i>2&&(a.set(A[A.length-1]),a[a.length-1]=3,A.push(Sd(e,Buffer.from(a)))),A}function RGe(n,t,o,i){let e=Sd(t,n).slice(0,i);if(o.length!==i||e.length!==i)throw new Error("Bad MAC length");if(!o.equals(e))throw new Error("Bad MAC")}u5.exports={deriveSecrets:NGe,decrypt:_Ge,encrypt:MGe,hash:TGe,calculateMAC:Sd,verifyMAC:RGe}});var N5=$(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});var $dA=new Uint8Array(16),w5=new Uint8Array(32);w5[0]=9;function pA(n){var t,o=new Float64Array(16);if(n)for(t=0;t>24&255,n[t+1]=o>>16&255,n[t+2]=o>>8&255,n[t+3]=o&255,n[t+4]=i>>24&255,n[t+5]=i>>16&255,n[t+6]=i>>8&255,n[t+7]=i&255}function FGe(n,t,o,i,e){var a,A=0;for(a=0;a>>8)-1}function O5(n,t,o,i){return FGe(n,t,o,i,32)}function Cc(n,t){var o;for(o=0;o<16;o++)n[o]=t[o]|0}function zP(n){var t,o,i=1;for(t=0;t<16;t++)o=n[t]+i+65535,i=Math.floor(o/65536),n[t]=o-i*65536;n[0]+=i-1+37*(i-1)}function Dd(n,t,o){for(var i,e=~(o-1),a=0;a<16;a++)i=e&(n[a]^t[a]),n[a]^=i,t[a]^=i}function Od(n,t){var o,i,e,a=pA(),A=pA();for(o=0;o<16;o++)A[o]=t[o];for(zP(A),zP(A),zP(A),i=0;i<2;i++){for(a[0]=A[0]-65517,o=1;o<15;o++)a[o]=A[o]-65535-(a[o-1]>>16&1),a[o-1]&=65535;a[15]=A[15]-32767-(a[14]>>16&1),e=a[15]>>16&1,a[14]&=65535,Dd(A,a,1-e)}for(o=0;o<16;o++)n[2*o]=A[o]&255,n[2*o+1]=A[o]>>8}function y5(n,t){var o=new Uint8Array(32),i=new Uint8Array(32);return Od(o,n),Od(i,t),O5(o,0,i,0)}function b5(n){var t=new Uint8Array(32);return Od(t,n),t[0]&1}function $P(n,t){var o;for(o=0;o<16;o++)n[o]=t[2*o]+(t[2*o+1]<<8);n[15]&=32767}function hn(n,t,o){for(var i=0;i<16;i++)n[i]=t[i]+o[i]}function Cn(n,t,o){for(var i=0;i<16;i++)n[i]=t[i]-o[i]}function It(n,t,o){var i,e,a=0,A=0,r=0,s=0,g=0,c=0,I=0,d=0,B=0,f=0,Q=0,y=0,m=0,_=0,T=0,R=0,H=0,j=0,F=0,q=0,J=0,x=0,P=0,z=0,U=0,N=0,k=0,V=0,ee=0,ie=0,Te=0,se=o[0],Ne=o[1],fe=o[2],De=o[3],Ke=o[4],rA=o[5],ve=o[6],iA=o[7],Ce=o[8],he=o[9],Ze=o[10],je=o[11],Oe=o[12],hA=o[13],dA=o[14],aA=o[15];i=t[0],a+=i*se,A+=i*Ne,r+=i*fe,s+=i*De,g+=i*Ke,c+=i*rA,I+=i*ve,d+=i*iA,B+=i*Ce,f+=i*he,Q+=i*Ze,y+=i*je,m+=i*Oe,_+=i*hA,T+=i*dA,R+=i*aA,i=t[1],A+=i*se,r+=i*Ne,s+=i*fe,g+=i*De,c+=i*Ke,I+=i*rA,d+=i*ve,B+=i*iA,f+=i*Ce,Q+=i*he,y+=i*Ze,m+=i*je,_+=i*Oe,T+=i*hA,R+=i*dA,H+=i*aA,i=t[2],r+=i*se,s+=i*Ne,g+=i*fe,c+=i*De,I+=i*Ke,d+=i*rA,B+=i*ve,f+=i*iA,Q+=i*Ce,y+=i*he,m+=i*Ze,_+=i*je,T+=i*Oe,R+=i*hA,H+=i*dA,j+=i*aA,i=t[3],s+=i*se,g+=i*Ne,c+=i*fe,I+=i*De,d+=i*Ke,B+=i*rA,f+=i*ve,Q+=i*iA,y+=i*Ce,m+=i*he,_+=i*Ze,T+=i*je,R+=i*Oe,H+=i*hA,j+=i*dA,F+=i*aA,i=t[4],g+=i*se,c+=i*Ne,I+=i*fe,d+=i*De,B+=i*Ke,f+=i*rA,Q+=i*ve,y+=i*iA,m+=i*Ce,_+=i*he,T+=i*Ze,R+=i*je,H+=i*Oe,j+=i*hA,F+=i*dA,q+=i*aA,i=t[5],c+=i*se,I+=i*Ne,d+=i*fe,B+=i*De,f+=i*Ke,Q+=i*rA,y+=i*ve,m+=i*iA,_+=i*Ce,T+=i*he,R+=i*Ze,H+=i*je,j+=i*Oe,F+=i*hA,q+=i*dA,J+=i*aA,i=t[6],I+=i*se,d+=i*Ne,B+=i*fe,f+=i*De,Q+=i*Ke,y+=i*rA,m+=i*ve,_+=i*iA,T+=i*Ce,R+=i*he,H+=i*Ze,j+=i*je,F+=i*Oe,q+=i*hA,J+=i*dA,x+=i*aA,i=t[7],d+=i*se,B+=i*Ne,f+=i*fe,Q+=i*De,y+=i*Ke,m+=i*rA,_+=i*ve,T+=i*iA,R+=i*Ce,H+=i*he,j+=i*Ze,F+=i*je,q+=i*Oe,J+=i*hA,x+=i*dA,P+=i*aA,i=t[8],B+=i*se,f+=i*Ne,Q+=i*fe,y+=i*De,m+=i*Ke,_+=i*rA,T+=i*ve,R+=i*iA,H+=i*Ce,j+=i*he,F+=i*Ze,q+=i*je,J+=i*Oe,x+=i*hA,P+=i*dA,z+=i*aA,i=t[9],f+=i*se,Q+=i*Ne,y+=i*fe,m+=i*De,_+=i*Ke,T+=i*rA,R+=i*ve,H+=i*iA,j+=i*Ce,F+=i*he,q+=i*Ze,J+=i*je,x+=i*Oe,P+=i*hA,z+=i*dA,U+=i*aA,i=t[10],Q+=i*se,y+=i*Ne,m+=i*fe,_+=i*De,T+=i*Ke,R+=i*rA,H+=i*ve,j+=i*iA,F+=i*Ce,q+=i*he,J+=i*Ze,x+=i*je,P+=i*Oe,z+=i*hA,U+=i*dA,N+=i*aA,i=t[11],y+=i*se,m+=i*Ne,_+=i*fe,T+=i*De,R+=i*Ke,H+=i*rA,j+=i*ve,F+=i*iA,q+=i*Ce,J+=i*he,x+=i*Ze,P+=i*je,z+=i*Oe,U+=i*hA,N+=i*dA,k+=i*aA,i=t[12],m+=i*se,_+=i*Ne,T+=i*fe,R+=i*De,H+=i*Ke,j+=i*rA,F+=i*ve,q+=i*iA,J+=i*Ce,x+=i*he,P+=i*Ze,z+=i*je,U+=i*Oe,N+=i*hA,k+=i*dA,V+=i*aA,i=t[13],_+=i*se,T+=i*Ne,R+=i*fe,H+=i*De,j+=i*Ke,F+=i*rA,q+=i*ve,J+=i*iA,x+=i*Ce,P+=i*he,z+=i*Ze,U+=i*je,N+=i*Oe,k+=i*hA,V+=i*dA,ee+=i*aA,i=t[14],T+=i*se,R+=i*Ne,H+=i*fe,j+=i*De,F+=i*Ke,q+=i*rA,J+=i*ve,x+=i*iA,P+=i*Ce,z+=i*he,U+=i*Ze,N+=i*je,k+=i*Oe,V+=i*hA,ee+=i*dA,ie+=i*aA,i=t[15],R+=i*se,H+=i*Ne,j+=i*fe,F+=i*De,q+=i*Ke,J+=i*rA,x+=i*ve,P+=i*iA,z+=i*Ce,U+=i*he,N+=i*Ze,k+=i*je,V+=i*Oe,ee+=i*hA,ie+=i*dA,Te+=i*aA,a+=38*H,A+=38*j,r+=38*F,s+=38*q,g+=38*J,c+=38*x,I+=38*P,d+=38*z,B+=38*U,f+=38*N,Q+=38*k,y+=38*V,m+=38*ee,_+=38*ie,T+=38*Te,e=1,i=a+e+65535,e=Math.floor(i/65536),a=i-e*65536,i=A+e+65535,e=Math.floor(i/65536),A=i-e*65536,i=r+e+65535,e=Math.floor(i/65536),r=i-e*65536,i=s+e+65535,e=Math.floor(i/65536),s=i-e*65536,i=g+e+65535,e=Math.floor(i/65536),g=i-e*65536,i=c+e+65535,e=Math.floor(i/65536),c=i-e*65536,i=I+e+65535,e=Math.floor(i/65536),I=i-e*65536,i=d+e+65535,e=Math.floor(i/65536),d=i-e*65536,i=B+e+65535,e=Math.floor(i/65536),B=i-e*65536,i=f+e+65535,e=Math.floor(i/65536),f=i-e*65536,i=Q+e+65535,e=Math.floor(i/65536),Q=i-e*65536,i=y+e+65535,e=Math.floor(i/65536),y=i-e*65536,i=m+e+65535,e=Math.floor(i/65536),m=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=i-e*65536,i=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=R+e+65535,e=Math.floor(i/65536),R=i-e*65536,a+=e-1+37*(e-1),e=1,i=a+e+65535,e=Math.floor(i/65536),a=i-e*65536,i=A+e+65535,e=Math.floor(i/65536),A=i-e*65536,i=r+e+65535,e=Math.floor(i/65536),r=i-e*65536,i=s+e+65535,e=Math.floor(i/65536),s=i-e*65536,i=g+e+65535,e=Math.floor(i/65536),g=i-e*65536,i=c+e+65535,e=Math.floor(i/65536),c=i-e*65536,i=I+e+65535,e=Math.floor(i/65536),I=i-e*65536,i=d+e+65535,e=Math.floor(i/65536),d=i-e*65536,i=B+e+65535,e=Math.floor(i/65536),B=i-e*65536,i=f+e+65535,e=Math.floor(i/65536),f=i-e*65536,i=Q+e+65535,e=Math.floor(i/65536),Q=i-e*65536,i=y+e+65535,e=Math.floor(i/65536),y=i-e*65536,i=m+e+65535,e=Math.floor(i/65536),m=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=i-e*65536,i=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=R+e+65535,e=Math.floor(i/65536),R=i-e*65536,a+=e-1+37*(e-1),n[0]=a,n[1]=A,n[2]=r,n[3]=s,n[4]=g,n[5]=c,n[6]=I,n[7]=d,n[8]=B,n[9]=f,n[10]=Q,n[11]=y,n[12]=m,n[13]=_,n[14]=T,n[15]=R}function En(n,t){It(n,t,t)}function eG(n,t){var o=pA(),i;for(i=0;i<16;i++)o[i]=t[i];for(i=253;i>=0;i--)En(o,o),i!==2&&i!==4&&It(o,o,t);for(i=0;i<16;i++)n[i]=o[i]}function LGe(n,t){var o=pA(),i;for(i=0;i<16;i++)o[i]=t[i];for(i=250;i>=0;i--)En(o,o),i!==1&&It(o,o,t);for(i=0;i<16;i++)n[i]=o[i]}function M5(n,t,o){var i=new Uint8Array(32),e=new Float64Array(80),a,A,r=pA(),s=pA(),g=pA(),c=pA(),I=pA(),d=pA();for(A=0;A<31;A++)i[A]=t[A];for(i[31]=t[31]&127|64,i[0]&=248,$P(e,o),A=0;A<16;A++)s[A]=e[A],c[A]=r[A]=g[A]=0;for(r[0]=c[0]=1,A=254;A>=0;--A)a=i[A>>>3]>>>(A&7)&1,Dd(r,s,a),Dd(g,c,a),hn(I,r,g),Cn(r,r,g),hn(g,s,c),Cn(s,s,c),En(c,I),En(d,r),It(r,g,r),It(g,s,I),hn(I,r,g),Cn(r,r,g),En(s,r),Cn(g,c,d),It(r,g,kGe),hn(r,r,c),It(g,g,r),It(r,c,d),It(c,s,e),En(s,I),Dd(r,s,a),Dd(g,c,a);for(A=0;A<16;A++)e[A+16]=r[A],e[A+32]=g[A],e[A+48]=s[A],e[A+64]=c[A];var B=e.subarray(32),f=e.subarray(16);return eG(B,B),It(f,f,B),Od(n,f),0}function UGe(n,t){return M5(n,t,w5)}var m5=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function S5(n,t,o,i){for(var e=new Int32Array(16),a=new Int32Array(16),A,r,s,g,c,I,d,B,f,Q,y,m,_,T,R,H,j,F,q,J,x,P,z,U,N,k,V=n[0],ee=n[1],ie=n[2],Te=n[3],se=n[4],Ne=n[5],fe=n[6],De=n[7],Ke=t[0],rA=t[1],ve=t[2],iA=t[3],Ce=t[4],he=t[5],Ze=t[6],je=t[7],Oe=0;i>=128;){for(q=0;q<16;q++)J=8*q+Oe,e[q]=o[J+0]<<24|o[J+1]<<16|o[J+2]<<8|o[J+3],a[q]=o[J+4]<<24|o[J+5]<<16|o[J+6]<<8|o[J+7];for(q=0;q<80;q++)if(A=V,r=ee,s=ie,g=Te,c=se,I=Ne,d=fe,B=De,f=Ke,Q=rA,y=ve,m=iA,_=Ce,T=he,R=Ze,H=je,x=De,P=je,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=(se>>>14|Ce<<18)^(se>>>18|Ce<<14)^(Ce>>>9|se<<23),P=(Ce>>>14|se<<18)^(Ce>>>18|se<<14)^(se>>>9|Ce<<23),z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,x=se&Ne^~se&fe,P=Ce&he^~Ce&Ze,z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,x=m5[q*2],P=m5[q*2+1],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,x=e[q%16],P=a[q%16],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,j=N&65535|k<<16,F=z&65535|U<<16,x=j,P=F,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=(V>>>28|Ke<<4)^(Ke>>>2|V<<30)^(Ke>>>7|V<<25),P=(Ke>>>28|V<<4)^(V>>>2|Ke<<30)^(V>>>7|Ke<<25),z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,x=V&ee^V&ie^ee&ie,P=Ke&rA^Ke&ve^rA&ve,z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,B=N&65535|k<<16,H=z&65535|U<<16,x=g,P=m,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=j,P=F,z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,g=N&65535|k<<16,m=z&65535|U<<16,ee=A,ie=r,Te=s,se=g,Ne=c,fe=I,De=d,V=B,rA=f,ve=Q,iA=y,Ce=m,he=_,Ze=T,je=R,Ke=H,q%16===15)for(J=0;J<16;J++)x=e[J],P=a[J],z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=e[(J+9)%16],P=a[(J+9)%16],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,j=e[(J+1)%16],F=a[(J+1)%16],x=(j>>>1|F<<31)^(j>>>8|F<<24)^j>>>7,P=(F>>>1|j<<31)^(F>>>8|j<<24)^(F>>>7|j<<25),z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,j=e[(J+14)%16],F=a[(J+14)%16],x=(j>>>19|F<<13)^(F>>>29|j<<3)^j>>>6,P=(F>>>19|j<<13)^(j>>>29|F<<3)^(F>>>6|j<<26),z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,e[J]=N&65535|k<<16,a[J]=z&65535|U<<16;x=V,P=Ke,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=n[0],P=t[0],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,n[0]=V=N&65535|k<<16,t[0]=Ke=z&65535|U<<16,x=ee,P=rA,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=n[1],P=t[1],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,n[1]=ee=N&65535|k<<16,t[1]=rA=z&65535|U<<16,x=ie,P=ve,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=n[2],P=t[2],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,n[2]=ie=N&65535|k<<16,t[2]=ve=z&65535|U<<16,x=Te,P=iA,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=n[3],P=t[3],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,n[3]=Te=N&65535|k<<16,t[3]=iA=z&65535|U<<16,x=se,P=Ce,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=n[4],P=t[4],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,n[4]=se=N&65535|k<<16,t[4]=Ce=z&65535|U<<16,x=Ne,P=he,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=n[5],P=t[5],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,n[5]=Ne=N&65535|k<<16,t[5]=he=z&65535|U<<16,x=fe,P=Ze,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=n[6],P=t[6],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,n[6]=fe=N&65535|k<<16,t[6]=Ze=z&65535|U<<16,x=De,P=je,z=P&65535,U=P>>>16,N=x&65535,k=x>>>16,x=n[7],P=t[7],z+=P&65535,U+=P>>>16,N+=x&65535,k+=x>>>16,U+=z>>>16,N+=U>>>16,k+=N>>>16,n[7]=De=N&65535|k<<16,t[7]=je=z&65535|U<<16,Oe+=128,i-=128}return i}function bu(n,t,o){var i=new Int32Array(8),e=new Int32Array(8),a=new Uint8Array(256),A,r=o;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,e[0]=4089235720,e[1]=2227873595,e[2]=4271175723,e[3]=1595750129,e[4]=2917565137,e[5]=725511199,e[6]=4215389547,e[7]=327033209,S5(i,e,t,o),o%=128,A=0;A=0;--e)i=o[e/8|0]>>(e&7)&1,D5(n,t,i),ZP(t,n),ZP(n,n),D5(n,t,i)}function qS(n,t){var o=[pA(),pA(),pA(),pA()];Cc(o[0],B5),Cc(o[1],f5),Cc(o[2],wd),It(o[3],B5,f5),_5(n,o,t)}var VP=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function AG(n,t){var o,i,e,a;for(i=63;i>=32;--i){for(o=0,e=i-32,a=i-12;e>8,t[e]-=o*256;t[e]+=o,t[i]=0}for(o=0,e=0;e<32;e++)t[e]+=o-(t[31]>>4)*VP[e],o=t[e]>>8,t[e]&=255;for(e=0;e<32;e++)t[e]-=o*VP[e];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,n[i]=t[i]&255}function Mu(n){var t=new Float64Array(64),o;for(o=0;o<64;o++)t[o]=n[o];for(o=0;o<64;o++)n[o]=0;AG(n,t)}function HGe(n,t,o,i){var e=new Uint8Array(64),a=new Uint8Array(64),A,r,s=new Float64Array(64),g=[pA(),pA(),pA(),pA()];for(A=0;A>7&&Cn(n[0],WP,n[0]),It(n[3],n[0],n[1]),0)}function YGe(n,t,o,i){var e,a,A=new Uint8Array(32),r=new Uint8Array(64),s=[pA(),pA(),pA(),pA()],g=[pA(),pA(),pA(),pA()];if(a=-1,o<64||xGe(g,i))return-1;for(e=0;e=0}dg.verify=WGe;function ZGe(n){if(uc(n),n.length!==32)throw new Error("wrong seed length");for(var t=new Uint8Array(32),o=new Uint8Array(32),i=0;i<32;i++)t[i]=n[i];return UGe(o,t),t[0]&=248,t[31]&=127,t[31]|=64,o[31]&=127,{public:o,private:t}}dg.generateKeyPair=ZGe;dg.default={}});var Bc=$(Md=>{"use strict";var _u=N5(),bd=Xe("crypto"),tG=Buffer.from([48,42,48,5,6,3,43,101,110,3,33,0]),rG=Buffer.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]),XGe=Buffer.from([5]),aG=function(n){return Buffer.concat([XGe,n])};function R5(n){if(n===void 0)throw new Error("Undefined private key");if(!(n instanceof Buffer))throw new Error(`Invalid private key type: ${n.constructor.name}`);if(n.byteLength!=32)throw new Error(`Incorrect private key length: ${n.byteLength}`)}function k5(n){if(!(n instanceof Buffer))throw new Error(`Invalid public key type: ${n.constructor.name}`);if(n===void 0||(n.byteLength!=33||n[0]!=5)&&n.byteLength!=32)throw new Error("Invalid public key");return n.byteLength==33?n.slice(1):(console.error("WARNING: Expected pubkey of length 33, please report the ST and client that generated the pubkey"),n)}function $Ge(n){let t=new Uint8Array(n);return t[0]|=6,t[31]|=128,t[31]&=-65,t}Md.getPublicFromPrivateKey=function(n){let t=$Ge(n),o=_u.generateKeyPair(t);return aG(Buffer.from(o.public))};Md.generateKeyPair=function(){try{let{publicKey:n,privateKey:t}=bd.generateKeyPairSync("x25519",{publicKeyEncoding:{format:"der",type:"spki"},privateKeyEncoding:{format:"der",type:"pkcs8"}}),o=n.slice(tG.length,tG.length+32),i=t.slice(rG.length,rG.length+32);return{pubKey:aG(o),privKey:i}}catch{let t=_u.generateKeyPair(bd.randomBytes(32));return{privKey:Buffer.from(t.private),pubKey:aG(Buffer.from(t.public))}}};Md.calculateAgreement=function(n,t){if(n=k5(n),R5(t),!n||n.byteLength!=32)throw new Error("Invalid public key");if(typeof bd.diffieHellman=="function"){let o=bd.createPrivateKey({key:Buffer.concat([rG,t]),format:"der",type:"pkcs8"}),i=bd.createPublicKey({key:Buffer.concat([tG,n]),format:"der",type:"spki"});return bd.diffieHellman({privateKey:o,publicKey:i})}else{let o=_u.sharedKey(t,n);return Buffer.from(o)}};Md.calculateSignature=function(n,t){if(R5(n),!t)throw new Error("Invalid message");return Buffer.from(_u.sign(n,t))};Md.verifySignature=function(n,t,o,i){if(n=k5(n),!n||n.byteLength!=32)throw new Error("Invalid public key");if(!t)throw new Error("Invalid message");if(!o||o.byteLength!=64)throw new Error("Invalid signature");return i?!0:_u.verify(n,t,o)}});var P5=$(Tu=>{var zS=Bc(),eFe=Xe("crypto");function v5(n){return typeof n=="number"&&n%1===0&&n>=0}Tu.generateIdentityKeyPair=zS.generateKeyPair;Tu.generateRegistrationId=function(){var n=Uint16Array.from(eFe.randomBytes(2))[0];return n&16383};Tu.generateSignedPreKey=function(n,t){if(!(n.privKey instanceof Buffer)||n.privKey.byteLength!=32||!(n.pubKey instanceof Buffer)||n.pubKey.byteLength!=33)throw new TypeError("Invalid argument for identityKeyPair");if(!v5(t))throw new TypeError("Invalid argument for signedKeyId: "+t);let o=zS.generateKeyPair(),i=zS.calculateSignature(n.privKey,o.pubKey);return{keyId:t,keyPair:o,signature:i}};Tu.generatePreKey=function(n){if(!v5(n))throw new TypeError("Invalid argument for keyId: "+n);let t=zS.generateKeyPair();return{keyId:n,keyPair:t}}});var oG=$((rhA,G5)=>{var iG=class n{static from(t){if(typeof t!="string"||!t.match(/.*\.\d+/))throw new Error("Invalid address encoding");let o=t.split(".");return new this(o[0],parseInt(o[1]))}constructor(t,o){if(typeof t!="string")throw new TypeError("id required for addr");if(t.indexOf(".")!==-1)throw new TypeError("encoded addr detected");if(this.id=t,typeof o!="number")throw new TypeError("number required for deviceId");this.deviceId=o}toString(){return`${this.id}.${this.deviceId}`}is(t){return t instanceof n?t.id===this.id&&t.deviceId===this.deviceId:!1}};G5.exports=iG});var nG=$((ahA,F5)=>{var AFe={OURS:1,THEIRS:2};F5.exports=AFe});var sG=$((ihA,L5)=>{var tFe={SENDING:1,RECEIVING:2};L5.exports=tFe});var XS=$((ohA,H5)=>{var rFe=nG(),aFe=40,U5="v1";function WS(n){if(!Buffer.isBuffer(n))throw new TypeError("Buffer required")}var ZS=class{constructor(){this._chains={}}toString(){return``}inspect(){return this.toString()}addChain(t,o){WS(t);let i=t.toString("base64");if(this._chains.hasOwnProperty(i))throw new Error("Overwrite attempt");this._chains[i]=o}getChain(t){return WS(t),this._chains[t.toString("base64")]}deleteChain(t){WS(t);let o=t.toString("base64");if(!this._chains.hasOwnProperty(o))throw new ReferenceError("Not Found");delete this._chains[o]}*chains(){for(let[t,o]of Object.entries(this._chains))yield[Buffer.from(t,"base64"),o]}serialize(){let t={registrationId:this.registrationId,currentRatchet:{ephemeralKeyPair:{pubKey:this.currentRatchet.ephemeralKeyPair.pubKey.toString("base64"),privKey:this.currentRatchet.ephemeralKeyPair.privKey.toString("base64")},lastRemoteEphemeralKey:this.currentRatchet.lastRemoteEphemeralKey.toString("base64"),previousCounter:this.currentRatchet.previousCounter,rootKey:this.currentRatchet.rootKey.toString("base64")},indexInfo:{baseKey:this.indexInfo.baseKey.toString("base64"),baseKeyType:this.indexInfo.baseKeyType,closed:this.indexInfo.closed,used:this.indexInfo.used,created:this.indexInfo.created,remoteIdentityKey:this.indexInfo.remoteIdentityKey.toString("base64")},_chains:this._serialize_chains(this._chains)};return this.pendingPreKey&&(t.pendingPreKey=Object.assign({},this.pendingPreKey),t.pendingPreKey.baseKey=this.pendingPreKey.baseKey.toString("base64")),t}static deserialize(t){let o=new this;return o.registrationId=t.registrationId,o.currentRatchet={ephemeralKeyPair:{pubKey:Buffer.from(t.currentRatchet.ephemeralKeyPair.pubKey,"base64"),privKey:Buffer.from(t.currentRatchet.ephemeralKeyPair.privKey,"base64")},lastRemoteEphemeralKey:Buffer.from(t.currentRatchet.lastRemoteEphemeralKey,"base64"),previousCounter:t.currentRatchet.previousCounter,rootKey:Buffer.from(t.currentRatchet.rootKey,"base64")},o.indexInfo={baseKey:Buffer.from(t.indexInfo.baseKey,"base64"),baseKeyType:t.indexInfo.baseKeyType,closed:t.indexInfo.closed,used:t.indexInfo.used,created:t.indexInfo.created,remoteIdentityKey:Buffer.from(t.indexInfo.remoteIdentityKey,"base64")},o._chains=this._deserialize_chains(t._chains),t.pendingPreKey&&(o.pendingPreKey=Object.assign({},t.pendingPreKey),o.pendingPreKey.baseKey=Buffer.from(t.pendingPreKey.baseKey,"base64")),o}_serialize_chains(t){let o={};for(let i of Object.keys(t)){let e=t[i],a={};for(let[A,r]of Object.entries(e.messageKeys))a[A]=r.toString("base64");o[i]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&e.chainKey.key.toString("base64")},chainType:e.chainType,messageKeys:a}}return o}static _deserialize_chains(t){let o={};for(let i of Object.keys(t)){let e=t[i],a={};for(let[A,r]of Object.entries(e.messageKeys))a[A]=Buffer.from(r,"base64");o[i]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&Buffer.from(e.chainKey.key,"base64")},chainType:e.chainType,messageKeys:a}}return o}},VS=[{version:"v1",migrate:function(t){let o=t._sessions;if(t.registrationId)for(let i in o)o[i].registrationId||(o[i].registrationId=t.registrationId);else for(let i in o)o[i].indexInfo.closed===-1&&console.error("V1 session storage migration error: registrationId",t.registrationId,"for open session version",t.version)}}],gG=class{static createEntry(){return new ZS}static migrate(t){let o=t.version===void 0;for(let i=0;i{let i=t.indexInfo.used||0,e=o.indexInfo.used||0;return i===e?0:iaFe;){let t,o;for(let[i,e]of Object.entries(this.sessions))e.indexInfo.closed!==-1&&(!o||e.indexInfo.closed{gs.SignalError=class extends Error{};gs.UntrustedIdentityKeyError=class extends gs.SignalError{constructor(t,o){super(),this.name="UntrustedIdentityKeyError",this.addr=t,this.identityKey=o}};gs.SessionError=class extends gs.SignalError{constructor(t){super(t),this.name="SessionError"}};gs.MessageCounterError=class extends gs.SessionError{constructor(t){super(t),this.name="MessageCounterError"}};gs.PreKeyError=class extends gs.SessionError{constructor(t){super(t),this.name="PreKeyError"}}});var cG=$((phA,x5)=>{"use strict";var eD=new Map,K5=1e4;async function iFe(n,t){let o=0;for(;;){let i=Math.min(n.length,K5);for(let e=o;e=K5?(n.splice(0,i),o=0):o=i;else break}t()}x5.exports=function(n,t){t.name||(Object.defineProperty(t,"name",{writable:!0}),typeof n=="string"?t.name=n:console.warn("Unhandled bucket type (for naming):",typeof n,n));let o;eD.has(n)||(eD.set(n,[]),o=!0);let i=eD.get(n),e=new Promise((a,A)=>i.push({awaitable:t,resolve:a,reject:A}));return o&&iFe(i,()=>eD.delete(n)),e}});var lG=$((dhA,q5)=>{"use strict";var Y5=nG(),oFe=sG(),j5=XS(),J5=rl(),fc=Bc(),AD=$S(),nFe=cG(),IG=class{constructor(t,o){this.addr=o,this.storage=t}async initOutgoing(t){let o=this.addr.toString();return await nFe(o,async()=>{if(!await this.storage.isTrustedIdentity(this.addr.id,t.identityKey))throw new AD.UntrustedIdentityKeyError(this.addr.id,t.identityKey);fc.verifySignature(t.identityKey,t.signedPreKey.publicKey,t.signedPreKey.signature,!0);let i=fc.generateKeyPair(),e=t.preKey&&t.preKey.publicKey,a=await this.initSession(!0,i,void 0,t.identityKey,e,t.signedPreKey.publicKey,t.registrationId);a.pendingPreKey={signedKeyId:t.signedPreKey.keyId,baseKey:i.pubKey},t.preKey&&(a.pendingPreKey.preKeyId=t.preKey.keyId);let A=await this.storage.loadSession(o);if(!A)A=new j5;else{let r=A.getOpenSession();r&&A.closeSession(r)}A.setSession(a),await this.storage.storeSession(o,A)})}async initIncoming(t,o){let i=this.addr.toString();if(!await this.storage.isTrustedIdentity(i,o.identityKey))throw new AD.UntrustedIdentityKeyError(this.addr.id,o.identityKey);if(t.getSession(o.baseKey))return;let e=await this.storage.loadPreKey(o.preKeyId);if(o.preKeyId&&!e)throw new AD.PreKeyError("Invalid PreKey ID");let a=await this.storage.loadSignedPreKey(o.signedPreKeyId);if(!a)throw new AD.PreKeyError("Missing SignedPreKey");let A=t.getOpenSession();return A&&(console.warn("Closing open session in favor of incoming prekey bundle"),t.closeSession(A)),t.setSession(await this.initSession(!1,e,a,o.identityKey,o.baseKey,void 0,o.registrationId)),o.preKeyId}async initSession(t,o,i,e,a,A,r){if(t){if(i)throw new Error("Invalid call to initSession");i=o}else{if(A)throw new Error("Invalid call to initSession");A=a}let s;!o||!a?s=new Uint8Array(128):s=new Uint8Array(160);for(var g=0;g<32;g++)s[g]=255;let c=await this.storage.getOurIdentity(),I=fc.calculateAgreement(A,c.privKey),d=fc.calculateAgreement(e,i.privKey),B=fc.calculateAgreement(A,i.privKey);if(t?(s.set(new Uint8Array(I),32),s.set(new Uint8Array(d),64)):(s.set(new Uint8Array(I),64),s.set(new Uint8Array(d),32)),s.set(new Uint8Array(B),96),o&&a){let y=fc.calculateAgreement(a,o.privKey);s.set(new Uint8Array(y),128)}let f=J5.deriveSecrets(Buffer.from(s),Buffer.alloc(32),Buffer.from("WhisperText")),Q=j5.createEntry();return Q.registrationId=r,Q.currentRatchet={rootKey:f[0],ephemeralKeyPair:t?fc.generateKeyPair():i,lastRemoteEphemeralKey:A,previousCounter:0},Q.indexInfo={created:Date.now(),used:Date.now(),remoteIdentityKey:e,baseKey:t?o.pubKey:a,baseKeyType:t?Y5.OURS:Y5.THEIRS,closed:-1},t&&this.calculateSendingRatchet(Q,A),Q}calculateSendingRatchet(t,o){let i=t.currentRatchet,e=fc.calculateAgreement(o,i.ephemeralKeyPair.privKey),a=J5.deriveSecrets(e,i.rootKey,Buffer.from("WhisperRatchet"));t.addChain(i.ephemeralKeyPair.pubKey,{messageKeys:{},chainKey:{counter:-1,key:a[1]},chainType:oFe.SENDING}),i.rootKey=a[0]}};q5.exports=IG});var V5=$((hhA,z5)=>{"use strict";var Qc=Gy(),ko=Qc.Reader,pG=Qc.Writer,nA=Qc.util,un=Qc.roots.default||(Qc.roots.default={});un.textsecure=(function(){var n={};return n.WhisperMessage=(function(){function t(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 1:A.ephemeralKey=i.bytes();break;case 2:A.counter=i.uint32();break;case 3:A.previousCounter=i.uint32();break;case 4:A.ciphertext=i.bytes();break;default:i.skipType(r&7);break}}return A},t.decodeDelimited=function(i){return i instanceof ko||(i=new ko(i)),this.decode(i,i.uint32())},t.verify=function(i){return typeof i!="object"||i===null?"object expected":i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&!(i.ephemeralKey&&typeof i.ephemeralKey.length=="number"||nA.isString(i.ephemeralKey))?"ephemeralKey: buffer expected":i.counter!=null&&i.hasOwnProperty("counter")&&!nA.isInteger(i.counter)?"counter: integer expected":i.previousCounter!=null&&i.hasOwnProperty("previousCounter")&&!nA.isInteger(i.previousCounter)?"previousCounter: integer expected":i.ciphertext!=null&&i.hasOwnProperty("ciphertext")&&!(i.ciphertext&&typeof i.ciphertext.length=="number"||nA.isString(i.ciphertext))?"ciphertext: buffer expected":null},t.fromObject=function(i){if(i instanceof un.textsecure.WhisperMessage)return i;var e=new un.textsecure.WhisperMessage;return i.ephemeralKey!=null&&(typeof i.ephemeralKey=="string"?nA.base64.decode(i.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(i.ephemeralKey)),0):i.ephemeralKey.length&&(e.ephemeralKey=i.ephemeralKey)),i.counter!=null&&(e.counter=i.counter>>>0),i.previousCounter!=null&&(e.previousCounter=i.previousCounter>>>0),i.ciphertext!=null&&(typeof i.ciphertext=="string"?nA.base64.decode(i.ciphertext,e.ciphertext=nA.newBuffer(nA.base64.length(i.ciphertext)),0):i.ciphertext.length&&(e.ciphertext=i.ciphertext)),e},t.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(e.bytes===String?a.ephemeralKey="":(a.ephemeralKey=[],e.bytes!==Array&&(a.ephemeralKey=nA.newBuffer(a.ephemeralKey))),a.counter=0,a.previousCounter=0,e.bytes===String?a.ciphertext="":(a.ciphertext=[],e.bytes!==Array&&(a.ciphertext=nA.newBuffer(a.ciphertext)))),i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&(a.ephemeralKey=e.bytes===String?nA.base64.encode(i.ephemeralKey,0,i.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(i.ephemeralKey):i.ephemeralKey),i.counter!=null&&i.hasOwnProperty("counter")&&(a.counter=i.counter),i.previousCounter!=null&&i.hasOwnProperty("previousCounter")&&(a.previousCounter=i.previousCounter),i.ciphertext!=null&&i.hasOwnProperty("ciphertext")&&(a.ciphertext=e.bytes===String?nA.base64.encode(i.ciphertext,0,i.ciphertext.length):e.bytes===Array?Array.prototype.slice.call(i.ciphertext):i.ciphertext),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,Qc.util.toJSONOptions)},t})(),n.PreKeyWhisperMessage=(function(){function t(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 5:A.registrationId=i.uint32();break;case 1:A.preKeyId=i.uint32();break;case 6:A.signedPreKeyId=i.uint32();break;case 2:A.baseKey=i.bytes();break;case 3:A.identityKey=i.bytes();break;case 4:A.message=i.bytes();break;default:i.skipType(r&7);break}}return A},t.decodeDelimited=function(i){return i instanceof ko||(i=new ko(i)),this.decode(i,i.uint32())},t.verify=function(i){return typeof i!="object"||i===null?"object expected":i.registrationId!=null&&i.hasOwnProperty("registrationId")&&!nA.isInteger(i.registrationId)?"registrationId: integer expected":i.preKeyId!=null&&i.hasOwnProperty("preKeyId")&&!nA.isInteger(i.preKeyId)?"preKeyId: integer expected":i.signedPreKeyId!=null&&i.hasOwnProperty("signedPreKeyId")&&!nA.isInteger(i.signedPreKeyId)?"signedPreKeyId: integer expected":i.baseKey!=null&&i.hasOwnProperty("baseKey")&&!(i.baseKey&&typeof i.baseKey.length=="number"||nA.isString(i.baseKey))?"baseKey: buffer expected":i.identityKey!=null&&i.hasOwnProperty("identityKey")&&!(i.identityKey&&typeof i.identityKey.length=="number"||nA.isString(i.identityKey))?"identityKey: buffer expected":i.message!=null&&i.hasOwnProperty("message")&&!(i.message&&typeof i.message.length=="number"||nA.isString(i.message))?"message: buffer expected":null},t.fromObject=function(i){if(i instanceof un.textsecure.PreKeyWhisperMessage)return i;var e=new un.textsecure.PreKeyWhisperMessage;return i.registrationId!=null&&(e.registrationId=i.registrationId>>>0),i.preKeyId!=null&&(e.preKeyId=i.preKeyId>>>0),i.signedPreKeyId!=null&&(e.signedPreKeyId=i.signedPreKeyId>>>0),i.baseKey!=null&&(typeof i.baseKey=="string"?nA.base64.decode(i.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(i.baseKey)),0):i.baseKey.length&&(e.baseKey=i.baseKey)),i.identityKey!=null&&(typeof i.identityKey=="string"?nA.base64.decode(i.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(i.identityKey)),0):i.identityKey.length&&(e.identityKey=i.identityKey)),i.message!=null&&(typeof i.message=="string"?nA.base64.decode(i.message,e.message=nA.newBuffer(nA.base64.length(i.message)),0):i.message.length&&(e.message=i.message)),e},t.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(a.preKeyId=0,e.bytes===String?a.baseKey="":(a.baseKey=[],e.bytes!==Array&&(a.baseKey=nA.newBuffer(a.baseKey))),e.bytes===String?a.identityKey="":(a.identityKey=[],e.bytes!==Array&&(a.identityKey=nA.newBuffer(a.identityKey))),e.bytes===String?a.message="":(a.message=[],e.bytes!==Array&&(a.message=nA.newBuffer(a.message))),a.registrationId=0,a.signedPreKeyId=0),i.preKeyId!=null&&i.hasOwnProperty("preKeyId")&&(a.preKeyId=i.preKeyId),i.baseKey!=null&&i.hasOwnProperty("baseKey")&&(a.baseKey=e.bytes===String?nA.base64.encode(i.baseKey,0,i.baseKey.length):e.bytes===Array?Array.prototype.slice.call(i.baseKey):i.baseKey),i.identityKey!=null&&i.hasOwnProperty("identityKey")&&(a.identityKey=e.bytes===String?nA.base64.encode(i.identityKey,0,i.identityKey.length):e.bytes===Array?Array.prototype.slice.call(i.identityKey):i.identityKey),i.message!=null&&i.hasOwnProperty("message")&&(a.message=e.bytes===String?nA.base64.encode(i.message,0,i.message.length):e.bytes===Array?Array.prototype.slice.call(i.message):i.message),i.registrationId!=null&&i.hasOwnProperty("registrationId")&&(a.registrationId=i.registrationId),i.signedPreKeyId!=null&&i.hasOwnProperty("signedPreKeyId")&&(a.signedPreKeyId=i.signedPreKeyId),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,Qc.util.toJSONOptions)},t})(),n.KeyExchangeMessage=(function(){function t(o){if(o)for(var i=Object.keys(o),e=0;e>>3){case 1:A.id=i.uint32();break;case 2:A.baseKey=i.bytes();break;case 3:A.ephemeralKey=i.bytes();break;case 4:A.identityKey=i.bytes();break;case 5:A.baseKeySignature=i.bytes();break;default:i.skipType(r&7);break}}return A},t.decodeDelimited=function(i){return i instanceof ko||(i=new ko(i)),this.decode(i,i.uint32())},t.verify=function(i){return typeof i!="object"||i===null?"object expected":i.id!=null&&i.hasOwnProperty("id")&&!nA.isInteger(i.id)?"id: integer expected":i.baseKey!=null&&i.hasOwnProperty("baseKey")&&!(i.baseKey&&typeof i.baseKey.length=="number"||nA.isString(i.baseKey))?"baseKey: buffer expected":i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&!(i.ephemeralKey&&typeof i.ephemeralKey.length=="number"||nA.isString(i.ephemeralKey))?"ephemeralKey: buffer expected":i.identityKey!=null&&i.hasOwnProperty("identityKey")&&!(i.identityKey&&typeof i.identityKey.length=="number"||nA.isString(i.identityKey))?"identityKey: buffer expected":i.baseKeySignature!=null&&i.hasOwnProperty("baseKeySignature")&&!(i.baseKeySignature&&typeof i.baseKeySignature.length=="number"||nA.isString(i.baseKeySignature))?"baseKeySignature: buffer expected":null},t.fromObject=function(i){if(i instanceof un.textsecure.KeyExchangeMessage)return i;var e=new un.textsecure.KeyExchangeMessage;return i.id!=null&&(e.id=i.id>>>0),i.baseKey!=null&&(typeof i.baseKey=="string"?nA.base64.decode(i.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(i.baseKey)),0):i.baseKey.length&&(e.baseKey=i.baseKey)),i.ephemeralKey!=null&&(typeof i.ephemeralKey=="string"?nA.base64.decode(i.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(i.ephemeralKey)),0):i.ephemeralKey.length&&(e.ephemeralKey=i.ephemeralKey)),i.identityKey!=null&&(typeof i.identityKey=="string"?nA.base64.decode(i.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(i.identityKey)),0):i.identityKey.length&&(e.identityKey=i.identityKey)),i.baseKeySignature!=null&&(typeof i.baseKeySignature=="string"?nA.base64.decode(i.baseKeySignature,e.baseKeySignature=nA.newBuffer(nA.base64.length(i.baseKeySignature)),0):i.baseKeySignature.length&&(e.baseKeySignature=i.baseKeySignature)),e},t.toObject=function(i,e){e||(e={});var a={};return e.defaults&&(a.id=0,e.bytes===String?a.baseKey="":(a.baseKey=[],e.bytes!==Array&&(a.baseKey=nA.newBuffer(a.baseKey))),e.bytes===String?a.ephemeralKey="":(a.ephemeralKey=[],e.bytes!==Array&&(a.ephemeralKey=nA.newBuffer(a.ephemeralKey))),e.bytes===String?a.identityKey="":(a.identityKey=[],e.bytes!==Array&&(a.identityKey=nA.newBuffer(a.identityKey))),e.bytes===String?a.baseKeySignature="":(a.baseKeySignature=[],e.bytes!==Array&&(a.baseKeySignature=nA.newBuffer(a.baseKeySignature)))),i.id!=null&&i.hasOwnProperty("id")&&(a.id=i.id),i.baseKey!=null&&i.hasOwnProperty("baseKey")&&(a.baseKey=e.bytes===String?nA.base64.encode(i.baseKey,0,i.baseKey.length):e.bytes===Array?Array.prototype.slice.call(i.baseKey):i.baseKey),i.ephemeralKey!=null&&i.hasOwnProperty("ephemeralKey")&&(a.ephemeralKey=e.bytes===String?nA.base64.encode(i.ephemeralKey,0,i.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(i.ephemeralKey):i.ephemeralKey),i.identityKey!=null&&i.hasOwnProperty("identityKey")&&(a.identityKey=e.bytes===String?nA.base64.encode(i.identityKey,0,i.identityKey.length):e.bytes===Array?Array.prototype.slice.call(i.identityKey):i.identityKey),i.baseKeySignature!=null&&i.hasOwnProperty("baseKeySignature")&&(a.baseKeySignature=e.bytes===String?nA.base64.encode(i.baseKeySignature,0,i.baseKeySignature.length):e.bytes===Array?Array.prototype.slice.call(i.baseKeySignature):i.baseKeySignature),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,Qc.util.toJSONOptions)},t})(),n})();z5.exports=un});var dG=$((EhA,W5)=>{"use strict";var{textsecure:{WhisperMessage:sFe,PreKeyWhisperMessage:gFe}}=V5();W5.exports={WhisperMessage:sFe,PreKeyWhisperMessage:gFe}});var eZ=$((ChA,$5)=>{var tD=sG(),cFe=oG(),IFe=lG(),Z5=XS(),hg=rl(),X5=Bc(),cs=$S(),_d=dG(),lFe=cG(),yc=3;function rD(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}var hG=class{constructor(t,o){if(!(o instanceof cFe))throw new TypeError("protocolAddress must be a ProtocolAddress");this.addr=o,this.storage=t}_encodeTupleByte(t,o){if(t>15||o>15)throw TypeError("Numbers must be 4 bits or less");return t<<4|o}_decodeTupleByte(t){return[t>>4,t&15]}toString(){return``}async getRecord(){let t=await this.storage.loadSession(this.addr.toString());if(t&&!(t instanceof Z5))throw new TypeError("SessionRecord type expected from loadSession");return t}async storeRecord(t){t.removeOldSessions(),await this.storage.storeSession(this.addr.toString(),t)}async queueJob(t){return await lFe(this.addr.toString(),t)}async encrypt(t){rD(t);let o=await this.storage.getOurIdentity();return await this.queueJob(async()=>{let i=await this.getRecord();if(!i)throw new cs.SessionError("No sessions");let e=i.getOpenSession();if(!e)throw new cs.SessionError("No open session");let a=e.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,a))throw new cs.UntrustedIdentityKeyError(this.addr.id,a);let A=e.getChain(e.currentRatchet.ephemeralKeyPair.pubKey);if(A.chainType===tD.RECEIVING)throw new Error("Tried to encrypt on a receiving chain");this.fillMessageKeys(A,A.chainKey.counter+1);let r=hg.deriveSecrets(A.messageKeys[A.chainKey.counter],Buffer.alloc(32),Buffer.from("WhisperMessageKeys"));delete A.messageKeys[A.chainKey.counter];let s=_d.WhisperMessage.create();s.ephemeralKey=e.currentRatchet.ephemeralKeyPair.pubKey,s.counter=A.chainKey.counter,s.previousCounter=e.currentRatchet.previousCounter,s.ciphertext=hg.encrypt(r[0],t,r[2].slice(0,16));let g=_d.WhisperMessage.encode(s).finish(),c=Buffer.alloc(g.byteLength+66+1);c.set(o.pubKey),c.set(e.indexInfo.remoteIdentityKey,33),c[66]=this._encodeTupleByte(yc,yc),c.set(g,67);let I=hg.calculateMAC(r[1],c),d=Buffer.alloc(g.byteLength+9);d[0]=this._encodeTupleByte(yc,yc),d.set(g,1),d.set(I.slice(0,8),g.byteLength+1),await this.storeRecord(i);let B,f;if(e.pendingPreKey){B=3;let Q=_d.PreKeyWhisperMessage.create({identityKey:o.pubKey,registrationId:await this.storage.getOurRegistrationId(),baseKey:e.pendingPreKey.baseKey,signedPreKeyId:e.pendingPreKey.signedKeyId,message:d});e.pendingPreKey.preKeyId&&(Q.preKeyId=e.pendingPreKey.preKeyId),f=Buffer.concat([Buffer.from([this._encodeTupleByte(yc,yc)]),Buffer.from(_d.PreKeyWhisperMessage.encode(Q).finish())])}else B=1,f=d;return{type:B,body:f,registrationId:e.registrationId}})}async decryptWithSessions(t,o){if(!o.length)throw new cs.SessionError("No sessions available");let i=[];for(let e of o){let a;try{return a=await this.doDecryptWhisperMessage(t,e),e.indexInfo.used=Date.now(),{session:e,plaintext:a}}catch(A){i.push(A)}}console.error("Failed to decrypt message with any known session...");for(let e of i)console.error("Session error:"+e,e.stack);throw new cs.SessionError("No matching sessions found for message")}async decryptWhisperMessage(t){return rD(t),await this.queueJob(async()=>{let o=await this.getRecord();if(!o)throw new cs.SessionError("No session record");let i=await this.decryptWithSessions(t,o.getSessions()),e=i.session.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,e))throw new cs.UntrustedIdentityKeyError(this.addr.id,e);return o.isClosed(i.session)&&console.warn("Decrypted message with closed session."),await this.storeRecord(o),i.plaintext})}async decryptPreKeyWhisperMessage(t){rD(t);let o=this._decodeTupleByte(t[0]);if(o[1]>3||o[0]<3)throw new Error("Incompatible version number on PreKeyWhisperMessage");return await this.queueJob(async()=>{let i=await this.getRecord(),e=_d.PreKeyWhisperMessage.decode(t.slice(1));if(!i){if(e.registrationId==null)throw new Error("No registrationId");i=new Z5}let A=await new IFe(this.storage,this.addr).initIncoming(i,e),r=i.getSession(e.baseKey),s=await this.doDecryptWhisperMessage(e.message,r);return await this.storeRecord(i),A&&await this.storage.removePreKey(A),s})}async doDecryptWhisperMessage(t,o){if(rD(t),!o)throw new TypeError("session required");let i=this._decodeTupleByte(t[0]);if(i[1]>3||i[0]<3)throw new Error("Incompatible version number on WhisperMessage");let e=t.slice(1,-8),a=_d.WhisperMessage.decode(e);this.maybeStepRatchet(o,a.ephemeralKey,a.previousCounter);let A=o.getChain(a.ephemeralKey);if(A.chainType===tD.SENDING)throw new Error("Tried to decrypt on a sending chain");if(this.fillMessageKeys(A,a.counter),!A.messageKeys.hasOwnProperty(a.counter))throw new cs.MessageCounterError("Key used already or never filled");let r=A.messageKeys[a.counter];delete A.messageKeys[a.counter];let s=hg.deriveSecrets(r,Buffer.alloc(32),Buffer.from("WhisperMessageKeys")),g=await this.storage.getOurIdentity(),c=Buffer.alloc(e.byteLength+66+1);c.set(o.indexInfo.remoteIdentityKey),c.set(g.pubKey,33),c[66]=this._encodeTupleByte(yc,yc),c.set(e,67),hg.verifyMAC(c,s[1],t.slice(-8),8);let I=hg.decrypt(s[0],a.ciphertext,s[2].slice(0,16));return delete o.pendingPreKey,I}fillMessageKeys(t,o){if(t.chainKey.counter>=o)return;if(o-t.chainKey.counter>2e3)throw new cs.SessionError("Over 2000 messages into the future!");if(t.chainKey.key===void 0)throw new cs.SessionError("Chain closed");let i=t.chainKey.key;return t.messageKeys[t.chainKey.counter+1]=hg.calculateMAC(i,Buffer.from([1])),t.chainKey.key=hg.calculateMAC(i,Buffer.from([2])),t.chainKey.counter+=1,this.fillMessageKeys(t,o)}maybeStepRatchet(t,o,i){if(t.getChain(o))return;let e=t.currentRatchet,a=t.getChain(e.lastRemoteEphemeralKey);a&&(this.fillMessageKeys(a,i),delete a.chainKey.key),this.calculateRatchet(t,o,!1);let A=t.getChain(e.ephemeralKeyPair.pubKey);A&&(e.previousCounter=A.chainKey.counter,t.deleteChain(e.ephemeralKeyPair.pubKey)),e.ephemeralKeyPair=X5.generateKeyPair(),this.calculateRatchet(t,o,!0),e.lastRemoteEphemeralKey=o}calculateRatchet(t,o,i){let e=t.currentRatchet,a=X5.calculateAgreement(o,e.ephemeralKeyPair.privKey),A=hg.deriveSecrets(a,e.rootKey,Buffer.from("WhisperRatchet"),2),r=i?e.ephemeralKeyPair.pubKey:o;t.addChain(r,{messageKeys:{},chainKey:{counter:-1,key:A[1]},chainType:i?tD.SENDING:tD.RECEIVING}),e.rootKey=A[0]}async hasOpenSession(){return await this.queueJob(async()=>{let t=await this.getRecord();return t?t.haveOpenSession():!1})}async closeOpenSession(){return await this.queueJob(async()=>{let t=await this.getRecord();if(t){let o=t.getOpenSession();o&&(t.closeSession(o),await this.storeRecord(t))}})}};$5.exports=hG});var AZ=$(Eg=>{"use strict";Eg.crypto=rl();Eg.curve=Bc();Eg.keyhelper=P5();Eg.ProtocolAddress=oG();Eg.SessionBuilder=lG();Eg.SessionCipher=eZ();Eg.SessionRecord=XS();Object.assign(Eg,$S())});var CG=$((yhA,oZ)=>{"use strict";oZ.exports=function(...n){try{return JSON.stringify(...n)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var uG=$((nZ,sZ)=>{"use strict";var BFe=CG();sZ.exports=class extends Error{constructor(n){let t=n.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:BFe(o));super(t.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,nZ.assert)}}});var al=$((ShA,gZ)=>{"use strict";var fFe=uG();gZ.exports=function(n,...t){if(!n)throw t.length===1&&t[0]instanceof Error?t[0]:new fFe(t)}});var ku=$((DhA,IZ)=>{"use strict";var BG=al(),cZ={};IZ.exports=function(n,t,o){if(t===!1||t===null||t===void 0)return n;o=o||{},typeof o=="string"&&(o={separator:o});let i=Array.isArray(t);BG(!i||!o.separator,"Separator option is not valid for array-based chain");let e=i?t:t.split(o.separator||"."),a=n;for(let A=0;A{"use strict";var lZ={};Za=pZ.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};lZ.typeMap=new Map([["[object Error]",Za.error],["[object Map]",Za.map],["[object Promise]",Za.promise],["[object Set]",Za.set],["[object WeakMap]",Za.weakMap],["[object WeakSet]",Za.weakSet]]);Za.getInternalProto=function(n){if(Array.isArray(n))return Za.array;if(Buffer&&n instanceof Buffer)return Za.buffer;if(n instanceof Date)return Za.date;if(n instanceof RegExp)return Za.regex;if(n instanceof Error)return Za.error;let t=Object.prototype.toString.call(n);return lZ.typeMap.get(t)||Za.generic}});var iD=$(dZ=>{"use strict";dZ.keys=function(n,t={}){return t.symbols!==!1?Reflect.ownKeys(n):Object.getOwnPropertyNames(n)}});var oD=$((OhA,hZ)=>{"use strict";var QFe=ku(),$i=fG(),yFe=iD(),ug={needsProtoHack:new Set([$i.set,$i.map,$i.weakSet,$i.weakMap])};hZ.exports=ug.clone=function(n,t={},o=null){if(typeof n!="object"||n===null)return n;let i=ug.clone,e=o;if(t.shallow){if(t.shallow!==!0)return ug.cloneWithShallow(n,t);i=s=>s}else if(e){let s=e.get(n);if(s)return s}else e=new Map;let a=$i.getInternalProto(n);if(a===$i.buffer)return Buffer&&Buffer.from(n);if(a===$i.date)return new Date(n.getTime());if(a===$i.regex)return new RegExp(n);let A=ug.base(n,a,t);if(A===n)return n;if(e&&e.set(n,A),a===$i.set)for(let s of n)A.add(i(s,t,e));else if(a===$i.map)for(let[s,g]of n)A.set(s,i(g,t,e));let r=yFe.keys(n,t);for(let s of r){if(s==="__proto__")continue;if(a===$i.array&&s==="length"){A.length=n.length;continue}let g=Object.getOwnPropertyDescriptor(n,s);g?g.get||g.set?Object.defineProperty(A,s,g):g.enumerable?A[s]=i(n[s],t,e):Object.defineProperty(A,s,{enumerable:!1,writable:!0,configurable:!0,value:i(n[s],t,e)}):Object.defineProperty(A,s,{enumerable:!0,writable:!0,configurable:!0,value:i(n[s],t,e)})}return A};ug.cloneWithShallow=function(n,t){let o=t.shallow;t=Object.assign({},t),t.shallow=!1;let i=new Map;for(let e of o){let a=QFe(n,e);(typeof a=="object"||typeof a=="function")&&i.set(a,a)}return ug.clone(n,t,i)};ug.base=function(n,t,o){if(o.prototype===!1)return ug.needsProtoHack.has(t)?new t.constructor:t===$i.array?[]:{};let i=Object.getPrototypeOf(n);if(i&&i.isImmutable)return n;if(t===$i.array){let e=[];return i!==t&&Object.setPrototypeOf(e,i),e}if(ug.needsProtoHack.has(t)){let e=new i.constructor;return i!==t&&Object.setPrototypeOf(e,i),e}return Object.create(i)}});var yG=$((bhA,uZ)=>{"use strict";var QG=al(),EZ=oD(),mFe=iD(),CZ={};uZ.exports=CZ.merge=function(n,t,o){if(QG(n&&typeof n=="object","Invalid target value: must be an object"),QG(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return n;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(t)){QG(Array.isArray(n),"Cannot merge array onto an object"),o.mergeArrays||(n.length=0);for(let e=0;e{"use strict";var nD=al(),fZ=oD(),QZ=yG(),BZ=ku(),sD={};yZ.exports=function(n,t,o={}){if(nD(n&&typeof n=="object","Invalid defaults value: must be an object"),nD(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),nD(typeof o=="object","Invalid options: must be an object"),!t)return null;if(o.shallow)return sD.applyToDefaultsWithShallow(n,t,o);let i=fZ(n);if(t===!0)return i;let e=o.nullOverride!==void 0?o.nullOverride:!1;return QZ(i,t,{nullOverride:e,mergeArrays:!1})};sD.applyToDefaultsWithShallow=function(n,t,o){let i=o.shallow;nD(Array.isArray(i),"Invalid keys");let e=new Map,a=t===!0?null:new Set;for(let s of i){s=Array.isArray(s)?s:s.split(".");let g=BZ(n,s);g&&typeof g=="object"?e.set(g,a&&BZ(t,s)||g):a&&a.add(s)}let A=fZ(n,{},e);if(!a)return A;for(let s of a)sD.reachCopy(A,t,s);let r=o.nullOverride!==void 0?o.nullOverride:!1;return QZ(A,t,{nullOverride:r,mergeArrays:!1})};sD.reachCopy=function(n,t,o){for(let a of o){if(!(a in t))return;let A=t[a];if(typeof A!="object"||A===null)return;t=A}let i=t,e=n;for(let a=0;a{"use strict";var mG={};SZ.exports=mG.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=mG.Bench.now()}elapsed(){return mG.Bench.now()-this.ts}static now(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}}});var SG=$((NhA,wZ)=>{"use strict";wZ.exports=function(){}});var bZ=$((RhA,OZ)=>{"use strict";var SFe=SG();OZ.exports=function(){return new Promise(SFe)}});var DG=$((khA,MZ)=>{"use strict";var Is=fG(),ja={mismatched:null};MZ.exports=function(n,t,o){return o=Object.assign({prototype:!0},o),!!ja.isDeepEqual(n,t,o,[])};ja.isDeepEqual=function(n,t,o,i){if(n===t)return n!==0||1/n===1/t;let e=typeof n;if(e!==typeof t||n===null||t===null)return!1;if(e==="function"){if(!o.deepFunction||n.toString()!==t.toString())return!1}else if(e!=="object")return n!==n&&t!==t;let a=ja.getSharedType(n,t,!!o.prototype);switch(a){case Is.buffer:return Buffer&&Buffer.prototype.equals.call(n,t);case Is.promise:return n===t;case Is.regex:return n.toString()===t.toString();case ja.mismatched:return!1}for(let A=i.length-1;A>=0;--A)if(i[A].isSame(n,t))return!0;i.push(new ja.SeenEntry(n,t));try{return!!ja.isDeepEqualObj(a,n,t,o,i)}finally{i.pop()}};ja.getSharedType=function(n,t,o){if(o)return Object.getPrototypeOf(n)!==Object.getPrototypeOf(t)?ja.mismatched:Is.getInternalProto(n);let i=Is.getInternalProto(n);return i!==Is.getInternalProto(t)?ja.mismatched:i};ja.valueOf=function(n){let t=n.valueOf;if(t===void 0)return n;try{return t.call(n)}catch(o){return o}};ja.hasOwnEnumerableProperty=function(n,t){return Object.prototype.propertyIsEnumerable.call(n,t)};ja.isSetSimpleEqual=function(n,t){for(let o of Set.prototype.values.call(n))if(!Set.prototype.has.call(t,o))return!1;return!0};ja.isDeepEqualObj=function(n,t,o,i,e){let{isDeepEqual:a,valueOf:A,hasOwnEnumerableProperty:r}=ja,{keys:s,getOwnPropertySymbols:g}=Object;if(n===Is.array)if(i.part){for(let f of t)for(let Q of o)if(a(f,Q,i,e))return!0}else{if(t.length!==o.length)return!1;for(let f=0;f{"use strict";_Z.exports=function(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var NZ=$((GhA,TZ)=>{"use strict";var gD=al(),DFe=DG(),wFe=wG(),OFe=iD(),eo={};TZ.exports=function(n,t,o={}){return typeof t!="object"&&(t=[t]),gD(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof n=="string"?eo.string(n,t,o):Array.isArray(n)?eo.array(n,t,o):(gD(typeof n=="object","Reference must be string or an object"),eo.object(n,t,o))};eo.array=function(n,t,o){if(Array.isArray(t)||(t=[t]),!n.length||o.only&&o.once&&n.length!==t.length)return!1;let i,e=new Map;for(let A of t)if(!o.deep||!A||typeof A!="object"){let r=e.get(A);r?++r.allowed:e.set(A,{allowed:1,hits:0})}else{i=i||eo.compare(o);let r=!1;for(let[s,g]of e.entries())if(i(s,A)){++g.allowed,r=!0;break}r||e.set(A,{allowed:1,hits:0})}let a=0;for(let A of n){let r;if(!o.deep||!A||typeof A!="object")r=e.get(A);else{i=i||eo.compare(o);for(let[s,g]of e.entries())if(i(s,A)){r=g;break}}if(r&&(++r.hits,++a,o.once&&r.hits>r.allowed))return!1}if(o.only&&a!==n.length)return!1;for(let A of e.values())if(A.hits!==A.allowed&&A.hitst.propertyIsEnumerable(s)),a=[...Object.keys(t),...e],A=eo.compare(o),r=new Set(a);for(let s of i){if(!r.has(s)){if(o.only)return!1;continue}if(!A(t[s],n[s]))return!1;r.delete(s)}return r.size?o.part?r.sizes!=="");let i=new Map,e=[];for(let s of t)if(gD(typeof s=="string","Cannot compare string reference to non-string value"),s){let g=i.get(s);g?++g.allowed:(i.set(s,{allowed:1,hits:0}),e.push(wFe(s)))}else if(o.once||o.only)return!1;if(!e.length)return!0;let a=new RegExp(`(${e.join("|")})`,"g"),A=n.replace(a,(s,g)=>(++i.get(g).hits,""));if(o.only&&A)return!1;let r=!1;for(let s of i.values())if(s.hits&&(r=!0),s.hits!==s.allowed&&(s.hitsDFe(e,a,i)};eo.shallow=function(n,t){return n===t}});var kZ=$((FhA,RZ)=>{"use strict";var bFe=al();RZ.exports=function(n){return bFe(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(n),"Bad attribute value ("+n+")"),n.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var PZ=$((LhA,vZ)=>{"use strict";var Sc={};vZ.exports=function(n){if(!n)return"";let t="";for(let o=0;o=256?"&#"+n+";":`&#x${n.toString(16).padStart(2,"0")};`)};Sc.isSafe=function(n){return Sc.safeCharCodes.has(n)};Sc.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);Sc.safeCharCodes=(function(){let n=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&n.add(t);return n})()});var FZ=$((UhA,GZ)=>{"use strict";var cD={};GZ.exports=function(n){return n?n.replace(/[<>&\u2028\u2029]/g,cD.escape):""};cD.escape=function(n){return cD.replacements.get(n)};cD.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var HZ=$((HhA,UZ)=>{"use strict";var LZ={};UZ.exports=LZ.flatten=function(n,t){let o=t||[];for(let i of n)Array.isArray(i)?LZ.flatten(i,o):o.push(i);return o}});var YZ=$((KhA,xZ)=>{"use strict";var KZ={};xZ.exports=function(n,t,o={}){if(!n||!t)return o.first?null:[];let i=[],e=Array.isArray(n)?new Set(n):n,a=new Set;for(let A of t)if(KZ.has(e,A)&&!a.has(A)){if(o.first)return A;i.push(A),a.add(A)}return o.first?null:i};KZ.has=function(n,t){return typeof n.has=="function"?n.has(t):n[t]!==void 0}});var JZ=$((xhA,jZ)=>{"use strict";jZ.exports=function(n){return!!n&&typeof n.then=="function"}});var VZ=$((YhA,zZ)=>{"use strict";var qZ={wrapped:Symbol("wrapped")};zZ.exports=function(n){if(n[qZ.wrapped])return n;let t=!1,o=function(...i){t||(t=!0,n(...i))};return o[qZ.wrapped]=!0,o}});var ZZ=$((jhA,WZ)=>{"use strict";var MFe=ku();WZ.exports=function(n,t,o){return t.replace(/{([^{}]+)}/g,(i,e)=>{let a=MFe(n,e,o);return a??""})}});var $Z=$((JhA,XZ)=>{"use strict";var _Fe={maxTimer:2147483647};XZ.exports=function(n,t,o){if(typeof n=="bigint"&&(n=Number(n)),n>=Number.MAX_SAFE_INTEGER&&(n=1/0),typeof n!="number"&&n!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(i=>{let e=o?o.setTimeout:setTimeout,a=()=>{let A=Math.min(n,_Fe.maxTimer);n-=A,e(()=>n>0?a():i(t),A)};n!==1/0&&a()})}});var e9=$(sr=>{"use strict";sr.applyToDefaults=mZ();sr.assert=al();sr.Bench=DZ();sr.block=bZ();sr.clone=oD();sr.contain=NZ();sr.deepEqual=DG();sr.Error=uG();sr.escapeHeaderAttribute=kZ();sr.escapeHtml=PZ();sr.escapeJson=FZ();sr.escapeRegex=wG();sr.flatten=HZ();sr.ignore=SG();sr.intersect=YZ();sr.isPromise=JZ();sr.merge=yG();sr.once=VZ();sr.reach=ku();sr.reachTemplate=ZZ();sr.stringify=CG();sr.wait=$Z()});var Gr=$(ke=>{"use strict";var il=e9(),Mi={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary 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 Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[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 Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};ke.Boom=class extends Error{constructor(n,t={}){if(n instanceof Error)return ke.boomify(il.clone(n),t);let{statusCode:o=500,data:i=null,ctor:e=ke.Boom}=t,a=new Error(n||void 0);Error.captureStackTrace(a,e),a.data=i;let A=Mi.initialize(a,o);return Object.defineProperty(A,"typeof",{value:e}),t.decorate&&Object.assign(A,t.decorate),A}static[Symbol.hasInstance](n){return this===ke.Boom?ke.isBoom(n):this.prototype.isPrototypeOf(n)}};ke.isBoom=function(n,t){return n instanceof Error&&!!n.isBoom&&(!t||n.output.statusCode===t)};ke.boomify=function(n,t){return il.assert(n instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(n.data=t.data),t.decorate&&Object.assign(n,t.decorate),n.isBoom?t.override===!1||!t.statusCode&&!t.message?n:Mi.initialize(n,t.statusCode||n.output.statusCode,t.message):Mi.initialize(n,t.statusCode||500,t.message)};ke.badRequest=function(n,t){return new ke.Boom(n,{statusCode:400,data:t,ctor:ke.badRequest})};ke.unauthorized=function(n,t,o){let i=new ke.Boom(n,{statusCode:401,ctor:ke.unauthorized});if(!t)return i;if(typeof t!="string")return i.output.headers["WWW-Authenticate"]=t.join(", "),i;let e=`${t}`;return(o||n)&&(i.output.payload.attributes={}),o&&(typeof o=="string"?(e+=" "+il.escapeHeaderAttribute(o),i.output.payload.attributes=o):e+=" "+Object.keys(o).map(a=>{let A=o[a];return A==null&&(A=""),i.output.payload.attributes[a]=A,`${a}="${il.escapeHeaderAttribute(A.toString())}"`}).join(", ")),n?(o&&(e+=","),e+=` error="${il.escapeHeaderAttribute(n)}"`,i.output.payload.attributes.error=n):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=e,i};ke.paymentRequired=function(n,t){return new ke.Boom(n,{statusCode:402,data:t,ctor:ke.paymentRequired})};ke.forbidden=function(n,t){return new ke.Boom(n,{statusCode:403,data:t,ctor:ke.forbidden})};ke.notFound=function(n,t){return new ke.Boom(n,{statusCode:404,data:t,ctor:ke.notFound})};ke.methodNotAllowed=function(n,t,o){let i=new ke.Boom(n,{statusCode:405,data:t,ctor:ke.methodNotAllowed});return typeof o=="string"&&(o=[o]),Array.isArray(o)&&(i.output.headers.Allow=o.join(", ")),i};ke.notAcceptable=function(n,t){return new ke.Boom(n,{statusCode:406,data:t,ctor:ke.notAcceptable})};ke.proxyAuthRequired=function(n,t){return new ke.Boom(n,{statusCode:407,data:t,ctor:ke.proxyAuthRequired})};ke.clientTimeout=function(n,t){return new ke.Boom(n,{statusCode:408,data:t,ctor:ke.clientTimeout})};ke.conflict=function(n,t){return new ke.Boom(n,{statusCode:409,data:t,ctor:ke.conflict})};ke.resourceGone=function(n,t){return new ke.Boom(n,{statusCode:410,data:t,ctor:ke.resourceGone})};ke.lengthRequired=function(n,t){return new ke.Boom(n,{statusCode:411,data:t,ctor:ke.lengthRequired})};ke.preconditionFailed=function(n,t){return new ke.Boom(n,{statusCode:412,data:t,ctor:ke.preconditionFailed})};ke.entityTooLarge=function(n,t){return new ke.Boom(n,{statusCode:413,data:t,ctor:ke.entityTooLarge})};ke.uriTooLong=function(n,t){return new ke.Boom(n,{statusCode:414,data:t,ctor:ke.uriTooLong})};ke.unsupportedMediaType=function(n,t){return new ke.Boom(n,{statusCode:415,data:t,ctor:ke.unsupportedMediaType})};ke.rangeNotSatisfiable=function(n,t){return new ke.Boom(n,{statusCode:416,data:t,ctor:ke.rangeNotSatisfiable})};ke.expectationFailed=function(n,t){return new ke.Boom(n,{statusCode:417,data:t,ctor:ke.expectationFailed})};ke.teapot=function(n,t){return new ke.Boom(n,{statusCode:418,data:t,ctor:ke.teapot})};ke.badData=function(n,t){return new ke.Boom(n,{statusCode:422,data:t,ctor:ke.badData})};ke.locked=function(n,t){return new ke.Boom(n,{statusCode:423,data:t,ctor:ke.locked})};ke.failedDependency=function(n,t){return new ke.Boom(n,{statusCode:424,data:t,ctor:ke.failedDependency})};ke.tooEarly=function(n,t){return new ke.Boom(n,{statusCode:425,data:t,ctor:ke.tooEarly})};ke.preconditionRequired=function(n,t){return new ke.Boom(n,{statusCode:428,data:t,ctor:ke.preconditionRequired})};ke.tooManyRequests=function(n,t){return new ke.Boom(n,{statusCode:429,data:t,ctor:ke.tooManyRequests})};ke.illegal=function(n,t){return new ke.Boom(n,{statusCode:451,data:t,ctor:ke.illegal})};ke.internal=function(n,t,o=500){return Mi.serverError(n,t,o,ke.internal)};ke.notImplemented=function(n,t){return Mi.serverError(n,t,501,ke.notImplemented)};ke.badGateway=function(n,t){return Mi.serverError(n,t,502,ke.badGateway)};ke.serverUnavailable=function(n,t){return Mi.serverError(n,t,503,ke.serverUnavailable)};ke.gatewayTimeout=function(n,t){return Mi.serverError(n,t,504,ke.gatewayTimeout)};ke.badImplementation=function(n,t){let o=Mi.serverError(n,t,500,ke.badImplementation);return o.isDeveloperError=!0,o};Mi.initialize=function(n,t,o){let i=parseInt(t,10);if(il.assert(!isNaN(i)&&i>=400,"First argument must be a number (400+):",t),n.isBoom=!0,n.isServer=i>=500,n.hasOwnProperty("data")||(n.data=null),n.output={statusCode:i,payload:{},headers:{}},Object.defineProperty(n,"reformat",{value:Mi.reformat,configurable:!0}),!o&&!n.message&&(n.reformat(),o=n.output.payload.error),o){let e=Object.getOwnPropertyDescriptor(n,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),"message");il.assert(!e||e.configurable&&!e.get,"The error is not compatible with boom"),n.message=o+(n.message?": "+n.message:""),n.output.payload.message=n.message}return n.reformat(),n};Mi.reformat=function(n=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=Mi.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&n!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};Mi.serverError=function(n,t,o,i){return t instanceof Error&&!t.isBoom?ke.boomify(t,{statusCode:o,message:n}):new ke.Boom(n,{statusCode:o,data:t,ctor:i})}});var rX,cLe,ILe,lLe,pLe,dLe,hLe,ELe,CLe,uLe,BLe,fLe,QLe,yLe,mLe,O,ps=ue(()=>{rX=n=>typeof n<"u"&&n!==null,cLe=n=>typeof n=="object",ILe=n=>Object.prototype.toString.call(n)==="[object Object]",lLe=n=>typeof n=="function",pLe=n=>typeof n=="boolean",dLe=n=>n instanceof Buffer,hLe=n=>{if(rX(n))switch(n.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},ELe=n=>n instanceof ArrayBuffer,CLe=n=>typeof n=="string"&&n.length>0,uLe=n=>typeof n=="number"&&Number.isFinite(n),BLe=n=>Number.isInteger(n),fLe=(n,t,o)=>n>=t&&n<=o,QLe=(n,t)=>t.includes(n),yLe=(n,t,o)=>new Error(`Expected ${t} for ${n} but received ${o} of type ${typeof o}`),mLe=(n,t)=>(t.message=n.message,t),O={defined:rX,object:cLe,plainObject:ILe,fn:lLe,bool:pLe,buffer:dLe,typedArray:hLe,arrayBuffer:ELe,string:CLe,number:uLe,integer:BLe,inRange:fLe,inArray:QLe,invalidParameterError:yLe,nativeError:mLe}});var oX=$((rCA,iX)=>{"use strict";var aX=()=>process.platform==="linux",wD=null,SLe=()=>{if(!wD)if(aX()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,wD=process.report.getReport(),process.report.excludeNetwork=n}else wD={};return wD};iX.exports={isLinux:aX,getReport:SLe}});var sX=$((aCA,nX)=>{"use strict";var Hd=Xe("fs"),DLe="/usr/bin/ldd",wLe="/proc/self/exe",OD=2048,OLe=n=>{let t=Hd.openSync(n,"r"),o=Buffer.alloc(OD),i=Hd.readSync(t,o,0,OD,0);return Hd.close(t,()=>{}),o.subarray(0,i)},bLe=n=>new Promise((t,o)=>{Hd.open(n,"r",(i,e)=>{if(i)o(i);else{let a=Buffer.alloc(OD);Hd.read(e,a,0,OD,0,(A,r)=>{t(a.subarray(0,r)),Hd.close(e,()=>{})})}})});nX.exports={LDD_PATH:DLe,SELF_PATH:wLe,readFileSync:OLe,readFile:bLe}});var cX=$((iCA,gX)=>{"use strict";var MLe=n=>{if(n.length<64||n.readUInt32BE(0)!==2135247942||n.readUInt8(4)!==2||n.readUInt8(5)!==1)return null;let t=n.readUInt32LE(32),o=n.readUInt16LE(54),i=n.readUInt16LE(56);for(let e=0;e{"use strict";var lX=Xe("child_process"),{isLinux:Kd,getReport:pX}=oX(),{LDD_PATH:bD,SELF_PATH:dX,readFile:UG,readFileSync:HG}=sX(),{interpreterPath:hX}=cX(),ds,hs,Es,EX="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",Tc="",CX=()=>Tc||new Promise(n=>{lX.exec(EX,(t,o)=>{Tc=t?" ":o,n(Tc)})}),uX=()=>{if(!Tc)try{Tc=lX.execSync(EX,{encoding:"utf8"})}catch{Tc=" "}return Tc},mg="glibc",BX=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,Il="musl",_Le=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),fX=()=>{let n=pX();return n.header&&n.header.glibcVersionRuntime?mg:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(_Le)?Il:null},QX=n=>{let[t,o]=n.split(/[\r\n]+/);return t&&t.includes(mg)?mg:o&&o.includes(Il)?Il:null},yX=n=>{if(n){if(n.includes("/ld-musl-"))return Il;if(n.includes("/ld-linux-"))return mg}return null},mX=n=>(n=n.toString(),n.includes("musl")?Il:n.includes("GNU C Library")?mg:null),TLe=async()=>{if(hs!==void 0)return hs;hs=null;try{let n=await UG(bD);hs=mX(n)}catch{}return hs},NLe=()=>{if(hs!==void 0)return hs;hs=null;try{let n=HG(bD);hs=mX(n)}catch{}return hs},RLe=async()=>{if(ds!==void 0)return ds;ds=null;try{let n=await UG(dX),t=hX(n);ds=yX(t)}catch{}return ds},kLe=()=>{if(ds!==void 0)return ds;ds=null;try{let n=HG(dX),t=hX(n);ds=yX(t)}catch{}return ds},SX=async()=>{let n=null;if(Kd()&&(n=await RLe(),!n&&(n=await TLe(),n||(n=fX()),!n))){let t=await CX();n=QX(t)}return n},DX=()=>{let n=null;if(Kd()&&(n=kLe(),!n&&(n=NLe(),n||(n=fX()),!n))){let t=uX();n=QX(t)}return n},vLe=async()=>Kd()&&await SX()!==mg,PLe=()=>Kd()&&DX()!==mg,GLe=async()=>{if(Es!==void 0)return Es;Es=null;try{let t=(await UG(bD)).match(BX);t&&(Es=t[1])}catch{}return Es},FLe=()=>{if(Es!==void 0)return Es;Es=null;try{let t=HG(bD).match(BX);t&&(Es=t[1])}catch{}return Es},wX=()=>{let n=pX();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},IX=n=>n.trim().split(/\s+/)[1],OX=n=>{let[t,o,i]=n.split(/[\r\n]+/);return t&&t.includes(mg)?IX(t):o&&i&&o.includes(Il)?IX(i):null},LLe=async()=>{let n=null;if(Kd()&&(n=await GLe(),n||(n=wX()),!n)){let t=await CX();n=OX(t)}return n},ULe=()=>{let n=null;if(Kd()&&(n=FLe(),n||(n=wX()),!n)){let t=uX();n=OX(t)}return n};bX.exports={GLIBC:mg,MUSL:Il,family:SX,familySync:DX,isNonGlibcLinux:vLe,isNonGlibcLinuxSync:PLe,version:LLe,versionSync:ULe}});var xd=$((nCA,MX)=>{"use strict";var HLe="2.0.0",KLe=Number.MAX_SAFE_INTEGER||9007199254740991,xLe=16,YLe=250,jLe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];MX.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:xLe,MAX_SAFE_BUILD_LENGTH:YLe,MAX_SAFE_INTEGER:KLe,RELEASE_TYPES:jLe,SEMVER_SPEC_VERSION:HLe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var zu=$((sCA,_X)=>{"use strict";var JLe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};_X.exports=JLe});var Yd=$((Cs,TX)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:KG,MAX_SAFE_BUILD_LENGTH:qLe,MAX_LENGTH:zLe}=xd(),VLe=zu();Cs=TX.exports={};var WLe=Cs.re=[],ZLe=Cs.safeRe=[],gA=Cs.src=[],XLe=Cs.safeSrc=[],cA=Cs.t={},$Le=0,xG="[a-zA-Z0-9-]",e2e=[["\\s",1],["\\d",zLe],[xG,qLe]],A2e=n=>{for(let[t,o]of e2e)n=n.split(`${t}*`).join(`${t}{0,${o}}`).split(`${t}+`).join(`${t}{1,${o}}`);return n},JA=(n,t,o)=>{let i=A2e(t),e=$Le++;VLe(n,e,t),cA[n]=e,gA[e]=t,XLe[e]=i,WLe[e]=new RegExp(t,o?"g":void 0),ZLe[e]=new RegExp(i,o?"g":void 0)};JA("NUMERICIDENTIFIER","0|[1-9]\\d*");JA("NUMERICIDENTIFIERLOOSE","\\d+");JA("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${xG}*`);JA("MAINVERSION",`(${gA[cA.NUMERICIDENTIFIER]})\\.(${gA[cA.NUMERICIDENTIFIER]})\\.(${gA[cA.NUMERICIDENTIFIER]})`);JA("MAINVERSIONLOOSE",`(${gA[cA.NUMERICIDENTIFIERLOOSE]})\\.(${gA[cA.NUMERICIDENTIFIERLOOSE]})\\.(${gA[cA.NUMERICIDENTIFIERLOOSE]})`);JA("PRERELEASEIDENTIFIER",`(?:${gA[cA.NONNUMERICIDENTIFIER]}|${gA[cA.NUMERICIDENTIFIER]})`);JA("PRERELEASEIDENTIFIERLOOSE",`(?:${gA[cA.NONNUMERICIDENTIFIER]}|${gA[cA.NUMERICIDENTIFIERLOOSE]})`);JA("PRERELEASE",`(?:-(${gA[cA.PRERELEASEIDENTIFIER]}(?:\\.${gA[cA.PRERELEASEIDENTIFIER]})*))`);JA("PRERELEASELOOSE",`(?:-?(${gA[cA.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${gA[cA.PRERELEASEIDENTIFIERLOOSE]})*))`);JA("BUILDIDENTIFIER",`${xG}+`);JA("BUILD",`(?:\\+(${gA[cA.BUILDIDENTIFIER]}(?:\\.${gA[cA.BUILDIDENTIFIER]})*))`);JA("FULLPLAIN",`v?${gA[cA.MAINVERSION]}${gA[cA.PRERELEASE]}?${gA[cA.BUILD]}?`);JA("FULL",`^${gA[cA.FULLPLAIN]}$`);JA("LOOSEPLAIN",`[v=\\s]*${gA[cA.MAINVERSIONLOOSE]}${gA[cA.PRERELEASELOOSE]}?${gA[cA.BUILD]}?`);JA("LOOSE",`^${gA[cA.LOOSEPLAIN]}$`);JA("GTLT","((?:<|>)?=?)");JA("XRANGEIDENTIFIERLOOSE",`${gA[cA.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);JA("XRANGEIDENTIFIER",`${gA[cA.NUMERICIDENTIFIER]}|x|X|\\*`);JA("XRANGEPLAIN",`[v=\\s]*(${gA[cA.XRANGEIDENTIFIER]})(?:\\.(${gA[cA.XRANGEIDENTIFIER]})(?:\\.(${gA[cA.XRANGEIDENTIFIER]})(?:${gA[cA.PRERELEASE]})?${gA[cA.BUILD]}?)?)?`);JA("XRANGEPLAINLOOSE",`[v=\\s]*(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:\\.(${gA[cA.XRANGEIDENTIFIERLOOSE]})(?:${gA[cA.PRERELEASELOOSE]})?${gA[cA.BUILD]}?)?)?`);JA("XRANGE",`^${gA[cA.GTLT]}\\s*${gA[cA.XRANGEPLAIN]}$`);JA("XRANGELOOSE",`^${gA[cA.GTLT]}\\s*${gA[cA.XRANGEPLAINLOOSE]}$`);JA("COERCEPLAIN",`(^|[^\\d])(\\d{1,${KG}})(?:\\.(\\d{1,${KG}}))?(?:\\.(\\d{1,${KG}}))?`);JA("COERCE",`${gA[cA.COERCEPLAIN]}(?:$|[^\\d])`);JA("COERCEFULL",gA[cA.COERCEPLAIN]+`(?:${gA[cA.PRERELEASE]})?(?:${gA[cA.BUILD]})?(?:$|[^\\d])`);JA("COERCERTL",gA[cA.COERCE],!0);JA("COERCERTLFULL",gA[cA.COERCEFULL],!0);JA("LONETILDE","(?:~>?)");JA("TILDETRIM",`(\\s*)${gA[cA.LONETILDE]}\\s+`,!0);Cs.tildeTrimReplace="$1~";JA("TILDE",`^${gA[cA.LONETILDE]}${gA[cA.XRANGEPLAIN]}$`);JA("TILDELOOSE",`^${gA[cA.LONETILDE]}${gA[cA.XRANGEPLAINLOOSE]}$`);JA("LONECARET","(?:\\^)");JA("CARETTRIM",`(\\s*)${gA[cA.LONECARET]}\\s+`,!0);Cs.caretTrimReplace="$1^";JA("CARET",`^${gA[cA.LONECARET]}${gA[cA.XRANGEPLAIN]}$`);JA("CARETLOOSE",`^${gA[cA.LONECARET]}${gA[cA.XRANGEPLAINLOOSE]}$`);JA("COMPARATORLOOSE",`^${gA[cA.GTLT]}\\s*(${gA[cA.LOOSEPLAIN]})$|^$`);JA("COMPARATOR",`^${gA[cA.GTLT]}\\s*(${gA[cA.FULLPLAIN]})$|^$`);JA("COMPARATORTRIM",`(\\s*)${gA[cA.GTLT]}\\s*(${gA[cA.LOOSEPLAIN]}|${gA[cA.XRANGEPLAIN]})`,!0);Cs.comparatorTrimReplace="$1$2$3";JA("HYPHENRANGE",`^\\s*(${gA[cA.XRANGEPLAIN]})\\s+-\\s+(${gA[cA.XRANGEPLAIN]})\\s*$`);JA("HYPHENRANGELOOSE",`^\\s*(${gA[cA.XRANGEPLAINLOOSE]})\\s+-\\s+(${gA[cA.XRANGEPLAINLOOSE]})\\s*$`);JA("STAR","(<|>)?=?\\s*\\*");JA("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");JA("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var _D=$((gCA,NX)=>{"use strict";var t2e=Object.freeze({loose:!0}),r2e=Object.freeze({}),a2e=n=>n?typeof n!="object"?t2e:n:r2e;NX.exports=a2e});var YG=$((cCA,vX)=>{"use strict";var RX=/^[0-9]+$/,kX=(n,t)=>{if(typeof n=="number"&&typeof t=="number")return n===t?0:nkX(t,n);vX.exports={compareIdentifiers:kX,rcompareIdentifiers:i2e}});var fa=$((ICA,GX)=>{"use strict";var TD=zu(),{MAX_LENGTH:PX,MAX_SAFE_INTEGER:ND}=xd(),{safeRe:RD,t:kD}=Yd(),o2e=_D(),{compareIdentifiers:jG}=YG(),n2e=(n,t)=>{let o=t.split(".");if(o.length>n.length)return!1;for(let i=0;iPX)throw new TypeError(`version is longer than ${PX} characters`);TD("SemVer",t,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let i=t.trim().match(o.loose?RD[kD.LOOSE]:RD[kD.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>ND||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ND||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ND||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let a=+e;if(a>=0&&at.major?1:this.minort.minor?1:this.patcht.patch?1:0}comparePre(t){if(t instanceof n||(t=new n(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let o=0;do{let i=this.prerelease[o],e=t.prerelease[o];if(TD("prerelease compare",o,i,e),i===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(i===void 0)return-1;if(i===e)continue;return jG(i,e)}while(++o)}compareBuild(t){t instanceof n||(t=new n(t,this.options));let o=0;do{let i=this.build[o],e=t.build[o];if(TD("build compare",o,i,e),i===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(i===void 0)return-1;if(i===e)continue;return jG(i,e)}while(++o)}inc(t,o,i){if(t.startsWith("pre")){if(!o&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(o){let e=`-${o}`.match(this.options.loose?RD[kD.PRERELEASELOOSE]:RD[kD.PRERELEASE]);if(!e||e[1]!==o)throw new Error(`invalid identifier: ${o}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",o,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",o,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",o,i),this.inc("pre",o,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",o,i),this.inc("pre",o,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let e=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let a=this.prerelease.length;for(;--a>=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(o===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(o){let a=[o,e];if(i===!1&&(a=[o]),n2e(this.prerelease,o)){let A=this.prerelease[o.split(".").length];isNaN(A)&&(this.prerelease=a)}else this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};GX.exports=JG});var Nc=$((lCA,LX)=>{"use strict";var FX=fa(),s2e=(n,t,o=!1)=>{if(n instanceof FX)return n;try{return new FX(n,t)}catch(i){if(!o)return null;throw i}};LX.exports=s2e});var HX=$((pCA,UX)=>{"use strict";var g2e=Nc(),c2e=(n,t)=>{let o=g2e(n,t);return o?o.version:null};UX.exports=c2e});var xX=$((dCA,KX)=>{"use strict";var I2e=Nc(),l2e=(n,t)=>{let o=I2e(n.trim().replace(/^[=v]+/,""),t);return o?o.version:null};KX.exports=l2e});var JX=$((hCA,jX)=>{"use strict";var YX=fa(),p2e=(n,t,o,i,e)=>{typeof o=="string"&&(e=i,i=o,o=void 0);try{return new YX(n instanceof YX?n.version:n,o).inc(t,i,e).version}catch{return null}};jX.exports=p2e});var VX=$((ECA,zX)=>{"use strict";var qX=Nc(),d2e=(n,t)=>{let o=qX(n,null,!0),i=qX(t,null,!0),e=o.compare(i);if(e===0)return null;let a=e>0,A=a?o:i,r=a?i:o,s=!!A.prerelease.length;if(!!r.prerelease.length&&!s){if(!r.patch&&!r.minor)return"major";if(r.compareMain(A)===0)return r.minor&&!r.patch?"minor":"patch"}let c=s?"pre":"";return o.major!==i.major?c+"major":o.minor!==i.minor?c+"minor":o.patch!==i.patch?c+"patch":"prerelease"};zX.exports=d2e});var ZX=$((CCA,WX)=>{"use strict";var h2e=fa(),E2e=(n,t)=>new h2e(n,t).major;WX.exports=E2e});var $X=$((uCA,XX)=>{"use strict";var C2e=fa(),u2e=(n,t)=>new C2e(n,t).minor;XX.exports=u2e});var A7=$((BCA,e7)=>{"use strict";var B2e=fa(),f2e=(n,t)=>new B2e(n,t).patch;e7.exports=f2e});var r7=$((fCA,t7)=>{"use strict";var Q2e=Nc(),y2e=(n,t)=>{let o=Q2e(n,t);return o&&o.prerelease.length?o.prerelease:null};t7.exports=y2e});var Po=$((QCA,i7)=>{"use strict";var a7=fa(),m2e=(n,t,o)=>new a7(n,o).compare(new a7(t,o));i7.exports=m2e});var n7=$((yCA,o7)=>{"use strict";var S2e=Po(),D2e=(n,t,o)=>S2e(t,n,o);o7.exports=D2e});var g7=$((mCA,s7)=>{"use strict";var w2e=Po(),O2e=(n,t)=>w2e(n,t,!0);s7.exports=O2e});var vD=$((SCA,I7)=>{"use strict";var c7=fa(),b2e=(n,t,o)=>{let i=new c7(n,o),e=new c7(t,o);return i.compare(e)||i.compareBuild(e)};I7.exports=b2e});var p7=$((DCA,l7)=>{"use strict";var M2e=vD(),_2e=(n,t)=>n.sort((o,i)=>M2e(o,i,t));l7.exports=_2e});var h7=$((wCA,d7)=>{"use strict";var T2e=vD(),N2e=(n,t)=>n.sort((o,i)=>T2e(i,o,t));d7.exports=N2e});var Vu=$((OCA,E7)=>{"use strict";var R2e=Po(),k2e=(n,t,o)=>R2e(n,t,o)>0;E7.exports=k2e});var PD=$((bCA,C7)=>{"use strict";var v2e=Po(),P2e=(n,t,o)=>v2e(n,t,o)<0;C7.exports=P2e});var qG=$((MCA,u7)=>{"use strict";var G2e=Po(),F2e=(n,t,o)=>G2e(n,t,o)===0;u7.exports=F2e});var zG=$((_CA,B7)=>{"use strict";var L2e=Po(),U2e=(n,t,o)=>L2e(n,t,o)!==0;B7.exports=U2e});var GD=$((TCA,f7)=>{"use strict";var H2e=Po(),K2e=(n,t,o)=>H2e(n,t,o)>=0;f7.exports=K2e});var FD=$((NCA,Q7)=>{"use strict";var x2e=Po(),Y2e=(n,t,o)=>x2e(n,t,o)<=0;Q7.exports=Y2e});var VG=$((RCA,y7)=>{"use strict";var j2e=qG(),J2e=zG(),q2e=Vu(),z2e=GD(),V2e=PD(),W2e=FD(),Z2e=(n,t,o,i)=>{switch(t){case"===":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n===o;case"!==":return typeof n=="object"&&(n=n.version),typeof o=="object"&&(o=o.version),n!==o;case"":case"=":case"==":return j2e(n,o,i);case"!=":return J2e(n,o,i);case">":return q2e(n,o,i);case">=":return z2e(n,o,i);case"<":return V2e(n,o,i);case"<=":return W2e(n,o,i);default:throw new TypeError(`Invalid operator: ${t}`)}};y7.exports=Z2e});var S7=$((kCA,m7)=>{"use strict";var X2e=fa(),$2e=Nc(),{safeRe:LD,t:UD}=Yd(),eUe=(n,t)=>{if(n instanceof X2e)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;t=t||{};let o=null;if(!t.rtl)o=n.match(t.includePrerelease?LD[UD.COERCEFULL]:LD[UD.COERCE]);else{let s=t.includePrerelease?LD[UD.COERCERTLFULL]:LD[UD.COERCERTL],g;for(;(g=s.exec(n))&&(!o||o.index+o[0].length!==n.length);)(!o||g.index+g[0].length!==o.index+o[0].length)&&(o=g),s.lastIndex=g.index+g[1].length+g[2].length;s.lastIndex=-1}if(o===null)return null;let i=o[2],e=o[3]||"0",a=o[4]||"0",A=t.includePrerelease&&o[5]?`-${o[5]}`:"",r=t.includePrerelease&&o[6]?`+${o[6]}`:"";return $2e(`${i}.${e}.${a}${A}${r}`,t)};m7.exports=eUe});var w7=$((vCA,D7)=>{"use strict";var AUe=Nc(),tUe=xd(),rUe=fa(),aUe=(n,t,o)=>{if(!tUe.RELEASE_TYPES.includes(t))return null;let i=iUe(n,o);return i&&oUe(i,t)},iUe=(n,t)=>{let o=n instanceof rUe?n.version:n;return AUe(o,t)},oUe=(n,t)=>{if(nUe(t))return n.version;switch(n.prerelease=[],t){case"major":n.minor=0,n.patch=0;break;case"minor":n.patch=0;break}return n.format()},nUe=n=>n.startsWith("pre");D7.exports=aUe});var b7=$((PCA,O7)=>{"use strict";var WG=class{constructor(){this.max=1e3,this.map=new Map}get(t){let o=this.map.get(t);if(o!==void 0)return this.map.delete(t),this.map.set(t,o),o}delete(t){return this.map.delete(t)}set(t,o){if(!this.delete(t)&&o!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(t,o)}return this}};O7.exports=WG});var Go=$((GCA,N7)=>{"use strict";var sUe=/\s+/g,ZG=class n{constructor(t,o){if(o=cUe(o),t instanceof n)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new n(t.raw,o);if(t instanceof XG)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t.trim().replace(sUe," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(e=>!_7(e[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&BUe(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t0&&(this.formatted+="||");let o=this.set[t];for(let i=0;i0&&(this.formatted+=" "),this.formatted+=o[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(uUe,"");let i=((this.options.includePrerelease&&EUe)|(this.options.loose&&CUe))+":"+t,e=M7.get(i);if(e)return e;let a=this.options.loose,A=a?Xa[Qa.HYPHENRANGELOOSE]:Xa[Qa.HYPHENRANGE];t=t.replace(A,_Ue(this.options.includePrerelease)),Yt("hyphen replace",t),t=t.replace(Xa[Qa.COMPARATORTRIM],pUe),Yt("comparator trim",t),t=t.replace(Xa[Qa.TILDETRIM],dUe),Yt("tilde trim",t),t=t.replace(Xa[Qa.CARETTRIM],hUe),Yt("caret trim",t);let r=t.split(" ").map(I=>fUe(I,this.options)).join(" ").split(/\s+/).map(I=>MUe(I,this.options));a&&(r=r.filter(I=>(Yt("loose invalid filter",I,this.options),!!I.match(Xa[Qa.COMPARATORLOOSE])))),Yt("range list",r);let s=new Map,g=r.map(I=>new XG(I,this.options));for(let I of g){if(_7(I))return[I];s.set(I.value,I)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return M7.set(i,c),c}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Range is required");return this.set.some(i=>T7(i,o)&&t.set.some(e=>T7(e,o)&&i.every(a=>e.every(A=>a.intersects(A,o)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new IUe(t,this.options)}catch{return!1}for(let o=0;on.value==="<0.0.0-0",BUe=n=>n.value==="",T7=(n,t)=>{let o=!0,i=n.slice(),e=i.pop();for(;o&&i.length;)o=i.every(a=>e.intersects(a,t)),e=i.pop();return o},fUe=(n,t)=>(n=n.replace(Xa[Qa.BUILD],""),Yt("comp",n,t),n=SUe(n,t),Yt("caret",n),n=yUe(n,t),Yt("tildes",n),n=wUe(n,t),Yt("xrange",n),n=bUe(n,t),Yt("stars",n),n),Hr=n=>!n||n.toLowerCase()==="x"||n==="*",QUe=(n,t,o)=>Hr(n)&&!Hr(t)||Hr(t)&&o&&!Hr(o),yUe=(n,t)=>n.trim().split(/\s+/).map(o=>mUe(o,t)).join(" "),mUe=(n,t)=>{let o=t.loose?Xa[Qa.TILDELOOSE]:Xa[Qa.TILDE],i=t.includePrerelease?"-0":"";return n.replace(o,(e,a,A,r,s)=>{Yt("tilde",n,e,a,A,r,s);let g;return Hr(a)?g="":Hr(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Hr(r)?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:s?(Yt("replaceTilde pr",s),g=`>=${a}.${A}.${r}-${s} <${a}.${+A+1}.0-0`):g=`>=${a}.${A}.${r} <${a}.${+A+1}.0-0`,Yt("tilde return",g),g})},SUe=(n,t)=>n.trim().split(/\s+/).map(o=>DUe(o,t)).join(" "),DUe=(n,t)=>{Yt("caret",n,t);let o=t.loose?Xa[Qa.CARETLOOSE]:Xa[Qa.CARET],i=t.includePrerelease?"-0":"";return n.replace(o,(e,a,A,r,s)=>{Yt("caret",n,e,a,A,r,s);let g;return Hr(a)?g="":Hr(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Hr(r)?a==="0"?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.0${i} <${+a+1}.0.0-0`:s?(Yt("replaceCaret pr",s),a==="0"?A==="0"?g=`>=${a}.${A}.${r}-${s} <${a}.${A}.${+r+1}-0`:g=`>=${a}.${A}.${r}-${s} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.${r}-${s} <${+a+1}.0.0-0`):(Yt("no pr"),a==="0"?A==="0"?g=`>=${a}.${A}.${r} <${a}.${A}.${+r+1}-0`:g=`>=${a}.${A}.${r} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.${r} <${+a+1}.0.0-0`),Yt("caret return",g),g})},wUe=(n,t)=>(Yt("replaceXRanges",n,t),n.split(/\s+/).map(o=>OUe(o,t)).join(" ")),OUe=(n,t)=>{n=n.trim();let o=t.loose?Xa[Qa.XRANGELOOSE]:Xa[Qa.XRANGE];return n.replace(o,(i,e,a,A,r,s)=>{if(Yt("xRange",n,i,e,a,A,r,s),QUe(a,A,r))return n;let g=Hr(a),c=g||Hr(A),I=c||Hr(r),d=I;return e==="="&&d&&(e=""),s=t.includePrerelease?"-0":"",g?e===">"||e==="<"?i="<0.0.0-0":i="*":e&&d?(c&&(A=0),r=0,e===">"?(e=">=",c?(a=+a+1,A=0,r=0):(A=+A+1,r=0)):e==="<="&&(e="<",c?a=+a+1:A=+A+1),e==="<"&&(s="-0"),i=`${e+a}.${A}.${r}${s}`):c?i=`>=${a}.0.0${s} <${+a+1}.0.0-0`:I&&(i=`>=${a}.${A}.0${s} <${a}.${+A+1}.0-0`),Yt("xRange return",i),i})},bUe=(n,t)=>(Yt("replaceStars",n,t),n.trim().replace(Xa[Qa.STAR],"")),MUe=(n,t)=>(Yt("replaceGTE0",n,t),n.trim().replace(Xa[t.includePrerelease?Qa.GTE0PRE:Qa.GTE0],"")),_Ue=n=>(t,o,i,e,a,A,r,s,g,c,I,d)=>(Hr(i)?o="":Hr(e)?o=`>=${i}.0.0${n?"-0":""}`:Hr(a)?o=`>=${i}.${e}.0${n?"-0":""}`:A?o=`>=${o}`:o=`>=${o}${n?"-0":""}`,Hr(g)?s="":Hr(c)?s=`<${+g+1}.0.0-0`:Hr(I)?s=`<${g}.${+c+1}.0-0`:d?s=`<=${g}.${c}.${I}-${d}`:n?s=`<${g}.${c}.${+I+1}-0`:s=`<=${s}`,`${o} ${s}`.trim()),TUe=(n,t,o)=>{for(let i=0;i0){let e=n[i].semver;if(e.major===t.major&&e.minor===t.minor&&e.patch===t.patch)return!0}return!1}return!0}});var Wu=$((FCA,F7)=>{"use strict";var Zu=Symbol("SemVer ANY"),AF=class n{static get ANY(){return Zu}constructor(t,o){if(o=R7(o),t instanceof n){if(t.loose===!!o.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),eF("comparator",t,o),this.options=o,this.loose=!!o.loose,this.parse(t),this.semver===Zu?this.value="":this.value=this.operator+this.semver.version,eF("comp",this)}parse(t){let o=this.options.loose?k7[v7.COMPARATORLOOSE]:k7[v7.COMPARATOR],i=t.match(o);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new P7(i[2],this.options.loose):this.semver=Zu}toString(){return this.value}test(t){if(eF("Comparator.test",t,this.options.loose),this.semver===Zu||t===Zu)return!0;if(typeof t=="string")try{t=new P7(t,this.options)}catch{return!1}return $G(t,this.operator,this.semver,this.options)}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new G7(t.value,o).test(this.value):t.operator===""?t.value===""?!0:new G7(this.value,o).test(t.semver):(o=R7(o),o.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!o.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||$G(this.semver,"<",t.semver,o)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||$G(this.semver,">",t.semver,o)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};F7.exports=AF;var R7=_D(),{safeRe:k7,t:v7}=Yd(),$G=VG(),eF=zu(),P7=fa(),G7=Go()});var Xu=$((LCA,L7)=>{"use strict";var NUe=Go(),RUe=(n,t,o)=>{try{t=new NUe(t,o)}catch{return!1}return t.test(n)};L7.exports=RUe});var H7=$((UCA,U7)=>{"use strict";var kUe=Go(),vUe=(n,t)=>new kUe(n,t).set.map(o=>o.map(i=>i.value).join(" ").trim().split(" "));U7.exports=vUe});var x7=$((HCA,K7)=>{"use strict";var PUe=fa(),GUe=Go(),FUe=(n,t,o)=>{let i=null,e=null,a=null;try{a=new GUe(t,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===-1)&&(i=A,e=new PUe(i,o))}),i};K7.exports=FUe});var j7=$((KCA,Y7)=>{"use strict";var LUe=fa(),UUe=Go(),HUe=(n,t,o)=>{let i=null,e=null,a=null;try{a=new UUe(t,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===1)&&(i=A,e=new LUe(i,o))}),i};Y7.exports=HUe});var z7=$((xCA,q7)=>{"use strict";var tF=fa(),KUe=Go(),J7=Vu(),xUe=(n,t)=>{n=new KUe(n,t);let o=new tF("0.0.0");if(n.test(o)||(o=new tF("0.0.0-0"),n.test(o)))return o;o=null;for(let i=0;i{let r=new tF(A.semver.version);switch(A.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!a||J7(r,a))&&(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),a&&(!o||J7(o,a))&&(o=a)}return o&&n.test(o)?o:null};q7.exports=xUe});var W7=$((YCA,V7)=>{"use strict";var YUe=Go(),jUe=(n,t)=>{try{return new YUe(n,t).range||"*"}catch{return null}};V7.exports=jUe});var HD=$((jCA,e$)=>{"use strict";var JUe=fa(),$7=Wu(),{ANY:qUe}=$7,zUe=Go(),VUe=Xu(),Z7=Vu(),X7=PD(),WUe=FD(),ZUe=GD(),XUe=(n,t,o,i)=>{n=new JUe(n,i),t=new zUe(t,i);let e,a,A,r,s;switch(o){case">":e=Z7,a=WUe,A=X7,r=">",s=">=";break;case"<":e=X7,a=ZUe,A=Z7,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(VUe(n,t,i))return!1;for(let g=0;g{B.semver===qUe&&(B=new $7(">=0.0.0")),I=I||B,d=d||B,e(B.semver,I.semver,i)?I=B:A(B.semver,d.semver,i)&&(d=B)}),I.operator===r||I.operator===s||(!d.operator||d.operator===r)&&a(n,d.semver))return!1;if(d.operator===s&&A(n,d.semver))return!1}return!0};e$.exports=XUe});var t$=$((JCA,A$)=>{"use strict";var $Ue=HD(),eHe=(n,t,o)=>$Ue(n,t,">",o);A$.exports=eHe});var a$=$((qCA,r$)=>{"use strict";var AHe=HD(),tHe=(n,t,o)=>AHe(n,t,"<",o);r$.exports=tHe});var n$=$((zCA,o$)=>{"use strict";var i$=Go(),rHe=(n,t,o)=>(n=new i$(n,o),t=new i$(t,o),n.intersects(t,o));o$.exports=rHe});var g$=$((VCA,s$)=>{"use strict";var aHe=Xu(),iHe=Po();s$.exports=(n,t,o)=>{let i=[],e=null,a=null,A=n.sort((c,I)=>iHe(c,I,o));for(let c of A)aHe(c,t,o)?(a=c,e||(e=c)):(a&&i.push([e,a]),a=null,e=null);e&&i.push([e,null]);let r=[];for(let[c,I]of i)c===I?r.push(c):!I&&c===A[0]?r.push("*"):I?c===A[0]?r.push(`<=${I}`):r.push(`${c} - ${I}`):r.push(`>=${c}`);let s=r.join(" || "),g=typeof t.raw=="string"?t.raw:String(t);return s.length{"use strict";var c$=Go(),iF=Wu(),{ANY:rF}=iF,aF=Xu(),oF=Po(),oHe=(n,t,o={})=>{if(n===t)return!0;n=new c$(n,o),t=new c$(t,o);let i=!1;e:for(let e of n.set){for(let a of t.set){let A=sHe(e,a,o);if(i=i||A!==null,A)continue e}if(i)return!1}return!0},nHe=[new iF(">=0.0.0-0")],I$=[new iF(">=0.0.0")],sHe=(n,t,o)=>{if(n===t)return!0;if(n.length===1&&n[0].semver===rF){if(t.length===1&&t[0].semver===rF)return!0;o.includePrerelease?n=nHe:n=I$}if(t.length===1&&t[0].semver===rF){if(o.includePrerelease)return!0;t=I$}let i=new Set,e,a;for(let B of n)B.operator===">"||B.operator===">="?e=l$(e,B,o):B.operator==="<"||B.operator==="<="?a=p$(a,B,o):i.add(B.semver);if(i.size>1)return null;let A;if(e&&a){if(A=oF(e.semver,a.semver,o),A>0)return null;if(A===0&&(e.operator!==">="||a.operator!=="<="))return null}for(let B of i){if(e&&!aF(B,String(e),o)||a&&!aF(B,String(a),o))return null;for(let f of t)if(!aF(B,String(f),o))return!1;return!0}let r,s,g,c,I=a&&!o.includePrerelease&&a.semver.prerelease.length?a.semver:!1,d=e&&!o.includePrerelease&&e.semver.prerelease.length?e.semver:!1;I&&I.prerelease.length===1&&a.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let B of t){if(c=c||B.operator===">"||B.operator===">=",g=g||B.operator==="<"||B.operator==="<=",e){if(d&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===d.major&&B.semver.minor===d.minor&&B.semver.patch===d.patch&&(d=!1),B.operator===">"||B.operator===">="){if(r=l$(e,B,o),r===B&&r!==e)return!1}else if(e.operator===">="&&!B.test(e.semver))return!1}if(a){if(I&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===I.major&&B.semver.minor===I.minor&&B.semver.patch===I.patch&&(I=!1),B.operator==="<"||B.operator==="<="){if(s=p$(a,B,o),s===B&&s!==a)return!1}else if(a.operator==="<="&&!B.test(a.semver))return!1}if(!B.operator&&(a||e)&&A!==0)return!1}return!(e&&g&&!a&&A!==0||a&&c&&!e&&A!==0||d||I)},l$=(n,t,o)=>{if(!n)return t;let i=oF(n.semver,t.semver,o);return i>0?n:i<0||t.operator===">"&&n.operator===">="?t:n},p$=(n,t,o)=>{if(!n)return t;let i=oF(n.semver,t.semver,o);return i<0?n:i>0||t.operator==="<"&&n.operator==="<="?t:n};d$.exports=oHe});var KD=$((ZCA,u$)=>{"use strict";var nF=Yd(),E$=xd(),gHe=fa(),C$=YG(),cHe=Nc(),IHe=HX(),lHe=xX(),pHe=JX(),dHe=VX(),hHe=ZX(),EHe=$X(),CHe=A7(),uHe=r7(),BHe=Po(),fHe=n7(),QHe=g7(),yHe=vD(),mHe=p7(),SHe=h7(),DHe=Vu(),wHe=PD(),OHe=qG(),bHe=zG(),MHe=GD(),_He=FD(),THe=VG(),NHe=S7(),RHe=w7(),kHe=Wu(),vHe=Go(),PHe=Xu(),GHe=H7(),FHe=x7(),LHe=j7(),UHe=z7(),HHe=W7(),KHe=HD(),xHe=t$(),YHe=a$(),jHe=n$(),JHe=g$(),qHe=h$();u$.exports={parse:cHe,valid:IHe,clean:lHe,inc:pHe,diff:dHe,major:hHe,minor:EHe,patch:CHe,prerelease:uHe,compare:BHe,rcompare:fHe,compareLoose:QHe,compareBuild:yHe,sort:mHe,rsort:SHe,gt:DHe,lt:wHe,eq:OHe,neq:bHe,gte:MHe,lte:_He,cmp:THe,coerce:NHe,truncate:RHe,Comparator:kHe,Range:vHe,satisfies:PHe,toComparators:GHe,maxSatisfying:FHe,minSatisfying:LHe,minVersion:UHe,validRange:HHe,outside:KHe,gtr:xHe,ltr:YHe,intersects:jHe,simplifyRange:JHe,subset:qHe,SemVer:gHe,re:nF.re,src:nF.src,tokens:nF.t,SEMVER_SPEC_VERSION:E$.SEMVER_SPEC_VERSION,RELEASE_TYPES:E$.RELEASE_TYPES,compareIdentifiers:C$.compareIdentifiers,rcompareIdentifiers:C$.rcompareIdentifiers}});var Sg,xD=ue(()=>{Sg={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.35.3",author:"Lovell Fuller ",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert ","Jonathan Ong ","Chanon Sajjamanochai ","Juliano Julio ","Daniel Gasienica ","Julian Walker ","Amit Pitaru ","Brandon Aaron ","Andreas Lind ","Maurus Cuelenaere ","Linus Unneb\xE4ck ","Victor Mateevitsi ","Alaric Holloway ","Bernhard K. Weisshuhn ","Chris Riley ","David Carley ","John Tobin ","Kenton Gray ","Felix B\xFCnemann ","Samy Al Zahrani ","Chintan Thakkar ","F. Orlando Galashan ","Kleis Auke Wolthuizen ","Matt Hirsch ","Matthias Thoemmes ","Patrick Paskaris ","J\xE9r\xE9my Lal ","Rahul Nanwani ","Alice Monday ","Kristo Jorgenson ","YvesBos ","Guy Maliar ","Nicolas Coden ","Matt Parrish ","Marcel Bretschneider ","Matthew McEachen ","Jarda Kot\u011B\u0161ovec ","Kenric D'Souza ","Oleh Aleinyk ","Marcel Bretschneider ","Andrea Bianco ","Rik Heywood ","Thomas Parisot ","Nathan Graves ","Tom Lokhorst ","Espen Hovlandsdal ","Sylvain Dumont ","Alun Davies ","Aidan Hoolachan ","Axel Eirola ","Freezy ","Daiz ","Julian Aubourg ","Keith Belovay ","Michael B. Klein ","Jordan Prudhomme ","Ilya Ovdin ","Andargor ","Paul Neave ","Brendan Kennedy ","Brychan Bennett-Odlum ","Edward Silverton ","Roman Malieiev ","Tomas Szabo ","Robert O'Rourke ","Guillermo Alfonso Varela Chouci\xF1o ","Christian Flintrup ","Manan Jadhav ","Leon Radley ","alza54 ","Jacob Smith ","Michael Nutt ","Brad Parham ","Taneli Vatanen ","Joris Dugu\xE9 ","Chris Banks ","Ompal Singh ","Brodan ","Ankur Parihar ","Brahim Ait elhaj ","Mart Jansink ","Lachlan Newman ","Dennis Beatty ","Ingvar Stepanyan ","Don Denton ","Dmytro Tiapukhin ","Florian Lefebvre "],scripts:{build:"node install/build.js","build:dist":"node scripts/build.mjs",clean:"rm -rf src/build/ test/fixtures/output.*",test:"npm run lint && npm run test-unit",lint:"npm run lint-cpp && npm run lint-js && npm run lint-types && npm run lint-publish","lint-cpp":"cpplint --quiet src/*.h src/*.cc","lint-js":"biome lint","lint-publish":"publint --strict","lint-types":"tsd --files ./test/types/sharp.test-d.{cts,mts}","test-leak":"./test/leak/leak.sh","test-unit":"node --experimental-test-coverage test/unit.mjs","package-from-local-build":"node npm/from-local-build.js","package-wasm-wrappers":"node npm/wasm-wrappers.js","package-release-notes":"node npm/release-notes.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",files:["dist","install","lib/index.d.ts","src/*.{cc,h,gyp}"],main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.mts",exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}}},sideEffects:!0,repository:{type:"git",url:"git+https://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{"@img/colour":"^1.1.0","detect-libc":"^2.1.2",semver:"^7.8.5"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.35.3","@img/sharp-darwin-x64":"0.35.3","@img/sharp-freebsd-wasm32":"0.35.3","@img/sharp-libvips-darwin-arm64":"1.3.2","@img/sharp-libvips-darwin-x64":"1.3.2","@img/sharp-libvips-linux-arm":"1.3.2","@img/sharp-libvips-linux-arm64":"1.3.2","@img/sharp-libvips-linux-ppc64":"1.3.2","@img/sharp-libvips-linux-riscv64":"1.3.2","@img/sharp-libvips-linux-s390x":"1.3.2","@img/sharp-libvips-linux-x64":"1.3.2","@img/sharp-libvips-linuxmusl-arm64":"1.3.2","@img/sharp-libvips-linuxmusl-x64":"1.3.2","@img/sharp-linux-arm":"0.35.3","@img/sharp-linux-arm64":"0.35.3","@img/sharp-linux-ppc64":"0.35.3","@img/sharp-linux-riscv64":"0.35.3","@img/sharp-linux-s390x":"0.35.3","@img/sharp-linux-x64":"0.35.3","@img/sharp-linuxmusl-arm64":"0.35.3","@img/sharp-linuxmusl-x64":"0.35.3","@img/sharp-webcontainers-wasm32":"0.35.3","@img/sharp-win32-arm64":"0.35.3","@img/sharp-win32-ia32":"0.35.3","@img/sharp-win32-x64":"0.35.3"},peerDependenciesMeta:{"@types/node":{optional:!0}},devDependencies:{"@biomejs/biome":"^2.5.1","@cpplint/cli":"^0.1.0","@emnapi/runtime":"^1.11.1","@img/sharp-libvips-dev":"1.3.2","@img/sharp-libvips-dev-wasm32":"1.3.2","@img/sharp-libvips-win32-arm64":"1.3.2","@img/sharp-libvips-win32-ia32":"1.3.2","@img/sharp-libvips-win32-x64":"1.3.2","@types/node":"*",emnapi:"^1.11.1","exif-reader":"^2.0.3","extract-zip":"^2.0.1",icc:"^4.0.0","node-addon-api":"^8.9.0","node-gyp":"^12.4.0",publint:"^0.3.21","tar-fs":"^3.1.3",tsd:"^0.33.0"},license:"Apache-2.0",engines:{node:">=20.9.0"},config:{libvips:">=8.18.3"},funding:{url:"https://opencollective.com/libvips"}}});import{spawnSync as $u}from"node:child_process";import{createHash as VHe}from"node:crypto";var eB,gF,WHe,f$,ZHe,cF,XHe,Q$,$He,jd,eKe,AKe,tKe,rKe,y$,aKe,B$,iKe,oKe,m$,nKe,sKe,S$,sF,gKe,YD,IF=ue(()=>{eB=qe(KD(),1),gF=qe(MD(),1);xD();WHe=process.env.npm_package_config_libvips||Sg.config.libvips,f$=eB.default.coerce(WHe).version,ZHe=["darwin-arm64","darwin-x64","freebsd-arm64","freebsd-x64","linux-arm","linux-arm64","linux-ppc64","linux-riscv64","linux-s390x","linux-wasm32","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],cF={encoding:"utf8",shell:!0},XHe=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},Q$=()=>gF.default.isNonGlibcLinuxSync()?gF.default.familySync():"",$He=()=>`${process.platform}${Q$()}-${process.arch}`,jd=()=>{if(y$())return"wasm32";let{npm_config_arch:n,npm_config_platform:t,npm_config_libc:o}=process.env,i=typeof o=="string"?o:Q$();return`${t||process.platform}${i}-${n||process.arch}`},eKe=()=>{try{return Xe(`@img/sharp-libvips-dev-${jd()}/include`)}catch{try{return Xe("@img/sharp-libvips-dev/include")}catch{}}return""},AKe=()=>{try{return Xe("@img/sharp-libvips-dev/cplusplus")}catch{}return""},tKe=()=>{try{return Xe(`@img/sharp-libvips-dev-${jd()}/lib`)}catch{try{return Xe(`@img/sharp-libvips-${jd()}/lib`)}catch{}}return""},rKe=()=>{if(process.release?.name==="node"&&process.versions&&!eB.default.satisfies(process.versions.node,Sg.engines.node))return{found:process.versions.node,expected:Sg.engines.node}},y$=()=>{let{CC:n}=process.env;return!!n?.endsWith("/emcc")},aKe=()=>process.platform==="darwin"&&process.arch==="x64"?($u("sysctl sysctl.proc_translated",cF).stdout||"").trim()==="sysctl.proc_translated: 1":!1,B$=n=>VHe("sha512").update(n).digest("hex"),iKe=()=>{try{let n=B$(`imgsharp-libvips-${jd()}`),t=eB.default.coerce(Sg.optionalDependencies[`@img/sharp-libvips-${jd()}`],{includePrerelease:!0}).version;return B$(`${n}npm:${t}`).slice(0,10)}catch{}return""},oKe=()=>$u(`node-gyp rebuild --directory=src ${y$()?"--nodedir=emscripten":""}`,{...cF,stdio:"inherit"}).status,m$=()=>process.platform!=="win32"?($u("pkg-config --modversion vips-cpp",{...cF,env:{...process.env,PKG_CONFIG_PATH:S$()}}).stdout||"").trim():"",nKe=()=>{try{let n=($u("brew",["--prefix"],{encoding:"utf8"}).stdout||"").trim();if(n)return`${n}/lib/pkgconfig`}catch{}},sKe=()=>{try{let n=($u("pkg-config",["--variable","pc_path","pkg-config"],{encoding:"utf8"}).stdout||"").trim();if(n)return n}catch{}},S$=()=>process.platform!=="win32"?[nKe(),sKe(),process.env.PKG_CONFIG_PATH].filter(Boolean).join(":"):"",sF=(n,t,o)=>(o&&o(`Detected ${t}, skipping search for globally-installed libvips`),n),gKe=n=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return sF(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return sF(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(aKe())return sF(!1,"Rosetta",n);let t=m$();return!!t&&eB.default.gte(t,f$)},YD={minimumLibvipsVersion:f$,prebuiltPlatforms:ZHe,buildPlatformArch:jd,buildSharpLibvipsIncludeDir:eKe,buildSharpLibvipsCPlusPlusDir:AKe,buildSharpLibvipsLibDir:tKe,isUnsupportedNodeRuntime:rKe,runtimePlatformArch:$He,log:XHe,yarnLocator:iKe,spawnRebuild:oKe,globalLibvipsVersion:m$,pkgConfigPath:S$,useGlobalLibvips:gKe}});import{createRequire as cKe}from"node:module";var jD,Kr,w$,IKe,D$,lKe,pKe,Dg,Pt,Rc,mt,AB=ue(()=>{jD=qe(MD(),1);IF();xD();Kr=cKe(import.meta.url),{version:w$}=Sg,{runtimePlatformArch:IKe,isUnsupportedNodeRuntime:D$,prebuiltPlatforms:lKe,minimumLibvipsVersion:pKe}=YD,Dg=IKe(),Rc=[];try{Pt=Kr(`../src/build/Release/sharp-${Dg}-${w$}.node`)}catch(n){Rc.push(n)}if(!Pt)try{Pt=Kr(`../src/build/Release/sharp-wasm32-${w$}.node`)}catch(n){Rc.push(n)}if(!Pt)try{switch(Dg){case"darwin-arm64":Pt=Kr("@img/sharp-darwin-arm64/sharp.node");break;case"darwin-x64":Pt=Kr("@img/sharp-darwin-x64/sharp.node");break;case"linux-arm":Pt=Kr("@img/sharp-linux-arm/sharp.node");break;case"linux-arm64":Pt=Kr("@img/sharp-linux-arm64/sharp.node");break;case"linux-ppc64":Pt=Kr("@img/sharp-linux-ppc64/sharp.node");break;case"linux-riscv64":Pt=Kr("@img/sharp-linux-riscv64/sharp.node");break;case"linux-s390x":Pt=Kr("@img/sharp-linux-s390x/sharp.node");break;case"linux-x64":Pt=Kr("@img/sharp-linux-x64/sharp.node");break;case"linuxmusl-arm64":Pt=Kr("@img/sharp-linuxmusl-arm64/sharp.node");break;case"linuxmusl-x64":Pt=Kr("@img/sharp-linuxmusl-x64/sharp.node");break;case"win32-arm64":Pt=Kr("@img/sharp-win32-arm64/sharp.node");break;case"win32-ia32":Pt=Kr("@img/sharp-win32-ia32/sharp.node");break;case"win32-x64":Pt=Kr("@img/sharp-win32-x64/sharp.node");break;case"freebsd-arm64":case"freebsd-x64":Pt=Kr("@img/sharp-freebsd-wasm32/sharp.node");break;case"linux-wasm32":Pt=Kr("@img/sharp-webcontainers-wasm32/sharp.node");break}if(Pt&&["linux-x64","linuxmusl-x64"].includes(Dg)&&!Pt._isUsingX64V2()){let n=new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");n.code="Unsupported CPU",Rc.push(n),Pt=null}Pt&&process.versions.electron&&Dg.startsWith("linux")&&process.emitWarning("Binaries provided by Electron for use on Linux may be incompatible with sharp - see https://sharp.pixelplumbing.com/install#electron-and-linux",{code:"SharpElectronLinux"})}catch(n){Rc.push(n)}if(!Pt)try{Pt=Kr("@img/sharp-wasm32/sharp.node")}catch(n){Rc.push(n)}if(!Pt){let[n,t,o]=["linux","darwin","win32"].map(a=>Dg.startsWith(a)),i=[`Could not load the "sharp" module using the ${Dg} runtime`];Rc.forEach(a=>{a.code.endsWith("MODULE_NOT_FOUND")||i.push(`${a.code}: ${a.message}`)});let e=Rc.map(a=>a.message).join(" ");if(i.push("Possible solutions:"),D$()){let{found:a,expected:A}=D$();i.push("- Please upgrade Node.js:",` Found ${a}`,` Requires ${A}`)}else if(lKe.includes(Dg)){let[a,A]=Dg.split("-"),r=a.endsWith("musl")?" --libc=musl":"";i.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${a.replace("musl","")}${r} --cpu=${A} sharp`)}else i.push(`- Manually install libvips >= ${pKe}`," See https://sharp.pixelplumbing.com/install#building-from-source","- Add WebAssembly-based dependencies:"," npm install sharp @img/sharp-wasm32");if(n&&/(symbol not found|CXXABI_)/i.test(e))try{let{config:a}=Kr(`@img/sharp-libvips-${Dg}/package`),A=`${(0,jD.familySync)()} ${(0,jD.versionSync)()}`,r=`${a.musl?"musl":"glibc"} ${a.musl||a.glibc}`;i.push("- Update your OS:",` Found ${A}`,` Requires ${r}`)}catch{}throw n&&/\/snap\/core[0-9]{2}/.test(e)&&i.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),t&&/Incompatible library version/.test(e)&&i.push("- Update Homebrew:"," brew update && brew upgrade vips"),Rc.some(a=>a.code==="ERR_DLOPEN_DISABLED")&&i.push("- Run Node.js without using the --no-addons flag"),o&&/The specified procedure could not be found/.test(e)&&i.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),i.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(i.join(` +`))}mt=Pt});import dKe from"node:util";import lF from"node:stream";function CKe(){let n=this.constructor.call(),{debuglog:t,queueListener:o,...i}=this.options;return n.options=structuredClone(i),n.options.debuglog=t,n.options.queueListener=o,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),n.options.input.buffer=this.options.input.buffer,n.emit("finish")}),n}var hKe,EKe,ll,us,O$=ue(()=>{ps();AB();hKe=dKe.debuglog("sharp"),EKe=n=>{ll.queue.emit("change",n)},ll=function(n,t){if(arguments.length===1&&!O.defined(n))throw new Error("Invalid input");return this instanceof ll?(lF.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBefore:!1,orientBefore:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,trimMargin:0,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,typedArrayOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",keepGainMap:!1,withGainMap:!1,resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,webpExact:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffBigtiff:!1,tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:0,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,heifTune:"auto",jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:o=>{this.emit("warning",o),hKe(o)},queueListener:EKe},this.options.input=this._createInputDescriptor(n,t,{allowStream:!0}),this):new ll(n,t)};Object.setPrototypeOf(ll.prototype,lF.Duplex.prototype);Object.setPrototypeOf(ll,lF.Duplex);Object.assign(ll.prototype,{clone:CKe});us=ll});function b$(n){let t=BKe.filter(o=>O.defined(n[o])).map(o=>[o,n[o]]);return t.length?Object.fromEntries(t):void 0}function fKe(n,t,o){let i={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,limitInputChannels:5,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(O.string(n))i.file=n;else if(O.buffer(n)){if(n.length===0)throw Error("Input Buffer is empty");i.buffer=n}else if(O.arrayBuffer(n)){if(n.byteLength===0)throw Error("Input bit Array is empty");i.buffer=Buffer.from(n,0,n.byteLength)}else if(O.typedArray(n)){if(n.length===0)throw Error("Input Bit Array is empty");i.buffer=Buffer.from(n.buffer,n.byteOffset,n.byteLength)}else if(O.plainObject(n)&&!O.defined(t))t=n,b$(t)&&(i.buffer=[]);else if(!O.defined(n)&&!O.defined(t)&&O.object(o)&&o.allowStream)i.buffer=[];else if(Array.isArray(n))if(n.length>1)if(!this.options.joining)this.options.joining=!0,this.options.join=n.map(e=>this._createInputDescriptor(e));else throw new Error("Recursive join is unsupported");else throw new Error("Expected at least two images to join");else throw new Error(`Unsupported input '${n}' of type ${typeof n}${O.defined(t)?` when also providing options of type ${typeof t}`:""}`);if(O.object(t)){if(O.defined(t.failOn))if(O.string(t.failOn)&&O.inArray(t.failOn,["none","truncated","error","warning"]))i.failOn=t.failOn;else throw O.invalidParameterError("failOn","one of: none, truncated, error, warning",t.failOn);if(O.defined(t.autoOrient))if(O.bool(t.autoOrient))i.autoOrient=t.autoOrient;else throw O.invalidParameterError("autoOrient","boolean",t.autoOrient);if(O.defined(t.density))if(O.number(t.density)&&O.inRange(t.density,1,1e5))i.density=t.density;else throw O.invalidParameterError("density","number between 1 and 100000",t.density);if(O.defined(t.ignoreIcc))if(O.bool(t.ignoreIcc))i.ignoreIcc=t.ignoreIcc;else throw O.invalidParameterError("ignoreIcc","boolean",t.ignoreIcc);if(O.defined(t.limitInputPixels))if(O.bool(t.limitInputPixels))i.limitInputPixels=t.limitInputPixels?16383**2:0;else if(O.integer(t.limitInputPixels)&&O.inRange(t.limitInputPixels,0,Number.MAX_SAFE_INTEGER))i.limitInputPixels=t.limitInputPixels;else throw O.invalidParameterError("limitInputPixels","positive integer",t.limitInputPixels);if(O.defined(t.limitInputChannels))if(O.bool(t.limitInputChannels))i.limitInputChannels=t.limitInputChannels?5:0;else if(O.integer(t.limitInputChannels)&&O.inRange(t.limitInputChannels,0,Number.MAX_SAFE_INTEGER))i.limitInputChannels=t.limitInputChannels;else throw O.invalidParameterError("limitInputChannels","positive integer",t.limitInputChannels);if(O.defined(t.unlimited))if(O.bool(t.unlimited))i.unlimited=t.unlimited;else throw O.invalidParameterError("unlimited","boolean",t.unlimited);if(O.defined(t.sequentialRead))if(O.bool(t.sequentialRead))i.sequentialRead=t.sequentialRead;else throw O.invalidParameterError("sequentialRead","boolean",t.sequentialRead);if(O.defined(t.raw)){if(O.object(t.raw)&&O.integer(t.raw.width)&&O.inRange(t.raw.width,1,1e8)&&O.integer(t.raw.height)&&O.inRange(t.raw.height,1,1e8)&&O.integer(t.raw.channels)&&O.inRange(t.raw.channels,1,4))switch(i.rawWidth=t.raw.width,i.rawHeight=t.raw.height,i.rawChannels=t.raw.channels,n.constructor){case Uint8Array:case Uint8ClampedArray:i.rawDepth="uchar";break;case Int8Array:i.rawDepth="char";break;case Uint16Array:i.rawDepth="ushort";break;case Int16Array:i.rawDepth="short";break;case Uint32Array:i.rawDepth="uint";break;case Int32Array:i.rawDepth="int";break;case Float32Array:i.rawDepth="float";break;case Float64Array:i.rawDepth="double";break;default:i.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(i.rawPremultiplied=!1,O.defined(t.raw.premultiplied))if(O.bool(t.raw.premultiplied))i.rawPremultiplied=t.raw.premultiplied;else throw O.invalidParameterError("raw.premultiplied","boolean",t.raw.premultiplied);if(i.rawPageHeight=0,O.defined(t.raw.pageHeight))if(O.integer(t.raw.pageHeight)&&t.raw.pageHeight>0&&t.raw.pageHeight<=t.raw.height){if(t.raw.height%t.raw.pageHeight!==0)throw new Error(`Expected raw.height ${t.raw.height} to be a multiple of raw.pageHeight ${t.raw.pageHeight}`);i.rawPageHeight=t.raw.pageHeight}else throw O.invalidParameterError("raw.pageHeight","positive integer",t.raw.pageHeight)}if(O.defined(t.animated))if(O.bool(t.animated))i.pages=t.animated?-1:1;else throw O.invalidParameterError("animated","boolean",t.animated);if(O.defined(t.pages))if(O.integer(t.pages)&&O.inRange(t.pages,-1,1e5))i.pages=t.pages;else throw O.invalidParameterError("pages","integer between -1 and 100000",t.pages);if(O.defined(t.page))if(O.integer(t.page)&&O.inRange(t.page,0,1e5))i.page=t.page;else throw O.invalidParameterError("page","integer between 0 and 100000",t.page);if(O.object(t.openSlide)&&O.defined(t.openSlide.level))if(O.integer(t.openSlide.level)&&O.inRange(t.openSlide.level,0,256))i.openSlideLevel=t.openSlide.level;else throw O.invalidParameterError("openSlide.level","integer between 0 and 256",t.openSlide.level);else if(O.defined(t.level))if(O.integer(t.level)&&O.inRange(t.level,0,256))i.openSlideLevel=t.level;else throw O.invalidParameterError("level","integer between 0 and 256",t.level);if(O.object(t.tiff)&&O.defined(t.tiff.subifd))if(O.integer(t.tiff.subifd)&&O.inRange(t.tiff.subifd,-1,1e5))i.tiffSubifd=t.tiff.subifd;else throw O.invalidParameterError("tiff.subifd","integer between -1 and 100000",t.tiff.subifd);else if(O.defined(t.subifd))if(O.integer(t.subifd)&&O.inRange(t.subifd,-1,1e5))i.tiffSubifd=t.subifd;else throw O.invalidParameterError("subifd","integer between -1 and 100000",t.subifd);if(O.object(t.svg)){if(O.defined(t.svg.stylesheet))if(O.string(t.svg.stylesheet))i.svgStylesheet=t.svg.stylesheet;else throw O.invalidParameterError("svg.stylesheet","string",t.svg.stylesheet);if(O.defined(t.svg.highBitdepth))if(O.bool(t.svg.highBitdepth))i.svgHighBitdepth=t.svg.highBitdepth;else throw O.invalidParameterError("svg.highBitdepth","boolean",t.svg.highBitdepth)}if(O.object(t.pdf)&&O.defined(t.pdf.background)?i.pdfBackground=this._getBackgroundColourOption(t.pdf.background):O.defined(t.pdfBackground)&&(i.pdfBackground=this._getBackgroundColourOption(t.pdfBackground)),O.object(t.jp2)&&O.defined(t.jp2.oneshot))if(O.bool(t.jp2.oneshot))i.jp2Oneshot=t.jp2.oneshot;else throw O.invalidParameterError("jp2.oneshot","boolean",t.jp2.oneshot);if(O.defined(t.create))if(O.object(t.create)&&O.integer(t.create.width)&&O.inRange(t.create.width,1,1e8)&&O.integer(t.create.height)&&O.inRange(t.create.height,1,1e8)&&O.integer(t.create.channels)){if(i.createWidth=t.create.width,i.createHeight=t.create.height,i.createChannels=t.create.channels,i.createPageHeight=0,O.defined(t.create.pageHeight))if(O.integer(t.create.pageHeight)&&t.create.pageHeight>0&&t.create.pageHeight<=t.create.height){if(t.create.height%t.create.pageHeight!==0)throw new Error(`Expected create.height ${t.create.height} to be a multiple of create.pageHeight ${t.create.pageHeight}`);i.createPageHeight=t.create.pageHeight}else throw O.invalidParameterError("create.pageHeight","positive integer",t.create.pageHeight);if(O.defined(t.create.noise)){if(!O.object(t.create.noise))throw new Error("Expected noise to be an object");if(t.create.noise.type!=="gaussian")throw new Error("Only gaussian noise is supported at the moment");if(i.createNoiseType=t.create.noise.type,!O.inRange(t.create.channels,1,4))throw O.invalidParameterError("create.channels","number between 1 and 4",t.create.channels);if(i.createNoiseMean=128,O.defined(t.create.noise.mean))if(O.number(t.create.noise.mean)&&O.inRange(t.create.noise.mean,0,1e4))i.createNoiseMean=t.create.noise.mean;else throw O.invalidParameterError("create.noise.mean","number between 0 and 10000",t.create.noise.mean);if(i.createNoiseSigma=30,O.defined(t.create.noise.sigma))if(O.number(t.create.noise.sigma)&&O.inRange(t.create.noise.sigma,0,1e4))i.createNoiseSigma=t.create.noise.sigma;else throw O.invalidParameterError("create.noise.sigma","number between 0 and 10000",t.create.noise.sigma)}else if(O.defined(t.create.background)){if(!O.inRange(t.create.channels,3,4))throw O.invalidParameterError("create.channels","number between 3 and 4",t.create.channels);i.createBackground=this._getBackgroundColourOption(t.create.background)}else throw new Error("Expected valid noise or background to create a new input image");delete i.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(O.defined(t.text))if(O.object(t.text)&&O.string(t.text.text)){if(i.textValue=t.text.text,O.defined(t.text.height)&&O.defined(t.text.dpi))throw new Error("Expected only one of dpi or height");if(O.defined(t.text.font))if(O.string(t.text.font))i.textFont=t.text.font;else throw O.invalidParameterError("text.font","string",t.text.font);if(O.defined(t.text.fontfile))if(O.string(t.text.fontfile))i.textFontfile=t.text.fontfile;else throw O.invalidParameterError("text.fontfile","string",t.text.fontfile);if(O.defined(t.text.width))if(O.integer(t.text.width)&&O.inRange(t.text.width,1,1e6))i.textWidth=t.text.width;else throw O.invalidParameterError("text.width","integer between 1 and 1000000",t.text.width);if(O.defined(t.text.height))if(O.integer(t.text.height)&&O.inRange(t.text.height,1,1e6))i.textHeight=t.text.height;else throw O.invalidParameterError("text.height","integer between 1 and 1000000",t.text.height);if(O.defined(t.text.align))if(O.string(t.text.align)&&O.string(this.constructor.align[t.text.align]))i.textAlign=this.constructor.align[t.text.align];else throw O.invalidParameterError("text.align","valid alignment",t.text.align);if(O.defined(t.text.justify))if(O.bool(t.text.justify))i.textJustify=t.text.justify;else throw O.invalidParameterError("text.justify","boolean",t.text.justify);if(O.defined(t.text.dpi))if(O.integer(t.text.dpi)&&O.inRange(t.text.dpi,1,1e6))i.textDpi=t.text.dpi;else throw O.invalidParameterError("text.dpi","integer between 1 and 1000000",t.text.dpi);if(O.defined(t.text.rgba))if(O.bool(t.text.rgba))i.textRgba=t.text.rgba;else throw O.invalidParameterError("text.rgba","bool",t.text.rgba);if(O.defined(t.text.spacing))if(O.integer(t.text.spacing)&&O.inRange(t.text.spacing,-1e6,1e6))i.textSpacing=t.text.spacing;else throw O.invalidParameterError("text.spacing","integer between -1000000 and 1000000",t.text.spacing);if(O.defined(t.text.wrap))if(O.string(t.text.wrap)&&O.inArray(t.text.wrap,["word","char","word-char","none"]))i.textWrap=t.text.wrap;else throw O.invalidParameterError("text.wrap","one of: word, char, word-char, none",t.text.wrap);delete i.buffer}else throw new Error("Expected a valid string to create an image with text.");if(O.defined(t.join))if(O.defined(this.options.join)){if(O.defined(t.join.animated))if(O.bool(t.join.animated))i.joinAnimated=t.join.animated;else throw O.invalidParameterError("join.animated","boolean",t.join.animated);if(O.defined(t.join.across))if(O.integer(t.join.across)&&O.inRange(t.join.across,1,1e6))i.joinAcross=t.join.across;else throw O.invalidParameterError("join.across","integer between 1 and 100000",t.join.across);if(O.defined(t.join.shim))if(O.integer(t.join.shim)&&O.inRange(t.join.shim,0,1e6))i.joinShim=t.join.shim;else throw O.invalidParameterError("join.shim","integer between 0 and 100000",t.join.shim);if(O.defined(t.join.background)&&(i.joinBackground=this._getBackgroundColourOption(t.join.background)),O.defined(t.join.halign))if(O.string(t.join.halign)&&O.string(this.constructor.align[t.join.halign]))i.joinHalign=this.constructor.align[t.join.halign];else throw O.invalidParameterError("join.halign","valid alignment",t.join.halign);if(O.defined(t.join.valign))if(O.string(t.join.valign)&&O.string(this.constructor.align[t.join.valign]))i.joinValign=this.constructor.align[t.join.valign];else throw O.invalidParameterError("join.valign","valid alignment",t.join.valign)}else throw new Error("Expected input to be an array of images to join")}else if(O.defined(t))throw new Error(`Invalid input options ${t}`);return i}function QKe(n,t,o){Array.isArray(this.options.input.buffer)?O.buffer(n)?(this.options.input.buffer.length===0&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(n),o()):o(new Error("Non-Buffer data on Writable Stream")):o(new Error("Unexpected data on Writable Stream"))}function yKe(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function mKe(){return Array.isArray(this.options.input.buffer)}function SKe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),mt.metadata(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)})}):mt.metadata(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)}),this):this._isStreamInput()?new Promise((o,i)=>{let e=()=>{this._flattenBufferIn(),mt.metadata(this.options,(a,A)=>{a?i(O.nativeError(a,t)):o(A)})};this.writableFinished?e():this.once("finish",e)}):new Promise((o,i)=>{mt.metadata(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}function DKe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),mt.stats(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)})}):mt.stats(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)}),this):this._isStreamInput()?new Promise((o,i)=>{this.on("finish",function(){this._flattenBufferIn(),mt.stats(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}):new Promise((o,i)=>{mt.stats(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}var uKe,BKe,M$,_$=ue(()=>{ps();AB();uKe={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},BKe=["failOn","limitInputPixels","limitInputChannels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","openSlideLevel","pdfBackground","tiffSubifd"];M$=n=>{Object.assign(n.prototype,{_inputOptionsFromObject:b$,_createInputDescriptor:fKe,_write:QKe,_flattenBufferIn:yKe,_isStreamInput:mKe,metadata:SKe,stats:DKe}),n.align=uKe}});function dF(n){return n.angle%360!==0||n.rotationAngle!==0}function JD(n){return n.width!==-1||n.height!==-1}function bKe(n,t,o){if(JD(this.options)&&this.options.debuglog("ignoring previous resize options"),this.options.widthPost!==-1&&this.options.debuglog("operation order will be: extract, resize, extract"),O.defined(n))if(O.object(n)&&!O.defined(o))o=n;else if(O.integer(n)&&n>0)this.options.width=n;else throw O.invalidParameterError("width","positive integer",n);else this.options.width=-1;if(O.defined(t))if(O.integer(t)&&t>0)this.options.height=t;else throw O.invalidParameterError("height","positive integer",t);else this.options.height=-1;if(O.object(o)){if(O.defined(o.width))if(O.integer(o.width)&&o.width>0)this.options.width=o.width;else throw O.invalidParameterError("width","positive integer",o.width);if(O.defined(o.height))if(O.integer(o.height)&&o.height>0)this.options.height=o.height;else throw O.invalidParameterError("height","positive integer",o.height);if(O.defined(o.fit)){let i=OKe[o.fit];if(O.string(i))this.options.canvas=i;else throw O.invalidParameterError("fit","valid fit",o.fit)}if(O.defined(o.position)){let i=O.integer(o.position)?o.position:k$[o.position]||R$[o.position]||N$[o.position];if(O.integer(i)&&(O.inRange(i,0,8)||O.inRange(i,16,17)))this.options.position=i;else throw O.invalidParameterError("position","valid position/gravity/strategy",o.position)}if(this._setBackgroundColourOption("resizeBackground",o.background),O.defined(o.kernel))if(O.string(pF[o.kernel]))this.options.kernel=pF[o.kernel];else throw O.invalidParameterError("kernel","valid kernel name",o.kernel);O.defined(o.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",o.withoutEnlargement),O.defined(o.withoutReduction)&&this._setBooleanOption("withoutReduction",o.withoutReduction),O.defined(o.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",o.fastShrinkOnLoad)}return dF(this.options)&&JD(this.options)&&(this.options.rotateBefore=!0),this}function MKe(n){if(O.integer(n))if(O.inRange(n,1,1e4))this.options.extendTop=n,this.options.extendBottom=n,this.options.extendLeft=n,this.options.extendRight=n;else throw O.invalidParameterError("extend","integer between 1 and 10000",n);else if(O.object(n)){if(O.defined(n.top))if(O.integer(n.top)&&O.inRange(n.top,0,1e4))this.options.extendTop=n.top;else throw O.invalidParameterError("top","integer between 0 and 10000",n.top);if(O.defined(n.bottom))if(O.integer(n.bottom)&&O.inRange(n.bottom,0,1e4))this.options.extendBottom=n.bottom;else throw O.invalidParameterError("bottom","integer between 0 and 10000",n.bottom);if(O.defined(n.left))if(O.integer(n.left)&&O.inRange(n.left,0,1e4))this.options.extendLeft=n.left;else throw O.invalidParameterError("left","integer between 0 and 10000",n.left);if(O.defined(n.right))if(O.integer(n.right)&&O.inRange(n.right,0,1e4))this.options.extendRight=n.right;else throw O.invalidParameterError("right","integer between 0 and 10000",n.right);if(this._setBackgroundColourOption("extendBackground",n.background),O.defined(n.extendWith))if(O.string(T$[n.extendWith]))this.options.extendWith=T$[n.extendWith];else throw O.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",n.extendWith)}else throw O.invalidParameterError("extend","integer or object",n);return this}function _Ke(n){let t=JD(this.options)||this.options.widthPre!==-1?"Post":"Pre";return this.options[`width${t}`]!==-1&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(o){let i=n[o];if(O.integer(i)&&O.inRange(i,0,1e8))this.options[o+(o==="left"||o==="top"?"Offset":"")+t]=i;else throw O.invalidParameterError(o,"integer between 0 and 100000000",i)},this),dF(this.options)&&!JD(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function TKe(n){if(this.options.trimThreshold=10,O.defined(n))if(O.object(n)){if(O.defined(n.background)&&this._setBackgroundColourOption("trimBackground",n.background),O.defined(n.threshold))if(O.number(n.threshold)&&n.threshold>=0)this.options.trimThreshold=n.threshold;else throw O.invalidParameterError("threshold","positive number",n.threshold);if(O.defined(n.lineArt)&&this._setBooleanOption("trimLineArt",n.lineArt),O.defined(n.margin))if(O.integer(n.margin)&&O.inRange(n.margin,0,1e7))this.options.trimMargin=n.margin;else throw O.invalidParameterError("margin","integer between 0 and 10000000",n.margin)}else throw O.invalidParameterError("trim","object",n);return dF(this.options)&&(this.options.rotateBefore=!0),this}var N$,R$,T$,k$,pF,wKe,OKe,v$,P$=ue(()=>{ps();N$={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},R$={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},T$={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},k$={entropy:16,attention:17},pF={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},wKe={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},OKe={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};v$=n=>{Object.assign(n.prototype,{resize:bKe,extend:MKe,extract:_Ke,trim:TKe}),n.gravity=N$,n.strategy=k$,n.kernel=pF,n.fit=wKe,n.position=R$}});function NKe(n){if(!Array.isArray(n))throw O.invalidParameterError("images to composite","array",n);return this.options.composite=n.map(t=>{if(!O.object(t))throw O.invalidParameterError("image to composite","object",t);let o=this._inputOptionsFromObject(t),i={input:this._createInputDescriptor(t.input,o,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(O.defined(t.blend))if(O.string(hF[t.blend]))i.blend=hF[t.blend];else throw O.invalidParameterError("blend","valid blend name",t.blend);if(O.defined(t.tile))if(O.bool(t.tile))i.tile=t.tile;else throw O.invalidParameterError("tile","boolean",t.tile);if(O.defined(t.left))if(O.integer(t.left))i.left=t.left;else throw O.invalidParameterError("left","integer",t.left);if(O.defined(t.top))if(O.integer(t.top))i.top=t.top;else throw O.invalidParameterError("top","integer",t.top);if(O.defined(t.top)!==O.defined(t.left))throw new Error("Expected both left and top to be set");if(i.hasOffset=O.integer(t.top)&&O.integer(t.left),O.defined(t.gravity))if(O.integer(t.gravity)&&O.inRange(t.gravity,0,8))i.gravity=t.gravity;else if(O.string(t.gravity)&&O.integer(this.constructor.gravity[t.gravity]))i.gravity=this.constructor.gravity[t.gravity];else throw O.invalidParameterError("gravity","valid gravity",t.gravity);if(O.defined(t.premultiplied))if(O.bool(t.premultiplied))i.premultiplied=t.premultiplied;else throw O.invalidParameterError("premultiplied","boolean",t.premultiplied);return i}),this}var hF,G$,F$=ue(()=>{ps();hF={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};G$=n=>{n.prototype.composite=NKe,n.blend=hF}});function RKe(n,t){if(!O.defined(n))return this.autoOrient();if((this.options.angle||this.options.rotationAngle)&&(this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0),O.integer(n)&&!(n%90))this.options.angle=n;else if(O.number(n))this.options.rotationAngle=n,O.object(t)&&t.background&&this._setBackgroundColourOption("rotationBackground",t.background);else throw O.invalidParameterError("angle","numeric",n);return this}function kKe(){return this.options.input.autoOrient=!0,this}function vKe(n){return this.options.flip=O.bool(n)?n:!0,this}function PKe(n){return this.options.flop=O.bool(n)?n:!0,this}function GKe(n,t){let i=Array.isArray(n)&&(n.length===4&&n.every(O.number)||n.length===2&&n.every(e=>Array.isArray(e)&&e.length===2))?n.flat():[];if(i.length===4&&i.every(O.number))this.options.affineMatrix=i;else throw O.invalidParameterError("matrix","1x4 or 2x2 array",n);if(O.defined(t))if(O.object(t)){if(this._setBackgroundColourOption("affineBackground",t.background),O.defined(t.idx))if(O.number(t.idx))this.options.affineIdx=t.idx;else throw O.invalidParameterError("options.idx","number",t.idx);if(O.defined(t.idy))if(O.number(t.idy))this.options.affineIdy=t.idy;else throw O.invalidParameterError("options.idy","number",t.idy);if(O.defined(t.odx))if(O.number(t.odx))this.options.affineOdx=t.odx;else throw O.invalidParameterError("options.odx","number",t.odx);if(O.defined(t.ody))if(O.number(t.ody))this.options.affineOdy=t.ody;else throw O.invalidParameterError("options.ody","number",t.ody);if(O.defined(t.interpolator))if(O.inArray(t.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=t.interpolator;else throw O.invalidParameterError("options.interpolator","valid interpolator name",t.interpolator)}else throw O.invalidParameterError("options","object",t);return this}function FKe(n){if(O.plainObject(n)){if(O.number(n.sigma)&&O.inRange(n.sigma,1e-6,10))this.options.sharpenSigma=n.sigma;else throw O.invalidParameterError("options.sigma","number between 0.000001 and 10",n.sigma);if(O.defined(n.m1))if(O.number(n.m1)&&O.inRange(n.m1,0,1e6))this.options.sharpenM1=n.m1;else throw O.invalidParameterError("options.m1","number between 0 and 1000000",n.m1);if(O.defined(n.m2))if(O.number(n.m2)&&O.inRange(n.m2,0,1e6))this.options.sharpenM2=n.m2;else throw O.invalidParameterError("options.m2","number between 0 and 1000000",n.m2);if(O.defined(n.x1))if(O.number(n.x1)&&O.inRange(n.x1,0,1e6))this.options.sharpenX1=n.x1;else throw O.invalidParameterError("options.x1","number between 0 and 1000000",n.x1);if(O.defined(n.y2))if(O.number(n.y2)&&O.inRange(n.y2,0,1e6))this.options.sharpenY2=n.y2;else throw O.invalidParameterError("options.y2","number between 0 and 1000000",n.y2);if(O.defined(n.y3))if(O.number(n.y3)&&O.inRange(n.y3,0,1e6))this.options.sharpenY3=n.y3;else throw O.invalidParameterError("options.y3","number between 0 and 1000000",n.y3)}else this.options.sharpenSigma=-1;return this}function LKe(n){if(!O.defined(n))this.options.medianSize=3;else if(O.integer(n)&&O.inRange(n,1,1e3))this.options.medianSize=n;else throw O.invalidParameterError("size","integer between 1 and 1000",n);return this}function UKe(n){let t;if(O.number(n))t=n;else if(O.plainObject(n)){if(!O.number(n.sigma))throw O.invalidParameterError("options.sigma","number between 0.3 and 1000",t);if(t=n.sigma,"precision"in n)if(O.string(L$[n.precision]))this.options.precision=L$[n.precision];else throw O.invalidParameterError("precision","one of: integer, float, approximate",n.precision);if("minAmplitude"in n)if(O.number(n.minAmplitude)&&O.inRange(n.minAmplitude,.001,1))this.options.minAmpl=n.minAmplitude;else throw O.invalidParameterError("minAmplitude","number between 0.001 and 1",n.minAmplitude)}if(!O.defined(n))this.options.blurSigma=-1;else if(O.bool(n))this.options.blurSigma=n?-1:0;else if(O.number(t)&&O.inRange(t,.3,1e3))this.options.blurSigma=t;else throw O.invalidParameterError("sigma","number between 0.3 and 1000",t);return this}function HKe(n){if(!O.defined(n))this.options.dilateWidth=1;else if(O.integer(n)&&O.inRange(n,1,65536))this.options.dilateWidth=n;else throw O.invalidParameterError("width","integer between 1 and 65536",n);return this}function KKe(n){if(!O.defined(n))this.options.erodeWidth=1;else if(O.integer(n)&&O.inRange(n,1,65536))this.options.erodeWidth=n;else throw O.invalidParameterError("width","integer between 1 and 65536",n);return this}function xKe(n){return this.options.flatten=O.bool(n)?n:!0,O.object(n)&&this._setBackgroundColourOption("flattenBackground",n.background),this}function YKe(){return this.options.unflatten=!0,this}function jKe(n,t){if(!O.defined(n))this.options.gamma=2.2;else if(O.number(n)&&O.inRange(n,1,3))this.options.gamma=n;else throw O.invalidParameterError("gamma","number between 1.0 and 3.0",n);if(!O.defined(t))this.options.gammaOut=this.options.gamma;else if(O.number(t)&&O.inRange(t,1,3))this.options.gammaOut=t;else throw O.invalidParameterError("gammaOut","number between 1.0 and 3.0",t);return this}function JKe(n){if(this.options.negate=O.bool(n)?n:!0,O.plainObject(n)&&"alpha"in n)if(O.bool(n.alpha))this.options.negateAlpha=n.alpha;else throw O.invalidParameterError("alpha","should be boolean value",n.alpha);return this}function qKe(n){if(O.plainObject(n)){if(O.defined(n.lower))if(O.number(n.lower)&&O.inRange(n.lower,0,99))this.options.normaliseLower=n.lower;else throw O.invalidParameterError("lower","number between 0 and 99",n.lower);if(O.defined(n.upper))if(O.number(n.upper)&&O.inRange(n.upper,1,100))this.options.normaliseUpper=n.upper;else throw O.invalidParameterError("upper","number between 1 and 100",n.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw O.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function zKe(n){return this.normalise(n)}function VKe(n){if(O.plainObject(n)){if(O.integer(n.width)&&O.inRange(n.width,1,65536))this.options.claheWidth=n.width;else throw O.invalidParameterError("width","integer between 1 and 65536",n.width);if(O.integer(n.height)&&O.inRange(n.height,1,65536))this.options.claheHeight=n.height;else throw O.invalidParameterError("height","integer between 1 and 65536",n.height);if(O.defined(n.maxSlope))if(O.integer(n.maxSlope)&&O.inRange(n.maxSlope,0,100))this.options.claheMaxSlope=n.maxSlope;else throw O.invalidParameterError("maxSlope","integer between 0 and 100",n.maxSlope)}else throw O.invalidParameterError("options","plain object",n);return this}function WKe(n){if(!O.object(n)||!Array.isArray(n.kernel)||!O.integer(n.width)||!O.integer(n.height)||!O.inRange(n.width,3,1001)||!O.inRange(n.height,3,1001)||n.height*n.width!==n.kernel.length||!n.kernel.every(O.number))throw new Error("Invalid convolution kernel");return O.integer(n.scale)||(n.scale=n.kernel.reduce((t,o)=>t+o,0)),n.scale<1&&(n.scale=1),O.integer(n.offset)||(n.offset=0),this.options.convKernel=n,this}function ZKe(n,t){if(!O.defined(n))this.options.threshold=128;else if(O.bool(n))this.options.threshold=n?128:0;else if(O.integer(n)&&O.inRange(n,0,255))this.options.threshold=n;else throw O.invalidParameterError("threshold","integer between 0 and 255",n);return!O.object(t)||t.greyscale===!0||t.grayscale===!0?this.options.thresholdGrayscale=!0:this.options.thresholdGrayscale=!1,this}function XKe(n,t,o){if(this.options.boolean=this._createInputDescriptor(n,o),O.string(t)&&O.inArray(t,["and","or","eor"]))this.options.booleanOp=t;else throw O.invalidParameterError("operator","one of: and, or, eor",t);return this}function $Ke(n,t){if(!O.defined(n)&&O.number(t)?n=1:O.number(n)&&!O.defined(t)&&(t=0),!O.defined(n))this.options.linearA=[];else if(O.number(n))this.options.linearA=[n];else if(Array.isArray(n)&&n.length&&n.every(O.number))this.options.linearA=n;else throw O.invalidParameterError("a","number or array of numbers",n);if(!O.defined(t))this.options.linearB=[];else if(O.number(t))this.options.linearB=[t];else if(Array.isArray(t)&&t.length&&t.every(O.number))this.options.linearB=t;else throw O.invalidParameterError("b","number or array of numbers",t);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function exe(n){if(!Array.isArray(n))throw O.invalidParameterError("inputMatrix","array",n);let t=n.length;if(t!==3&&t!==4)throw O.invalidParameterError("inputMatrix","3x3 or 4x4 array",t);if(!n.every(i=>Array.isArray(i)&&i.length===t))throw O.invalidParameterError("inputMatrix",`array of ${t} arrays of length ${t}`,n);let o=n.flat();if(!o.every(O.number))throw O.invalidParameterError("inputMatrix","array of numbers",o);return this.options.recombMatrix=o,this}function Axe(n){if(!O.plainObject(n))throw O.invalidParameterError("options","plain object",n);if("brightness"in n)if(O.number(n.brightness)&&n.brightness>=0)this.options.brightness=n.brightness;else throw O.invalidParameterError("brightness","number above zero",n.brightness);if("saturation"in n)if(O.number(n.saturation)&&n.saturation>=0)this.options.saturation=n.saturation;else throw O.invalidParameterError("saturation","number above zero",n.saturation);if("hue"in n)if(O.integer(n.hue))this.options.hue=n.hue%360;else throw O.invalidParameterError("hue","number",n.hue);if("lightness"in n)if(O.number(n.lightness))this.options.lightness=n.lightness;else throw O.invalidParameterError("lightness","number",n.lightness);return this}var L$,U$,H$=ue(()=>{ps();L$={integer:"integer",float:"float",approximate:"approximate"};U$=n=>{Object.assign(n.prototype,{autoOrient:kKe,rotate:RKe,flip:vKe,flop:PKe,affine:GKe,sharpen:FKe,erode:KKe,dilate:HKe,median:LKe,blur:UKe,flatten:xKe,unflatten:YKe,gamma:jKe,negate:JKe,normalise:qKe,normalize:zKe,clahe:VKe,convolve:WKe,threshold:ZKe,boolean:XKe,linear:$Ke,recomb:exe,modulate:Axe})}});var q$=$((yuA,J$)=>{var fF=Object.defineProperty,txe=Object.getOwnPropertyDescriptor,rxe=Object.getOwnPropertyNames,axe=Object.prototype.hasOwnProperty,ixe=(n,t)=>{for(var o in t)fF(n,o,{get:t[o],enumerable:!0})},oxe=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of rxe(t))!axe.call(n,e)&&e!==o&&fF(n,e,{get:()=>t[e],enumerable:!(i=txe(t,e))||i.enumerable});return n},nxe=n=>oxe(fF({},"__esModule",{value:!0}),n),K$={};ixe(K$,{default:()=>Qxe});J$.exports=nxe(K$);var EF={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let n in EF)Object.freeze(EF[n]);var Bs=Object.freeze(EF),x$=Object.create(null);for(let n in Bs)Object.hasOwn(Bs,n)&&(x$[Bs[n]]=n);var Ti={to:{},get:{}};Ti.get=function(n){let t=n.slice(0,3).toLowerCase(),o,i;switch(t){case"hsl":{o=Ti.get.hsl(n),i="hsl";break}case"hwb":{o=Ti.get.hwb(n),i="hwb";break}default:{o=Ti.get.rgb(n),i="rgb";break}}return o?{model:i,value:o}:null};Ti.get.rgb=function(n){if(!n)return null;let t=/^#([a-f\d]{3,4})$/i,o=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,e=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,a=/^(\w+)$/,A=[0,0,0,1],r,s,g;if(r=n.match(o)){for(g=r[2],r=r[1],s=0;s<3;s++){let c=s*2;A[s]=Number.parseInt(r.slice(c,c+2),16)}g&&(A[3]=Number.parseInt(g,16)/255)}else if(r=n.match(t)){for(r=r[1],g=r[3],s=0;s<3;s++)A[s]=Number.parseInt(r[s]+r[s],16);g&&(A[3]=Number.parseInt(g+g,16)/255)}else if(r=n.match(i)){for(s=0;s<3;s++)A[s]=Number.parseFloat(r[s+1]);r[4]&&(A[3]=r[5]?Number.parseFloat(r[4])*.01:Number.parseFloat(r[4]))}else if(r=n.match(e)){for(s=0;s<3;s++)A[s]=Math.round(Number.parseFloat(r[s+1])*2.55);r[4]&&(A[3]=r[5]?Number.parseFloat(r[4])*.01:Number.parseFloat(r[4]))}else return(r=n.toLowerCase().match(a))?r[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Bs,r[1])?(A=Bs[r[1]].slice(),A[3]=1,A):null:null;for(s=0;s<3;s++)A[s]=kc(A[s],0,255);return A[3]=kc(A[3],0,1),A};Ti.get.hsl=function(n){if(!n)return null;let t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(t);if(o){let i=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,a=kc(Number.parseFloat(o[2]),0,100),A=kc(Number.parseFloat(o[3]),0,100),r=kc(Number.isNaN(i)?1:i,0,1);return[e,a,A,r]}return null};Ti.get.hwb=function(n){if(!n)return null;let t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,o=n.match(t);if(o){let i=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,a=kc(Number.parseFloat(o[2]),0,100),A=kc(Number.parseFloat(o[3]),0,100),r=kc(Number.isNaN(i)?1:i,0,1);return[e,a,A,r]}return null};Ti.to.hex=function(...n){return"#"+qD(n[0])+qD(n[1])+qD(n[2])+(n[3]<1?qD(Math.round(n[3]*255)):"")};Ti.to.rgb=function(...n){return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};Ti.to.rgb.percent=function(...n){let t=Math.round(n[0]/255*100),o=Math.round(n[1]/255*100),i=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+t+"%, "+o+"%, "+i+"%)":"rgba("+t+"%, "+o+"%, "+i+"%, "+n[3]+")"};Ti.to.hsl=function(...n){return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};Ti.to.hwb=function(...n){let t="";return n.length>=4&&n[3]!==1&&(t=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+t+")"};Ti.to.keyword=function(...n){return x$[n.slice(0,3)]};function kc(n,t,o){return Math.min(Math.max(t,n),o)}function qD(n){let t=Math.round(n).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Jd=Ti,Y$={};for(let n of Object.keys(Bs))Y$[Bs[n]]=n;var sA={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},pl=sA,wg=(6/29)**3;function zd(n){let t=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,t),1)}function Vd(n){return n>.04045?((n+.055)/1.055)**2.4:n/12.92}for(let n of Object.keys(sA)){if(!("channels"in sA[n]))throw new Error("missing channels property: "+n);if(!("labels"in sA[n]))throw new Error("missing channel labels property: "+n);if(sA[n].labels.length!==sA[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:t,labels:o}=sA[n];delete sA[n].channels,delete sA[n].labels,Object.defineProperty(sA[n],"channels",{value:t}),Object.defineProperty(sA[n],"labels",{value:o})}sA.rgb.hsl=function(n){let t=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.min(t,o,i),a=Math.max(t,o,i),A=a-e,r,s;switch(a){case e:{r=0;break}case t:{r=(o-i)/A;break}case o:{r=2+(i-t)/A;break}case i:{r=4+(t-o)/A;break}}r=Math.min(r*60,360),r<0&&(r+=360);let g=(e+a)/2;return a===e?s=0:g<=.5?s=A/(a+e):s=A/(2-a-e),[r,s*100,g*100]};sA.rgb.hsv=function(n){let t,o,i,e,a,A=n[0]/255,r=n[1]/255,s=n[2]/255,g=Math.max(A,r,s),c=g-Math.min(A,r,s),I=function(d){return(g-d)/6/c+1/2};if(c===0)e=0,a=0;else{switch(a=c/g,t=I(A),o=I(r),i=I(s),g){case A:{e=i-o;break}case r:{e=1/3+t-i;break}case s:{e=2/3+o-t;break}}e<0?e+=1:e>1&&(e-=1)}return[e*360,a*100,g*100]};sA.rgb.hwb=function(n){let t=n[0],o=n[1],i=n[2],e=sA.rgb.hsl(n)[0],a=1/255*Math.min(t,Math.min(o,i));return i=1-1/255*Math.max(t,Math.max(o,i)),[e,a*100,i*100]};sA.rgb.oklab=function(n){let t=Vd(n[0]/255),o=Vd(n[1]/255),i=Vd(n[2]/255),e=Math.cbrt(.4122214708*t+.5363325363*o+.0514459929*i),a=Math.cbrt(.2119034982*t+.6806995451*o+.1073969566*i),A=Math.cbrt(.0883024619*t+.2817188376*o+.6299787005*i),r=.2104542553*e+.793617785*a-.0040720468*A,s=1.9779984951*e-2.428592205*a+.4505937099*A,g=.0259040371*e+.7827717662*a-.808675766*A;return[r*100,s*100,g*100]};sA.rgb.cmyk=function(n){let t=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.min(1-t,1-o,1-i),a=(1-t-e)/(1-e)||0,A=(1-o-e)/(1-e)||0,r=(1-i-e)/(1-e)||0;return[a*100,A*100,r*100,e*100]};function sxe(n,t){return(n[0]-t[0])**2+(n[1]-t[1])**2+(n[2]-t[2])**2}sA.rgb.keyword=function(n){let t=Y$[n];if(t)return t;let o=Number.POSITIVE_INFINITY,i;for(let e of Object.keys(Bs)){let a=Bs[e],A=sxe(n,a);Awg?o**(1/3):7.787*o+16/116,i=i>wg?i**(1/3):7.787*i+16/116,e=e>wg?e**(1/3):7.787*e+16/116;let a=116*i-16,A=500*(o-i),r=200*(i-e);return[a,A,r]};sA.hsl.rgb=function(n){let t=n[0]/360,o=n[1]/100,i=n[2]/100,e,a;if(o===0)return a=i*255,[a,a,a];let A=i<.5?i*(1+o):i+o-i*o,r=2*i-A,s=[0,0,0];for(let g=0;g<3;g++)e=t+1/3*-(g-1),e<0&&e++,e>1&&e--,6*e<1?a=r+(A-r)*6*e:2*e<1?a=A:3*e<2?a=r+(A-r)*(2/3-e)*6:a=r,s[g]=a*255;return s};sA.hsl.hsv=function(n){let t=n[0],o=n[1]/100,i=n[2]/100,e=o,a=Math.max(i,.01);i*=2,o*=i<=1?i:2-i,e*=a<=1?a:2-a;let A=(i+o)/2,r=i===0?2*e/(a+e):2*o/(i+o);return[t,r*100,A*100]};sA.hsv.rgb=function(n){let t=n[0]/60,o=n[1]/100,i=n[2]/100,e=Math.floor(t)%6,a=t-Math.floor(t),A=255*i*(1-o),r=255*i*(1-o*a),s=255*i*(1-o*(1-a));switch(i*=255,e){case 0:return[i,s,A];case 1:return[r,i,A];case 2:return[A,i,s];case 3:return[A,r,i];case 4:return[s,A,i];case 5:return[i,A,r]}};sA.hsv.hsl=function(n){let t=n[0],o=n[1]/100,i=n[2]/100,e=Math.max(i,.01),a,A;A=(2-o)*i;let r=(2-o)*e;return a=o*e,a/=r<=1?r:2-r,a=a||0,A/=2,[t,a*100,A*100]};sA.hwb.rgb=function(n){let t=n[0]/360,o=n[1]/100,i=n[2]/100,e=o+i,a;e>1&&(o/=e,i/=e);let A=Math.floor(6*t),r=1-i;a=6*t-A,(A&1)!==0&&(a=1-a);let s=o+a*(r-o),g,c,I;switch(A){default:case 6:case 0:{g=r,c=s,I=o;break}case 1:{g=s,c=r,I=o;break}case 2:{g=o,c=r,I=s;break}case 3:{g=o,c=s,I=r;break}case 4:{g=s,c=o,I=r;break}case 5:{g=r,c=o,I=s;break}}return[g*255,c*255,I*255]};sA.cmyk.rgb=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e=n[3]/100,a=1-Math.min(1,t*(1-e)+e),A=1-Math.min(1,o*(1-e)+e),r=1-Math.min(1,i*(1-e)+e);return[a*255,A*255,r*255]};sA.xyz.rgb=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e,a,A;return e=t*3.2404542+o*-1.5371385+i*-.4985314,a=t*-.969266+o*1.8760108+i*.041556,A=t*.0556434+o*-.2040259+i*1.0572252,e=zd(e),a=zd(a),A=zd(A),[e*255,a*255,A*255]};sA.xyz.lab=function(n){let t=n[0],o=n[1],i=n[2];t/=95.047,o/=100,i/=108.883,t=t>wg?t**(1/3):7.787*t+16/116,o=o>wg?o**(1/3):7.787*o+16/116,i=i>wg?i**(1/3):7.787*i+16/116;let e=116*o-16,a=500*(t-o),A=200*(o-i);return[e,a,A]};sA.xyz.oklab=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e=Math.cbrt(.8189330101*t+.3618667424*o-.1288597137*i),a=Math.cbrt(.0329845436*t+.9293118715*o+.0361456387*i),A=Math.cbrt(.0482003018*t+.2643662691*o+.633851707*i),r=.2104542553*e+.793617785*a-.0040720468*A,s=1.9779984951*e-2.428592205*a+.4505937099*A,g=.0259040371*e+.7827717662*a-.808675766*A;return[r*100,s*100,g*100]};sA.oklab.oklch=function(n){return sA.lab.lch(n)};sA.oklab.xyz=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e=(.999999998*t+.396337792*o+.215803758*i)**3,a=(1.000000008*t-.105561342*o-.063854175*i)**3,A=(1.000000055*t-.089484182*o-1.291485538*i)**3,r=1.227013851*e-.55779998*a+.281256149*A,s=-.040580178*e+1.11225687*a-.071676679*A,g=-.076381285*e-.421481978*a+1.58616322*A;return[r*100,s*100,g*100]};sA.oklab.rgb=function(n){let t=n[0]/100,o=n[1]/100,i=n[2]/100,e=(t+.3963377774*o+.2158037573*i)**3,a=(t-.1055613458*o-.0638541728*i)**3,A=(t-.0894841775*o-1.291485548*i)**3,r=zd(4.0767416621*e-3.3077115913*a+.2309699292*A),s=zd(-1.2684380046*e+2.6097574011*a-.3413193965*A),g=zd(-.0041960863*e-.7034186147*a+1.707614701*A);return[r*255,s*255,g*255]};sA.oklch.oklab=function(n){return sA.lch.lab(n)};sA.lab.xyz=function(n){let t=n[0],o=n[1],i=n[2],e,a,A;a=(t+16)/116,e=o/500+a,A=a-i/200;let r=a**3,s=e**3,g=A**3;return a=r>wg?r:(a-16/116)/7.787,e=s>wg?s:(e-16/116)/7.787,A=g>wg?g:(A-16/116)/7.787,e*=95.047,a*=100,A*=108.883,[e,a,A]};sA.lab.lch=function(n){let t=n[0],o=n[1],i=n[2],e;e=Math.atan2(i,o)*360/2/Math.PI,e<0&&(e+=360);let A=Math.sqrt(o*o+i*i);return[t,A,e]};sA.lch.lab=function(n){let t=n[0],o=n[1],e=n[2]/360*2*Math.PI,a=o*Math.cos(e),A=o*Math.sin(e);return[t,a,A]};sA.rgb.ansi16=function(n,t=null){let[o,i,e]=n,a=t===null?sA.rgb.hsv(n)[2]:t;if(a=Math.round(a/50),a===0)return 30;let A=30+(Math.round(e/255)<<2|Math.round(i/255)<<1|Math.round(o/255));return a===2&&(A+=60),A};sA.hsv.ansi16=function(n){return sA.rgb.ansi16(sA.hsv.rgb(n),n[2])};sA.rgb.ansi256=function(n){let t=n[0],o=n[1],i=n[2];return t>>4===o>>4&&o>>4===i>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)};sA.ansi16.rgb=function(n){n=n[0];let t=n%10;if(t===0||t===7)return n>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let o=(Math.trunc(n>50)+1)*.5,i=(t&1)*o*255,e=(t>>1&1)*o*255,a=(t>>2&1)*o*255;return[i,e,a]};sA.ansi256.rgb=function(n){if(n=n[0],n>=232){let a=(n-232)*10+8;return[a,a,a]}n-=16;let t,o=Math.floor(n/36)/5*255,i=Math.floor((t=n%36)/6)/5*255,e=t%6/5*255;return[o,i,e]};sA.rgb.hex=function(n){let o=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".slice(o.length)+o};sA.hex.rgb=function(n){let t=n.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let o=t[0];t[0].length===3&&(o=[...o].map(r=>r+r).join(""));let i=Number.parseInt(o,16),e=i>>16&255,a=i>>8&255,A=i&255;return[e,a,A]};sA.rgb.hcg=function(n){let t=n[0]/255,o=n[1]/255,i=n[2]/255,e=Math.max(Math.max(t,o),i),a=Math.min(Math.min(t,o),i),A=e-a,r,s=A<1?a/(1-A):0;return A<=0?r=0:e===t?r=(o-i)/A%6:e===o?r=2+(i-t)/A:r=4+(t-o)/A,r/=6,r%=1,[r*360,A*100,s*100]};sA.hsl.hcg=function(n){let t=n[1]/100,o=n[2]/100,i=o<.5?2*t*o:2*t*(1-o),e=0;return i<1&&(e=(o-.5*i)/(1-i)),[n[0],i*100,e*100]};sA.hsv.hcg=function(n){let t=n[1]/100,o=n[2]/100,i=t*o,e=0;return i<1&&(e=(o-i)/(1-i)),[n[0],i*100,e*100]};sA.hcg.rgb=function(n){let t=n[0]/360,o=n[1]/100,i=n[2]/100;if(o===0)return[i*255,i*255,i*255];let e=[0,0,0],a=t%1*6,A=a%1,r=1-A,s=0;switch(Math.floor(a)){case 0:{e[0]=1,e[1]=A,e[2]=0;break}case 1:{e[0]=r,e[1]=1,e[2]=0;break}case 2:{e[0]=0,e[1]=1,e[2]=A;break}case 3:{e[0]=0,e[1]=r,e[2]=1;break}case 4:{e[0]=A,e[1]=0,e[2]=1;break}default:e[0]=1,e[1]=0,e[2]=r}return s=(1-o)*i,[(o*e[0]+s)*255,(o*e[1]+s)*255,(o*e[2]+s)*255]};sA.hcg.hsv=function(n){let t=n[1]/100,o=n[2]/100,i=t+o*(1-t),e=0;return i>0&&(e=t/i),[n[0],e*100,i*100]};sA.hcg.hsl=function(n){let t=n[1]/100,i=n[2]/100*(1-t)+.5*t,e=0;return i>0&&i<.5?e=t/(2*i):i>=.5&&i<1&&(e=t/(2*(1-i))),[n[0],e*100,i*100]};sA.hcg.hwb=function(n){let t=n[1]/100,o=n[2]/100,i=t+o*(1-t);return[n[0],(i-t)*100,(1-i)*100]};sA.hwb.hcg=function(n){let t=n[1]/100,i=1-n[2]/100,e=i-t,a=0;return e<1&&(a=(i-e)/(1-e)),[n[0],e*100,a*100]};sA.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};sA.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};sA.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};sA.gray.hsl=function(n){return[0,0,n[0]]};sA.gray.hsv=sA.gray.hsl;sA.gray.hwb=function(n){return[0,100,n[0]]};sA.gray.cmyk=function(n){return[0,0,0,n[0]]};sA.gray.lab=function(n){return[n[0],0,0]};sA.gray.hex=function(n){let t=Math.round(n[0]/100*255)&255,i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(i.length)+i};sA.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};function gxe(){let n={},t=Object.keys(pl);for(let{length:o}=t,i=0;i0;){let i=o.pop(),e=Object.keys(pl[i]);for(let{length:a}=e,A=0;A1&&(o=i),n(o))};return"conversion"in n&&(t.conversion=n.conversion),t}function Cxe(n){let t=function(...o){let i=o[0];if(i==null)return i;i.length>1&&(o=i);let e=n(o);if(typeof e=="object")for(let{length:a}=e,A=0;A0){this.model=t||"rgb",i=Ao[this.model].channels;let e=Array.prototype.slice.call(n,0,i);this.color=BF(e,i),this.valpha=typeof n[i]=="number"?n[i]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;let e=Object.keys(n);"alpha"in n&&(e.splice(e.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);let a=e.sort().join("");if(!(a in CF))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=CF[a];let{labels:A}=Ao[this.model],r=[];for(o=0;o(n%360+360)%360),saturationl:Br("hsl",1,xr(100)),lightness:Br("hsl",2,xr(100)),saturationv:Br("hsv",1,xr(100)),value:Br("hsv",2,xr(100)),chroma:Br("hcg",1,xr(100)),gray:Br("hcg",2,xr(100)),white:Br("hwb",1,xr(100)),wblack:Br("hwb",2,xr(100)),cyan:Br("cmyk",0,xr(100)),magenta:Br("cmyk",1,xr(100)),yellow:Br("cmyk",2,xr(100)),black:Br("cmyk",3,xr(100)),x:Br("xyz",0,xr(95.047)),y:Br("xyz",1,xr(100)),z:Br("xyz",2,xr(108.833)),l:Br("lab",0,xr(100)),a:Br("lab",1),b:Br("lab",2),keyword(n){return n!==void 0?new na(n):Ao[this.model].keyword(this.color)},hex(n){return n!==void 0?new na(n):Jd.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new na(n);let t=this.rgb().round().color,o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),Jd.to.hex(...t)+o},rgbNumber(){let n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){let n=this.rgb().color,t=[];for(let[o,i]of n.entries()){let e=i/255;t[o]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(n){let t=this.luminosity(),o=n.luminosity();return t>o?(t+.05)/(o+.05):(o+.05)/(t+.05)},level(n){let t=this.contrast(n);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let n=this.rgb();for(let t=0;t<3;t++)n.color[t]=255-n.color[t];return n},lighten(n){let t=this.hsl();return t.color[2]+=t.color[2]*n,t},darken(n){let t=this.hsl();return t.color[2]-=t.color[2]*n,t},saturate(n){let t=this.hsl();return t.color[1]+=t.color[1]*n,t},desaturate(n){let t=this.hsl();return t.color[1]-=t.color[1]*n,t},whiten(n){let t=this.hwb();return t.color[1]+=t.color[1]*n,t},blacken(n){let t=this.hwb();return t.color[2]+=t.color[2]*n,t},grayscale(){let n=this.rgb().color,t=n[0]*.3+n[1]*.59+n[2]*.11;return na.rgb(t,t,t)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){let t=this.hsl(),o=t.color[0];return o=(o+n)%360,o=o<0?360+o:o,t.color[0]=o,t},mix(n,t){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);let o=n.rgb(),i=this.rgb(),e=t===void 0?.5:t,a=2*e-1,A=o.alpha()-i.alpha(),r=((a*A===-1?a:(a+A)/(1+a*A))+1)/2,s=1-r;return na.rgb(r*o.red()+s*i.red(),r*o.green()+s*i.green(),r*o.blue()+s*i.blue(),o.alpha()*e+i.alpha()*(1-e))}};for(let n of Object.keys(Ao)){if(j$.includes(n))continue;let{channels:t}=Ao[n];na.prototype[n]=function(...o){return this.model===n?new na(this):o.length>0?new na(o,n):new na([...fxe(Ao[this.model][n].raw(this.color)),this.valpha],n)},na[n]=function(...o){let i=o[0];return typeof i=="number"&&(i=BF(o,t)),new na(i,n)}}function uxe(n,t){return Number(n.toFixed(t))}function Bxe(n){return function(t){return uxe(t,n)}}function Br(n,t,o){n=Array.isArray(n)?n:[n];for(let i of n)(uF[i]||=[])[t]=o;return n=n[0],function(i){let e;return i!==void 0?(o&&(i=o(i)),e=this[n](),e.color[t]=i,e):(e=this[n]().color[t],o&&(e=o(e)),e)}}function xr(n){return function(t){return Math.max(0,Math.min(n,t))}}function fxe(n){return Array.isArray(n)?n:[n]}function BF(n,t){for(let o=0;o{z$.exports=q$().default});function yxe(n){return this._setBackgroundColourOption("tint",n),this}function mxe(n){return this.options.greyscale=O.bool(n)?n:!0,this}function Sxe(n){return this.greyscale(n)}function Dxe(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspacePipeline=n,this}function wxe(n){return this.pipelineColourspace(n)}function Oxe(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspace=n,this}function bxe(n){return this.toColourspace(n)}function X$(n){if(O.object(n)||O.string(n)&&n.length>=3&&n.length<=200){let t=(0,Z$.default)(n),o=t.red(),i=t.green(),e=t.blue(),a=Math.round(t.alpha()*255);for(let[A,r]of[["red",o],["green",i],["blue",e],["alpha",a]])if(!O.number(r))throw O.invalidParameterError(`background.${A}`,"number",r);return[o,i,e,a]}else throw O.invalidParameterError("background","object or string",n)}function Mxe(n,t){O.defined(t)&&(this.options[n]=X$(t))}var Z$,W$,$$,eee=ue(()=>{Z$=qe(V$(),1);ps();W$={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};$$=n=>{Object.assign(n.prototype,{tint:yxe,greyscale:mxe,grayscale:Sxe,pipelineColourspace:Dxe,pipelineColorspace:wxe,toColourspace:Oxe,toColorspace:bxe,_getBackgroundColourOption:X$,_setBackgroundColourOption:Mxe}),n.colourspace=W$,n.colorspace=W$}});function Txe(){return this.options.removeAlpha=!0,this}function Nxe(n){if(O.defined(n))if(O.number(n)&&O.inRange(n,0,1))this.options.ensureAlpha=n;else throw O.invalidParameterError("alpha","number between 0 and 1",n);else this.options.ensureAlpha=1;return this}function Rxe(n){let t={red:0,green:1,blue:2,alpha:3};if(Object.keys(t).includes(n)&&(n=t[n]),O.integer(n)&&O.inRange(n,0,4))this.options.extractChannel=n;else throw O.invalidParameterError("channel","integer or one of: red, green, blue, alpha",n);return this}function kxe(n,t){return Array.isArray(n)?n.forEach(function(o){this.options.joinChannelIn.push(this._createInputDescriptor(o,t))},this):this.options.joinChannelIn.push(this._createInputDescriptor(n,t)),this}function vxe(n){if(O.string(n)&&O.inArray(n,["and","or","eor"]))this.options.bandBoolOp=n;else throw O.invalidParameterError("boolOp","one of: and, or, eor",n);return this}var _xe,Aee,tee=ue(()=>{ps();_xe={and:"and",or:"or",eor:"eor"};Aee=n=>{Object.assign(n.prototype,{removeAlpha:Txe,ensureAlpha:Nxe,extractChannel:Rxe,joinChannel:kxe,bandbool:vxe}),n.bool=_xe}});import QF from"node:path";function Gxe(n,t){let o;if(O.string(n)?O.string(this.options.input.file)&&QF.resolve(this.options.input.file)===QF.resolve(n)?o=new Error("Cannot use same file for input and output"):Pxe.test(QF.extname(n))&&!this.constructor.format.jp2.output.file&&(o=aee()):o=new Error("Missing output file path"),o)if(O.fn(t))t(o);else return Promise.reject(o);else{this.options.fileOut=n;let i=Error();return this._pipeline(t,i)}return this}function Fxe(n,t){O.object(n)?this._setBooleanOption("resolveWithObject",n.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";let o=Error();return this._pipeline(O.fn(n)?n:t,o)}function Lxe(){this.options.resolveWithObject=!0,this.options.typedArrayOut=!0;let n=Error();return this._pipeline(null,n)}function Uxe(n){if(O.number(n)&&n>0)this.options.withMetadataDensity=n;else throw O.invalidParameterError("density","positive number",n);return this.keepExif()}function Hxe(){return this.options.keepMetadata|=1,this}function Kxe(n){if(O.object(n))for(let[t,o]of Object.entries(n))if(O.object(o))for(let[i,e]of Object.entries(o))if(O.string(e))this.options.withExif[`exif-${t.toLowerCase()}-${i}`]=e;else throw O.invalidParameterError(`${t}.${i}`,"string",e);else throw O.invalidParameterError(t,"object",o);else throw O.invalidParameterError("exif","object",n);return this.options.withExifMerge=!1,this.keepExif()}function xxe(n){return this.withExif(n),this.options.withExifMerge=!0,this}function Yxe(){return this.options.keepMetadata|=8,this}function jxe(n,t){if(O.string(n))this.options.withIccProfile=n;else throw O.invalidParameterError("icc","string",n);if(this.keepIccProfile(),O.object(t)&&O.defined(t.attach))if(O.bool(t.attach))t.attach||(this.options.keepMetadata&=-9);else throw O.invalidParameterError("attach","boolean",t.attach);return this}function Jxe(){return this.options.keepGainMap=!0,this.options.withGainMap=!1,this.options.keepMetadata|=32,this}function qxe(){return this.options.withGainMap=!0,this.options.keepGainMap=!1,this.options.colourspace="scrgb",this}function zxe(){return this.options.keepMetadata|=2,this}function Vxe(n){if(O.string(n)&&n.length>0)this.options.withXmp=n,this.options.keepMetadata|=2;else throw O.invalidParameterError("xmp","non-empty string",n);return this}function Wxe(){return this.options.keepMetadata|=31,this}function Zxe(n){if(this.keepMetadata(),this.withIccProfile("srgb"),O.object(n)){if(O.defined(n.orientation))if(O.integer(n.orientation)&&O.inRange(n.orientation,1,8))this.options.withMetadataOrientation=n.orientation;else throw O.invalidParameterError("orientation","integer between 1 and 8",n.orientation);if(O.defined(n.density))if(O.number(n.density)&&n.density>0)this.options.withMetadataDensity=n.density;else throw O.invalidParameterError("density","positive number",n.density);O.defined(n.icc)&&this.withIccProfile(n.icc),O.defined(n.exif)&&this.withExifMerge(n.exif)}return this}function Xxe(n,t){let o=ree.get((O.object(n)&&O.string(n.id)?n.id:n).toLowerCase());if(!o)throw O.invalidParameterError("format",`one of: ${[...ree.keys()].join(", ")}`,n);return this[o](t)}function $xe(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jpegQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.progressive)&&this._setBooleanOption("jpegProgressive",n.progressive),O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);let t=O.bool(n.optimizeCoding)?n.optimizeCoding:n.optimiseCoding;if(O.defined(t)&&this._setBooleanOption("jpegOptimiseCoding",t),O.defined(n.mozjpeg))if(O.bool(n.mozjpeg))n.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3);else throw O.invalidParameterError("mozjpeg","boolean",n.mozjpeg);let o=O.bool(n.trellisQuantization)?n.trellisQuantization:n.trellisQuantisation;O.defined(o)&&this._setBooleanOption("jpegTrellisQuantisation",o),O.defined(n.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",n.overshootDeringing);let i=O.bool(n.optimizeScans)?n.optimizeScans:n.optimiseScans;O.defined(i)&&(this._setBooleanOption("jpegOptimiseScans",i),i&&(this.options.jpegProgressive=!0));let e=O.number(n.quantizationTable)?n.quantizationTable:n.quantisationTable;if(O.defined(e))if(O.integer(e)&&O.inRange(e,0,8))this.options.jpegQuantisationTable=e;else throw O.invalidParameterError("quantisationTable","integer between 0 and 8",e)}return this._updateFormatOut("jpeg",n)}function eYe(n){if(O.object(n)){if(O.defined(n.progressive)&&this._setBooleanOption("pngProgressive",n.progressive),O.defined(n.compressionLevel))if(O.integer(n.compressionLevel)&&O.inRange(n.compressionLevel,0,9))this.options.pngCompressionLevel=n.compressionLevel;else throw O.invalidParameterError("compressionLevel","integer between 0 and 9",n.compressionLevel);O.defined(n.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",n.adaptiveFiltering);let t=n.colours||n.colors;if(O.defined(t))if(O.integer(t)&&O.inRange(t,2,256))this.options.pngBitdepth=iee(t);else throw O.invalidParameterError("colours","integer between 2 and 256",t);if(O.defined(n.palette)?this._setBooleanOption("pngPalette",n.palette):[n.quality,n.effort,n.colours,n.colors,n.dither].some(O.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,0,100))this.options.pngQuality=n.quality;else throw O.invalidParameterError("quality","integer between 0 and 100",n.quality);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,10))this.options.pngEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 10",n.effort);if(O.defined(n.dither))if(O.number(n.dither)&&O.inRange(n.dither,0,1))this.options.pngDither=n.dither;else throw O.invalidParameterError("dither","number between 0.0 and 1.0",n.dither)}}return this._updateFormatOut("png",n)}function AYe(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.webpQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.alphaQuality))if(O.integer(n.alphaQuality)&&O.inRange(n.alphaQuality,0,100))this.options.webpAlphaQuality=n.alphaQuality;else throw O.invalidParameterError("alphaQuality","integer between 0 and 100",n.alphaQuality);if(O.defined(n.lossless)&&this._setBooleanOption("webpLossless",n.lossless),O.defined(n.nearLossless)&&this._setBooleanOption("webpNearLossless",n.nearLossless),O.defined(n.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",n.smartSubsample),O.defined(n.smartDeblock)&&this._setBooleanOption("webpSmartDeblock",n.smartDeblock),O.defined(n.preset))if(O.string(n.preset)&&O.inArray(n.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=n.preset;else throw O.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",n.preset);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,0,6))this.options.webpEffort=n.effort;else throw O.invalidParameterError("effort","integer between 0 and 6",n.effort);O.defined(n.minSize)&&this._setBooleanOption("webpMinSize",n.minSize),O.defined(n.mixed)&&this._setBooleanOption("webpMixed",n.mixed),O.defined(n.exact)&&this._setBooleanOption("webpExact",n.exact)}return yF(n,this.options),this._updateFormatOut("webp",n)}function tYe(n){if(O.object(n)){O.defined(n.reuse)&&this._setBooleanOption("gifReuse",n.reuse),O.defined(n.progressive)&&this._setBooleanOption("gifProgressive",n.progressive);let t=n.colours||n.colors;if(O.defined(t))if(O.integer(t)&&O.inRange(t,2,256))this.options.gifBitdepth=iee(t);else throw O.invalidParameterError("colours","integer between 2 and 256",t);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,10))this.options.gifEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 10",n.effort);if(O.defined(n.dither))if(O.number(n.dither)&&O.inRange(n.dither,0,1))this.options.gifDither=n.dither;else throw O.invalidParameterError("dither","number between 0.0 and 1.0",n.dither);if(O.defined(n.interFrameMaxError))if(O.number(n.interFrameMaxError)&&O.inRange(n.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=n.interFrameMaxError;else throw O.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",n.interFrameMaxError);if(O.defined(n.interPaletteMaxError))if(O.number(n.interPaletteMaxError)&&O.inRange(n.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=n.interPaletteMaxError;else throw O.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",n.interPaletteMaxError);if(O.defined(n.keepDuplicateFrames))if(O.bool(n.keepDuplicateFrames))this._setBooleanOption("gifKeepDuplicateFrames",n.keepDuplicateFrames);else throw O.invalidParameterError("keepDuplicateFrames","boolean",n.keepDuplicateFrames)}return yF(n,this.options),this._updateFormatOut("gif",n)}function rYe(n){if(!this.constructor.format.jp2.output.buffer)throw aee();if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jp2Quality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.jp2Lossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.tileWidth))if(O.integer(n.tileWidth)&&O.inRange(n.tileWidth,1,32768))this.options.jp2TileWidth=n.tileWidth;else throw O.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(O.defined(n.tileHeight))if(O.integer(n.tileHeight)&&O.inRange(n.tileHeight,1,32768))this.options.jp2TileHeight=n.tileHeight;else throw O.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling)}return this._updateFormatOut("jp2",n)}function yF(n,t){if(O.object(n)&&O.defined(n.loop))if(O.integer(n.loop)&&O.inRange(n.loop,0,65535))t.loop=n.loop;else throw O.invalidParameterError("loop","integer between 0 and 65535",n.loop);if(O.object(n)&&O.defined(n.delay))if(O.integer(n.delay)&&O.inRange(n.delay,0,65535))t.delay=[n.delay];else if(Array.isArray(n.delay)&&n.delay.every(O.integer)&&n.delay.every(o=>O.inRange(o,0,65535)))t.delay=n.delay;else throw O.invalidParameterError("delay","integer or an array of integers between 0 and 65535",n.delay)}function aYe(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.tiffQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.bitdepth))if(O.integer(n.bitdepth)&&O.inArray(n.bitdepth,[1,2,4]))this.options.tiffBitdepth=n.bitdepth;else throw O.invalidParameterError("bitdepth","1, 2 or 4",n.bitdepth);if(O.defined(n.tile)&&this._setBooleanOption("tiffTile",n.tile),O.defined(n.tileWidth))if(O.integer(n.tileWidth)&&O.inRange(n.tileWidth,1,32768))this.options.tiffTileWidth=n.tileWidth;else throw O.invalidParameterError("tileWidth","integer between 1 and 32768",n.tileWidth);if(O.defined(n.tileHeight))if(O.integer(n.tileHeight)&&O.inRange(n.tileHeight,1,32768))this.options.tiffTileHeight=n.tileHeight;else throw O.invalidParameterError("tileHeight","integer between 1 and 32768",n.tileHeight);if(O.defined(n.miniswhite)&&this._setBooleanOption("tiffMiniswhite",n.miniswhite),O.defined(n.pyramid)&&this._setBooleanOption("tiffPyramid",n.pyramid),O.defined(n.xres))if(O.number(n.xres)&&O.inRange(n.xres,.001,1e6))this.options.tiffXres=n.xres;else throw O.invalidParameterError("xres","number between 0.001 and 1000000",n.xres);if(O.defined(n.yres))if(O.number(n.yres)&&O.inRange(n.yres,.001,1e6))this.options.tiffYres=n.yres;else throw O.invalidParameterError("yres","number between 0.001 and 1000000",n.yres);if(O.defined(n.compression))if(O.string(n.compression)&&O.inArray(n.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=n.compression;else throw O.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",n.compression);if(O.defined(n.bigtiff)&&this._setBooleanOption("tiffBigtiff",n.bigtiff),O.defined(n.predictor))if(O.string(n.predictor)&&O.inArray(n.predictor,["none","horizontal","float"]))this.options.tiffPredictor=n.predictor;else throw O.invalidParameterError("predictor","one of: none, horizontal, float",n.predictor);if(O.defined(n.resolutionUnit))if(O.string(n.resolutionUnit)&&O.inArray(n.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=n.resolutionUnit;else throw O.invalidParameterError("resolutionUnit","one of: inch, cm",n.resolutionUnit)}return this._updateFormatOut("tiff",n)}function iYe(n){return this.heif({...n,compression:"av1"})}function oYe(n){if(O.object(n)){if(O.string(n.compression)&&O.inArray(n.compression,["av1","hevc"]))this.options.heifCompression=n.compression;else throw O.invalidParameterError("compression","one of: av1, hevc",n.compression);if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.heifQuality=n.quality;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.heifLossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,0,9))this.options.heifEffort=n.effort;else throw O.invalidParameterError("effort","integer between 0 and 9",n.effort);if(O.defined(n.chromaSubsampling))if(O.string(n.chromaSubsampling)&&O.inArray(n.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=n.chromaSubsampling;else throw O.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",n.chromaSubsampling);if(O.defined(n.bitdepth))if(O.integer(n.bitdepth)&&O.inArray(n.bitdepth,[8,10,12]))this.options.heifBitdepth=n.bitdepth;else throw O.invalidParameterError("bitdepth","8, 10 or 12",n.bitdepth);if(O.defined(n.tune))if(O.string(n.tune)&&O.inArray(n.tune,["auto","iq","psnr","ssim"]))this.options.heifLossless&&n.tune==="iq"?this.options.heifTune="ssim":this.options.heifTune=n.tune;else throw O.invalidParameterError("tune","one of: auto, iq, psnr, ssim",n.tune)}else throw O.invalidParameterError("options","Object",n);return this._updateFormatOut("heif",n)}function nYe(n){if(O.object(n)){if(O.defined(n.quality))if(O.integer(n.quality)&&O.inRange(n.quality,1,100))this.options.jxlDistance=n.quality>=30?.1+(100-n.quality)*.09:53/3e3*n.quality*n.quality-23/20*n.quality+25;else throw O.invalidParameterError("quality","integer between 1 and 100",n.quality);else if(O.defined(n.distance))if(O.number(n.distance)&&O.inRange(n.distance,0,15))this.options.jxlDistance=n.distance;else throw O.invalidParameterError("distance","number between 0.0 and 15.0",n.distance);if(O.defined(n.decodingTier))if(O.integer(n.decodingTier)&&O.inRange(n.decodingTier,0,4))this.options.jxlDecodingTier=n.decodingTier;else throw O.invalidParameterError("decodingTier","integer between 0 and 4",n.decodingTier);if(O.defined(n.lossless))if(O.bool(n.lossless))this.options.jxlLossless=n.lossless;else throw O.invalidParameterError("lossless","boolean",n.lossless);if(O.defined(n.effort))if(O.integer(n.effort)&&O.inRange(n.effort,1,9))this.options.jxlEffort=n.effort;else throw O.invalidParameterError("effort","integer between 1 and 9",n.effort)}return yF(n,this.options),this._updateFormatOut("jxl",n)}function sYe(n){if(O.object(n)&&O.defined(n.depth))if(O.string(n.depth)&&O.inArray(n.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=n.depth;else throw O.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",n.depth);return this._updateFormatOut("raw")}function gYe(n){if(O.object(n)){if(O.defined(n.size))if(O.integer(n.size)&&O.inRange(n.size,1,8192))this.options.tileSize=n.size;else throw O.invalidParameterError("size","integer between 1 and 8192",n.size);if(O.defined(n.overlap))if(O.integer(n.overlap)&&O.inRange(n.overlap,0,8192)){if(n.overlap>this.options.tileSize)throw O.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,n.overlap);this.options.tileOverlap=n.overlap}else throw O.invalidParameterError("overlap","integer between 0 and 8192",n.overlap);if(O.defined(n.container))if(O.string(n.container)&&O.inArray(n.container,["fs","zip"]))this.options.tileContainer=n.container;else throw O.invalidParameterError("container","one of: fs, zip",n.container);if(O.defined(n.layout))if(O.string(n.layout)&&O.inArray(n.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=n.layout;else throw O.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",n.layout);if(O.defined(n.angle))if(O.integer(n.angle)&&!(n.angle%90))this.options.tileAngle=n.angle;else throw O.invalidParameterError("angle","positive/negative multiple of 90",n.angle);if(this._setBackgroundColourOption("tileBackground",n.background),O.defined(n.depth))if(O.string(n.depth)&&O.inArray(n.depth,["onepixel","onetile","one"]))this.options.tileDepth=n.depth;else throw O.invalidParameterError("depth","one of: onepixel, onetile, one",n.depth);if(O.defined(n.skipBlanks))if(O.integer(n.skipBlanks)&&O.inRange(n.skipBlanks,-1,65535))this.options.tileSkipBlanks=n.skipBlanks;else throw O.invalidParameterError("skipBlanks","integer between -1 and 255/65535",n.skipBlanks);else O.defined(n.layout)&&n.layout==="google"&&(this.options.tileSkipBlanks=5);let t=O.bool(n.center)?n.center:n.centre;if(O.defined(t)&&this._setBooleanOption("tileCentre",t),O.defined(n.id))if(O.string(n.id))this.options.tileId=n.id;else throw O.invalidParameterError("id","string",n.id);if(O.defined(n.basename))if(O.string(n.basename))this.options.tileBasename=n.basename;else throw O.invalidParameterError("basename","string",n.basename)}if(O.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw O.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function cYe(n){if(!O.plainObject(n))throw O.invalidParameterError("options","object",n);if(O.integer(n.seconds)&&O.inRange(n.seconds,0,3600))this.options.timeoutSeconds=n.seconds;else throw O.invalidParameterError("seconds","integer between 0 and 3600",n.seconds);return this}function IYe(n,t){return O.object(t)&&t.force===!1||(this.options.formatOut=n),this}function lYe(n,t){if(O.bool(t))this.options[n]=t;else throw O.invalidParameterError(n,"boolean",t)}function pYe(){if(!this.options.streamOut){this.options.streamOut=!0;let n=Error();this._pipeline(void 0,n)}}function dYe(n,t){return typeof n=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),mt.pipeline(this.options,(o,i,e)=>{o?n(O.nativeError(o,t)):n(null,i,e)})}):mt.pipeline(this.options,(o,i,e)=>{o?n(O.nativeError(o,t)):n(null,i,e)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),mt.pipeline(this.options,(o,i,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):mt.pipeline(this.options,(o,i,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(i)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((o,i)=>{this.once("finish",()=>{this._flattenBufferIn(),mt.pipeline(this.options,(e,a,A)=>{e?i(O.nativeError(e,t)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}):new Promise((o,i)=>{mt.pipeline(this.options,(e,a,A)=>{e?i(O.nativeError(e,t)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}var ree,Pxe,aee,iee,oee,nee=ue(()=>{ps();AB();ree=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),Pxe=/\.(jp[2x]|j2[kc])$/i,aee=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),iee=n=>1<<31-Math.clz32(Math.ceil(Math.log2(n)));oee=n=>{Object.assign(n.prototype,{toFile:Gxe,toBuffer:Fxe,toUint8Array:Lxe,withDensity:Uxe,keepExif:Hxe,withExif:Kxe,withExifMerge:xxe,keepIccProfile:Yxe,withIccProfile:jxe,keepGainMap:Jxe,withGainMap:qxe,keepXmp:zxe,withXmp:Vxe,keepMetadata:Wxe,withMetadata:Zxe,toFormat:Xxe,jpeg:$xe,jp2:rYe,png:eYe,webp:AYe,tiff:aYe,avif:iYe,heif:oYe,jxl:nYe,gif:tYe,raw:sYe,tile:gYe,timeout:cYe,_updateFormatOut:IYe,_setBooleanOption:lYe,_read:pYe,_pipeline:dYe})}});import hYe from"node:events";import{createRequire as EYe}from"node:module";import{availableParallelism as CYe}from"node:os";function gee(n){if(O.bool(n))return n?mt.cache(50,20,100):mt.cache(0,0,0);if(O.object(n)){for(let t of["memory","files","items"]){let o=n[t];if(O.defined(o)&&!(O.integer(o)&&o>=0))throw O.invalidParameterError(t,"a positive integer",o)}return mt.cache(n.memory,n.files,n.items)}else return mt.cache()}function BYe(n){return mt.concurrency(O.integer(n)?n:null)}function QYe(){return mt.counters()}function yYe(n){return mt.simd(O.bool(n)?n:null)}function mYe(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))mt.block(n.operation,!0);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}function SYe(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))mt.block(n.operation,!1);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}var tB,mF,see,SF,vc,uYe,Wd,fYe,cee,Iee=ue(()=>{tB=qe(MD(),1);ps();IF();AB();xD();mF=EYe(import.meta.url),see=YD.runtimePlatformArch(),SF=mt.libvipsVersion(),vc=mt.format();vc.heif.output.alias=["avif","heic"];vc.jpeg.output.alias=["jpe","jpg"];vc.tiff.output.alias=["tif"];vc.jp2.output.alias=["j2c","j2k","jp2","jpx"];uYe={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},Wd={vips:SF.semver};if(!SF.isGlobal)if(SF.isWasm)try{Wd=mF("@img/sharp-wasm32/versions")}catch{}else try{Wd=mF(`@img/sharp-${see}/versions`)}catch{try{Wd=mF(`@img/sharp-libvips-${see}/versions`)}catch{}}Wd.sharp=Sg.version;Wd.heif&&vc.heif&&(vc.heif.input.fileSuffix=[".avif"],vc.heif.output.alias=["avif"]);gee(!0);!process.env.MALLOC_ARENA_MAX&&tB.default.familySync()===tB.default.GLIBC&&!mt._isUsingJemalloc()?mt.concurrency(1):tB.default.familySync()===tB.default.MUSL&&mt.concurrency()===1024&&mt.concurrency(CYe());fYe=new hYe.EventEmitter;cee=n=>{n.cache=gee,n.concurrency=BYe,n.counters=QYe,n.simd=yYe,n.format=vc,n.interpolators=uYe,n.versions=Wd,n.queue=fYe,n.block=mYe,n.unblock=SYe}});var lee={};_r(lee,{default:()=>DYe});var DYe,pee=ue(()=>{O$();_$();P$();F$();H$();eee();tee();nee();Iee();M$(us);v$(us);G$(us);U$(us);$$(us);Aee(us);oee(us);cee(us);DYe=us});var wYe,kA,Pc,rB=ue(()=>{wYe="End-Of-Stream",kA=class extends Error{constructor(){super(wYe),this.name="EndOfStreamError"}},Pc=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}});var zD,dee=ue(()=>{zD=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((t,o)=>{this.reject=o,this.resolve=t})}}});var Gc,VD=ue(()=>{rB();Gc=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(t,o=!1){let i=await this.read(t,o);return this.peekQueue.push(t.subarray(0,i)),i}async read(t,o=!1){if(t.length===0)return 0;let i=this.readFromPeekBuffer(t);if(this.endOfStream||(i+=await this.readRemainderFromStream(t.subarray(i),o)),i===0&&!o)throw new kA;return i}readFromPeekBuffer(t){let o=t.length,i=0;for(;this.peekQueue.length>0&&o>0;){let e=this.peekQueue.pop();if(!e)throw new Error("peekData should be defined");let a=Math.min(e.length,o);t.set(e.subarray(0,a),i),i+=a,o-=a,a{rB();dee();VD();aB=class extends Gc{constructor(t){if(super(),this.s=t,this.deferred=null,!t.read||!t.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",o=>this.reject(o)),this.s.once("close",()=>this.abort())}async readFromStream(t,o){if(t.length===0)return 0;let i=this.s.read(t.length);if(i)return t.set(i),i.length;let e={buffer:t,mayBeLess:o,deferred:new zD};return this.deferred=e.deferred,this.s.once("readable",()=>{this.readDeferred(e)}),e.deferred.promise}readDeferred(t){let o=this.s.read(t.buffer.length);o?(t.buffer.set(o),t.deferred.resolve(o.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(t)})}reject(t){this.interrupted=!0,this.deferred&&(this.deferred.reject(t),this.deferred=null)}async abort(){this.reject(new Pc)}async close(){return this.abort()}}});var WD,Eee=ue(()=>{VD();WD=class extends Gc{constructor(t){super(),this.reader=t}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var iB,DF=ue(()=>{Eee();iB=class extends WD{async readFromStream(t,o){if(t.length===0)return 0;let i=await this.reader.read(new Uint8Array(t.length),{min:o?void 0:t.length});return i.done&&(this.endOfStream=i.done),i.value?(t.set(i.value),i.value.length):0}}});var Zd,wF=ue(()=>{rB();VD();Zd=class extends Gc{constructor(t){super(),this.reader=t,this.buffer=null}writeChunk(t,o){let i=Math.min(o.length,t.length);return t.set(o.subarray(0,i)),i{DF();wF()});var Fc=ue(()=>{rB();hee();DF();wF();Cee()});var Sn,Xd=ue(()=>{Fc();Sn=class{constructor(t){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=t?.onClose,t?.abortSignal&&t.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(t,o=this.position){let i=new Uint8Array(t.len);if(await this.readBuffer(i,{position:o})o)return this.position+=o,o}return this.position+=t,t}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(t,o){if(!this.supportsRandomAccess()&&o&&o.position!==void 0&&o.position{Xd();Fc();OYe=256e3,oB=class extends Sn{constructor(t,o){super(o),this.streamReader=t,this.fileInfo=o?.fileInfo??{}}async readBuffer(t,o){let i=this.normalizeOptions(t,o),e=i.position-this.position;if(e>0)return await this.ignore(e),this.readBuffer(t,o);if(e<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(i.length===0)return 0;let a=await this.streamReader.read(t.subarray(0,i.length),i.mayBeLess);if(this.position+=a,(!o||!o.mayBeLess)&&a0){let A=new Uint8Array(i.length+a);return e=await this.peekBuffer(A,{mayBeLess:i.mayBeLess}),t.set(A.subarray(a)),e-a}if(a<0)throw new Error("Cannot peek from a negative offset in a stream")}if(i.length>0){try{e=await this.streamReader.peek(t.subarray(0,i.length),i.mayBeLess)}catch(a){if(o?.mayBeLess&&a instanceof kA)return 0;throw a}if(!i.mayBeLess&&e{Fc();Xd();ZD=class extends Sn{constructor(t,o){super(o),this.uint8Array=t,this.fileInfo={...o?.fileInfo??{},size:t.length}}async readBuffer(t,o){o?.position&&(this.position=o.position);let i=await this.peekBuffer(t,o);return this.position+=i,i}async peekBuffer(t,o){let i=this.normalizeOptions(t,o),e=Math.min(this.uint8Array.length-i.position,i.length);if(!i.mayBeLess&&e{Fc();Xd();XD=class extends Sn{constructor(t,o){super(o),this.blob=t,this.fileInfo={...o?.fileInfo??{},size:t.size,mimeType:t.type}}async readBuffer(t,o){o?.position&&(this.position=o.position);let i=await this.peekBuffer(t,o);return this.position+=i,i}async peekBuffer(t,o){let i=this.normalizeOptions(t,o),e=Math.min(this.blob.size-i.position,i.length);if(!i.mayBeLess&&e{if(await o.close(),e)return e()},new oB(o,i)}function $D(n,t){let o=OF(n),i=t??{},e=i.onClose;return i.onClose=async()=>{if(await o.close(),e)return e()},new oB(o,i)}function to(n,t){return new ZD(n,t)}function ew(n,t){return new XD(n,t)}var Aw=ue(()=>{Fc();uee();Bee();fee();Fc();Xd()});import{open as MYe}from"node:fs/promises";var $d,bF=ue(()=>{Xd();Fc();$d=class n extends Sn{static async fromFile(t){let o=await MYe(t,"r"),i=await o.stat();return new n(o,{fileInfo:{path:t,size:i.size}})}constructor(t,o){super(o),this.fileHandle=t,this.fileInfo=o.fileInfo}async readBuffer(t,o){let i=this.normalizeOptions(t,o);if(this.position=i.position,i.length===0)return 0;let e=await this.fileHandle.read(t,0,i.length,i.position);if(this.position+=e.bytesRead,e.bytesRead{Aw();bF();bF();Aw();yee=$d.fromFile});var mee=$(_F=>{_F.read=function(n,t,o,i,e){var a,A,r=e*8-i-1,s=(1<>1,c=-7,I=o?e-1:0,d=o?-1:1,B=n[t+I];for(I+=d,a=B&(1<<-c)-1,B>>=-c,c+=r;c>0;a=a*256+n[t+I],I+=d,c-=8);for(A=a&(1<<-c)-1,a>>=-c,c+=i;c>0;A=A*256+n[t+I],I+=d,c-=8);if(a===0)a=1-g;else{if(a===s)return A?NaN:(B?-1:1)*(1/0);A=A+Math.pow(2,i),a=a-g}return(B?-1:1)*A*Math.pow(2,a-i)};_F.write=function(n,t,o,i,e,a){var A,r,s,g=a*8-e-1,c=(1<>1,d=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=i?0:a-1,f=i?1:-1,Q=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(r=isNaN(t)?1:0,A=c):(A=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-A))<1&&(A--,s*=2),A+I>=1?t+=d/s:t+=d*Math.pow(2,1-I),t*s>=2&&(A++,s/=2),A+I>=c?(r=0,A=c):A+I>=1?(r=(t*s-1)*Math.pow(2,e),A=A+I):(r=t*Math.pow(2,I-1)*Math.pow(2,e),A=0));e>=8;n[o+B]=r&255,B+=f,r/=256,e-=8);for(A=A<0;n[o+B]=A&255,B+=f,A/=256,g-=8);n[o+B-f]|=Q*128}});function TYe(){if(!(typeof globalThis.TextDecoder>"u"))return tw??(tw=new globalThis.TextDecoder("utf-8"))}function NYe(){if(!(typeof globalThis.TextEncoder>"u"))return rw??(rw=new globalThis.TextEncoder)}function Qr(n,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=TYe();return o?o.decode(n):kYe(n)}case"utf-16le":return vYe(n);case"us-ascii":case"ascii":return PYe(n);case"latin1":case"iso-8859-1":return GYe(n);case"windows-1252":return FYe(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function Dee(n="",t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=NYe();return o?o.encode(n):LYe(n)}case"utf-16le":return UYe(n);case"us-ascii":case"ascii":return HYe(n);case"latin1":case"iso-8859-1":return KYe(n);case"windows-1252":return xYe(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function NF(n,t){t.length!==0&&(n.push(String.fromCharCode.apply(null,t)),t.length=0)}function Or(n,t,o){t.push(o),t.length>=eh&&NF(n,t)}function RYe(n,t,o){if(o<=65535){Or(n,t,o);return}o-=65536,Or(n,t,55296+(o>>10)),Or(n,t,56320+(o&1023))}function kYe(n){let t=[],o=[],i=0;for(n.length>=3&&n[0]===239&&n[1]===187&&n[2]===191&&(i=3);i244){Or(t,o,ya),i++;continue}if(e<=223){if(i+1>=n.length){Or(t,o,ya),i++;continue}let c=n[i+1];if((c&192)!==128){Or(t,o,ya),i++;continue}let I=(e&31)<<6|c&63;Or(t,o,I),i+=2;continue}if(e<=239){if(i+2>=n.length){Or(t,o,ya),i++;continue}let c=n[i+1],I=n[i+2];if(!((c&192)===128&&(I&192)===128&&!(e===224&&c<160)&&!(e===237&&c>=160))){Or(t,o,ya),i++;continue}let B=(e&15)<<12|(c&63)<<6|I&63;Or(t,o,B),i+=3;continue}if(i+3>=n.length){Or(t,o,ya),i++;continue}let a=n[i+1],A=n[i+2],r=n[i+3];if(!((a&192)===128&&(A&192)===128&&(r&192)===128&&!(e===240&&a<144)&&!(e===244&&a>143))){Or(t,o,ya),i++;continue}let g=(e&7)<<18|(a&63)<<12|(A&63)<<6|r&63;RYe(t,o,g),i+=4}return NF(t,o),t.join("")}function vYe(n){let t=[],o=[],i=n.length,e=0;for(;e+1=55296&&a<=56319){if(e+1=56320&&A<=57343?(Or(t,o,a),Or(t,o,A),e+=2):Or(t,o,ya)}else Or(t,o,ya);continue}if(a>=56320&&a<=57343){Or(t,o,ya);continue}Or(t,o,a)}return e=128&&e<=159?See[e]:void 0;o+=a??String.fromCharCode(e),o.length>=eh&&(t.push(o),o="")}return o&&t.push(o),t.join("")}function LYe(n){let t=[];for(let o=0;o=55296&&i<=56319)if(o+1=56320&&e<=57343?(i=65536+(i-55296<<10)+(e-56320),o++):i=ya}else i=ya;else i>=56320&&i<=57343&&(i=ya);i<128?t.push(i):i<2048?t.push(192|i>>6,128|i&63):i<65536?t.push(224|i>>12,128|i>>6&63,128|i&63):t.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63)}return new Uint8Array(t)}function UYe(n){let t=[];for(let i=0;i=55296&&e<=56319){if(i+1=56320&&a<=57343?(t.push(e,a),i++):t.push(ya)}else t.push(ya);continue}if(e>=56320&&e<=57343){t.push(ya);continue}t.push(e)}let o=new Uint8Array(t.length*2);for(let i=0;i>>8}return o}function HYe(n){let t=new Uint8Array(n.length);for(let o=0;o=0&&e<=127||e>=160&&e<=255){t[o]=e;continue}t[o]=63}return t}var See,TF,tw,rw,eh,ya,fs=ue(()=>{See={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},TF={};for(let[n,t]of Object.entries(See))TF[t]=Number.parseInt(n,10);eh=32*1024,ya=65533});var VA={};_r(VA,{AnsiStringType:()=>kF,Float16_BE:()=>JYe,Float16_LE:()=>qYe,Float32_BE:()=>PF,Float32_LE:()=>zYe,Float64_BE:()=>iw,Float64_LE:()=>VYe,Float80_BE:()=>WYe,Float80_LE:()=>ZYe,INT16_BE:()=>Lo,INT16_LE:()=>YYe,INT24_BE:()=>aw,INT24_LE:()=>jYe,INT32_BE:()=>$a,INT32_LE:()=>gr,INT64_BE:()=>vF,INT64_LE:()=>gB,INT8:()=>ys,IgnoreType:()=>RF,StringType:()=>Ve,UINT16_BE:()=>LA,UINT16_LE:()=>SA,UINT24_BE:()=>br,UINT24_LE:()=>sB,UINT32_BE:()=>xe,UINT32_LE:()=>Fe,UINT64_BE:()=>ms,UINT64_LE:()=>Mr,UINT8:()=>fA,Uint8ArrayType:()=>Dt});function zA(n){return new DataView(n.buffer,n.byteOffset)}var Qs,fA,SA,LA,sB,br,Fe,xe,ys,Lo,YYe,jYe,aw,$a,gr,Mr,gB,ms,vF,JYe,qYe,PF,zYe,iw,VYe,WYe,ZYe,RF,Dt,Ve,kF,wA=ue(()=>{Qs=qe(mee(),1);fs();fA={len:1,get(n,t){return zA(n).getUint8(t)},put(n,t,o){return zA(n).setUint8(t,o),t+1}},SA={len:2,get(n,t){return zA(n).getUint16(t,!0)},put(n,t,o){return zA(n).setUint16(t,o,!0),t+2}},LA={len:2,get(n,t){return zA(n).getUint16(t)},put(n,t,o){return zA(n).setUint16(t,o),t+2}},sB={len:3,get(n,t){let o=zA(n);return o.getUint8(t)+(o.getUint16(t+1,!0)<<8)},put(n,t,o){let i=zA(n);return i.setUint8(t,o&255),i.setUint16(t+1,o>>8,!0),t+3}},br={len:3,get(n,t){let o=zA(n);return(o.getUint16(t)<<8)+o.getUint8(t+2)},put(n,t,o){let i=zA(n);return i.setUint16(t,o>>8),i.setUint8(t+2,o&255),t+3}},Fe={len:4,get(n,t){return zA(n).getUint32(t,!0)},put(n,t,o){return zA(n).setUint32(t,o,!0),t+4}},xe={len:4,get(n,t){return zA(n).getUint32(t)},put(n,t,o){return zA(n).setUint32(t,o),t+4}},ys={len:1,get(n,t){return zA(n).getInt8(t)},put(n,t,o){return zA(n).setInt8(t,o),t+1}},Lo={len:2,get(n,t){return zA(n).getInt16(t)},put(n,t,o){return zA(n).setInt16(t,o),t+2}},YYe={len:2,get(n,t){return zA(n).getInt16(t,!0)},put(n,t,o){return zA(n).setInt16(t,o,!0),t+2}},jYe={len:3,get(n,t){let o=sB.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let i=zA(n);return i.setUint8(t,o&255),i.setUint16(t+1,o>>8,!0),t+3}},aw={len:3,get(n,t){let o=br.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let i=zA(n);return i.setUint16(t,o>>8),i.setUint8(t+2,o&255),t+3}},$a={len:4,get(n,t){return zA(n).getInt32(t)},put(n,t,o){return zA(n).setInt32(t,o),t+4}},gr={len:4,get(n,t){return zA(n).getInt32(t,!0)},put(n,t,o){return zA(n).setInt32(t,o,!0),t+4}},Mr={len:8,get(n,t){return zA(n).getBigUint64(t,!0)},put(n,t,o){return zA(n).setBigUint64(t,o,!0),t+8}},gB={len:8,get(n,t){return zA(n).getBigInt64(t,!0)},put(n,t,o){return zA(n).setBigInt64(t,o,!0),t+8}},ms={len:8,get(n,t){return zA(n).getBigUint64(t)},put(n,t,o){return zA(n).setBigUint64(t,o),t+8}},vF={len:8,get(n,t){return zA(n).getBigInt64(t)},put(n,t,o){return zA(n).setBigInt64(t,o),t+8}},JYe={len:2,get(n,t){return Qs.read(n,t,!1,10,this.len)},put(n,t,o){return Qs.write(n,o,t,!1,10,this.len),t+this.len}},qYe={len:2,get(n,t){return Qs.read(n,t,!0,10,this.len)},put(n,t,o){return Qs.write(n,o,t,!0,10,this.len),t+this.len}},PF={len:4,get(n,t){return zA(n).getFloat32(t)},put(n,t,o){return zA(n).setFloat32(t,o),t+4}},zYe={len:4,get(n,t){return zA(n).getFloat32(t,!0)},put(n,t,o){return zA(n).setFloat32(t,o,!0),t+4}},iw={len:8,get(n,t){return zA(n).getFloat64(t)},put(n,t,o){return zA(n).setFloat64(t,o),t+8}},VYe={len:8,get(n,t){return zA(n).getFloat64(t,!0)},put(n,t,o){return zA(n).setFloat64(t,o,!0),t+8}},WYe={len:10,get(n,t){return Qs.read(n,t,!1,63,this.len)},put(n,t,o){return Qs.write(n,o,t,!1,63,this.len),t+this.len}},ZYe={len:10,get(n,t){return Qs.read(n,t,!0,63,this.len)},put(n,t,o){return Qs.write(n,o,t,!0,63,this.len),t+this.len}},RF=class{constructor(t){this.len=t}get(t,o){}},Dt=class{constructor(t){this.len=t}get(t,o){return t.subarray(o,o+this.len)}},Ve=class{constructor(t,o){this.len=t,this.encoding=o}get(t,o=0){let i=t.subarray(o,o+this.len);return Qr(i,this.encoding)}},kF=class extends Ve{constructor(t){super(t,"windows-1252")}}});var dl,GF,wee,Oee,bee,Mee=ue(()=>{wA();dl={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},GF={get(n){return{signature:Fe.get(n,0),compressedSize:Fe.get(n,8),uncompressedSize:Fe.get(n,12)}},len:16},wee={get(n){let t=SA.get(n,6);return{signature:Fe.get(n,0),minVersion:SA.get(n,4),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,8),compressedSize:Fe.get(n,18),uncompressedSize:Fe.get(n,22),filenameLength:SA.get(n,26),extraFieldLength:SA.get(n,28),filename:null}},len:30},Oee={get(n){return{signature:Fe.get(n,0),nrOfThisDisk:SA.get(n,4),nrOfThisDiskWithTheStart:SA.get(n,6),nrOfEntriesOnThisDisk:SA.get(n,8),nrOfEntriesOfSize:SA.get(n,10),sizeOfCd:Fe.get(n,12),offsetOfStartOfCd:Fe.get(n,16),zipFileCommentLength:SA.get(n,20)}},len:22},bee={get(n){let t=SA.get(n,8);return{signature:Fe.get(n,0),minVersion:SA.get(n,6),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,10),compressedSize:Fe.get(n,20),uncompressedSize:Fe.get(n,24),filenameLength:SA.get(n,28),extraFieldLength:SA.get(n,30),fileCommentLength:SA.get(n,32),relativeOffsetOfLocalHeader:Fe.get(n,42),filename:null}},len:46}});function Tee(n){let t=new Uint8Array(Fe.len);return Fe.put(t,0,n),t}function $Ye(n,t){let o=n.length,i=t.length;if(i>o)return-1;for(let e=0;e<=o-i;e++){let a=!0;for(let A=0;Ae+a.length,0),o=new Uint8Array(t),i=0;for(let e of n)o.set(e,i),i+=e.length;return o}var _ee,Ss,FF,XYe,ow,hl,Nee=ue(()=>{wA();_ee=qe(ct(),1);Mee();Ss=(0,_ee.default)("tokenizer:inflate"),FF=256*1024,XYe=Tee(dl.DataDescriptor),ow=Tee(dl.EndOfCentralDirectory),hl=class n{constructor(t){this.tokenizer=t,this.syncBuffer=new Uint8Array(FF)}async isZip(){return await this.peekSignature()===dl.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(Fe)}async findEndOfCentralDirectoryLocator(){let t=this.tokenizer,o=Math.min(16*1024,t.fileInfo.size),i=this.syncBuffer.subarray(0,o);await this.tokenizer.readBuffer(i,{position:t.fileInfo.size-o});for(let e=i.length-4;e>=0;e--)if(i[e]===ow[0]&&i[e+1]===ow[1]&&i[e+2]===ow[2]&&i[e+3]===ow[3])return t.fileInfo.size-o+e;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Ss("Cannot reading central-directory without random-read support");return}Ss("Reading central-directory...");let t=this.tokenizer.position,o=await this.findEndOfCentralDirectoryLocator();if(o>0){Ss("Central-directory 32-bit signature found");let i=await this.tokenizer.readToken(Oee,o),e=[];this.tokenizer.setPosition(i.offsetOfStartOfCd);for(let a=0;a=0?g:s;if(a.handler){let I=new Uint8Array(c);await this.tokenizer.readBuffer(I),r.push(I)}else await this.tokenizer.ignore(c)}Ss(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),a.handler&&await this.inflate(e,e1e(r),a.handler)}else a.handler?(Ss(`Reading compressed-file-data: ${e.compressedSize} bytes`),A=new Uint8Array(e.compressedSize),await this.tokenizer.readBuffer(A),await this.inflate(e,A,a.handler)):(Ss(`Ignoring compressed-file-data: ${e.compressedSize} bytes`),await this.tokenizer.ignore(e.compressedSize));if(Ss(`Reading data-descriptor at pos=${this.tokenizer.position}`),e.dataDescriptor&&(await this.tokenizer.readToken(GF)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-GF.len}`)}while(!i)}async iterateOverCentralDirectory(t,o){for(let i of t){let e=o(i);if(e.handler){this.tokenizer.setPosition(i.relativeOffsetOfLocalHeader);let a=await this.readLocalFileHeader();if(a){await this.tokenizer.ignore(a.extraFieldLength);let A=new Uint8Array(i.compressedSize);await this.tokenizer.readBuffer(A),await this.inflate(a,A,e.handler)}}if(e.stop)break}}async inflate(t,o,i){if(t.compressedMethod===0)return i(o);if(t.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${t.compressedMethod}`);Ss(`Decompress filename=${t.filename}, compressed-size=${o.length}`);let e=await n.decompressDeflateRaw(o);return i(e)}static async decompressDeflateRaw(t){let o=new ReadableStream({start(a){a.enqueue(t),a.close()}}),i=new DecompressionStream("deflate-raw"),e=o.pipeThrough(i);try{let A=await new Response(e).arrayBuffer();return new Uint8Array(A)}catch(a){let A=a instanceof Error?`Failed to deflate ZIP entry: ${a.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(A)}}async readLocalFileHeader(){let t=await this.tokenizer.peekToken(Fe);if(t===dl.LocalFileHeader){let o=await this.tokenizer.readToken(wee);return o.filename=await this.tokenizer.readToken(new Ve(o.filenameLength,"utf-8")),o}if(t===dl.CentralFileHeader)return!1;throw t===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var cB,Ree=ue(()=>{cB=class{constructor(t){this.tokenizer=t}inflate(){let t=this.tokenizer;return new ReadableStream({async pull(o){let i=new Uint8Array(1024),e=await t.readBuffer(i,{mayBeLess:!0});if(e===0){o.close();return}o.enqueue(i.subarray(0,e))}}).pipeThrough(new DecompressionStream("gzip"))}}});var kee=ue(()=>{Nee();Ree()});function r1e(n,t,o){return n?n.constructor===t?!0:A1e.call(n)===o:!1}function a1e(n){return r1e(n,Uint8Array,t1e)}function i1e(n){if(!a1e(n))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n}\``)}function nw(n){i1e(n);let t="";for(let o=0;o{A1e=Object.prototype.toString,t1e="[object Uint8Array]";rfA={utf8:new globalThis.TextDecoder("utf8")},afA=new globalThis.TextEncoder,o1e=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"))});function vee(n,t){if(t==="utf-16le"){let o=[];for(let i=0;i>8&255)}return o}if(t==="utf-16be"){let o=[];for(let i=0;i>8&255,e&255)}return o}return[...n].map(o=>o.charCodeAt(0))}function Pee(n,t=0){let o=Number.parseInt(new Ve(6).get(n,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(o))return!1;let i=256;for(let e=t;e{wA();Gee={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4}});var Lee,Uee,Hee=ue(()=>{Lee=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],Uee=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"]});function f1e(n){let t=n?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return n;let{reader:o}=t,i=async()=>{await o.cancel(),o.releaseLock()};return t.close=i,t.abort=async()=>{t.interrupted=!0,await i()},n}function KF(n,t,o){if(!Number.isFinite(n)||n<0||n>t)throw new Og(`${o} has invalid size ${n} (maximum ${t} bytes)`);return n}async function Lc(n,t,{maximumLength:o=Uo,reason:i="skip"}={}){let e=KF(t,o,i);await n.ignore(e)}async function UF(n,t,o,{maximumLength:i=t.length,reason:e="read"}={}){let a=o?.length??t.length,A=KF(a,i,e);return n.readBuffer(t,{...o,length:A})}async function Q1e(n,{maximumLength:t=ws}={}){let e=new ReadableStream({start(g){g.enqueue(n),g.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),a=[],A=0;try{for(;;){let{done:g,value:c}=await e.read();if(g)break;if(A+=c.length,A>t)throw await e.cancel(),new Error(`ZIP entry decompressed data exceeds ${t} bytes`);a.push(c)}}finally{e.releaseLock()}let r=new Uint8Array(A),s=0;for(let g of a)r.set(g,s),s+=g.length;return r}function m1e(n,t){if(n.length=0?0:r===e?Math.min(y1e,r-1):0,c=s>=0?s:r-g;if(c===0)break;if(A+=c,A>o)throw new Error(`ZIP entry compressed data exceeds ${o} bytes`);if(t){let I=new Uint8Array(c);await n.tokenizer.readBuffer(I),a.push(I)}else await n.tokenizer.ignore(c);if(s>=0)break}if(ei(n.tokenizer)||(n.knownSizeDescriptorScannedBytes+=A),!!t)return D1e(a,A)}function O1e(n,t){return ei(n.tokenizer)?Math.max(0,Uo-(n.tokenizer.position-t)):Math.max(0,ws-n.knownSizeDescriptorScannedBytes)}async function b1e(n,t,{shouldBuffer:o,maximumDescriptorLength:i=ws}={}){if(t.dataDescriptor&&t.compressedSize===0)return w1e(n,{shouldBuffer:o,maximumLength:i});if(!o){await Lc(n.tokenizer,t.compressedSize,{maximumLength:ei(n.tokenizer)?ws:n.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let e=k1e(n.tokenizer);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>e)throw new Error(`ZIP entry compressed data exceeds ${e} bytes`);let a=new Uint8Array(t.compressedSize);return await n.tokenizer.readBuffer(a),a}function M1e(n,t){let o=n.getReader(),i=0,e=!1,a=!1,A=async r=>{e||a||(a=!0,await o.cancel(r))};return new ReadableStream({async pull(r){if(i>=t){r.close(),await A();return}let{done:s,value:g}=await o.read();if(s||!g){e=!0,r.close();return}let c=t-i;if(g.length>c){r.enqueue(g.subarray(0,c)),i+=c,r.close(),await A();return}r.enqueue(g),i+=g.length},async cancel(r){await A(r)}})}async function hB(n,t){return new HF(t).fromBuffer(n)}function Zee(n){switch(n=n.toLowerCase(),n){case"application/epub+zip":return{ext:"epub",mime:n};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:n};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:n};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:n};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:n};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:n};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:n};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:n};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:n};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:n};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:n};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:n};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:n};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:n};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:n};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:n};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function Ds(n,t,o){o={offset:0,...o};for(let[i,e]of t.entries())if(o.mask){if(e!==(o.mask[i]&n[i+o.offset]))return!1}else if(e!==n[i+o.offset])return!1;return!0}function _1e(n){return Number.isFinite(n)?Math.max(1,Math.trunc(n)):pB}function T1e(n,t,o){return o===void 0?n.read(t):(o.throwIfAborted(),new Promise((i,e)=>{let a=()=>{o.removeEventListener("abort",A)},A=()=>{let r=o.reason;a(),(async()=>{try{await n.cancel(r)}catch{}})(),e(r)};o.addEventListener("abort",A,{once:!0}),(async()=>{try{let r=await n.read(t);a(),i(r)}catch(r){a(),e(r)}})()}))}function N1e(n){return Number.isFinite(n)?Math.max(0,Math.min(n1e,Math.trunc(n))):0}function R1e(n){return Number.isFinite(n)?Math.max(0,n):Number.MAX_SAFE_INTEGER}function ei(n){let t=n.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function dB(n,t,o){return ei(n)&&n.position-t>o}function k1e(n){let t=n.fileInfo.size,o=Number.isFinite(t)?Math.max(0,t-n.position):Number.MAX_SAFE_INTEGER;return Math.min(o,s1e)}function v1e(n){if(n instanceof kA||n instanceof Og)return!0;if(!(n instanceof Error))return!1;if(C1e.has(n.message)||B1e.has(n.code))return!0;for(let t of u1e)if(n.message.startsWith(t))return!0;return!1}function Xee(n,t=ws){let o=[n.compressedSize,n.uncompressedSize];for(let i of o)if(!Number.isFinite(i)||i<0||i>t)return!1;return!0}function P1e(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function G1e(n,t){t.startsWith("word/")&&(n.hasWordDirectory=!0),t.startsWith("ppt/")&&(n.hasPresentationDirectory=!0),t.startsWith("xl/")&&(n.hasSpreadsheetDirectory=!0),t.startsWith("3D/")&&t.endsWith(".model")&&(n.hasThreeDimensionalModelEntry=!0)}function $ee(n){if(!(!n.hasContentTypesEntry||n.hasUnparseableContentTypes||n.isParsingContentTypes||n.hasParsedContentTypesEntry)){if(n.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(n.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(n.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(n.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function F1e(n){let t=n.indexOf('.main+xml"');if(t===-1){let e="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return n.includes(`ContentType="${e}"`)?e:void 0}let o=n.slice(0,t),i=o.lastIndexOf('"');return o.slice(i+1)}var pB,n1e,ws,Kee,s1e,Uo,gw,xee,g1e,c1e,Yee,LF,jee,Jee,I1e,l1e,p1e,d1e,h1e,qee,zee,Vee,E1e,Wee,C1e,u1e,B1e,Og,eAe,sw,y1e,HF,L1e,U1e,AAe=ue(()=>{wA();Aw();kee();lB();Fee();Hee();pB=4100,n1e=pB-2,ws=1024*1024,Kee=1024,s1e=2**31-1,Uo=16*1024*1024,gw=ws,xee=ws,g1e=Uo,c1e=1,Yee=100,LF=Uo,jee=64,Jee=gw,I1e=256,l1e=512,p1e=Uo,d1e=512,h1e=512,qee=256,zee=gw,Vee=gw,E1e=gw,Wee=Uo,C1e=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),u1e=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],B1e=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),Og=class extends Error{};eAe=134695760,sw=16,y1e=sw-1;hl.prototype.inflate=async function(n,t,o){if(n.compressedMethod===0)return o(t);if(n.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${n.compressedMethod}`);let i=await Q1e(t,{maximumLength:ws});return o(i)};hl.prototype.unzip=async function(n){let t=!1,o=0,i=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(dB(this.tokenizer,i,Uo))throw new Og(`ZIP stream probing exceeds ${Uo} bytes`);let e=await this.readLocalFileHeader();if(!e)break;if(o++,o>Kee)throw new Error(`ZIP entry count exceeds ${Kee}`);let a=n(e);t=!!a.stop,await this.tokenizer.ignore(e.extraFieldLength);let A=await b1e(this,e,{shouldBuffer:!!a.handler,maximumDescriptorLength:Math.min(ws,O1e(this,i))});if(a.handler&&await this.inflate(e,A,a.handler),e.dataDescriptor){let r=new Uint8Array(sw);if(await this.tokenizer.readBuffer(r),Fe.get(r,0)!==eAe)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-r.length}`)}if(dB(this.tokenizer,i,Uo))throw new Og(`ZIP stream probing exceeds ${Uo} bytes`)}while(!t)};HF=class n{constructor(t){let o=N1e(t?.mpegOffsetTolerance);this.options={...t,mpegOffsetTolerance:o},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(t){return f1e($D(t,this.getTokenizerOptions()))}async parseTokenizer(t,o=0){this.detectionReentryCount=o;let i=t.position;for(let e of this.detectors){let a;try{a=await e.detect(t)}catch(A){if(A instanceof kA||A instanceof Og)return;throw A}if(a)return a;if(i!==t.position)return}}async fromTokenizer(t){try{return await this.parseTokenizer(t)}finally{await t.close()}}async fromBuffer(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof t}\``);let o=t instanceof Uint8Array?t:new Uint8Array(t);if(o?.length>1)return this.fromTokenizer(to(o,this.getTokenizerOptions()))}async fromBlob(t){this.options.signal?.throwIfAborted();let o=ew(t,this.getTokenizerOptions());return this.fromTokenizer(o)}async fromStream(t){this.options.signal?.throwIfAborted();let o=this.createTokenizerFromWebStream(t);return this.fromTokenizer(o)}async toDetectionStream(t,o){let i=_1e(o?.sampleSize??pB),e,a,A=t.getReader({mode:"byob"});try{let{value:g,done:c}=await T1e(A,new Uint8Array(i),this.options.signal);if(a=g,!c&&g)try{e=await this.fromBuffer(g.subarray(0,i))}catch(I){if(!(I instanceof kA))throw I;e=void 0}a=g}finally{A.releaseLock()}let r=new TransformStream({async start(g){g.enqueue(a)},transform(g,c){c.enqueue(g)}}),s=t.pipeThrough(r);return s.fileType=e,s}async detectGzip(t){if(this.gzipProbeDepth>=c1e)return{ext:"gz",mime:"application/gzip"};let o=new cB(t),i=M1e(o.inflate(),g1e),e=ei(t),a,A,r,s;if(e){let g=new AbortController;a=setTimeout(()=>{g.abort(new DOMException(`Operation timed out after ${Yee} ms`,"TimeoutError"))},Yee),A=this.options.signal===void 0?g.signal:AbortSignal.any([this.options.signal,g.signal]),r=new n({...this.options,signal:A}),r.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{s=await(r??this).fromStream(i)}catch(g){if(g?.name==="AbortError"&&A?.reason?.name!=="TimeoutError")throw g}finally{clearTimeout(a),e||this.gzipProbeDepth--}return s?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(t,o){return Ds(this.buffer,t,o)}checkString(t,o){return this.check(vee(t,o?.encoding),o)}detectConfident=async t=>{if(this.buffer=new Uint8Array(pB),t.fileInfo.size===void 0&&(t.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=t,ei(t)&&(await t.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(t);if(await t.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await t.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=qee?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(t));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(t);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await Lc(t,6,{maximumLength:6,reason:"ID3 header prefix"});let o=await t.readToken(Gee),i=ei(t);if(!Number.isFinite(o)||o<0||i&&(o>LF||t.position+o>LF))return;if(t.position+o>t.fileInfo.size)return i?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await Lc(t,o,{maximumLength:i?LF:t.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof kA)return;throw e}return this.detectionReentryCount>=qee?void 0:(this.detectionReentryCount++,this.parseTokenizer(t,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let o,i=P1e();try{await new hl(t).unzip(e=>{G1e(i,e.filename);let a=e.filename==="[Content_Types].xml",A=$ee(i);if(!a&&A)return o=A,{stop:!0};switch(e.filename){case"META-INF/mozilla.rsa":return o={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return o={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return Xee(e,xee)?{async handler(r){let s=new TextDecoder("utf-8").decode(r).trim();o=Zee(s)},stop:!0}:{};case"[Content_Types].xml":return i.hasContentTypesEntry=!0,Xee(e,xee)?(i.isParsingContentTypes=!0,{async handler(r){let s=new TextDecoder("utf-8").decode(r),g=F1e(s);g&&(o=Zee(g)),i.hasParsedContentTypesEntry=!0,i.isParsingContentTypes=!1},stop:!0}):(i.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(e.filename)?(o={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(e){if(!v1e(e))throw e;i.isParsingContentTypes&&(i.isParsingContentTypes=!1,i.hasUnparseableContentTypes=!0)}return o??$ee(i)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await t.ignore(28);let o=new Uint8Array(8);return await t.readBuffer(o),Ds(o,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:Ds(o,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:Ds(o,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:Ds(o,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:Ds(o,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:Ds(o,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let o=await this.readTiffHeader(!1);if(o)return o}if(this.check([77,77])){let o=await this.readTiffHeader(!0);if(o)return o}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function o(){let s=await t.peekNumber(fA),g=128,c=0;for(;(s&g)===0&&g!==0;)++c,g>>=1;let I=new Uint8Array(c+1);return await UF(t,I,void 0,{maximumLength:I.length,reason:"EBML field"}),I}async function i(){let s=await o(),g=await o();g[0]^=128>>g.length-1;let c=Math.min(6,g.length),I=new DataView(s.buffer),d=new DataView(g.buffer,g.length-c,c);return{id:IB(I),len:IB(d)}}async function e(s){let g=0;for(;s>0;){if(g++,g>I1e||dB(t,A,Uo))return;let c=t.position,I=await i();if(I.id===17026){if(I.len>jee)return;let d=KF(I.len,jee,"EBML DocType");return(await t.readToken(new Ve(d))).replaceAll(/\00.*$/g,"")}if(ei(t)&&(!Number.isFinite(I.len)||I.len<0||I.len>Jee)||(await Lc(t,I.len,{maximumLength:ei(t)?Jee:t.fileInfo.size,reason:"EBML payload"}),--s,t.position<=c))return}}let a=await i(),A=t.position;switch(await e(a.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let o=xe.get(this.buffer,4),i=LA.get(this.buffer,6);if(o>0&&o<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(i>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("=1e3&&o<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!"))return await t.ignore(8),await t.readToken(new Ve(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[` +`,"\r"," "," ","\0"].some(o=>this.checkString(o,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let o={ext:"png",mime:"image/png"},i={ext:"apng",mime:"image/apng"};await t.ignore(8);async function e(){return{length:await t.readToken($a),type:await t.readToken(new Ve(4,"latin1"))}}let a=ei(t),A=t.position,r=0,s=!1;do{if(r++,r>l1e||dB(t,A,p1e))break;let g=t.position,c=await e();if(c.length<0)return;if(c.type==="IHDR"){if(c.length!==13)return;s=!0}switch(c.type){case"IDAT":return o;case"acTL":return i;default:if(!s&&c.type!=="CgBI")return;if(a&&c.length>zee)return s&&S1e(c.type)?o:void 0;try{await Lc(t,c.length+4,{maximumLength:a?zee+4:t.fileInfo.size,reason:"PNG chunk payload"})}catch(I){if(!a&&(I instanceof Og||I instanceof kA))return o;throw I}}if(t.position<=g)break}while(t.position+8d1e||dB(t,a,Uo)));){let r=t.position,s=await i(),g=s.size-24;if(!Number.isFinite(g)||g<0){o=!0;break}if(Ds(s.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let c=new Uint8Array(16);if(g-=await UF(t,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),Ds(c,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(Ds(c,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(e&&g>Vee){o=!0;break}if(await Lc(t,g,{maximumLength:e?Vee:t.fileInfo.size,reason:"ASF header payload"}),t.position<=r){o=!0;break}}}catch(i){if(i instanceof kA||i instanceof Og)ei(t)&&(o=!0);else throw i}return o?void 0:{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await t.ignore(20),await t.readToken(new Ve(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("=16){let o=new DataView(this.buffer.buffer).getUint32(12,!0);if(o>12&&this.buffer.length>=o+16)try{let i=new TextDecoder().decode(this.buffer.subarray(16,o+16));if(JSON.parse(i).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await t.peekBuffer(this.buffer,{length:Math.min(512,t.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&Pee(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let o="utf-16le";return this.checkString("{this.buffer=new Uint8Array(pB);let o=R1e(t.fileInfo.size);if(await t.peekBuffer(this.buffer,{length:Math.min(8,o),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await t.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,o),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let i=0;i<=this.options.mpegOffsetTolerance;++i){let e=this.scanMpeg(i);if(e)return e}};async readTiffTag(t){let o=await this.tokenizer.readToken(t?LA:SA);switch(await this.tokenizer.ignore(10),o){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(t){let o=await this.tokenizer.readToken(t?LA:SA);if(!(o>h1e)&&!(ei(this.tokenizer)&&2+o*12>Wee))for(let i=0;i=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(e>=8){let r=(t?LA:SA).get(this.buffer,8),s=(t?LA:SA).get(this.buffer,10);if(r===28&&s===254||r===31&&s===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(ei(this.tokenizer)&&e>E1e)return o;let a=ei(this.tokenizer)?Wee:this.tokenizer.fileInfo.size;try{await Lc(this.tokenizer,e,{maximumLength:a,reason:"TIFF IFD offset"})}catch(r){if(r instanceof kA)return;throw r}let A;try{A=await this.readTiffIFD(t)}catch(r){if(r instanceof kA)return;throw r}return A??o}if(i===43)return o}scanMpeg(t){if(this.check([255,224],{offset:t,mask:[255,224]})){if(this.check([16],{offset:t+1,mask:[22]}))return this.check([8],{offset:t+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:t+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:t+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:t+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},L1e=new Set(Lee),U1e=new Set(Uee)});var xF=ue(()=>{Fo();AAe()});var sAe=$(cw=>{"use strict";Object.defineProperty(cw,"__esModule",{value:!0});cw.format=Y1e;cw.parse=j1e;var H1e=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,rAe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,K1e=/[\\"]/g,x1e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,aAe=(()=>{let n=function(){};return n.prototype=Object.create(null),n})();function Y1e(n){let{type:t,parameters:o}=n;if(!t||!x1e.test(t))throw new TypeError(`Invalid type: ${t}`);let i=t;if(o)for(let e of Object.keys(o)){if(!rAe.test(e))throw new TypeError(`Invalid parameter name: ${e}`);i+=`; ${e}=${W1e(o[e])}`}return i}function j1e(n,t){let o=t?.comma===!0?z1e:65536,i=n.length,e=jF(n,t?.start??0,i),a=e;e=YF(n,e,i,o);let A=JF(n,a,e),r=n.slice(a,A).toLowerCase();return t?.parameters===!1?{type:r,index:e,parameters:new aAe}:V1e(n,r,e,i,o)}var iAe=32,oAe=9,nAe=59,J1e=61,tAe=34,q1e=92,z1e=44;function V1e(n,t,o,i,e){let a=new aAe;e:for(;ot;){let i=n.charCodeAt(o-1);if(i!==iAe&&i!==oAe)break;o--}return o}function W1e(n){if(rAe.test(n))return n;if(H1e.test(n))return`"${n.replace(K1e,"\\$&")}"`;throw new TypeError(`Invalid parameter value: ${n}`)}});function gAe(n){if(!Z1e.test(n))throw new TypeError(`Invalid media type: ${n}`);let t=n.indexOf("/"),o=n.slice(0,t).toLowerCase(),i=n.slice(t+1).toLowerCase(),e,a=i.lastIndexOf("+");return a!==-1&&(e=i.slice(a+1),i=i.slice(0,a)),{type:o,subtype:i,suffix:e}}var Z1e,cAe=ue(()=>{Z1e=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/});var IAe,sa,qF,zF=ue(()=>{IAe={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},sa={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},qF={[sa.video]:"video",[sa.audio]:"audio",[sa.complex]:"complex",[sa.logo]:"logo",[sa.subtitle]:"subtitle",[sa.button]:"button",[sa.control]:"control"}});var Ah,Uc,Hc,VF,Ho,El,Qt,Xt=ue(()=>{Ah=n=>class extends Error{constructor(o){super(o),this.name=n}},Uc=class extends Ah("CouldNotDetermineFileTypeError"){},Hc=class extends Ah("UnsupportedFileTypeError"){},VF=class extends Ah("UnexpectedFileContentError"){constructor(t,o){super(o),this.fileType=t}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}},Ho=class extends Ah("FieldDecodingError"){},El=class extends Ah("InternalParserError"){},Qt=n=>class extends VF{constructor(t){super(n,t)}}});function GA(n,t,o){return(n[t]&1<>a;let r=8-a,s=i-r;return s<0?A>>=8-a-i:s>0&&(A<<=s,A|=ZA(n,t,o+r,s)),A}function ma(n,t,o){return ZA(n,t,o,1)===1}function pAe(n){let t=[];for(let o=0,i=n.length;oo.trim().toLowerCase());if(t.length>=1){let o=Number.parseFloat(t[0]);return t.length===2&&t[1]==="db"?{dB:o,ratio:$1e(o)}:{dB:X1e(o),ratio:o}}}function WF(n){if(n.length===0)throw new Error("decodeUintBE: empty Uint8Array");let t=new DataView(n.buffer,n.byteOffset,n.byteLength);return IB(t)}var $t=ue(()=>{wA();Xt();lB()});var th,rh,ah,ZF,EB,XF,ih,lw,$F,Kc=ue(()=>{wA();$t();th={0:"Other",1:"32x32 pixels 'file icon' (PNG only)",2:"Other file icon",3:"Cover (front)",4:"Cover (back)",5:"Leaflet page",6:"Media (e.g. label side of CD)",7:"Lead artist/lead performer/soloist",8:"Artist/performer",9:"Conductor",10:"Band/Orchestra",11:"Composer",12:"Lyricist/text writer",13:"Recording Location",14:"During recording",15:"During performance",16:"Movie/video screen capture",17:"A bright coloured fish",18:"Illustration",19:"Band/artist logotype",20:"Publisher/Studio logotype"},rh={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},ah={notSynchronized:0,mpegFrameNumber:1,milliseconds:2},ZF={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4},EB={len:10,get:(n,t)=>({fileIdentifier:new Ve(3,"ascii").get(n,t),version:{major:ys.get(n,t+3),revision:ys.get(n,t+4)},flags:{unsynchronisation:GA(n,t+5,7),isExtendedHeader:GA(n,t+5,6),expIndicator:GA(n,t+5,5),footer:GA(n,t+5,4)},size:ZF.get(n,t+6)})},XF={len:10,get:(n,t)=>({size:xe.get(n,t),extendedFlags:LA.get(n,t+4),sizeOfPadding:xe.get(n,t+6),crcDataPresent:GA(n,t+4,31)})},ih={len:1,get:(n,t)=>{switch(n[t]){case 0:return{encoding:"latin1"};case 1:return{encoding:"utf-16le",bom:!0};case 2:return{encoding:"utf-16be",bom:!1};case 3:return{encoding:"utf8",bom:!1};default:return{encoding:"utf8",bom:!1}}}},lw={len:4,get:(n,t)=>({encoding:ih.get(n,t),language:new Ve(3,"latin1").get(n,t+1)})},$F={len:6,get:(n,t)=>{let o=lw.get(n,t);return{encoding:o.encoding,language:o.language,timeStampFormat:fA.get(n,t+4),contentType:fA.get(n,t+5)}}}});var Cl=ue(()=>{zF();Kc()});function hAe(n){return pw[n]&&!pw[n].multiple}function EAe(n){return!pw[n].multiple||pw[n].unique||!1}var eA,pw,CAe=ue(()=>{eA={multiple:!1},pw={year:eA,track:eA,disk:eA,title:eA,artist:eA,artists:{multiple:!0,unique:!0},albumartist:eA,albumartists:{multiple:!0,unique:!0},album:eA,date:eA,originaldate:eA,originalyear:eA,releasedate:eA,comment:{multiple:!0,unique:!1},genre:{multiple:!0,unique:!0},picture:{multiple:!0,unique:!0},composer:{multiple:!0,unique:!0},lyrics:{multiple:!0,unique:!1},albumsort:{multiple:!1,unique:!0},titlesort:{multiple:!1,unique:!0},work:{multiple:!1,unique:!0},artistsort:{multiple:!1,unique:!0},albumartistsort:{multiple:!1,unique:!0},composersort:{multiple:!1,unique:!0},lyricist:{multiple:!0,unique:!0},writer:{multiple:!0,unique:!0},conductor:{multiple:!0,unique:!0},remixer:{multiple:!0,unique:!0},arranger:{multiple:!0,unique:!0},engineer:{multiple:!0,unique:!0},producer:{multiple:!0,unique:!0},technician:{multiple:!0,unique:!0},djmixer:{multiple:!0,unique:!0},mixer:{multiple:!0,unique:!0},label:{multiple:!0,unique:!0},grouping:eA,subtitle:{multiple:!0},discsubtitle:eA,totaltracks:eA,totaldiscs:eA,compilation:eA,rating:{multiple:!0},bpm:eA,mood:eA,media:eA,catalognumber:{multiple:!0,unique:!0},tvShow:eA,tvShowSort:eA,tvSeason:eA,tvEpisode:eA,tvEpisodeId:eA,tvNetwork:eA,podcast:eA,podcasturl:eA,releasestatus:eA,releasetype:{multiple:!0},releasecountry:eA,script:eA,language:eA,copyright:eA,license:eA,encodedby:eA,encodersettings:eA,gapless:eA,barcode:eA,isrc:{multiple:!0},asin:eA,musicbrainz_recordingid:eA,musicbrainz_trackid:eA,musicbrainz_albumid:eA,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:eA,musicbrainz_workid:eA,musicbrainz_trmid:eA,musicbrainz_discid:eA,acoustid_id:eA,acoustid_fingerprint:eA,musicip_puid:eA,musicip_fingerprint:eA,website:eA,"performer:instrument":{multiple:!0,unique:!0},averageLevel:eA,peakLevel:eA,notes:{multiple:!0,unique:!1},key:eA,originalalbum:eA,originalartist:eA,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:eA,discogs_label_id:eA,discogs_master_release_id:eA,discogs_votes:eA,discogs_rating:eA,replaygain_track_peak:eA,replaygain_track_gain:eA,replaygain_album_peak:eA,replaygain_album_gain:eA,replaygain_track_minmax:eA,replaygain_album_minmax:eA,replaygain_undo:eA,description:{multiple:!0},longDescription:eA,category:{multiple:!0},hdVideo:eA,keywords:{multiple:!0},movement:eA,movementIndex:eA,movementTotal:eA,podcastId:eA,showMovement:eA,stik:eA,playCounter:eA}});var cr,bg=ue(()=>{cr=class{static toIntOrNull(t){let o=Number.parseInt(t,10);return Number.isNaN(o)?null:o}static normalizeTrack(t){let o=t.toString().split("/");return{no:Number.parseInt(o[0],10)||null,of:Number.parseInt(o[1],10)||null}}constructor(t,o){this.tagTypes=t,this.tagMap=o}mapGenericTag(t,o){t={id:t.id,value:t.value},this.postMap(t,o);let i=this.getCommonName(t.id);return i?{id:i,value:t.value}:null}getCommonName(t){return this.tagMap[t]}postMap(t,o){}};cr.maxRatingScore=1});var e3e,dw,uAe=ue(()=>{bg();e3e={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"},dw=class extends cr{constructor(){super(["ID3v1"],e3e)}}});var xo,oh=ue(()=>{bg();xo=class extends cr{constructor(t,o){let i={};for(let e of Object.keys(o))i[e.toUpperCase()]=o[e];super(t,i)}getCommonName(t){return this.tagMap[t.toUpperCase()]}}});var A3e,hw,BAe=ue(()=>{wA();bg();oh();$t();A3e={TIT2:"title",TPE1:"artist","TXXX:Artists":"artists",TPE2:"albumartist",TALB:"album",TDRV:"date",TORY:"originalyear",TPOS:"disk",TCON:"genre",APIC:"picture",TCOM:"composer",USLT:"lyrics",TSOA:"albumsort",TSOT:"titlesort",TOAL:"originalalbum",TSOP:"artistsort",TSO2:"albumartistsort",TSOC:"composersort",TEXT:"lyricist","TXXX:Writer":"writer",TPE3:"conductor",TPE4:"remixer","IPLS:arranger":"arranger","IPLS:engineer":"engineer","IPLS:producer":"producer","IPLS:DJ-mix":"djmixer","IPLS:mix":"mixer",TPUB:"label",TIT1:"grouping",TIT3:"subtitle",TRCK:"track",TCMP:"compilation",POPM:"rating",TBPM:"bpm",TMED:"media","TXXX:CATALOGNUMBER":"catalognumber","TXXX:MusicBrainz Album Status":"releasestatus","TXXX:MusicBrainz Album Type":"releasetype","TXXX:MusicBrainz Album Release Country":"releasecountry","TXXX:RELEASECOUNTRY":"releasecountry","TXXX:SCRIPT":"script",TLAN:"language",TCOP:"copyright",WCOP:"license",TENC:"encodedby",TSSE:"encodersettings","TXXX:BARCODE":"barcode","TXXX:ISRC":"isrc",TSRC:"isrc","TXXX:ASIN":"asin","TXXX:originalyear":"originalyear","UFID:http://musicbrainz.org":"musicbrainz_recordingid","TXXX:MusicBrainz Release Track Id":"musicbrainz_trackid","TXXX:MusicBrainz Album Id":"musicbrainz_albumid","TXXX:MusicBrainz Artist Id":"musicbrainz_artistid","TXXX:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","TXXX:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","TXXX:MusicBrainz Work Id":"musicbrainz_workid","TXXX:MusicBrainz TRM Id":"musicbrainz_trmid","TXXX:MusicBrainz Disc Id":"musicbrainz_discid","TXXX:ACOUSTID_ID":"acoustid_id","TXXX:Acoustid Id":"acoustid_id","TXXX:Acoustid Fingerprint":"acoustid_fingerprint","TXXX:MusicIP PUID":"musicip_puid","TXXX:MusicMagic Fingerprint":"musicip_fingerprint",WOAR:"website",TDRC:"date",TYER:"year",TDOR:"originaldate","TIPL:arranger":"arranger","TIPL:engineer":"engineer","TIPL:producer":"producer","TIPL:DJ-mix":"djmixer","TIPL:mix":"mixer",TMOO:"mood",SYLT:"lyrics",TSST:"discsubtitle",TKEY:"key",COMM:"comment",TOPE:"originalartist","PRIV:AverageLevel":"averageLevel","PRIV:PeakLevel":"peakLevel","TXXX:DISCOGS_ARTIST_ID":"discogs_artist_id","TXXX:DISCOGS_ARTISTS":"artists","TXXX:DISCOGS_ARTIST_NAME":"artists","TXXX:DISCOGS_ALBUM_ARTISTS":"albumartist","TXXX:DISCOGS_CATALOG":"catalognumber","TXXX:DISCOGS_COUNTRY":"releasecountry","TXXX:DISCOGS_DATE":"originaldate","TXXX:DISCOGS_LABEL":"label","TXXX:DISCOGS_LABEL_ID":"discogs_label_id","TXXX:DISCOGS_MASTER_RELEASE_ID":"discogs_master_release_id","TXXX:DISCOGS_RATING":"discogs_rating","TXXX:DISCOGS_RELEASED":"date","TXXX:DISCOGS_RELEASE_ID":"discogs_release_id","TXXX:DISCOGS_VOTES":"discogs_votes","TXXX:CATALOGID":"catalognumber","TXXX:STYLE":"genre","TXXX:REPLAYGAIN_TRACK_PEAK":"replaygain_track_peak","TXXX:REPLAYGAIN_TRACK_GAIN":"replaygain_track_gain","TXXX:REPLAYGAIN_ALBUM_PEAK":"replaygain_album_peak","TXXX:REPLAYGAIN_ALBUM_GAIN":"replaygain_album_gain","TXXX:MP3GAIN_MINMAX":"replaygain_track_minmax","TXXX:MP3GAIN_ALBUM_MINMAX":"replaygain_album_minmax","TXXX:MP3GAIN_UNDO":"replaygain_undo",MVNM:"movement",MVIN:"movementIndex",PCST:"podcast",TCAT:"category",TDES:"description",TDRL:"releasedate",TGID:"podcastId",TKWD:"keywords",WFED:"podcasturl",GRP1:"grouping",PCNT:"playCounter"},hw=class n extends xo{static toRating(t){return{source:t.email,rating:t.rating>0?(t.rating-1)/254*cr.maxRatingScore:void 0}}constructor(){super(["ID3v2.3","ID3v2.4"],A3e)}postMap(t,o){switch(t.id){case"UFID":{let i=t.value;i.owner_identifier==="http://musicbrainz.org"&&(t.id+=`:${i.owner_identifier}`,t.value=ga(i.identifier,"latin1"))}break;case"PRIV":{let i=t.value;switch(i.owner_identifier){case"AverageLevel":case"PeakValue":t.id+=`:${i.owner_identifier}`,t.value=i.data.length===4?Fe.get(i.data,0):null,t.value===null&&o.addWarning("Failed to parse PRIV:PeakValue");break;default:o.addWarning(`Unknown PRIV owner-identifier: ${i.data}`)}}break;case"POPM":t.value=n.toRating(t.value);break;default:break}}}});var t3e,Ew,fAe=ue(()=>{bg();t3e={Title:"title",Author:"artist","WM/AlbumArtist":"albumartist","WM/AlbumTitle":"album","WM/Year":"date","WM/OriginalReleaseTime":"originaldate","WM/OriginalReleaseYear":"originalyear",Description:"comment","WM/TrackNumber":"track","WM/PartOfSet":"disk","WM/Genre":"genre","WM/Composer":"composer","WM/Lyrics":"lyrics","WM/AlbumSortOrder":"albumsort","WM/TitleSortOrder":"titlesort","WM/ArtistSortOrder":"artistsort","WM/AlbumArtistSortOrder":"albumartistsort","WM/ComposerSortOrder":"composersort","WM/Writer":"lyricist","WM/Conductor":"conductor","WM/ModifiedBy":"remixer","WM/Engineer":"engineer","WM/Producer":"producer","WM/DJMixer":"djmixer","WM/Mixer":"mixer","WM/Publisher":"label","WM/ContentGroupDescription":"grouping","WM/SubTitle":"subtitle","WM/SetSubTitle":"discsubtitle","WM/IsCompilation":"compilation","WM/SharedUserRating":"rating","WM/BeatsPerMinute":"bpm","WM/Mood":"mood","WM/Media":"media","WM/CatalogNo":"catalognumber","MusicBrainz/Album Status":"releasestatus","MusicBrainz/Album Type":"releasetype","MusicBrainz/Album Release Country":"releasecountry","WM/Script":"script","WM/Language":"language",Copyright:"copyright",LICENSE:"license","WM/EncodedBy":"encodedby","WM/EncodingSettings":"encodersettings","WM/Barcode":"barcode","WM/ISRC":"isrc","MusicBrainz/Track Id":"musicbrainz_recordingid","MusicBrainz/Release Track Id":"musicbrainz_trackid","MusicBrainz/Album Id":"musicbrainz_albumid","MusicBrainz/Artist Id":"musicbrainz_artistid","MusicBrainz/Album Artist Id":"musicbrainz_albumartistid","MusicBrainz/Release Group Id":"musicbrainz_releasegroupid","MusicBrainz/Work Id":"musicbrainz_workid","MusicBrainz/TRM Id":"musicbrainz_trmid","MusicBrainz/Disc Id":"musicbrainz_discid","Acoustid/Id":"acoustid_id","Acoustid/Fingerprint":"acoustid_fingerprint","MusicIP/PUID":"musicip_puid","WM/ARTISTS":"artists","WM/InitialKey":"key",ASIN:"asin","WM/Work":"work","WM/AuthorURL":"website","WM/Picture":"picture"},Ew=class n extends cr{static toRating(t){return{rating:Number.parseFloat(t+1)/5}}constructor(){super(["asf"],t3e)}postMap(t){switch(t.id){case"WM/SharedUserRating":{let o=t.id.split(":");t.value=n.toRating(t.value),t.id=o[0];break}}}}});var r3e,Cw,QAe=ue(()=>{oh();r3e={TT2:"title",TP1:"artist",TP2:"albumartist",TAL:"album",TYE:"year",COM:"comment",TRK:"track",TPA:"disk",TCO:"genre",PIC:"picture",TCM:"composer",TOR:"originaldate",TOT:"originalalbum",TXT:"lyricist",TP3:"conductor",TPB:"label",TT1:"grouping",TT3:"subtitle",TLA:"language",TCR:"copyright",WCP:"license",TEN:"encodedby",TSS:"encodersettings",WAR:"website",PCS:"podcast",TCP:"compilation",TDR:"date",TS2:"albumartistsort",TSA:"albumsort",TSC:"composersort",TSP:"artistsort",TST:"titlesort",WFD:"podcasturl",TBP:"bpm",GP1:"grouping"},Cw=class extends xo{constructor(){super(["ID3v2.2"],r3e)}}});var a3e,uw,yAe=ue(()=>{oh();a3e={Title:"title",Artist:"artist",Artists:"artists","Album Artist":"albumartist",Album:"album",Year:"date",Originalyear:"originalyear",Originaldate:"originaldate",Releasedate:"releasedate",Comment:"comment",Track:"track",Disc:"disk",DISCNUMBER:"disk",Genre:"genre","Cover Art (Front)":"picture","Cover Art (Back)":"picture",Composer:"composer",Lyrics:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",Lyricist:"lyricist",Writer:"writer",Conductor:"conductor",MixArtist:"remixer",Arranger:"arranger",Engineer:"engineer",Producer:"producer",DJMixer:"djmixer",Mixer:"mixer",Label:"label",Grouping:"grouping",Subtitle:"subtitle",DiscSubtitle:"discsubtitle",Compilation:"compilation",BPM:"bpm",Mood:"mood",Media:"media",CatalogNumber:"catalognumber",MUSICBRAINZ_ALBUMSTATUS:"releasestatus",MUSICBRAINZ_ALBUMTYPE:"releasetype",RELEASECOUNTRY:"releasecountry",Script:"script",Language:"language",Copyright:"copyright",LICENSE:"license",EncodedBy:"encodedby",EncoderSettings:"encodersettings",Barcode:"barcode",ISRC:"isrc",ASIN:"asin",musicbrainz_trackid:"musicbrainz_recordingid",musicbrainz_releasetrackid:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",Acoustid_Id:"acoustid_id",ACOUSTID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",Weblink:"website",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",MP3GAIN_MINMAX:"replaygain_track_minmax",MP3GAIN_UNDO:"replaygain_undo"},uw=class extends xo{constructor(){super(["APEv2"],a3e)}}});var i3e,o3e,CB,mAe=ue(()=>{oh();i3e={"\xA9nam":"title","\xA9ART":"artist",aART:"albumartist","----:com.apple.iTunes:Band":"albumartist","\xA9alb":"album","\xA9day":"date","\xA9cmt":"comment","\xA9com":"comment",trkn:"track",disk:"disk","\xA9gen":"genre",covr:"picture","\xA9wrt":"composer","\xA9lyr":"lyrics",soal:"albumsort",sonm:"titlesort",soar:"artistsort",soaa:"albumartistsort",soco:"composersort","----:com.apple.iTunes:LYRICIST":"lyricist","----:com.apple.iTunes:CONDUCTOR":"conductor","----:com.apple.iTunes:REMIXER":"remixer","----:com.apple.iTunes:ENGINEER":"engineer","----:com.apple.iTunes:PRODUCER":"producer","----:com.apple.iTunes:DJMIXER":"djmixer","----:com.apple.iTunes:MIXER":"mixer","----:com.apple.iTunes:LABEL":"label","\xA9grp":"grouping","----:com.apple.iTunes:SUBTITLE":"subtitle","----:com.apple.iTunes:DISCSUBTITLE":"discsubtitle",cpil:"compilation",tmpo:"bpm","----:com.apple.iTunes:MOOD":"mood","----:com.apple.iTunes:MEDIA":"media","----:com.apple.iTunes:CATALOGNUMBER":"catalognumber",tvsh:"tvShow",tvsn:"tvSeason",tves:"tvEpisode",sosn:"tvShowSort",tven:"tvEpisodeId",tvnn:"tvNetwork",pcst:"podcast",purl:"podcasturl","----:com.apple.iTunes:MusicBrainz Album Status":"releasestatus","----:com.apple.iTunes:MusicBrainz Album Type":"releasetype","----:com.apple.iTunes:MusicBrainz Album Release Country":"releasecountry","----:com.apple.iTunes:SCRIPT":"script","----:com.apple.iTunes:LANGUAGE":"language",cprt:"copyright","\xA9cpy":"copyright","----:com.apple.iTunes:LICENSE":"license","\xA9too":"encodedby",pgap:"gapless","----:com.apple.iTunes:BARCODE":"barcode","----:com.apple.iTunes:ISRC":"isrc","----:com.apple.iTunes:ASIN":"asin","----:com.apple.iTunes:NOTES":"comment","----:com.apple.iTunes:MusicBrainz Track Id":"musicbrainz_recordingid","----:com.apple.iTunes:MusicBrainz Release Track Id":"musicbrainz_trackid","----:com.apple.iTunes:MusicBrainz Album Id":"musicbrainz_albumid","----:com.apple.iTunes:MusicBrainz Artist Id":"musicbrainz_artistid","----:com.apple.iTunes:MusicBrainz Album Artist Id":"musicbrainz_albumartistid","----:com.apple.iTunes:MusicBrainz Release Group Id":"musicbrainz_releasegroupid","----:com.apple.iTunes:MusicBrainz Work Id":"musicbrainz_workid","----:com.apple.iTunes:MusicBrainz TRM Id":"musicbrainz_trmid","----:com.apple.iTunes:MusicBrainz Disc Id":"musicbrainz_discid","----:com.apple.iTunes:Acoustid Id":"acoustid_id","----:com.apple.iTunes:Acoustid Fingerprint":"acoustid_fingerprint","----:com.apple.iTunes:MusicIP PUID":"musicip_puid","----:com.apple.iTunes:fingerprint":"musicip_fingerprint","----:com.apple.iTunes:replaygain_track_gain":"replaygain_track_gain","----:com.apple.iTunes:replaygain_track_peak":"replaygain_track_peak","----:com.apple.iTunes:replaygain_album_gain":"replaygain_album_gain","----:com.apple.iTunes:replaygain_album_peak":"replaygain_album_peak","----:com.apple.iTunes:replaygain_track_minmax":"replaygain_track_minmax","----:com.apple.iTunes:replaygain_album_minmax":"replaygain_album_minmax","----:com.apple.iTunes:replaygain_undo":"replaygain_undo",gnre:"genre","----:com.apple.iTunes:ALBUMARTISTSORT":"albumartistsort","----:com.apple.iTunes:ARTISTS":"artists","----:com.apple.iTunes:ORIGINALDATE":"originaldate","----:com.apple.iTunes:ORIGINALYEAR":"originalyear","----:com.apple.iTunes:RELEASEDATE":"releasedate",desc:"description",ldes:"longDescription","\xA9mvn":"movement","\xA9mvi":"movementIndex","\xA9mvc":"movementTotal","\xA9wrk":"work",catg:"category",egid:"podcastId",hdvd:"hdVideo",keyw:"keywords",shwm:"showMovement",stik:"stik",rate:"rating"},o3e="iTunes",CB=class extends xo{constructor(){super([o3e],i3e)}postMap(t,o){switch(t.id){case"rate":t.value={source:void 0,rating:Number.parseFloat(t.value)/100};break}}}});var n3e,Bw,SAe=ue(()=>{bg();n3e={TITLE:"title",ARTIST:"artist",ARTISTS:"artists",ALBUMARTIST:"albumartist","ALBUM ARTIST":"albumartist",ALBUM:"album",DATE:"date",ORIGINALDATE:"originaldate",ORIGINALYEAR:"originalyear",RELEASEDATE:"releasedate",COMMENT:"comment",TRACKNUMBER:"track",DISCNUMBER:"disk",GENRE:"genre",METADATA_BLOCK_PICTURE:"picture",COMPOSER:"composer",LYRICS:"lyrics",ALBUMSORT:"albumsort",TITLESORT:"titlesort",WORK:"work",ARTISTSORT:"artistsort",ALBUMARTISTSORT:"albumartistsort",COMPOSERSORT:"composersort",LYRICIST:"lyricist",WRITER:"writer",CONDUCTOR:"conductor",REMIXER:"remixer",ARRANGER:"arranger",ENGINEER:"engineer",PRODUCER:"producer",DJMIXER:"djmixer",MIXER:"mixer",LABEL:"label",GROUPING:"grouping",SUBTITLE:"subtitle",DISCSUBTITLE:"discsubtitle",TRACKTOTAL:"totaltracks",DISCTOTAL:"totaldiscs",COMPILATION:"compilation",RATING:"rating",BPM:"bpm",KEY:"key",MOOD:"mood",MEDIA:"media",CATALOGNUMBER:"catalognumber",RELEASESTATUS:"releasestatus",RELEASETYPE:"releasetype",RELEASECOUNTRY:"releasecountry",SCRIPT:"script",LANGUAGE:"language",COPYRIGHT:"copyright",LICENSE:"license",ENCODEDBY:"encodedby",ENCODERSETTINGS:"encodersettings",BARCODE:"barcode",ISRC:"isrc",ASIN:"asin",MUSICBRAINZ_TRACKID:"musicbrainz_recordingid",MUSICBRAINZ_RELEASETRACKID:"musicbrainz_trackid",MUSICBRAINZ_ALBUMID:"musicbrainz_albumid",MUSICBRAINZ_ARTISTID:"musicbrainz_artistid",MUSICBRAINZ_ALBUMARTISTID:"musicbrainz_albumartistid",MUSICBRAINZ_RELEASEGROUPID:"musicbrainz_releasegroupid",MUSICBRAINZ_WORKID:"musicbrainz_workid",MUSICBRAINZ_TRMID:"musicbrainz_trmid",MUSICBRAINZ_DISCID:"musicbrainz_discid",ACOUSTID_ID:"acoustid_id",ACOUSTID_ID_FINGERPRINT:"acoustid_fingerprint",MUSICIP_PUID:"musicip_puid",WEBSITE:"website",NOTES:"notes",TOTALTRACKS:"totaltracks",TOTALDISCS:"totaldiscs",DISCOGS_ARTIST_ID:"discogs_artist_id",DISCOGS_ARTISTS:"artists",DISCOGS_ARTIST_NAME:"artists",DISCOGS_ALBUM_ARTISTS:"albumartist",DISCOGS_CATALOG:"catalognumber",DISCOGS_COUNTRY:"releasecountry",DISCOGS_DATE:"originaldate",DISCOGS_LABEL:"label",DISCOGS_LABEL_ID:"discogs_label_id",DISCOGS_MASTER_RELEASE_ID:"discogs_master_release_id",DISCOGS_RATING:"discogs_rating",DISCOGS_RELEASED:"date",DISCOGS_RELEASE_ID:"discogs_release_id",DISCOGS_VOTES:"discogs_votes",CATALOGID:"catalognumber",STYLE:"genre",REPLAYGAIN_TRACK_GAIN:"replaygain_track_gain",REPLAYGAIN_TRACK_PEAK:"replaygain_track_peak",REPLAYGAIN_ALBUM_GAIN:"replaygain_album_gain",REPLAYGAIN_ALBUM_PEAK:"replaygain_album_peak",REPLAYGAIN_MINMAX:"replaygain_track_minmax",REPLAYGAIN_ALBUM_MINMAX:"replaygain_album_minmax",REPLAYGAIN_UNDO:"replaygain_undo"},Bw=class n extends cr{static toRating(t,o,i){return{source:t?t.toLowerCase():void 0,rating:Number.parseFloat(o)/i*cr.maxRatingScore}}constructor(){super(["vorbis"],n3e)}postMap(t){if(t.id==="RATING")t.value=n.toRating(void 0,t.value,100);else if(t.id.indexOf("RATING:")===0){let o=t.id.split(":");t.value=n.toRating(o[1],t.value,1),t.id=o[0]}}}});var s3e,fw,DAe=ue(()=>{bg();s3e={IART:"artist",ICRD:"date",INAM:"title",TITL:"title",IPRD:"album",ITRK:"track",IPRT:"track",COMM:"comment",ICMT:"comment",ICNT:"releasecountry",GNRE:"genre",IWRI:"writer",RATE:"rating",YEAR:"year",ISFT:"encodedby",CODE:"encodedby",TURL:"website",IGNR:"genre",IENG:"engineer",ITCH:"technician",IMED:"media",IRPD:"album"},fw=class extends cr{constructor(){super(["exif"],s3e)}}});var g3e,Qw,wAe=ue(()=>{oh();g3e={"segment:title":"title","album:ARTIST":"albumartist","album:ARTISTSORT":"albumartistsort","album:TITLE":"album","album:DATE_RECORDED":"originaldate","album:DATE_RELEASED":"releasedate","album:PART_NUMBER":"disk","album:TOTAL_PARTS":"totaltracks","track:ARTIST":"artist","track:ARTISTSORT":"artistsort","track:TITLE":"title","track:PART_NUMBER":"track","track:MUSICBRAINZ_TRACKID":"musicbrainz_recordingid","track:MUSICBRAINZ_ALBUMID":"musicbrainz_albumid","track:MUSICBRAINZ_ARTISTID":"musicbrainz_artistid","track:PUBLISHER":"label","track:GENRE":"genre","track:ENCODER":"encodedby","track:ENCODER_OPTIONS":"encodersettings","edition:TOTAL_PARTS":"totaldiscs",picture:"picture"},Qw=class extends xo{constructor(){super(["matroska"],g3e)}}});var c3e,yw,OAe=ue(()=>{bg();c3e={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"},yw=class extends cr{constructor(){super(["AIFF"],c3e)}}});var mw,bAe=ue(()=>{uAe();BAe();fAe();QAe();yAe();mAe();SAe();DAe();wAe();OAe();Xt();mw=class{constructor(){this.tagMappers={},[new dw,new Cw,new hw,new CB,new CB,new Bw,new uw,new Ew,new fw,new Qw,new yw].forEach(t=>{this.registerTagMapper(t)})}mapTag(t,o,i){if(this.tagMappers[t])return this.tagMappers[t].mapGenericTag(o,i);throw new El(`No generic tag mapper defined for tag-format: ${t}`)}registerTagMapper(t){for(let o of t.tagTypes)this.tagMappers[o]=t}}});function MAe(n){return eL.test(n)?l3e(n):I3e(n)}function I3e(n){return{contentType:rh.lyrics,timeStampFormat:ah.notSynchronized,text:n.trim(),syncText:[]}}function l3e(n){let t=n.split(` +`),o=[];for(let i of t){let e=i.match(eL);if(e){let a=Number.parseInt(e[1],10),A=Number.parseInt(e[2],10),r=e[3].length===3?Number.parseInt(e[3],10):Number.parseInt(e[3],10)*10,s=(a*60+A)*1e3+r,g=i.replace(eL,"").trim();o.push({timestamp:s,text:g})}}return{contentType:rh.lyrics,timeStampFormat:ah.milliseconds,text:o.map(i=>i.text).join(` +`),syncText:o}}var eL,_Ae=ue(()=>{Cl();eL=/\[(\d{2}):(\d{2})\.(\d{2,3})]/});function d3e(n){return n.length>2?`${n.slice(0,n.length-1).join(", ")} & ${n[n.length-1]}`:n.join(" & ")}var TAe,ul,p3e,Sw,NAe=ue(()=>{Cl();TAe=qe(ct(),1);CAe();bAe();bg();$t();xF();_Ae();ul=(0,TAe.default)("music-metadata:collector"),p3e=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"],Sw=class{constructor(t){this.format={tagTypes:[],trackInfo:[]},this.native={},this.common={track:{no:null,of:null},disk:{no:null,of:null},movementIndex:{no:null,of:null}},this.quality={warnings:[]},this.commonOrigin={},this.originPriority={},this.tagMapper=new mw,this.opts=t;let o=1;for(let i of p3e)this.originPriority[i]=o++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(t){ul(`streamInfo: type=${t.type?qF[t.type]:"?"}, codec=${t.codecName}`),this.format.trackInfo.push(t)}setFormat(t,o){ul(`format: ${t} = ${o}`),this.format[t]=o,this.opts?.observer&&this.opts.observer({metadata:this,tag:{type:"format",id:t,value:o}})}setAudioOnly(){this.setFormat("hasAudio",!0),this.setFormat("hasVideo",!1)}async addTag(t,o,i){ul(`tag ${t}.${o} = ${i}`),this.native[t]||(this.format.tagTypes.push(t),this.native[t]=[]),this.native[t].push({id:o,value:i}),await this.toCommon(t,o,i)}addWarning(t){this.quality.warnings.push({message:t})}async postMap(t,o){switch(o.id){case"artist":return this.handleSingularArtistTag(t,o,"artist","artists");case"albumartist":return this.handleSingularArtistTag(t,o,"albumartist","albumartists");case"artists":return this.handlePluralArtistTag(t,o,"artist","artists");case"albumartists":return this.handlePluralArtistTag(t,o,"albumartist","albumartists");case"picture":return this.postFixPicture(o.value).then(i=>{i!==null&&(o.value=i,this.setGenericTag(t,o))});case"totaltracks":this.common.track.of=cr.toIntOrNull(o.value);return;case"totaldiscs":this.common.disk.of=cr.toIntOrNull(o.value);return;case"movementTotal":this.common.movementIndex.of=cr.toIntOrNull(o.value);return;case"track":case"disk":case"movementIndex":{let i=this.common[o.id].of;this.common[o.id]=cr.normalizeTrack(o.value),this.common[o.id].of=i??this.common[o.id].of;return}case"bpm":case"year":case"originalyear":o.value=Number.parseInt(o.value,10);break;case"date":{let i=Number.parseInt(o.value.substr(0,4),10);Number.isNaN(i)||(this.common.year=i);break}case"discogs_label_id":case"discogs_release_id":case"discogs_master_release_id":case"discogs_artist_id":case"discogs_votes":o.value=typeof o.value=="string"?Number.parseInt(o.value,10):o.value;break;case"replaygain_track_gain":case"replaygain_track_peak":case"replaygain_album_gain":case"replaygain_album_peak":o.value=dAe(o.value);break;case"replaygain_track_minmax":o.value=o.value.split(",").map(i=>Number.parseInt(i,10));break;case"replaygain_undo":{let i=o.value.split(",").map(e=>Number.parseInt(e,10));o.value={leftChannel:i[0],rightChannel:i[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":o.value=o.value==="1"||o.value===1;break;case"isrc":{let i=this.common[o.id];if(i&&i.indexOf(o.value)!==-1)return;break}case"comment":typeof o.value=="string"&&(o.value={text:o.value}),o.value.descriptor==="iTunPGAP"&&this.setGenericTag(t,{id:"gapless",value:o.value.text==="1"});break;case"lyrics":typeof o.value=="string"&&(o.value=MAe(o.value));break;default:}o.value!==null&&this.setGenericTag(t,o)}toCommonMetadata(){return{format:this.format,native:this.native,quality:this.quality,common:this.common}}handleSingularArtistTag(t,o,i,e){if(this.commonOrigin[i]===this.originPriority[t])return this.postMap("artificial",{id:e,value:o.value});this.common[e]||this.setGenericTag("artificial",{id:e,value:o.value}),this.setGenericTag(t,o)}handlePluralArtistTag(t,o,i,e){if((!this.common[i]||this.commonOrigin[i]===this.originPriority.artificial)&&(!this.common[e]||this.common[e].indexOf(o.value)===-1)){let a=(this.common[e]||[]).concat([o.value]),A=d3e(a);this.setGenericTag("artificial",{id:i,value:A})}this.setGenericTag(t,o)}async postFixPicture(t){if(t.data&&t.data.length>0){if(!t.format){let o=await hB(Uint8Array.from(t.data));if(o)t.format=o.mime;else return null}switch(t.format=t.format.toLocaleLowerCase(),t.format){case"image/jpg":t.format="image/jpeg"}return t}return this.addWarning("Empty picture tag found"),null}async toCommon(t,o,i){let e={id:o,value:i},a=this.tagMapper.mapTag(t,e,this);a&&await this.postMap(t,a)}setGenericTag(t,o){ul(`common.${o.id} = ${o.value}`);let i=this.commonOrigin[o.id]||1e3,e=this.originPriority[t];if(hAe(o.id))if(e<=i)this.common[o.id]=o.value,this.commonOrigin[o.id]=e;else return ul(`Ignore native tag (singleton): ${t}.${o.id} = ${o.value}`);else if(e===i)!EAe(o.id)||this.common[o.id].indexOf(o.value)===-1?this.common[o.id].push(o.value):ul(`Ignore duplicate value: ${t}.${o.id} = ${o.value}`);else if(e{Tt=class{constructor(t,o,i){this.metadata=t,this.tokenizer=o,this.options=i}}});var h3e,rt,Ai=ue(()=>{fs();$t();Xt();h3e=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,rt={len:4,get:(n,t)=>{let o=Qr(n.subarray(t,t+rt.len),"latin1");if(!o.match(h3e))throw new Ho(`FourCC contains invalid characters: ${pAe(o)} "${o}"`);return o},put:(n,t,o)=>{let i=Dee(o,"latin1");if(i.length!==4)throw new El("Invalid length");return n.set(i,t),t+4}}});function kAe(n){return{containsHeader:Dw(n,31),containsFooter:Dw(n,30),isHeader:Dw(n,29),readOnly:Dw(n,0),dataType:(n&6)>>1}}function Dw(n,t){return(n&1<{wA();Ai();uB={text_utf8:0,binary:1,external_info:2,reserved:3},AL={len:52,get:(n,t)=>({ID:rt.get(n,t),version:Fe.get(n,t+4)/1e3,descriptorBytes:Fe.get(n,t+8),headerBytes:Fe.get(n,t+12),seekTableBytes:Fe.get(n,t+16),headerDataBytes:Fe.get(n,t+20),apeFrameDataBytes:Fe.get(n,t+24),apeFrameDataBytesHigh:Fe.get(n,t+28),terminatingDataBytes:Fe.get(n,t+32),fileMD5:new Dt(16).get(n,t+36)})},RAe={len:24,get:(n,t)=>({compressionLevel:SA.get(n,t),formatFlags:SA.get(n,t+2),blocksPerFrame:Fe.get(n,t+4),finalFrameBlocks:Fe.get(n,t+8),totalFrames:Fe.get(n,t+12),bitsPerSample:SA.get(n,t+16),channel:SA.get(n,t+18),sampleRate:Fe.get(n,t+20)})},Ri={len:32,get:(n,t)=>({ID:new Ve(8,"ascii").get(n,t),version:Fe.get(n,t+8),size:Fe.get(n,t+12),fields:Fe.get(n,t+16),flags:kAe(Fe.get(n,t+20))})},ww={len:8,get:(n,t)=>({size:Fe.get(n,t),flags:kAe(Fe.get(n,t+4))})}});var LAe={};_r(LAe,{APEv2Parser:()=>Yc,ApeContentError:()=>nh,tryParseApeHeader:()=>Bl});function Bl(n,t,o){return new Yc(n,t,o).tryParseApeHeader()}var FAe,xc,PAe,GAe,nh,Yc,fl=ue(()=>{FAe=qe(ct(),1);Fo();wA();$t();Ni();vAe();Xt();fs();xc=(0,FAe.default)("music-metadata:parser:APEv2"),PAe="APEv2",GAe="APETAGEX",nh=class extends Qt("APEv2"){};Yc=class n extends Tt{constructor(){super(...arguments),this.ape={}}static calculateDuration(t){let o=t.totalFrames>1?t.blocksPerFrame*(t.totalFrames-1):0;return o+=t.finalFrameBlocks,o/t.sampleRate}static async findApeFooterOffset(t,o){let i=new Uint8Array(Ri.len),e=t.position;if(o<=Ri.len){xc(`Offset is too small to read APE footer: offset=${o}`);return}if(o>Ri.len){await t.readBuffer(i,{position:o-Ri.len}),t.setPosition(e);let a=Ri.get(i,0);if(a.ID==="APETAGEX")return a.flags.isHeader?xc(`APE Header found at offset=${o-Ri.len}`):(xc(`APE Footer found at offset=${o-Ri.len}`),o-=a.size),{footer:a,offset:o}}}static parseTagFooter(t,o,i){let e=Ri.get(o,o.length-Ri.len);if(e.ID!==GAe)throw new nh("Unexpected APEv2 Footer ID preamble value");return to(o),new n(t,to(o),i).parseTags(e)}async tryParseApeHeader(){if(this.tokenizer.fileInfo.size&&this.tokenizer.fileInfo.size-this.tokenizer.position0?this.parseDescriptorExpansion(o):this.parseHeader());return this.metadata.setAudioOnly(),await this.tokenizer.ignore(i.forwardBytes),this.tryParseApeHeader()}async parseTags(t){let o=new Uint8Array(256),i=t.size-Ri.len;xc(`Parse APE tags at offset=${this.tokenizer.position}, size=${i}`);for(let e=0;ethis.metadata.addTag(PAe,r,c)));break}case uB.binary:if(this.options.skipCovers)await this.tokenizer.ignore(a.size);else{let s=new Uint8Array(a.size);await this.tokenizer.readBuffer(s),A=Os(s);let g=Qr(s.subarray(0,A),"utf-8"),c=s.subarray(A+1);await this.metadata.addTag(PAe,r,{description:g,data:c})}break;case uB.external_info:xc(`Ignore external info ${r}`),await this.tokenizer.ignore(a.size);break;case uB.reserved:xc(`Ignore external info ${r}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${r}"`),await this.tokenizer.ignore(a.size);break}}}async parseDescriptorExpansion(t){return await this.tokenizer.ignore(t),this.parseHeader()}async parseHeader(){let t=await this.tokenizer.readToken(RAe);if(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("container","Monkey's Audio"),this.metadata.setFormat("bitsPerSample",t.bitsPerSample),this.metadata.setFormat("sampleRate",t.sampleRate),this.metadata.setFormat("numberOfChannels",t.channel),this.metadata.setFormat("duration",n.calculateDuration(t)),!this.ape.descriptor)throw new nh("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}});async function HAe(n){if(n.fileInfo.size>=128){let t=new Uint8Array(3),o=n.position;return await n.readBuffer(t,{position:n.fileInfo.size-128}),n.setPosition(o),Qr(t,"latin1")==="TAG"}return!1}var UAe,Ow,sh,bw,jc,Mw,BB=ue(()=>{UAe=qe(ct(),1);wA();$t();Ni();fl();fs();Ow=(0,UAe.default)("music-metadata:parser:ID3v1"),sh=["Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge","Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B","Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska","Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient","Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical","Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise","Alt. Rock","Bass","Soul","Punk","Space","Meditative","Instrumental Pop","Instrumental Rock","Ethnic","Gothic","Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40","Christian Rap","Pop/Funk","Jungle","Native American","Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical","Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk","Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock","Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band","Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson","Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus","Porn Groove","Satire","Slow Jam","Club","Tango","Samba","Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle","Duet","Punk Rock","Drum Solo","A Cappella","Euro-House","Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror","Indie","BritPop","Negerpunk","Polsk Punk","Beat","Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover","Contemporary Christian","Christian Rock","Merengue","Salsa","Thrash Metal","Anime","JPop","Synthpop","Abstract","Art Rock","Baroque","Bhangra","Big Beat","Breakbeat","Chillout","Downtempo","Dub","EBM","Eclectic","Electro","Electroclash","Emo","Experimental","Garage","Global","IDM","Illbient","Industro-Goth","Jam Band","Krautrock","Leftfield","Lounge","Math Rock","New Romantic","Nu-Breakz","Post-Punk","Post-Rock","Psytrance","Shoegaze","Space Rock","Trop Rock","World Music","Neoclassical","Audiobook","Audio Theatre","Neue Deutsche Welle","Podcast","Indie Rock","G-Funk","Dubstep","Garage Rock","Psybient"],bw={len:128,get:(n,t)=>{let o=new jc(3).get(n,t);return o==="TAG"?{header:o,title:new jc(30).get(n,t+3),artist:new jc(30).get(n,t+33),album:new jc(30).get(n,t+63),year:new jc(4).get(n,t+93),comment:new jc(28).get(n,t+97),zeroByte:fA.get(n,t+127),track:fA.get(n,t+126),genre:fA.get(n,t+127)}:null}},jc=class{constructor(t){this.len=t,this.stringType=new Ve(t,"latin1")}get(t,o){let i=this.stringType.get(t,o);return i=Iw(i),i=i.trim(),i.length>0?i:void 0}},Mw=class n extends Tt{constructor(t,o,i){super(t,o,i),this.apeHeader=i.apeHeader}static getGenre(t){if(tt){Ow("Already consumed the last 128 bytes");return}let o=await this.tokenizer.readToken(bw,t);if(o){Ow("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-bw.len);let i=["title","artist","album","comment","track","year"];for(let a of i)o[a]&&o[a]!==""&&await this.addTag(a,o[a]);let e=n.getGenre(o.genre);e&&await this.addTag("genre",e)}else Ow("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-bw.len)}async addTag(t,o){await this.metadata.addTag("ID3v1",t,o)}}});var tL,KAe=ue(()=>{wA();tL={len:16,get:(n,t)=>{let o=xe.get(n,t+8),i=xe.get(n,t+12);return{startTime:xe.get(n,t),endTime:xe.get(n,t+4),startOffset:o===4294967295?void 0:o,endOffset:i===4294967295?void 0:i}}}});function fB(n){switch(n){case 2:return 6;case 3:case 4:return 10;default:throw xAe(n)}}function E3e(n,t){return t===3?{status:{tag_alter_preservation:GA(n,0,7),file_alter_preservation:GA(n,0,6),read_only:GA(n,0,5)},format:{compression:GA(n,1,7),encryption:GA(n,1,6),grouping_identity:GA(n,1,5),unsynchronisation:!1,data_length_indicator:!1}}:{status:{tag_alter_preservation:GA(n,0,6),file_alter_preservation:GA(n,0,5),read_only:GA(n,0,4)},format:{grouping_identity:GA(n,1,6),compression:GA(n,1,3),encryption:GA(n,1,2),unsynchronisation:GA(n,1,1),data_length_indicator:GA(n,1,0)}}}function QB(n,t,o){switch(t){case 2:return C3e(n,t,o);case 3:case 4:return u3e(n,t,o);default:throw xAe(t)}}function C3e(n,t,o){let i={id:Qr(n.subarray(0,3),"ascii"),length:br.get(n,3)};return i.id.match(/^[A-Z0-9]{3}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${i.id}`),i}function u3e(n,t,o){let i={id:Qr(n.subarray(0,4),"ascii"),length:(t===4?ZF:xe).get(n,4),flags:E3e(n.subarray(8,10),t)};return i.id.match(/^[A-Z0-9]{4}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${i.id}`),i}function xAe(n){throw new Jc(`Unexpected majorVer: ${n}`)}var rL=ue(()=>{wA();$t();Kc();fs();aL()});function B3e(n){let t=[],o,i="";for(let e of n)if(typeof o=="string")if(e==="("&&o==="")i+="(",o=void 0;else if(e===")"){i!==""&&(t.push(i),i="");let a=YAe(o);a&&t.push(a),o=void 0}else o+=e;else e==="("?o="":i+=e;return i&&(t.length===0&&i.match(/^\d*$/)&&(i=YAe(i)),i&&t.push(i)),t}function YAe(n){if(n==="RX")return"Remix";if(n==="CR")return"Cover";if(n.match(/^\d*$/))return sh[Number.parseInt(n,10)]}function f3e(n){throw new Jc(`Unexpected majorVer: ${n}`)}var jAe,_w,Yo,iL,Tw,Jc,aL=ue(()=>{jAe=qe(ct(),1);wA();$t();Kc();BB();Xt();$t();KAe();rL();_w=(0,jAe.default)("music-metadata:id3v2:frame-parser"),Yo="latin1",iL={encoding:Yo,bom:!1};Tw=class n{constructor(t,o){this.major=t,this.warningCollector=o}readData(t,o,i){if(t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${o}`);return}let{encoding:e,bom:a}=ih.get(t,0),A=t.length,r=0,s=[],g=n.getNullTerminatorLength(e),c;switch(_w(`Parsing tag type=${o}, encoding=${e}, bom=${a}`),o!=="TXXX"&&o[0]==="T"?"T*":o){case"T*":case"GRP1":case"GP1":case"IPLS":case"MVIN":case"MVNM":case"PCS":case"PCST":{let I;try{I=n.trimNullPadding(ga(t.subarray(1),e))}catch(d){if(d instanceof Error){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} header has invalid string value: ${d.message}`);break}throw d}switch(o){case"TMCL":case"TIPL":case"IPLS":s=n.functionList(this.splitValue(o,I));break;case"TRK":case"TRCK":case"TPOS":case"TIT1":case"TIT2":case"TIT3":s=I;break;case"TCOM":case"TEXT":case"TOLY":case"TOPE":case"TPE1":case"TSRC":s=this.splitValue(o,I);break;case"TCO":case"TCON":s=this.splitValue(o,I).map(d=>B3e(d)).reduce((d,B)=>d.concat(B),[]);break;case"PCS":case"PCST":s=this.major>=4?this.splitValue(o,I):[I],s=Array.isArray(s)&&s[0]===""?1:0;break;default:s=this.major>=4?this.splitValue(o,I):[I]}break}case"TXXX":{let I=n.readIdentifierAndData(t.subarray(1),e);s={description:I.id,text:this.splitValue(o,ga(I.data,e).replace(/\x00+$/,""))};break}case"PIC":case"APIC":if(i){let I={};switch(t=t.subarray(1),this.major){case 2:I.format=ga(t.subarray(0,3),"latin1"),t=t.subarray(3);break;case 3:case 4:c=Os(t,Yo),I.format=ga(t.subarray(0,c),Yo),t=t.subarray(c+1);break;default:throw f3e(this.major)}I.format=n.fixPictureMimeType(I.format),I.type=th[t[0]],t=t.subarray(1),c=Os(t,e),I.description=ga(t.subarray(0,c),e),t=t.subarray(c+g),I.data=t,s=I}break;case"CNT":case"PCNT":s=WF(t);break;case"SYLT":{let I=$F.get(t,0);t=t.subarray($F.len);let d={descriptor:"",language:I.language,contentType:I.contentType,timeStampFormat:I.timeStampFormat,syncText:[]},B=!1;for(;t.length>0;){let f=n.readNullTerminatedString(t,I.encoding);if(t=t.subarray(f.len),B){let Q=xe.get(t,0);t=t.subarray(xe.len),d.syncText.push({text:f.text,timestamp:Q})}else d.descriptor=f.text,B=!0}s=d;break}case"ULT":case"USLT":case"COM":case"COMM":{let I=lw.get(t,r);r+=lw.len;let d=n.readNullTerminatedString(t.subarray(r),I.encoding);r+=d.len;let B=n.readNullTerminatedString(t.subarray(r),I.encoding);s={language:I.language,descriptor:d.text,text:B.text};break}case"UFID":{let I=n.readIdentifierAndData(t,Yo);s={owner_identifier:I.id,identifier:I.data};break}case"PRIV":{let I=n.readIdentifierAndData(t,Yo);s={owner_identifier:I.id,data:I.data};break}case"POPM":{t=t.subarray(r);let I=n.readNullTerminatedString(t,iL),d=I.text;if(t=t.subarray(I.len),t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} POPM frame missing rating byte`),s={email:d,rating:0,counter:void 0};break}let B=fA.get(t,0),f=t.subarray(fA.len);s={email:d,rating:B,counter:f.length>0?WF(f):void 0};break}case"GEOB":{let I=ih.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,iL),B=d.text;t=t.subarray(d.len);let f=n.readNullTerminatedString(t,I),Q=f.text;t=t.subarray(f.len);let y=n.readNullTerminatedString(t,I),m=y.text;t=t.subarray(y.len),s={type:B,filename:Q,description:m,data:t};break}case"WCOM":case"WCOP":case"WOAF":case"WOAR":case"WOAS":case"WORS":case"WPAY":case"WPUB":s=n.readNullTerminatedString(t,iL).text;break;case"WXXX":{let I=ih.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,I),B=d.text;t=t.subarray(d.len),s={description:B,url:n.trimNullPadding(ga(t,Yo))};break}case"WFD":case"WFED":{let I=ih.get(t,0);t=t.subarray(1),s=n.readNullTerminatedString(t,I).text;break}case"MCDI":{s=t.subarray(0,A);break}case"CHAP":{_w("Reading CHAP"),c=Os(t,Yo);let I={label:ga(t.subarray(0,c),Yo),info:tL.get(t,c+1),frames:new Map};for(r+=c+1+tL.len;r=a.length)return{text:ga(t,o.encoding),len:e};let r=t.subarray(0,i+A);return{text:ga(r,o.encoding),len:i+A+n.getNullTerminatorLength(o.encoding)}}static fixPictureMimeType(t){switch(t=t.toLocaleLowerCase(),t){case"jpg":return"image/jpeg";case"png":return"image/png"}return t}static functionList(t){let o={};for(let i=0;i+11?this.warningCollector.addWarning(`ID3v2.${this.major} ${t} uses non standard null-separator.`):i=o.split(/\//g)):i=o.split(/\x00/g),n.trimArray(i)}static trimArray(t){return t.map(o=>n.trimNullPadding(o).trim())}static trimNullPadding(t){let o=t.length;for(;o>0&&t.charCodeAt(o-1)===0;)o--;return o===t.length?t:t.slice(0,o)}static readIdentifierAndData(t,o){let i=n.readNullTerminatedString(t,{encoding:o,bom:!1});return{id:i.text,data:t.subarray(i.len)}}static getNullTerminatorLength(t){return t.startsWith("utf-16")?2:1}},Jc=class extends Qt("id3v2"){}});function Q3e(n){throw new Jc(`Unexpected majorVer: ${n}`)}var jo,gh=ue(()=>{wA();aL();Kc();rL();jo=class n{constructor(){this.tokenizer=void 0,this.id3Header=void 0,this.metadata=void 0,this.headerType=void 0,this.options=void 0}static removeUnsyncBytes(t){let o=0,i=0;for(;o0?this.parseExtendedHeaderData(o,t.size):this.parseId3Data(this.id3Header.size-t.size)}async parseExtendedHeaderData(t,o){return await this.tokenizer.ignore(t),this.parseId3Data(this.id3Header.size-o)}async parseId3Data(t){let o=await this.tokenizer.readToken(new Dt(t));for(let i of this.parseMetadata(o))switch(i.id){case"TXXX":i.value&&await this.handleTag(i,i.value.text,()=>i.value.description);break;default:await(Array.isArray(i.value)?Promise.all(i.value.map(e=>this.addTag(i.id,e))):this.addTag(i.id,i.value))}}async handleTag(t,o,i,e=a=>a){await Promise.all(o.map(a=>this.addTag(n.makeDescriptionTagName(t.id,i(a)),e(a))))}async addTag(t,o){await this.metadata.addTag(this.headerType,t,o)}parseMetadata(t){let o=0,i=[];for(;o!==t.length;){let e=fB(this.id3Header.version.major);if(o+e>t.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}let a=t.subarray(o,o+e);o+=e;let A=QB(a,this.id3Header.version.major,this.metadata),r=t.subarray(o,o+A.length);o+=A.length;let s=n.readFrameData(r,A,this.id3Header.version.major,!this.options.skipCovers,this.metadata);s&&i.push({id:A.id,value:s})}return i}static mapId3v2Chapters(t){if(!t)return;let o=t.filter(g=>g.id==="CHAP");if(!o?.length)return;let e=t.filter(g=>g.id==="CTOC")?.find(g=>g.value.flags?.topLevel),a=new Map;for(let g of o)a.set(g.value.label,g.value);let A=e?.value.childElementIds,r=[],s=A??[...a.keys()];for(let g of s){let c=a.get(g);if(!c)continue;let I=c.frames,d=I.get("TIT2");d&&r.push({id:g,title:d,url:I.get("WXXX"),start:c.info.startTime/1e3,end:c.info.endTime/1e3,image:I.get("APIC")})}return A||r.sort((g,c)=>g.start-c.start),r.length?r:void 0}}});var JAe,oL,bs,yB=ue(()=>{Fo();JAe=qe(ct(),1);Kc();gh();BB();Ni();oL=(0,JAe.default)("music-metadata:parser:ID3"),bs=class extends Tt{constructor(){super(...arguments),this.id3parser=new jo}static async startsWithID3v2Header(t){return(await t.peekToken(EB)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(t){if(t instanceof kA)oL("End-of-stream");else throw t}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),oL("End of ID3v2 header, go to MPEG-parser: pos=%s",this.tokenizer.position),await this.postId3v2Parse(),this.options.skipPostHeaders&&this.metadata.hasAny()?this.finalize():(await new Mw(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(EB)).fileIdentifier==="ID3")return oL("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}});var nL,qAe=ue(()=>{$t();nL={len:2,get:(n,t)=>{let o=ZA(n,t,0,3),i=ZA(n,t,6,1),e=ZA(n,t,7,9)/10;if(o>0)return{type:ZA(n,t,0,3),origin:ZA(n,t,3,3),adjustment:i?-e:e}}}});var zAe,VAe=ue(()=>{wA();$t();qAe();zAe={len:27,get:(n,t)=>{let o=xe.get(n,t+2);return{revision:ZA(n,t,0,4),vbr_method:ZA(n,t,4,4),lowpass_filter:100*fA.get(n,t+1),track_peak:o===0?null:o/2**23,track_gain:nL.get(n,6),album_gain:nL.get(n,8),music_length:xe.get(n,t+20),music_crc:fA.get(n,t+24),header_crc:LA.get(n,t+24)}}}});async function WAe(n){let t=await n.readToken(y3e),o={numFrames:null,streamSize:null,vbrScale:null};if(t.frames&&(o.numFrames=await n.readToken(xe)),t.bytes&&(o.streamSize=await n.readToken(xe)),t.toc&&(o.toc=new Uint8Array(100),await n.readBuffer(o.toc)),t.vbrScale&&(o.vbrScale=await n.readToken(xe)),await n.peekToken(new Ve(4,"ascii"))==="LAME"){await n.ignore(4),o.lame={version:await n.readToken(new Ve(5,"ascii"))};let e=o.lame.version.match(/\d+.\d+/g);if(e!==null){let A=e[0].split(".").map(r=>Number.parseInt(r,10));A[0]>=3&&A[1]>=90&&(o.lame.extended=await n.readToken(zAe))}}return o}var sL,Nw,y3e,ZAe=ue(()=>{wA();$t();VAe();sL=new Ve(4,"ascii"),Nw=new Ve(6,"ascii"),y3e={len:4,get:(n,t)=>({frames:ma(n,t,31),bytes:ma(n,t,30),toc:ma(n,t,29),vbrScale:ma(n,t,28)})}});var tte={};_r(tte,{MpegContentError:()=>Ql,MpegParser:()=>gL});function S3e(n){return`V${Math.floor((100-n)/10)}`}var Ate,ro,Ql,XAe,$Ae,m3e,ao,ete,gL,rte=ue(()=>{wA();Fo();Ate=qe(ct(),1);$t();yB();ZAe();Xt();ro=(0,Ate.default)("music-metadata:parser:mpeg"),Ql=class extends Qt("MPEG"){},XAe=1024,$Ae={AudioObjectTypes:["AAC Main","AAC LC","AAC SSR","AAC LTP"],SamplingFrequencies:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,null,null,null]},m3e=[void 0,["front-center"],["front-left","front-right"],["front-center","front-left","front-right"],["front-center","front-left","front-right","back-center"],["front-center","front-left","front-right","back-left","back-right"],["front-center","front-left","front-right","back-left","back-right","LFE-channel"],["front-center","front-left","front-right","side-left","side-right","back-left","back-right","LFE-channel"]],ao=class n{constructor(t,o){this.bitrateIndex=null,this.sampRateFreqIndex=null,this.padding=null,this.privateBit=null,this.channelModeIndex=null,this.modeExtension=null,this.isOriginalMedia=null,this.version=null,this.bitrate=null,this.samplingRate=null,this.frameLength=0,this.versionIndex=ZA(t,o+1,3,2),this.layer=n.LayerDescription[ZA(t,o+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(t,o):this.parseMpegHeader(t,o),this.isProtectedByCRC=!ma(t,o+1,7)}calcDuration(t){return this.samplingRate==null?null:t*this.calcSamplesPerFrame()/this.samplingRate}calcSamplesPerFrame(){return n.samplesInFrameTable[this.version===1?0:1][this.layer]}calculateSideInfoLength(){if(this.layer!==3)return 2;if(this.channelModeIndex===3){if(this.version===1)return 17;if(this.version===2||this.version===2.5)return 9}else{if(this.version===1)return 32;if(this.version===2||this.version===2.5)return 17}return null}calcSlotSize(){return[null,4,1,1][this.layer]}parseMpegHeader(t,o){this.container="MPEG",this.bitrateIndex=ZA(t,o+2,0,4),this.sampRateFreqIndex=ZA(t,o+2,4,2),this.padding=ma(t,o+2,6),this.privateBit=ma(t,o+2,7),this.channelModeIndex=ZA(t,o+3,0,2),this.modeExtension=ZA(t,o+3,2,2),this.isCopyrighted=ma(t,o+3,4),this.isOriginalMedia=ma(t,o+3,5),this.emphasis=ZA(t,o+3,7,2),this.version=n.VersionID[this.versionIndex],this.channelMode=n.ChannelMode[this.channelModeIndex],this.codec=`MPEG ${this.version} Layer ${this.layer}`;let i=this.calcBitrate();if(!i)throw new Ql("Cannot determine bit-rate");if(this.bitrate=i*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new Ql("Cannot determine sampling-rate")}parseAdtsHeader(t,o){ro("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;let i=ZA(t,o+2,0,2);this.codec="AAC",this.codecProfile=$Ae.AudioObjectTypes[i],ro(`MPEG-4 audio-codec=${this.codec}`);let e=ZA(t,o+2,2,4);this.samplingRate=$Ae.SamplingFrequencies[e],ro(`sampling-rate=${this.samplingRate}`);let a=ZA(t,o+2,7,3);this.mp4ChannelConfig=m3e[a],ro(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=ZA(t,o+3,6,2)<<11}calcBitrate(){if(this.bitrateIndex===0||this.bitrateIndex===15)return null;if(this.version&&this.bitrateIndex){let t=10*Math.floor(this.version)+this.layer;return n.bitrate_index[this.bitrateIndex][t]}return null}calcSamplingRate(){return this.sampRateFreqIndex===3||this.version===null||this.sampRateFreqIndex==null?null:n.sampling_rate_freq_index[this.version][this.sampRateFreqIndex]}};ao.SyncByte1=255;ao.SyncByte2=224;ao.VersionID=[2.5,null,2,1];ao.LayerDescription=[0,3,2,1];ao.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];ao.bitrate_index={1:{11:32,12:32,13:32,21:32,22:8,23:8},2:{11:64,12:48,13:40,21:48,22:16,23:16},3:{11:96,12:56,13:48,21:56,22:24,23:24},4:{11:128,12:64,13:56,21:64,22:32,23:32},5:{11:160,12:80,13:64,21:80,22:40,23:40},6:{11:192,12:96,13:80,21:96,22:48,23:48},7:{11:224,12:112,13:96,21:112,22:56,23:56},8:{11:256,12:128,13:112,21:128,22:64,23:64},9:{11:288,12:160,13:128,21:144,22:80,23:80},10:{11:320,12:192,13:160,21:160,22:96,23:96},11:{11:352,12:224,13:192,21:176,22:112,23:112},12:{11:384,12:256,13:224,21:192,22:128,23:128},13:{11:416,12:320,13:256,21:224,22:144,23:144},14:{11:448,12:384,13:320,21:256,22:160,23:160}};ao.sampling_rate_freq_index={1:{0:44100,1:48e3,2:32e3},2:{0:22050,1:24e3,2:16e3},2.5:{0:11025,1:12e3,2:8e3}};ao.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];ete={len:4,get:(n,t)=>new ao(n,t)};gL=class extends bs{constructor(){super(...arguments),this.frameCount=0,this.syncFrameCount=-1,this.totalDataLength=0,this.bitrates=[],this.offset=0,this.frame_size=0,this.calculateEofDuration=!1,this.samplesPerFrame=null,this.buf_frame_header=new Uint8Array(4),this.mpegOffset=null,this.syncPeek={buf:new Uint8Array(XAe),len:0}}async postId3v2Parse(){this.metadata.setFormat("lossless",!1),this.metadata.setAudioOnly();try{let t=!1;for(;!t;)await this.sync(),t=await this.parseCommonMpegHeader()}catch(t){if(t instanceof kA){if(ro("End-of-stream"),this.calculateEofDuration&&this.samplesPerFrame!==null){let o=this.frameCount*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.format.sampleRate){let i=o/this.metadata.format.sampleRate;ro(`Calculate duration at EOF: ${i} sec.`,i),this.metadata.setFormat("duration",i)}}}else throw t}}finalize(){let t=this.metadata.format,o=!!this.metadata.native.ID3v1;if(this.mpegOffset!==null){if(t.duration&&this.tokenizer.fileInfo.size){let i=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);t.codecProfile&&t.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",i*8/t.duration)}if(this.tokenizer.fileInfo.size&&t.codecProfile==="CBR"){let i=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);if(this.frame_size!==null&&this.samplesPerFrame!==null){let e=Math.round(i/this.frame_size)*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",e),t.sampleRate&&!t.duration){let a=e/t.sampleRate;ro("Calculate CBR duration based on file size: %s",a),this.metadata.setFormat("duration",a)}}}}}async sync(){let t=!1;for(;;){let o=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:XAe,mayBeLess:!0}),this.syncPeek.len<=163)throw new kA;for(;;){if(t&&(this.syncPeek.buf[o]&224)===224){this.buf_frame_header[0]=ao.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[o],await this.tokenizer.ignore(o),ro(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(ro(`Re-synced MPEG stream, frameCount=${this.frameCount}`),this.frameCount=0,this.frame_size=0),this.syncFrameCount=this.frameCount;return}if(t=!1,o=this.syncPeek.buf.indexOf(ao.SyncByte1,o),o===-1){if(this.syncPeek.len=2&&t.layer===0?this.parseAdts(t):this.parseAudioFrameHeader(t)}async parseAudioFrameHeader(t){this.metadata.setFormat("numberOfChannels",t.channelMode==="mono"?1:2),this.metadata.setFormat("bitrate",t.bitrate),this.frameCount<20*1e4&&ro("offset=%s MP%s bitrate=%s sample-rate=%s",this.tokenizer.position-4,t.layer,t.bitrate,t.samplingRate);let o=t.calcSlotSize();if(o===null)throw new Ql("invalid slot_size");let i=t.calcSamplesPerFrame();ro(`samples_per_frame=${i}`);let e=i/8;if(t.bitrate!==null&&t.samplingRate!=null){let a=e*t.bitrate/t.samplingRate+(t.padding?o:0);this.frame_size=Math.floor(a)}if(this.audioFrameHeader=t,t.bitrate!==null&&this.bitrates.push(t.bitrate),this.frameCount===1)return this.offset=ete.len,await this.skipSideInformation(),!1;if(this.frameCount===4){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=i,this.metadata.setFormat("codecProfile","CBR"),this.tokenizer.fileInfo.size)return!0}else if(this.metadata.format.duration)return!0;if(!this.options.duration)return!0}return this.options.duration&&this.frameCount===4&&(this.samplesPerFrame=i,this.calculateEofDuration=!0),this.offset=4,t.isProtectedByCRC?(await this.parseCrc(),!1):(await this.skipSideInformation(),!1)}async parseAdts(t){let o=new Uint8Array(3);if(await this.tokenizer.readBuffer(o),t.frameLength+=ZA(o,0,0,11),this.totalDataLength+=t.frameLength,this.samplesPerFrame=1024,t.samplingRate!==null){let i=t.samplingRate/this.samplesPerFrame,a=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*i+.5;this.metadata.setFormat("bitrate",a),ro(`frame-count=${this.frameCount}, size=${t.frameLength} bytes, bit-rate=${a}`)}if(await this.tokenizer.ignore(t.frameLength>7?t.frameLength-7:1),this.frameCount===3)if(this.metadata.setFormat("codecProfile",t.codecProfile),t.mp4ChannelConfig&&this.metadata.setFormat("numberOfChannels",t.mp4ChannelConfig.length),this.options.duration)this.calculateEofDuration=!0;else return!0;return!1}async parseCrc(){return await this.tokenizer.ignore(Lo.len),this.offset+=Lo.len,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){let t=this.audioFrameHeader.calculateSideInfoLength();if(t!==null){await this.tokenizer.readToken(new Dt(t)),this.offset+=t,await this.readXtraInfoHeader();return}}}async readXtraInfoHeader(){let t=await this.tokenizer.readToken(sL);switch(this.offset+=sL.len,t){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":{let i=await this.readXingInfoHeader();if(i.vbrScale!==null){let e=S3e(i.vbrScale);this.metadata.setFormat("codecProfile",e)}return null}case"Xtra":break;case"LAME":{let i=await this.tokenizer.readToken(Nw);if(this.frame_size!==null&&this.frame_size>=this.offset+Nw.len)return this.offset+=Nw.len,this.metadata.setFormat("tool",`LAME ${i}`),await this.skipFrameData(this.frame_size-this.offset),null;this.metadata.addWarning("Corrupt LAME header");break}}let o=this.frame_size-this.offset;return o<0?this.metadata.addWarning(`Frame ${this.frameCount}corrupt: negative frameDataLeft`):await this.skipFrameData(o),null}async readXingInfoHeader(){let t=this.tokenizer.position,o=await WAe(this.tokenizer);if(this.offset+=this.tokenizer.position-t,o.lame&&(this.metadata.setFormat("tool",`LAME ${Ko(o.lame.version)}`),o.lame.extended&&(this.metadata.setFormat("trackPeakLevel",o.lame.extended.track_peak),o.lame.extended.track_gain&&this.metadata.setFormat("trackGain",o.lame.extended.track_gain.adjustment),o.lame.extended.album_gain&&this.metadata.setFormat("albumGain",o.lame.extended.album_gain.adjustment),this.metadata.setFormat("duration",o.lame.extended.music_length/1e3))),o.streamSize&&this.audioFrameHeader&&o.numFrames!==null){let e=this.audioFrameHeader.calcDuration(o.numFrames);return this.metadata.setFormat("duration",e),ro("Get duration from Xing header: %s",this.metadata.format.duration),o}let i=this.frame_size-this.offset;return await this.skipFrameData(i),o}async skipFrameData(t){if(t<0)throw new Ql("frame-data-left cannot be negative");await this.tokenizer.ignore(t)}areAllSame(t){let o=t[0];return t.every(i=>i===o)}}});var ate,ite=ue(()=>{ate={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],async load(){return(await Promise.resolve().then(()=>(rte(),tte))).MpegParser}}});var ote,nte=ue(()=>{ote={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],async load(){return(await Promise.resolve().then(()=>(fl(),LAe))).APEv2Parser}}});function cL(n){let t=n.trim();if(t.length!==36||t[8]!=="-"||t[13]!=="-"||t[18]!=="-"||t[23]!=="-")throw new Error(`Invalid GUID format: ${n}`);let o,i=new Uint8Array(16);o=parseInt(t.slice(0,8),16),i[0]=o&255,i[1]=o>>>8&255,i[2]=o>>>16&255,i[3]=o>>>24&255,o=parseInt(t.slice(9,13),16),i[4]=o&255,i[5]=o>>>8&255,o=parseInt(t.slice(14,18),16),i[6]=o&255,i[7]=o>>>8&255,o=parseInt(t.slice(19,23),16),i[8]=o>>>8&255,i[9]=o&255,o=parseInt(t.slice(24,32),16),i[10]=o>>>24&255,i[11]=o>>>16&255,i[12]=o>>>8&255,i[13]=o&255,o=parseInt(t.slice(32,36),16),i[14]=o>>>8&255,i[15]=o&255;for(let e=0;e<16;e++)if(!Number.isFinite(i[e]))throw new Error(`Invalid GUID format: ${n}`);if(!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(t))throw new Error(`Invalid GUID format: ${n}`);return i}var Rw,ste=ue(()=>{Rw=class n{constructor(t){if(t.length!==16)throw new Error("GUID must be exactly 16 bytes");this.bytes=t}static fromString(t){return new n(cL(t))}toString(){let t=this.bytes,o=s=>s.toString(16).padStart(2,"0"),i=o(t[3])+o(t[2])+o(t[1])+o(t[0]),e=o(t[5])+o(t[4]),a=o(t[7])+o(t[6]),A=o(t[8])+o(t[9]),r=o(t[10])+o(t[11])+o(t[12])+o(t[13])+o(t[14])+o(t[15]);return`${i}-${e}-${a}-${A}-${r}`.toUpperCase()}equals(t,o=0){if(o<0||t.length-o<16)return!1;let i=this.bytes;for(let e=0;e<16;e++)if(t[o+e]!==i[e])return!1;return!0}}});var Ye,er,IL=ue(()=>{ste();Ye=class n{static fromBin(t,o=0){return new n(n.decode(t,o))}static decode(t,o=0){return new Rw(t.subarray(o,o+16)).toString()}static decodeMediaType(t){switch(t.str){case n.AudioMedia.str:return"audio";case n.VideoMedia.str:return"video";case n.CommandMedia.str:return"command";case n.Degradable_JPEG_Media.str:return"degradable-jpeg";case n.FileTransferMedia.str:return"file-transfer";case n.BinaryMedia.str:return"binary"}}static encode(t){return cL(t)}constructor(t){this.str=t}equals(t){return this.str===t.str}toBin(){return n.encode(this.str)}};Ye.HeaderObject=new Ye("75B22630-668E-11CF-A6D9-00AA0062CE6C");Ye.DataObject=new Ye("75B22636-668E-11CF-A6D9-00AA0062CE6C");Ye.SimpleIndexObject=new Ye("33000890-E5B1-11CF-89F4-00A0C90349CB");Ye.IndexObject=new Ye("D6E229D3-35DA-11D1-9034-00A0C90349BE");Ye.MediaObjectIndexObject=new Ye("FEB103F8-12AD-4C64-840F-2A1D2F7AD48C");Ye.TimecodeIndexObject=new Ye("3CB73FD0-0C4A-4803-953D-EDF7B6228F0C");Ye.FilePropertiesObject=new Ye("8CABDCA1-A947-11CF-8EE4-00C00C205365");Ye.StreamPropertiesObject=new Ye("B7DC0791-A9B7-11CF-8EE6-00C00C205365");Ye.HeaderExtensionObject=new Ye("5FBF03B5-A92E-11CF-8EE3-00C00C205365");Ye.CodecListObject=new Ye("86D15240-311D-11D0-A3A4-00A0C90348F6");Ye.ScriptCommandObject=new Ye("1EFB1A30-0B62-11D0-A39B-00A0C90348F6");Ye.MarkerObject=new Ye("F487CD01-A951-11CF-8EE6-00C00C205365");Ye.BitrateMutualExclusionObject=new Ye("D6E229DC-35DA-11D1-9034-00A0C90349BE");Ye.ErrorCorrectionObject=new Ye("75B22635-668E-11CF-A6D9-00AA0062CE6C");Ye.ContentDescriptionObject=new Ye("75B22633-668E-11CF-A6D9-00AA0062CE6C");Ye.ExtendedContentDescriptionObject=new Ye("D2D0A440-E307-11D2-97F0-00A0C95EA850");Ye.ContentBrandingObject=new Ye("2211B3FA-BD23-11D2-B4B7-00A0C955FC6E");Ye.StreamBitratePropertiesObject=new Ye("7BF875CE-468D-11D1-8D82-006097C9A2B2");Ye.ContentEncryptionObject=new Ye("2211B3FB-BD23-11D2-B4B7-00A0C955FC6E");Ye.ExtendedContentEncryptionObject=new Ye("298AE614-2622-4C17-B935-DAE07EE9289C");Ye.DigitalSignatureObject=new Ye("2211B3FC-BD23-11D2-B4B7-00A0C955FC6E");Ye.PaddingObject=new Ye("1806D474-CADF-4509-A4BA-9AABCB96AAE8");Ye.ExtendedStreamPropertiesObject=new Ye("14E6A5CB-C672-4332-8399-A96952065B5A");Ye.AdvancedMutualExclusionObject=new Ye("A08649CF-4775-4670-8A16-6E35357566CD");Ye.GroupMutualExclusionObject=new Ye("D1465A40-5A79-4338-B71B-E36B8FD6C249");Ye.StreamPrioritizationObject=new Ye("D4FED15B-88D3-454F-81F0-ED5C45999E24");Ye.BandwidthSharingObject=new Ye("A69609E6-517B-11D2-B6AF-00C04FD908E9");Ye.LanguageListObject=new Ye("7C4346A9-EFE0-4BFC-B229-393EDE415C85");Ye.MetadataObject=new Ye("C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA");Ye.MetadataLibraryObject=new Ye("44231C94-9498-49D1-A141-1D134E457054");Ye.IndexParametersObject=new Ye("D6E229DF-35DA-11D1-9034-00A0C90349BE");Ye.MediaObjectIndexParametersObject=new Ye("6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7");Ye.TimecodeIndexParametersObject=new Ye("F55E496D-9797-4B5D-8C8B-604DFE9BFB24");Ye.CompatibilityObject=new Ye("26F18B5D-4584-47EC-9F5F-0E651F0452C9");Ye.AdvancedContentEncryptionObject=new Ye("43058533-6981-49E6-9B74-AD12CB86D58C");Ye.AudioMedia=new Ye("F8699E40-5B4D-11CF-A8FD-00805F5C442B");Ye.VideoMedia=new Ye("BC19EFC0-5B4D-11CF-A8FD-00805F5C442B");Ye.CommandMedia=new Ye("59DACFC0-59E6-11D0-A3AC-00A0C90348F6");Ye.JFIF_Media=new Ye("B61BE100-5B4E-11CF-A8FD-00805F5C442B");Ye.Degradable_JPEG_Media=new Ye("35907DE0-E415-11CF-A917-00805F5C442B");Ye.FileTransferMedia=new Ye("91BD222C-F21C-497A-8B6D-5AA86BFC0185");Ye.BinaryMedia=new Ye("3AFB65E2-47EF-40F2-AC2C-70A90D71D343");Ye.ASF_Index_Placeholder_Object=new Ye("D9AADE20-7C17-4F9C-BC28-8555DD98E2A2");er=Ye});function cte(n){return D3e[n]}function mB(n){return Ko(ga(n,"utf-16le"))}function gte(n){return new Uint8Array(n)}function w3e(n,t=0){return Ite(n,t)===1}function O3e(n,t=0){return Fe.get(n,t)}function b3e(n,t=0){return Mr.get(n,t)}function Ite(n,t=0){return SA.get(n,t)}var D3e,lte=ue(()=>{wA();$t();D3e=[mB,gte,w3e,O3e,b3e,Ite,gte]});async function pte(n){let t=await n.readNumber(SA);return(await n.readToken(new Ve(t*2,"utf-16le"))).replace("\0","")}async function hte(n){let t=await n.readToken(M3e),o=[];for(let i=0;i{wA();$t();IL();lte();Kc();Xt();ch=class extends Qt("ASF"){},dte={len:30,get:(n,t)=>({objectId:er.fromBin(n,t),objectSize:Number(Mr.get(n,t+16)),numberOfHeaderObjects:Fe.get(n,t+24)})},qc={len:24,get:(n,t)=>({objectId:er.fromBin(n,t),objectSize:Number(Mr.get(n,t+16))})},Mg=class{constructor(t){this.len=Number(t.objectSize)-qc.len}postProcessTag(t,o,i,e){if(o==="WM/Picture")t.push({id:o,value:lL.fromBuffer(e)});else{let a=cte(i);if(!a)throw new ch(`unexpected value headerType: ${i}`);t.push({id:o,value:a(e)})}}},SB=class extends Mg{get(t,o){return null}},Ih=class extends Mg{get(t,o){return{fileId:er.fromBin(t,o),fileSize:Mr.get(t,o+16),creationDate:Mr.get(t,o+24),dataPacketsCount:Mr.get(t,o+32),playDuration:Mr.get(t,o+40),sendDuration:Mr.get(t,o+48),preroll:Mr.get(t,o+56),flags:{broadcast:GA(t,o+64,24),seekable:GA(t,o+64,25)},minimumDataPacketSize:Fe.get(t,o+68),maximumDataPacketSize:Fe.get(t,o+72),maximumBitrate:Fe.get(t,o+76)}}};Ih.guid=er.FilePropertiesObject;lh=class extends Mg{get(t,o){return{streamType:er.decodeMediaType(er.fromBin(t,o)),errorCorrectionType:er.fromBin(t,o+8)}}};lh.guid=er.StreamPropertiesObject;ph=class{constructor(){this.len=22}get(t,o){let i=new DataView(t.buffer,o);return{reserved1:er.fromBin(t,o),reserved2:i.getUint16(16,!0),extensionDataSize:i.getUint16(18,!0)}}};ph.guid=er.HeaderExtensionObject;M3e={len:20,get:(n,t)=>({entryCount:new DataView(n.buffer,t).getUint16(16,!0)})};yl=class n extends Mg{get(t,o){let i=[],e=new DataView(t.buffer,o),a=10;for(let A=0;A0){let s=n.contentDescTags[A],g=a+r;i.push({id:s,value:mB(t.subarray(o+a,o+g))}),a=g}}return i}};yl.guid=er.ContentDescriptionObject;yl.contentDescTags=["Title","Author","Copyright","Description","Rating"];dh=class extends Mg{get(t,o){let i=[],e=new DataView(t.buffer,o),a=e.getUint16(0,!0),A=2;for(let r=0;rhL});var Ete,dL,R3e,hL,ute=ue(()=>{Ete=qe(ct(),1);Cl();IL();pL();Ni();pL();dL=(0,Ete.default)("music-metadata:parser:ASF"),R3e="asf",hL=class extends Tt{async parse(){let t=await this.tokenizer.readToken(dte);if(!t.objectId.equals(er.HeaderObject))throw new ch(`expected asf header; but was not found; got: ${t.objectId.str}`);await this.parseObjectHeader(t.numberOfHeaderObjects)}async parseObjectHeader(t){let o;do{let i=await this.tokenizer.readToken(qc);switch(dL("header GUID=%s",i.objectId.str),i.objectId.str){case Ih.guid.str:{let e=await this.tokenizer.readToken(new Ih(i));this.metadata.setFormat("duration",Number(e.playDuration/BigInt(1e3))/1e4-Number(e.preroll)/1e3),this.metadata.setFormat("bitrate",e.maximumBitrate);break}case lh.guid.str:{let e=await this.tokenizer.readToken(new lh(i));this.metadata.setFormat("container",`ASF/${e.streamType}`);break}case ph.guid.str:{let e=await this.tokenizer.readToken(new ph);await this.parseExtensionObject(e.extensionDataSize);break}case yl.guid.str:o=await this.tokenizer.readToken(new yl(i)),await this.addTags(o);break;case dh.guid.str:o=await this.tokenizer.readToken(new dh(i)),await this.addTags(o);break;case er.CodecListObject.str:{let e=await hte(this.tokenizer);e.forEach(A=>{this.metadata.addStreamInfo({type:A.type.videoCodec?sa.video:sa.audio,codecName:A.codecName})});let a=e.filter(A=>A.type.audioCodec).map(A=>A.codecName).join("/");this.metadata.setFormat("codec",a);break}case er.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(i.objectSize-qc.len);break;case er.PaddingObject.str:dL("Padding: %s bytes",i.objectSize-qc.len),await this.tokenizer.ignore(i.objectSize-qc.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${i.objectId.str}`),dL("Ignore ASF-Object-GUID: %s",i.objectId.str),await this.tokenizer.readToken(new SB(i))}}while(--t)}async addTags(t){await Promise.all(t.map(({id:o,value:i})=>this.metadata.addTag(R3e,o,i)))}async parseExtensionObject(t){do{let o=await this.tokenizer.readToken(qc),i=o.objectSize-qc.len;if(i<0)throw new ch(`Invalid ASF header object size: ${o.objectSize}`);switch(o.objectId.str){case hh.guid.str:await this.tokenizer.readToken(new hh(o));break;case ml.guid.str:{let e=await this.tokenizer.readToken(new ml(o));await this.addTags(e);break}case Eh.guid.str:{let e=await this.tokenizer.readToken(new Eh(o));await this.addTags(e);break}case er.PaddingObject.str:await this.tokenizer.ignore(i);break;case er.CompatibilityObject.str:await this.tokenizer.ignore(i);break;case er.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(i);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${o.objectId.str}`),await this.tokenizer.readToken(new SB(o));break}t-=o.objectSize}while(t>0)}}});var Bte,fte=ue(()=>{Bte={parserType:"asf",extensions:[".asf",".wma",".wmv"],mimeTypes:["audio/ms-wma","video/ms-wmv","audio/ms-asf","video/ms-asf","application/vnd.ms-asf"],async load(){return(await Promise.resolve().then(()=>(ute(),Cte))).AsfParser}}});var Sl,Qte=ue(()=>{wA();Ai();Sl={len:12,get:(n,t)=>({chunkID:rt.get(n,t),chunkSize:vF.get(n,t+4)})}});var mte={};_r(mte,{DsdiffContentParseError:()=>Ch,DsdiffParser:()=>EL});var yte,ti,Ch,EL,Ste=ue(()=>{wA();yte=qe(ct(),1);Fo();Ai();Ni();gh();Qte();Xt();ti=(0,yte.default)("music-metadata:parser:aiff"),Ch=class extends Qt("DSDIFF"){},EL=class extends Tt{async parse(){let t=await this.tokenizer.readToken(Sl);if(t.chunkID!=="FRM8")throw new Ch("Unexpected chunk-ID");this.metadata.setAudioOnly();let o=(await this.tokenizer.readToken(rt)).trim();switch(o){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${o}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(t.chunkSize-BigInt(rt.len));default:throw new Ch(`Unsupported DSDIFF type: ${o}`)}}async readFmt8Chunks(t){for(;t>=Sl.len;){let o=await this.tokenizer.readToken(Sl);ti(`Chunk id=${o.chunkID}`),await this.readData(o),t-=BigInt(Sl.len)+o.chunkSize}}async readData(t){ti(`Reading data of chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);let o=this.tokenizer.position;switch(t.chunkID.trim()){case"FVER":{let e=await this.tokenizer.readToken(Fe);ti(`DSDIFF version=${e}`);break}case"PROP":{if(await this.tokenizer.readToken(rt)!=="SND ")throw new Ch("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(t.chunkSize-BigInt(rt.len));break}case"ID3":{let e=await this.tokenizer.readToken(new Dt(Number(t.chunkSize))),a=to(e);await new jo().parse(this.metadata,a,this.options);break}case"DSD":this.metadata.format.numberOfChannels&&this.metadata.setFormat("numberOfSamples",Number(t.chunkSize*BigInt(8)/BigInt(this.metadata.format.numberOfChannels))),this.metadata.format.numberOfSamples&&this.metadata.format.sampleRate&&this.metadata.setFormat("duration",this.metadata.format.numberOfSamples/this.metadata.format.sampleRate);break;default:ti(`Ignore chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);break}let i=t.chunkSize-BigInt(this.tokenizer.position-o);i>0&&(ti(`After Parsing chunk, remaining ${i} bytes`),await this.tokenizer.ignore(Number(i)))}async handleSoundPropertyChunks(t){for(ti(`Parsing sound-property-chunks, remainingSize=${t}`);t>0;){let o=await this.tokenizer.readToken(Sl);ti(`Sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`);let i=this.tokenizer.position;switch(o.chunkID.trim()){case"FS":{let a=await this.tokenizer.readToken(xe);this.metadata.setFormat("sampleRate",a);break}case"CHNL":{let a=await this.tokenizer.readToken(LA);this.metadata.setFormat("numberOfChannels",a),await this.handleChannelChunks(o.chunkSize-BigInt(LA.len));break}case"CMPR":{let a=(await this.tokenizer.readToken(rt)).trim(),A=await this.tokenizer.readToken(fA),r=await this.tokenizer.readToken(new Ve(A,"ascii"));a==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${a} (${r})`);break}case"ABSS":{let a=await this.tokenizer.readToken(LA),A=await this.tokenizer.readToken(fA),r=await this.tokenizer.readToken(fA),s=await this.tokenizer.readToken(xe);ti(`ABSS ${a}:${A}:${r}.${s}`);break}case"LSCO":{let a=await this.tokenizer.readToken(LA);ti(`LSCO lsConfig=${a}`);break}default:ti(`Unknown sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`),await this.tokenizer.ignore(Number(o.chunkSize))}let e=o.chunkSize-BigInt(this.tokenizer.position-i);e>0&&(ti(`After Parsing sound-property-chunk ${o.chunkSize}, remaining ${e} bytes`),await this.tokenizer.ignore(Number(e))),t-=BigInt(Sl.len)+o.chunkSize,ti(`Parsing sound-property-chunks, remainingSize=${t}`)}if(this.metadata.format.lossless&&this.metadata.format.sampleRate&&this.metadata.format.numberOfChannels&&this.metadata.format.bitsPerSample){let o=this.metadata.format.sampleRate*this.metadata.format.numberOfChannels*this.metadata.format.bitsPerSample;this.metadata.setFormat("bitrate",o)}}async handleChannelChunks(t){ti(`Parsing channel-chunks, remainingSize=${t}`);let o=[];for(;t>=rt.len;){let i=await this.tokenizer.readToken(rt);ti(`Channel[ID=${i}]`),o.push(i),t-=BigInt(rt.len)}return ti(`Channels: ${o.join(", ")}`),o}}});var Dte,wte=ue(()=>{Dte={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],async load(){return(await Promise.resolve().then(()=>(Ste(),mte))).DsdiffParser}}});var Ote,zc,kw,CL=ue(()=>{wA();Ai();Xt();Ote={NONE:"not compressed PCM Apple Computer",sowt:"PCM (byte swapped)",fl32:"32-bit floating point IEEE 32-bit float",fl64:"64-bit floating point IEEE 64-bit float Apple Computer",alaw:"ALaw 2:1 8-bit ITU-T G.711 A-law",ulaw:"\xB5Law 2:1 8-bit ITU-T G.711 \xB5-law Apple Computer",ULAW:"CCITT G.711 u-law 8-bit ITU-T G.711 \xB5-law",ALAW:"CCITT G.711 A-law 8-bit ITU-T G.711 A-law",FL32:"Float 32 IEEE 32-bit float "},zc=class extends Qt("AIFF"){},kw=class{constructor(t,o){this.isAifc=o;let i=o?22:18;if(t.chunkSize>Math.abs(i):e<22){let A=fA.get(t,o+22);if(A>0){let r=(A+1)%2;if(23+A+r===this.len)a.compressionName=new Ve(A,"latin1").get(t,o+23);else throw new zc("Illegal pstring length")}else a.compressionName=void 0}}else a.compressionName="PCM";return a}}});var vw,bte=ue(()=>{wA();Ai();vw={len:8,get:(n,t)=>({chunkID:rt.get(n,t),chunkSize:Number(BigInt(xe.get(n,t+4)))})}});var _te={};_r(_te,{AIFFParser:()=>BL});var Mte,uL,BL,Tte=ue(()=>{wA();Mte=qe(ct(),1);Fo();gh();Ai();Ni();CL();CL();bte();uL=(0,Mte.default)("music-metadata:parser:aiff"),BL=class extends Tt{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(vw)).chunkID!=="FORM")throw new zc("Invalid Chunk-ID, expected 'FORM'");let o=await this.tokenizer.readToken(rt);switch(o){case"AIFF":this.metadata.setFormat("container",o),this.isCompressed=!1;break;case"AIFC":this.metadata.setFormat("container","AIFF-C"),this.isCompressed=!0;break;default:throw new zc(`Unsupported AIFF type: ${o}`)}this.metadata.setFormat("lossless",!this.isCompressed),this.metadata.setAudioOnly();try{for(;!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=vw.len;){uL(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(vw),e=2*Math.round(i.chunkSize/2),a=await this.readData(i);await this.tokenizer.ignore(e-a)}}catch(i){if(i instanceof kA)uL("End-of-stream");else throw i}}async readData(t){switch(t.chunkID){case"COMM":{if(this.isCompressed===null)throw new zc("Failed to parse AIFF.COMM chunk when compression type is unknown");let o=await this.tokenizer.readToken(new kw(t,this.isCompressed));return this.metadata.setFormat("bitsPerSample",o.sampleSize),this.metadata.setFormat("sampleRate",o.sampleRate),this.metadata.setFormat("numberOfChannels",o.numChannels),this.metadata.setFormat("numberOfSamples",o.numSampleFrames),this.metadata.setFormat("duration",o.numSampleFrames/o.sampleRate),(o.compressionName||o.compressionType)&&this.metadata.setFormat("codec",o.compressionName??Ote[o.compressionType]),t.chunkSize}case"ID3 ":{let o=await this.tokenizer.readToken(new Dt(t.chunkSize)),i=to(o);return await new jo().parse(this.metadata,i,this.options),t.chunkSize}case"SSND":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",8*t.chunkSize/this.metadata.format.duration),0;case"NAME":case"AUTH":case"(c) ":case"ANNO":return this.readTextChunk(t);default:return uL(`Ignore chunk id=${t.chunkID}, size=${t.chunkSize}`),0}}async readTextChunk(t){let i=(await this.tokenizer.readToken(new Ve(t.chunkSize,"ascii"))).split("\0").map(e=>e.trim()).filter(e=>e?.length);return await Promise.all(i.map(e=>this.metadata.addTag("AIFF",t.chunkID,e))),t.chunkSize}}});var Nte,Rte=ue(()=>{Nte={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],async load(){return(await Promise.resolve().then(()=>(Tte(),_te))).AIFFParser}}});var DB,kte,vte,Pte=ue(()=>{wA();Ai();DB={len:12,get:(n,t)=>({id:rt.get(n,t),size:Mr.get(n,t+4)})},kte={len:16,get:(n,t)=>({fileSize:gB.get(n,t),metadataPointer:gB.get(n,t+8)})},vte={len:40,get:(n,t)=>({formatVersion:gr.get(n,t),formatID:gr.get(n,t+4),channelType:gr.get(n,t+8),channelNum:gr.get(n,t+12),samplingFrequency:gr.get(n,t+16),bitsPerSample:gr.get(n,t+20),sampleCount:gB.get(n,t+24),blockSizePerChannel:gr.get(n,t+32)})}});var Fte={};_r(Fte,{DsdContentParseError:()=>Pw,DsfParser:()=>QL});var Gte,fL,Pw,QL,Lte=ue(()=>{Gte=qe(ct(),1);yB();Pte();gh();Xt();fL=(0,Gte.default)("music-metadata:parser:DSF"),Pw=class extends Qt("DSD"){},QL=class extends bs{async postId3v2Parse(){let t=this.tokenizer.position,o=await this.tokenizer.readToken(DB);if(o.id!=="DSD ")throw new Pw("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();let i=await this.tokenizer.readToken(kte);if(i.metadataPointer===BigInt(0))fL("No ID3v2 tag present");else return fL(`expect ID3v2 at offset=${i.metadataPointer}`),await this.parseChunks(i.fileSize-o.size),await this.tokenizer.ignore(Number(i.metadataPointer)-this.tokenizer.position-t),new jo().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(t){for(;t>=DB.len;){let o=await this.tokenizer.readToken(DB);switch(fL(`Parsing chunk name=${o.id} size=${o.size}`),o.id){case"fmt ":{let i=await this.tokenizer.readToken(vte);this.metadata.setFormat("numberOfChannels",i.channelNum),this.metadata.setFormat("sampleRate",i.samplingFrequency),this.metadata.setFormat("bitsPerSample",i.bitsPerSample),this.metadata.setFormat("numberOfSamples",i.sampleCount),this.metadata.setFormat("duration",Number(i.sampleCount)/i.samplingFrequency);let e=i.bitsPerSample*i.samplingFrequency*i.channelNum;this.metadata.setFormat("bitrate",e);return}default:this.tokenizer.ignore(Number(o.size)-DB.len);break}t-=o.size}}}});var Ute,Hte=ue(()=>{Ute={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],async load(){return(await Promise.resolve().then(()=>(Lte(),Fte))).DsfParser}}});var Vc,wB,Kte,Gw=ue(()=>{wA();Kc();Vc=class n{static fromBase64(t){return n.fromBuffer(Uint8Array.from(atob(t),o=>o.charCodeAt(0)))}static fromBuffer(t){return new n(t.length).get(t,0)}constructor(t){this.len=t}get(t,o){let i=th[xe.get(t,o)];o+=4;let e=xe.get(t,o);o+=4;let a=new Ve(e,"utf-8").get(t,o);o+=e;let A=xe.get(t,o);o+=4;let r=new Ve(A,"utf-8").get(t,o);o+=A;let s=xe.get(t,o);o+=4;let g=xe.get(t,o);o+=4;let c=xe.get(t,o);o+=4;let I=xe.get(t,o);o+=4;let d=xe.get(t,o);o+=4;let B=t.slice(o,o+d);return{type:i,format:a,description:r,width:s,height:g,colour_depth:c,indexed_color:I,data:B}}},wB={len:7,get:(n,t)=>({packetType:fA.get(n,t),vorbis:new Ve(6,"ascii").get(n,t+1)})},Kte={len:23,get:(n,t)=>({version:Fe.get(n,t+0),channelMode:fA.get(n,t+4),sampleRate:Fe.get(n,t+5),bitrateMax:Fe.get(n,t+9),bitrateNominal:Fe.get(n,t+13),bitrateMin:Fe.get(n,t+17)})}});var uh,yL=ue(()=>{wA();fs();uh=class{constructor(t,o){this.data=t,this.offset=o}readInt32(){let t=Fe.get(this.data,this.offset);return this.offset+=4,t}readStringUtf8(){let t=this.readInt32(),o=Qr(this.data.subarray(this.offset,this.offset+t),"utf-8");return this.offset+=t,o}parseUserComment(){let t=this.offset,o=this.readStringUtf8(),i=o.indexOf("=");return{key:o.substring(0,i).toUpperCase(),value:o.substring(i+1),len:this.offset-t}}}});var xte,Bh,OB,Ms,bB=ue(()=>{wA();xte=qe(ct(),1);yL();Gw();Xt();Bh=(0,xte.default)("music-metadata:parser:ogg:vorbis1"),OB=class extends Qt("Vorbis"){},Ms=class n{constructor(t,o){this.pageSegments=[],this.durationOnLastPage=!0,this.metadata=t,this.options=o}async parsePage(t,o){if(this.lastPageHeader=t,t.headerType.firstPage)this.parseFirstPage(t,o);else{if(t.headerType.continued){if(this.pageSegments.length===0)throw new OB("Cannot continue on previous page");this.pageSegments.push(o)}if(t.headerType.lastPage||!t.headerType.continued){if(this.pageSegments.length>0){let i=n.mergeUint8Arrays(this.pageSegments);await this.parseFullPage(i)}this.pageSegments=t.headerType.lastPage?[]:[o]}}}static mergeUint8Arrays(t){let o=t.reduce((e,a)=>e+a.length,0),i=new Uint8Array(o);return t.forEach((e,a,A)=>{let r=A.slice(0,a).reduce((s,g)=>s+g.length,0);i.set(e,r)}),i}async flush(){await this.parseFullPage(n.mergeUint8Arrays(this.pageSegments))}async parseUserComment(t,o){let e=new uh(t,o).parseUserComment();return await this.addTag(e.key,e.value),e.len}async addTag(t,o){if(t==="METADATA_BLOCK_PICTURE"&&typeof o=="string"){if(this.options.skipCovers){Bh("Ignore picture");return}o=Vc.fromBase64(o),Bh(`Push picture: id=${t}, format=${o.format}`)}else Bh(`Push tag: id=${t}, value=${o}`);await this.metadata.addTag("vorbis",t,o)}calculateDuration(t){this.lastPageHeader&&(t||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0&&(this.metadata.setFormat("numberOfSamples",this.lastPageHeader.absoluteGranulePosition),this.metadata.setFormat("duration",this.lastPageHeader.absoluteGranulePosition/this.metadata.format.sampleRate))}parseFirstPage(t,o){this.metadata.setFormat("codec","Vorbis I"),this.metadata.setFormat("hasAudio",!0),Bh("Parse first page");let i=wB.get(o,0);if(i.vorbis!=="vorbis")throw new OB("Metadata does not look like Vorbis");if(i.packetType===1){let e=Kte.get(o,wB.len);this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("bitrate",e.bitrateNominal),this.metadata.setFormat("numberOfChannels",e.channelMode),Bh("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",e.sampleRate,e.bitrateNominal,e.channelMode)}else throw new OB("First Ogg page should be type 1: the identification header")}async parseFullPage(t){let o=wB.get(t,0);switch(Bh("Parse full page: type=%s, byteLength=%s",o.packetType,t.byteLength),o.packetType){case 3:return this.parseUserCommentList(t,wB.len);case 1:case 5:break}}async parseUserCommentList(t,o){let i=Fe.get(t,o);o+=4,o+=i;let e=Fe.get(t,o);for(o+=4;e-- >0;)o+=await this.parseUserComment(t,o)}}});var ri,MB,_B,mL=ue(()=>{$t();wA();ri={STREAMINFO:0,PADDING:1,APPLICATION:2,SEEKTABLE:3,VORBIS_COMMENT:4,CUESHEET:5,PICTURE:6},MB={len:4,get:(n,t)=>({lastBlock:GA(n,t,7),type:ZA(n,t,1,7),length:br.get(n,t+1)})},_B={len:34,get:(n,t)=>({minimumBlockSize:LA.get(n,t),maximumBlockSize:LA.get(n,t+2)/1e3,minimumFrameSize:br.get(n,t+4),maximumFrameSize:br.get(n,t+7),sampleRate:br.get(n,t+10)>>4,channels:ZA(n,t+12,4,3)+1,bitsPerSample:ZA(n,t+12,7,5)+1,totalSamples:ZA(n,t+13,4,36),fileMD5:new Dt(16).get(n,t+18)})}});var Jte={};_r(Jte,{FlacParser:()=>TB});var jte,P3e,Fw,TB,SL=ue(()=>{jte=qe(ct(),1);wA();Gw();yB();Ai();bB();yL();Xt();mL();P3e=(0,jte.default)("music-metadata:parser:FLAC"),Fw=class extends Qt("FLAC"){},TB=class extends bs{constructor(){super(...arguments),this.vorbisParser=new Ms(this.metadata,this.options)}async postId3v2Parse(){if((await this.tokenizer.readToken(rt)).toString()!=="fLaC")throw new Fw("Invalid FLAC preamble");let o;do o=await this.tokenizer.readToken(MB),await this.parseDataBlock(o);while(!o.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){let i=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*i/this.metadata.format.duration)}}async parseDataBlock(t){switch(P3e(`blockHeader type=${t.type}, length=${t.length}`),t.type){case ri.STREAMINFO:return this.readBlockStreamInfo(t.length);case ri.PADDING:break;case ri.APPLICATION:break;case ri.SEEKTABLE:break;case ri.VORBIS_COMMENT:return this.readComment(t.length);case ri.CUESHEET:break;case ri.PICTURE:await this.parsePicture(t.length);return;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}async readBlockStreamInfo(t){if(t!==_B.len)throw new Fw("Unexpected block-stream-info length");let o=await this.tokenizer.readToken(_B);this.metadata.setFormat("container","FLAC"),this.processsStreamInfo(o)}processsStreamInfo(t){this.metadata.setFormat("codec","FLAC"),this.metadata.setFormat("hasAudio",!0),this.metadata.setFormat("lossless",!0),this.metadata.setFormat("numberOfChannels",t.channels),this.metadata.setFormat("bitsPerSample",t.bitsPerSample),this.metadata.setFormat("sampleRate",t.sampleRate),t.totalSamples>0&&this.metadata.setFormat("duration",t.totalSamples/t.sampleRate)}async readComment(t){let o=await this.tokenizer.readToken(new Dt(t));return this.parseComment(o)}async parseComment(t){let o=new uh(t,0),i=o.readStringUtf8();i.length>0&&this.metadata.setFormat("tool",i);let e=o.readInt32(),a=new Array(e);for(let A=0;A(A.key==="ENCODER"&&this.metadata.setFormat("tool",A.value),this.addTag(A.key,A.value))))}async parsePicture(t){return this.options.skipCovers?this.tokenizer.ignore(t):this.addPictureTag(await this.tokenizer.readToken(new Vc(t)))}addPictureTag(t){return this.addTag("METADATA_BLOCK_PICTURE",t)}addTag(t,o){return this.vorbisParser.addTag(t,o)}}});var qte,zte=ue(()=>{qte={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],async load(){return(await Promise.resolve().then(()=>(SL(),Jte))).FlacParser}}});var Me,DL=ue(()=>{Me={string:0,uint:1,uid:2,bool:3,binary:4,float:5}});var Vte,Wte=ue(()=>{DL();Vte={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:Me.uint},17143:{name:"ebmlReadVersion",value:Me.uint},17138:{name:"ebmlMaxIDWidth",value:Me.uint},17139:{name:"ebmlMaxSizeWidth",value:Me.uint},17026:{name:"docType",value:Me.string},17031:{name:"docTypeVersion",value:Me.uint},17029:{name:"docTypeReadVersion",value:Me.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:Me.binary},21420:{name:"position",value:Me.uint}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:Me.uid},29572:{name:"filename",value:Me.string},3979555:{name:"prevUID",value:Me.uid},3965867:{name:"prevFilename",value:Me.string},4110627:{name:"nextUID",value:Me.uid},4096955:{name:"nextFilename",value:Me.string},2807729:{name:"timecodeScale",value:Me.uint},17545:{name:"duration",value:Me.float},17505:{name:"dateUTC",value:Me.uint},31657:{name:"title",value:Me.string},19840:{name:"muxingApp",value:Me.string},22337:{name:"writingApp",value:Me.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:Me.uid},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:Me.uid},171:{name:"prevSize",value:Me.uid},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:Me.uint},29637:{name:"uid",value:Me.uid},131:{name:"trackType",value:Me.uint},185:{name:"flagEnabled",value:Me.bool},136:{name:"flagDefault",value:Me.bool},21930:{name:"flagForced",value:Me.bool},156:{name:"flagLacing",value:Me.bool},28135:{name:"minCache",value:Me.uint},28136:{name:"maxCache",value:Me.uint},2352003:{name:"defaultDuration",value:Me.uint},2306383:{name:"timecodeScale",value:Me.float},21358:{name:"name",value:Me.string},2274716:{name:"language",value:Me.string},134:{name:"codecID",value:Me.string},25506:{name:"codecPrivate",value:Me.binary},2459272:{name:"codecName",value:Me.string},3839639:{name:"codecSettings",value:Me.string},3883072:{name:"codecInfoUrl",value:Me.string},2536e3:{name:"codecDownloadUrl",value:Me.string},170:{name:"codecDecodeAll",value:Me.bool},28587:{name:"trackOverlay",value:Me.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:Me.bool},21432:{name:"stereoMode",value:Me.uint},176:{name:"pixelWidth",value:Me.uint},186:{name:"pixelHeight",value:Me.uint},21680:{name:"displayWidth",value:Me.uint},21690:{name:"displayHeight",value:Me.uint},21683:{name:"aspectRatioType",value:Me.uint},3061028:{name:"colourSpace",value:Me.uint},3126563:{name:"gammaValue",value:Me.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:Me.float},30901:{name:"outputSamplingFrequency",value:Me.float},159:{name:"channels",value:Me.uint},148:{name:"channels",value:Me.uint},32123:{name:"channelPositions",value:Me.binary},25188:{name:"bitDepth",value:Me.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:Me.uint},20530:{name:"scope",value:Me.bool},20531:{name:"type",value:Me.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:Me.uint},16981:{name:"contentCompSettings",value:Me.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:Me.uint},18402:{name:"contentEncKeyID",value:Me.binary},18403:{name:"contentSignature ",value:Me.binary},18404:{name:"ContentSigKeyID ",value:Me.binary},18405:{name:"contentSigAlgo ",value:Me.uint},18406:{name:"contentSigHashAlgo ",value:Me.uint}}},25188:{name:"bitDepth",value:Me.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:Me.uid},183:{name:"positions",container:{247:{name:"track",value:Me.uint},241:{name:"clusterPosition",value:Me.uint},21368:{name:"blockNumber",value:Me.uint},234:{name:"codecState",value:Me.uint},219:{name:"reference",container:{150:{name:"time",value:Me.uint},151:{name:"cluster",value:Me.uint},21343:{name:"number",value:Me.uint},235:{name:"codecState",value:Me.uint}}},240:{name:"relativePosition",value:Me.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:Me.string},18030:{name:"name",value:Me.string},18016:{name:"mimeType",value:Me.string},18012:{name:"data",value:Me.binary},18094:{name:"uid",value:Me.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:Me.uid},145:{name:"timeStart",value:Me.uint},146:{name:"timeEnd",value:Me.uid},152:{name:"hidden",value:Me.bool},17816:{name:"enabled",value:Me.uid},143:{name:"track",container:{137:{name:"trackNumber",value:Me.uid},128:{name:"display",container:{133:{name:"string",value:Me.string},17276:{name:"language ",value:Me.string},17278:{name:"country ",value:Me.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:Me.uid},25540:{name:"tagChapterUID",value:Me.uint},25542:{name:"tagAttachmentUID",value:Me.uid},25546:{name:"targetType",value:Me.string},26826:{name:"targetTypeValue",value:Me.uint},25545:{name:"tagEditionUID",value:Me.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:Me.string},17543:{name:"string",value:Me.string},17541:{name:"binary",value:Me.binary},17530:{name:"language",value:Me.string},17531:{name:"languageIETF",value:Me.string},17540:{name:"default",value:Me.bool}}}}}}}}}}}});function wL(n,t){return Number(G3e(n,t))}function G3e(n,t){let o=new Uint8Array(8),i=n.subarray(0,t);try{return o.set(i,8-t),ms.get(o,0)}catch{return BigInt(-1)}}function Xte(n){return n.container&&Object.keys(n.container).map(t=>{let o=n.container[t];return o.id=Number.parseInt(t,10),o}).forEach(t=>{t.parent=n,Xte(t)}),n}function Dl(n){let t="";return n.parent&&n.parent.name!=="dtd"&&(t+=`${Dl(n.parent)}/`),t+n.name}var Zte,fh,Lw,_s,Uw,$te=ue(()=>{wA();Zte=qe(ct(),1);Fo();DL();wA();Xt();fh=(0,Zte.default)("music-metadata:parser:ebml"),Lw=class extends Qt("EBML"){},_s={ReadNext:0,IgnoreElement:2,SkipSiblings:3,TerminateParsing:4,SkipElement:5},Uw=class{constructor(t){this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=t,this.parserMap.set(Me.uint,o=>this.readUint(o)),this.parserMap.set(Me.string,o=>this.readString(o)),this.parserMap.set(Me.binary,o=>this.readBuffer(o)),this.parserMap.set(Me.uid,async o=>this.readBuffer(o)),this.parserMap.set(Me.bool,o=>this.readFlag(o)),this.parserMap.set(Me.float,o=>this.readFloat(o))}async iterate(t,o,i){return this.parseContainer(Xte(t),o,i)}async parseContainer(t,o,i){let e={};for(;this.tokenizer.position=0?this.tokenizer.position+a.len:-1,i);r.multiple?(e[r.name]||(e[r.name]=[]),e[r.name].push(g)):e[r.name]=g,await i.elementValue(r,g,A)}else{let g=this.parserMap.get(r.value);if(typeof g=="function"){let c=await g(a);e[r.name]=c,await i.elementValue(r,c,A)}}break;case _s.SkipElement:fh(`Go to next element: name=${Dl(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`);break;case _s.IgnoreElement:fh(`Ignore element: name=${Dl(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(a.len);break;case _s.SkipSiblings:fh(`Ignore remaining container, at: name=${Dl(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(o-this.tokenizer.position);break;case _s.TerminateParsing:return fh(`Terminate parsing at element: name=${Dl(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`),e}else switch(a.id){case 236:await this.tokenizer.ignore(a.len);break;default:fh(`parseEbml: parent=${Dl(t)}, unknown child: id=${a.id.toString(16)} at position=${A}`),await this.tokenizer.ignore(a.len)}}return e}async readVintData(t){let o=await this.tokenizer.peekNumber(fA),i=128,e=1;for(;(o&i)===0;){if(e>t)throw new Lw("VINT value exceeding maximum size");++e,i>>=1}let a=new Uint8Array(e);return await this.tokenizer.readBuffer(a),a}async readElement(){let t=await this.readVintData(this.ebmlMaxIDLength),o=await this.readVintData(this.ebmlMaxSizeLength);return o[0]^=128>>o.length-1,{id:wL(t,t.length),len:wL(o,o.length)}}async readFloat(t){switch(t.len){case 0:return 0;case 4:return this.tokenizer.readNumber(PF);case 8:return this.tokenizer.readNumber(iw);case 10:return this.tokenizer.readNumber(iw);default:throw new Lw(`Invalid IEEE-754 float length: ${t.len}`)}}async readFlag(t){return await this.readUint(t)===1}async readUint(t){let o=await this.readBuffer(t);return wL(o,t.len)}async readString(t){return(await this.tokenizer.readToken(new Ve(t.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(t){let o=new Uint8Array(t.len);return await this.tokenizer.readBuffer(o),o}}});var Are={};_r(Are,{MatroskaParser:()=>OL});var ere,Hw,OL,tre=ue(()=>{ere=qe(ct(),1);Ni();Wte();zF();$te();Hw=(0,ere.default)("music-metadata:parser:matroska"),OL=class extends Tt{constructor(){super(...arguments),this.seekHeadOffset=0,this.flagUseIndexToSkipClusters=this.options.mkvUseIndex??!1}async parse(){let t=this.tokenizer.fileInfo.size??Number.MAX_SAFE_INTEGER,o=new Uw(this.tokenizer);Hw("Initializing DTD end MatroskaIterator"),await o.iterate(Vte,t,{startNext:i=>{switch(i.id){case 475249515:return Hw(`Skip element: name=${i.name}, id=0x${i.id.toString(16)}`),_s.IgnoreElement;case 524531317:if(this.flagUseIndexToSkipClusters&&this.seekHead){let e=this.seekHead.seek.find(a=>a.position+this.seekHeadOffset>this.tokenizer.position);if(e){let a=e.position+this.seekHeadOffset-this.tokenizer.position;return Hw(`Use index to go to next position, ignoring ${a} bytes`),this.tokenizer.ignore(a),_s.SkipElement}}return _s.IgnoreElement;default:return _s.ReadNext}},elementValue:async(i,e,a)=>{switch(Hw(`Received: name=${i.name}, value=${e}`),i.id){case 17026:this.metadata.setFormat("container",`EBML/${e}`);break;case 290298740:this.seekHead=e,this.seekHeadOffset=a;break;case 357149030:{let A=e,r=A.timecodeScale?A.timecodeScale:1e6;if(typeof A.duration=="number"){let s=A.duration*r/1e9;await this.addTag("segment:title",A.title),this.metadata.setFormat("duration",Number(s))}}break;case 374648427:{let A=e;if(A?.entries){A.entries.forEach(s=>{let g={codecName:s.codecID.replace("A_","").replace("V_",""),codecSettings:s.codecSettings,flagDefault:s.flagDefault,flagLacing:s.flagLacing,flagEnabled:s.flagEnabled,language:s.language,name:s.name,type:s.trackType,audio:s.audio,video:s.video};this.metadata.addStreamInfo(g)});let r=A.entries.filter(s=>s.trackType===sa.audio).reduce((s,g)=>!s||g.flagDefault&&!s.flagDefault||g.trackNumber{let s=r.target,g=s?.targetTypeValue?IAe[s.targetTypeValue]:s?.targetType?s.targetType:"track";await Promise.all(r.simpleTags.map(async c=>{let I=c.string?c.string:c.binary;await this.addTag(`${g}:${c.name}`,I)}))}))}break;case 423732329:{let A=e;await Promise.all(A.attachedFiles.filter(r=>r.mimeType.startsWith("image/")).map(r=>this.addTag("picture",{data:r.data,format:r.mimeType,description:r.description,name:r.name})))}break}}})}async addTag(t,o){await this.metadata.addTag("matroska",t,o)}}});var rre,are=ue(()=>{rre={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],async load(){return(await Promise.resolve().then(()=>(tre(),Are))).MatroskaParser}}});function gre(n,t,o,i,e){if(ML(`remainingLen=${i}, numberOfEntries=${e} * token-len=${t.len}`),i===0)return[];if(i!==e*t.len)throw new _g("mismatch number-of-entries with remaining atom-length");let a=[];for(let A=0;A{wA();ore=qe(ct(),1);Ai();Xt();$t();Xt();ML=(0,ore.default)("music-metadata:parser:MP4:atom"),_g=class extends Qt("MP4"){},wl={len:8,get:(n,t)=>{let o=xe.get(n,t);if(o<0)throw new _g("Invalid atom header length");return{length:BigInt(o),name:new Ve(4,"latin1").get(n,t+4)}},put:(n,t,o)=>(xe.put(n,t,Number(o.length)),rt.put(n,t+4,o.name))},nre=ms,_L={len:4,get:(n,t)=>({type:new Ve(4,"ascii").get(n,t)})},Kw=class{constructor(t,o,i){if(to&&ML(`Warning: atom ${i} expected to be ${o}, but was actually ${t} bytes long.`),this.len=t}},Qh={len:4,get:(n,t)=>{let o=xe.get(n,t)-2082844800;return new Date(o*1e3)}},yh={len:8,get:(n,t)=>{let o=Number(ms.get(n,t))-2082844800;return new Date(o*1e3)}},xw=class extends Kw{constructor(t){super(t,24,"mdhd")}get(t,o){let i=fA.get(t,o+0),e=br.get(t,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:Qh.get(t,o+4),modificationTime:Qh.get(t,o+8),timeScale:xe.get(t,o+12),duration:xe.get(t,o+16),language:LA.get(t,o+20),quality:LA.get(t,o+22)};case 1:return{version:i,flags:e,creationTime:yh.get(t,o+4),modificationTime:yh.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(ms.get(t,o+24)),language:LA.get(t,o+32),quality:LA.get(t,o+34)};default:throw new Ho("Invalid mdhd version header")}}},Yw=class extends Kw{constructor(t){super(t,100,"mvhd")}get(t,o){let i=fA.get(t,o),e=br.get(t,o+1);return i===1?{version:i,flags:e,creationTime:yh.get(t,o+4),modificationTime:yh.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(ms.get(t,o+24)),preferredRate:xe.get(t,o+32),preferredVolume:LA.get(t,o+36),previewTime:xe.get(t,o+84),previewDuration:xe.get(t,o+88),posterTime:xe.get(t,o+92),selectionTime:xe.get(t,o+96),selectionDuration:xe.get(t,o+100),currentTime:xe.get(t,o+104),nextTrackID:xe.get(t,o+108)}:{version:i,flags:e,creationTime:Qh.get(t,o+4),modificationTime:Qh.get(t,o+8),timeScale:xe.get(t,o+12),duration:xe.get(t,o+16),preferredRate:xe.get(t,o+20),preferredVolume:LA.get(t,o+24),previewTime:xe.get(t,o+72),previewDuration:xe.get(t,o+76),posterTime:xe.get(t,o+80),selectionTime:xe.get(t,o+84),selectionDuration:xe.get(t,o+88),currentTime:xe.get(t,o+92),nextTrackID:xe.get(t,o+96)}}},jw=class{constructor(t){this.len=t}get(t,o){return{type:{set:fA.get(t,o+0),type:br.get(t,o+1)},locale:br.get(t,o+4),value:new Dt(this.len-8).get(t,o+8)}}},Jw=class{constructor(t){this.len=t}get(t,o){return{version:fA.get(t,o),flags:br.get(t,o+1),name:new Ve(this.len-4,"utf-8").get(t,o+4)}}},qw=class{constructor(t){this.len=t}get(t,o){let i=fA.get(t,o),e=br.get(t,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:Qh.get(t,o+4),modificationTime:Qh.get(t,o+8),trackId:xe.get(t,o+12),duration:xe.get(t,o+20),layer:LA.get(t,o+32),alternateGroup:LA.get(t,o+34),volume:LA.get(t,o+36)};case 1:return{version:i,flags:e,creationTime:yh.get(t,o+4),modificationTime:yh.get(t,o+12),trackId:xe.get(t,o+20),duration:Number(ms.get(t,o+28)),layer:LA.get(t,o+44),alternateGroup:LA.get(t,o+46),volume:LA.get(t,o+48)};default:throw new Ho("Invalid tkhd version header")}}},ire={len:8,get:(n,t)=>({version:fA.get(n,t),flags:br.get(n,t+1),numberOfEntries:xe.get(n,t+4)})},bL=class{constructor(t){this.len=t}get(t,o){let i=this.len-12;return{dataFormat:rt.get(t,o),dataReferenceIndex:LA.get(t,o+10),description:i>0?new Dt(i).get(t,o+12):void 0}}},NB=class{constructor(t){this.len=t}get(t,o){let i=ire.get(t,o);o+=ire.len;let e=[];for(let a=0;a=this.len){ML("TrackRunBox size mismatch");break}let r={};e.flags.sampleDurationPresent&&(r.sampleDuration=xe.get(t,a),a+=4),e.flags.sampleSizePresent&&(r.sampleSize=xe.get(t,a),a+=4),e.flags.sampleFlagsPresent&&(r.sampleFlags=xe.get(t,a),a+=4),e.flags.sampleCompositionTimeOffsetsPresent&&(r.sampleCompositionTimeOffset=xe.get(t,a),a+=4),e.samples.push(r)}return e}},eO=class{constructor(t){this.len=t}get(t,o){let i=o+1,e=new Ve(4,"utf-8");return{version:ys.get(t,o),flags:br.get(t,o+1),componentType:e.get(t,o+4),handlerType:e.get(t,o+8),componentName:new Ve(this.len-28,"utf-8").get(t,o+28)}}},AO=class{constructor(t){this.len=t}get(t,o){let i=0,e=[];for(;i{lre=qe(ct(),1);vB();vB();Ire=(0,lre.default)("music-metadata:parser:MP4:Atom"),tO=class n{static async readAtom(t,o,i,e){let a=t.position;Ire(`Reading next token on offset=${a}...`);let A=await t.readToken(wl),r=A.length===1n;r&&(A.length=await t.readToken(nre));let s=new n(A,r,i),g=s.getPayloadLength(e);return Ire(`parse atom name=${s.atomPath}, extended=${s.extended}, offset=${a}, len=${s.header.length}`),await s.readData(t,o,g),s}constructor(t,o,i){this.header=t,this.extended=o,this.parent=i,this.children=[],this.atomPath=(this.parent?`${this.parent.atomPath}.`:"")+this.header.name}getHeaderLength(){return this.extended?16:8}getPayloadLength(t){return(this.header.length===0n?t:Number(this.header.length))-this.getHeaderLength()}async readAtoms(t,o,i){for(;i>0;){let e=await n.readAtom(t,o,this,i);this.children.push(e),i-=e.header.length===0n?i:Number(e.header.length)}}async readData(t,o,i){switch(this.header.name){case"moov":case"udta":case"mdia":case"minf":case"stbl":case"":case"ilst":case"tref":case"moof":return this.readAtoms(t,o,this.getPayloadLength(i));case"meta":{let a=(await t.peekToken(wl)).name==="hdlr"?0:4;return await t.ignore(a),this.readAtoms(t,o,this.getPayloadLength(i)-a)}default:return o(this,i)}}}});var Cre={};_r(Cre,{MP4Parser:()=>NL});function hre(n,t,o){return o.indexOf(n)===t}var Ere,ki,U3e,dre,NL,ure=ue(()=>{Ere=qe(ct(),1);wA();Ni();BB();pre();vB();vB();Cl();lB();fs();ki=(0,Ere.default)("music-metadata:parser:MP4"),U3e="iTunes",dre={raw:{lossy:!1,format:"raw"},MAC3:{lossy:!0,format:"MACE 3:1"},MAC6:{lossy:!0,format:"MACE 6:1"},ima4:{lossy:!0,format:"IMA 4:1"},ulaw:{lossy:!0,format:"uLaw 2:1"},alaw:{lossy:!0,format:"uLaw 2:1"},Qclp:{lossy:!0,format:"QUALCOMM PureVoice"},".mp3":{lossy:!0,format:"MPEG-1 layer 3"},alac:{lossy:!1,format:"ALAC"},"ac-3":{lossy:!0,format:"AC-3"},mp4a:{lossy:!0,format:"MPEG-4/AAC"},mp4s:{lossy:!0,format:"MP4S"},c608:{lossy:!0,format:"CEA-608"},c708:{lossy:!0,format:"CEA-708"}};NL=class n extends Tt{constructor(){super(...arguments),this.tracks=new Map,this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.atomParsers={mvhd:async t=>{let o=await this.tokenizer.readToken(new Yw(t));this.metadata.setFormat("creationTime",o.creationTime),this.metadata.setFormat("modificationTime",o.modificationTime)},chap:async t=>{let o=this.getTrackDescription(),i=[];for(;t>=xe.len;)i.push(await this.tokenizer.readNumber(xe)),t-=xe.len;o.chapterList=i},mdat:async t=>{if(this.options.includeChapters){let o=[...this.tracks.values()].filter(i=>i.chapterList);if(o.length===1){let i=o[0].chapterList,e=[...this.tracks.values()].filter(a=>i.indexOf(a.header.trackId)!==-1);if(e.length===1)return this.parseChapterTrack(e[0],o[0],t)}}await this.tokenizer.ignore(t)},ftyp:async t=>{let o=[];for(;t>0;){let e=await this.tokenizer.readToken(_L);t-=_L.len;let a=e.type.replace(/\W/g,"");a.length>0&&o.push(a)}ki(`ftyp: ${o.join("/")}`);let i=o.filter(hre).join("/");this.metadata.setFormat("container",i)},stsd:async t=>{let o=await this.tokenizer.readToken(new NB(t)),i=this.getTrackDescription();i.soundSampleDescription=o.table.map(e=>this.parseSoundSampleDescription(e))},stsz:async t=>{let o=await this.tokenizer.readToken(new kB(t)),i=this.getTrackDescription();i.sampleSize=o.sampleSize,i.sampleSizeTable=o.entries},date:async t=>{let o=await this.tokenizer.readToken(new Ve(t,"utf-8"));await this.addTag("date",o)}}}static read_BE_Integer(t,o){let i=(o?"INT":"UINT")+t.length*8+(t.length>1?"_BE":""),e=VA[i];if(!e)throw new _g(`Token for integer type not found: "${i}"`);return Number(e.get(t,0))}async parse(){this.hasVideoTrack=!1,this.hasAudioTrack=!0,this.tracks.clear();let t=this.tokenizer.fileInfo.size||0;for(;!this.tokenizer.fileInfo.size||t>0;){try{if((await this.tokenizer.peekToken(wl)).name==="\0\0\0\0"){let A=`Error at offset=${this.tokenizer.position}: box.id=0`;ki(A),this.addWarning(A);break}}catch(a){if(a instanceof Error){let A=`Error at offset=${this.tokenizer.position}: ${a.message}`;ki(A),this.addWarning(A)}else throw a;break}let e=await tO.readAtom(this.tokenizer,(a,A)=>this.handleAtom(a,A),null,t);t-=e.header.length===BigInt(0)?t:Number(e.header.length)}let o=[];this.tracks.forEach(e=>{let a=[];e.soundSampleDescription.forEach(A=>{let r={},s=dre[A.dataFormat];if(s?(a.push(s.format),r.codecName=s.format):r.codecName=`<${A.dataFormat}>`,A.description){let{description:g}=A;g.sampleRate>0&&(r.type=sa.audio,r.audio={samplingFrequency:g.sampleRate,bitDepth:g.sampleSize,channels:g.numAudioChannels})}this.metadata.addStreamInfo(r)}),a.length>=1&&o.push(a.join("/"))}),o.length>0&&this.metadata.setFormat("codec",o.filter(hre).join("+"));let i=[...this.tracks.values()].filter(e=>e.soundSampleDescription.length>=1&&e.soundSampleDescription[0].description&&e.soundSampleDescription[0].description.numAudioChannels>0);for(let e of i){if(e.media.header&&e.media.header.timeScale>0)if(e.sampleRate=e.media.header.timeScale,e.media.header.duration>0&&(ki("Using duration defined on audio track"),e.samples=e.media.header.duration,e.duration=e.samples/e.sampleRate),e.fragments.length>0){ki("Calculate duration defined in track fragments");let r=0;e.sizeInBytes=0;for(let s of e.fragments)for(let g of s.trackRun.samples){let c=g.sampleDuration??s.header.defaultSampleDuration??0,I=g.sampleSize??s.header.defaultSampleSize??0;if(c===0)throw new Error("Missing sampleDuration and no defaultSampleDuration in track fragment header");if(I===0)throw new Error("Missing sampleSize and no defaultSampleSize in track fragment header");r+=c,e.sizeInBytes+=I}e.samples||(e.samples=r),e.duration||(e.duration=r/e.sampleRate)}else e.sampleSizeTable.length>0&&(e.sizeInBytes=e.sampleSizeTable.reduce((r,s)=>r+s,0));let a=e.soundSampleDescription[0];if(a.description&&e.media.header&&(this.metadata.setFormat("sampleRate",a.description.sampleRate),this.metadata.setFormat("bitsPerSample",a.description.sampleSize),this.metadata.setFormat("numberOfChannels",a.description.numAudioChannels),e.media.header.timeScale===0&&e.timeToSampleTable.length>0)){let r=e.timeToSampleTable.map(s=>s.count*s.duration).reduce((s,g)=>s+g);e.duration=r/a.description.sampleRate}let A=dre[a.dataFormat];A&&this.metadata.setFormat("lossless",!A.lossy)}if(i.length>=1){let e=i[0];e.duration&&(this.metadata.setFormat("duration",e.duration),e.sizeInBytes&&this.metadata.setFormat("bitrate",8*e.sizeInBytes/e.duration))}this.metadata.setFormat("hasAudio",this.hasAudioTrack),this.metadata.setFormat("hasVideo",this.hasVideoTrack)}async handleAtom(t,o){if(t.parent)switch(t.parent.header.name){case"ilst":case"":return this.parseMetadataItemData(t);case"moov":switch(t.header.name){case"trak":return this.parseTrackBox(t);case"udta":return this.parseTrackBox(t)}break;case"moof":switch(t.header.name){case"traf":return this.parseTrackFragmentBox(t)}}if(this.atomParsers[t.header.name])return this.atomParsers[t.header.name](o);ki(`No parser for atom path=${t.atomPath}, payload-len=${o}, ignoring atom`),await this.tokenizer.ignore(o)}getTrackDescription(){let t=[...this.tracks.values()];return t[t.length-1]}async addTag(t,o){await this.metadata.addTag(U3e,t,o)}addWarning(t){ki(`Warning: ${t}`),this.metadata.addWarning(t)}parseMetadataItemData(t){let o=t.header.name;return t.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"data":return this.parseValueAtom(o,i);case"name":case"mean":case"rate":{let A=await this.tokenizer.readToken(new Jw(a));o+=`:${A.name}`;break}default:{let A=await this.tokenizer.readToken(new Dt(a));this.addWarning(`Unsupported meta-item: ${o}[${i.header.name}] => value=${nw(A)} ascii=${Qr(A,"ascii")}`)}}},t.getPayloadLength(0))}async parseValueAtom(t,o){let i=await this.tokenizer.readToken(new jw(Number(o.header.length)-wl.len));if(i.type.set!==0)throw new _g(`Unsupported type-set != 0: ${i.type.set}`);switch(i.type.type){case 0:switch(t){case"trkn":case"disk":{let e=fA.get(i.value,3),a=fA.get(i.value,5);await this.addTag(t,`${e}/${a}`);break}case"gnre":{let e=fA.get(i.value,1),a=sh[e-1];await this.addTag(t,a);break}case"rate":{let e=Qr(i.value,"ascii");await this.addTag(t,e);break}default:ki(`unknown proprietary value type for: ${o.atomPath}`)}break;case 1:case 18:await this.addTag(t,Qr(i.value));break;case 13:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/jpeg",data:Uint8Array.from(i.value)});break;case 14:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/png",data:Uint8Array.from(i.value)});break;case 21:await this.addTag(t,n.read_BE_Integer(i.value,!0));break;case 22:await this.addTag(t,n.read_BE_Integer(i.value,!1));break;case 65:await this.addTag(t,fA.get(i.value,0));break;case 66:await this.addTag(t,LA.get(i.value,0));break;case 67:await this.addTag(t,xe.get(i.value,0));break;default:this.addWarning(`atom key=${t}, has unknown well-known-type (data-type): ${i.type.type}`)}}async parseTrackBox(t){let o={media:{},fragments:[]};await t.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"chap":{let A=await this.tokenizer.readToken(new AO(e));o.chapterList=A;break}case"tkhd":o.header=await this.tokenizer.readToken(new qw(a));break;case"hdlr":o.handler=await this.tokenizer.readToken(new eO(a)),o.isAudio=()=>o.handler.handlerType==="audi"||o.handler.handlerType==="soun",o.isVideo=()=>o.handler.handlerType==="vide",o.isAudio()?this.hasAudioTrack=!0:o.isVideo()&&(this.hasVideoTrack=!0);break;case"mdhd":{let A=await this.tokenizer.readToken(new xw(a));o.media.header=A;break}case"stco":{let A=await this.tokenizer.readToken(new Ww(a));o.chunkOffsetTable=A.entries;break}case"stsc":{let A=await this.tokenizer.readToken(new Vw(a));o.sampleToChunkTable=A.entries;break}case"stsd":{let A=await this.tokenizer.readToken(new NB(a));o.soundSampleDescription=A.table.map(r=>this.parseSoundSampleDescription(r));break}case"stts":{let A=await this.tokenizer.readToken(new zw(a));o.timeToSampleTable=A.entries;break}case"stsz":{let A=await this.tokenizer.readToken(new kB(a));o.sampleSize=A.sampleSize,o.sampleSizeTable=A.entries;break}case"dinf":case"vmhd":case"smhd":ki(`Ignoring: ${i.header.name}`),await this.tokenizer.ignore(a);break;default:ki(`Unexpected track box: ${i.header.name}`),await this.tokenizer.ignore(a)}},t.getPayloadLength(0)),this.tracks.set(o.header.trackId,o)}parseTrackFragmentBox(t){let o;return t.readAtoms(this.tokenizer,async(i,e)=>{let a=i.getPayloadLength(e);switch(i.header.name){case"tfhd":{let A=new Xw(i.getPayloadLength(e));o=await this.tokenizer.readToken(A);break}case"tfdt":await this.tokenizer.ignore(a);break;case"trun":{let A=new $w(a),r=await this.tokenizer.readToken(A);o&&this.tracks.get(o.trackId)?.fragments.push({header:o,trackRun:r});break}default:ki(`Unexpected box: ${i.header.name}`),await this.tokenizer.ignore(a)}},t.getPayloadLength(0))}parseSoundSampleDescription(t){let o={dataFormat:t.dataFormat,dataReferenceIndex:t.dataReferenceIndex},i=0;if(t.description){let e=TL.get(t.description,i);i+=TL.len,e.version===0||e.version===1?o.description=sre.get(t.description,i):ki(`Warning: sound-sample-description ${e} not implemented`)}return o}async parseChapterTrack(t,o,i){if(!t.sampleSize&&t.chunkOffsetTable.length!==t.sampleSizeTable.length)throw new Error("Expected equal chunk-offset-table & sample-size-table length.");let e=[];for(let a=0;a0;++a){let A=t.timeToSampleTable.slice(0,a).reduce((d,B)=>d+B.duration,0),s=t.chunkOffsetTable[a]-this.tokenizer.position,g=t.sampleSize>0?t.sampleSize:t.sampleSizeTable[a];if(i-=s+g,i<0)throw new _g("Chapter chunk exceeding token length");await this.tokenizer.ignore(s);let c=await this.tokenizer.readToken(new Zw(g));ki(`Chapter ${a+1}: ${c}`);let I={title:c,timeScale:t.media.header?t.media.header.timeScale:0,start:A,sampleOffset:this.findSampleOffset(o,this.tokenizer.position)};ki(`Chapter title=${I.title}, offset=${I.sampleOffset}/${o.header.duration}`),e.push(I)}this.metadata.setFormat("chapters",e),await this.tokenizer.ignore(i)}findSampleOffset(t,o){let i=0;for(;i=o[i].firstChunk&&t{Bre={parserType:"mp4",extensions:[".mp4",".m4a",".m4b",".m4pa","m4v","m4r","3gp",".mov",".movie",".qt"],mimeTypes:["audio/mp4","audio/m4a","video/m4v","video/mp4","video/quicktime"],async load(){return(await Promise.resolve().then(()=>(ure(),Cre))).MP4Parser}}});var Sre,Qre,H3e,yre,mre,rO,Dre=ue(()=>{wA();Sre=qe(ct(),1);$t();Qre=(0,Sre.default)("music-metadata:parser:musepack:sv8"),H3e=new Ve(2,"latin1"),yre={len:5,get:(n,t)=>({crc:Fe.get(n,t),streamVersion:fA.get(n,t+4)})},mre={len:2,get:(n,t)=>({sampleFrequency:[44100,48e3,37800,32e3][ZA(n,t,0,3)],maxUsedBands:ZA(n,t,3,5),channelCount:ZA(n,t+1,0,4)+1,msUsed:ma(n,t+1,4),audioBlockFrames:ZA(n,t+1,5,3)})},rO=class{get tokenizer(){return this._tokenizer}set tokenizer(t){this._tokenizer=t}constructor(t){this._tokenizer=t}async readPacketHeader(){let t=await this.tokenizer.readToken(H3e),o=await this.readVariableSizeField();return{key:t,payloadLength:o.value-2-o.len}}async readStreamHeader(t){let o={};Qre(`Reading SH at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(yre);t-=yre.len,Object.assign(o,i),Qre(`SH.streamVersion = ${i.streamVersion}`);let e=await this.readVariableSizeField();t-=e.len,o.sampleCount=e.value;let a=await this.readVariableSizeField();t-=a.len,o.beginningOfSilence=a.value;let A=await this.tokenizer.readToken(mre);return t-=mre.len,Object.assign(o,A),await this.tokenizer.ignore(t),o}async readVariableSizeField(t=1,o=0){let i=await this.tokenizer.readNumber(fA);return(i&128)===0?{len:t,value:o+i}:(i&=127,i+=o,this.readVariableSizeField(t+1,i<<7))}}});var Tg,aO=ue(()=>{Xt();Tg=class extends Qt("Musepack"){}});var wre,x3e,iO,Ore=ue(()=>{wre=qe(ct(),1);Ni();fl();Ai();Dre();aO();x3e=(0,wre.default)("music-metadata:parser:musepack"),iO=class extends Tt{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(rt)!=="MPCK")throw new Tg("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){let t=new rO(this.tokenizer);do{let o=await t.readPacketHeader();switch(x3e(`packet-header key=${o.key}, payloadLength=${o.payloadLength}`),o.key){case"SH":{let i=await t.readStreamHeader(o.payloadLength);this.metadata.setFormat("numberOfSamples",i.sampleCount),this.metadata.setFormat("sampleRate",i.sampleFrequency),this.metadata.setFormat("duration",i.sampleCount/i.sampleFrequency),this.metadata.setFormat("numberOfChannels",i.channelCount);break}case"AP":this.audioLength+=o.payloadLength,await this.tokenizer.ignore(o.payloadLength);break;case"RG":case"EI":case"SO":case"ST":case"CT":await this.tokenizer.ignore(o.payloadLength);break;case"SE":return this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioLength*8/this.metadata.format.duration),Bl(this.metadata,this.tokenizer,this.options);default:throw new Tg(`Unexpected header: ${o.key}`)}}while(!0)}}});var oO,bre=ue(()=>{wA();oO=class{constructor(t){this.pos=0,this.dword=null,this.tokenizer=t}async read(t){for(;this.dword===null;)this.dword=await this.tokenizer.readToken(Fe);let o=this.dword;return this.pos+=t,this.pos<32?(o>>>=32-this.pos,o&(1<>>32-this.pos),o&(1<0){let e=32-this.pos;this.dword=null,t-=e,this.pos=0}let o=t%32,i=(t-o)/32;return await this.tokenizer.ignore(i*4),this.read(o)}}});var Mre,_re=ue(()=>{wA();$t();fs();Mre={len:24,get:(n,t)=>{let o={signature:Qr(n.subarray(t,t+3),"latin1"),streamMinorVersion:ZA(n,t+3,0,4),streamMajorVersion:ZA(n,t+3,4,4),frameCount:Fe.get(n,t+4),maxLevel:SA.get(n,t+8),sampleFrequency:[44100,48e3,37800,32e3][ZA(n,t+10,0,2)],link:ZA(n,t+10,2,2),profile:ZA(n,t+10,4,4),maxBand:ZA(n,t+11,0,6),intensityStereo:ma(n,t+11,6),midSideStereo:ma(n,t+11,7),titlePeak:SA.get(n,t+12),titleGain:SA.get(n,t+14),albumPeak:SA.get(n,t+16),albumGain:SA.get(n,t+18),lastFrameLength:Fe.get(n,t+20)>>>20&2047,trueGapless:ma(n,t+23,0)};return o.lastFrameLength=o.trueGapless?Fe.get(n,20)>>>20&2047:0,o}}});var Nre,Tre,nO,Rre=ue(()=>{Nre=qe(ct(),1);Ni();fl();bre();_re();aO();Tre=(0,Nre.default)("music-metadata:parser:musepack"),nO=class extends Tt{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){let t=await this.tokenizer.readToken(Mre);if(t.signature!=="MP+")throw new Tg("Unexpected magic number");Tre(`stream-version=${t.streamMajorVersion}.${t.streamMinorVersion}`),this.metadata.setFormat("container","Musepack, SV7"),this.metadata.setFormat("sampleRate",t.sampleFrequency);let o=1152*(t.frameCount-1)+t.lastFrameLength;this.metadata.setFormat("numberOfSamples",o),this.duration=o/t.sampleFrequency,this.metadata.setFormat("duration",this.duration),this.bitreader=new oO(this.tokenizer),this.metadata.setFormat("numberOfChannels",t.midSideStereo||t.intensityStereo?2:1);let i=await this.bitreader.read(8);return this.metadata.setFormat("codec",(i/100).toFixed(2)),await this.skipAudioData(t.frameCount),Tre(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),Bl(this.metadata,this.tokenizer,this.options)}async skipAudioData(t){for(;t-- >0;){let i=await this.bitreader.read(20);this.audioLength+=20+i,await this.bitreader.ignore(i)}let o=await this.bitreader.read(11);this.audioLength+=o,this.duration!==null&&this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}});var Pre={};_r(Pre,{MusepackParser:()=>RL});var vre,kre,RL,Gre=ue(()=>{vre=qe(ct(),1);wA();yB();Ore();Rre();aO();kre=(0,vre.default)("music-metadata:parser:musepack"),RL=class extends bs{async postId3v2Parse(){let t=await this.tokenizer.peekToken(new Ve(3,"latin1")),o;switch(t){case"MP+":{kre("Stream-version 7"),o=new nO(this.metadata,this.tokenizer,this.options);break}case"MPC":{kre("Stream-version 8"),o=new iO(this.metadata,this.tokenizer,this.options);break}default:throw new Tg("Invalid signature prefix")}return this.metadata.setAudioOnly(),o.parse()}}});var Fre,Lre=ue(()=>{Fre={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],async load(){return(await Promise.resolve().then(()=>(Gre(),Pre))).MusepackParser}}});var PB,sO,kL=ue(()=>{wA();Xt();PB=class extends Qt("Opus"){},sO=class{constructor(t){if(t<19)throw new PB("ID-header-page 0 should be at least 19 bytes long");this.len=t}get(t,o){return{magicSignature:new Ve(8,"ascii").get(t,o+0),version:fA.get(t,o+8),channelCount:fA.get(t,o+9),preSkip:SA.get(t,o+10),inputSampleRate:Fe.get(t,o+12),outputGain:SA.get(t,o+16),channelMapping:fA.get(t,o+18)}}}});var gO,Ure=ue(()=>{wA();bB();kL();kL();gO=class extends Ms{constructor(t,o,i){super(t,o),this.idHeader=null,this.lastPos=-1,this.tokenizer=i,this.durationOnLastPage=!0}parseFirstPage(t,o){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new sO(o.length).get(o,0),this.idHeader.magicSignature!=="OpusHead")throw new PB("Illegal ogg/Opus magic-signature");this.metadata.setFormat("sampleRate",this.idHeader.inputSampleRate),this.metadata.setFormat("numberOfChannels",this.idHeader.channelCount),this.metadata.setAudioOnly()}async parseFullPage(t){switch(new Ve(8,"ascii").get(t,0)){case"OpusTags":await this.parseUserCommentList(t,8),this.lastPos=this.tokenizer.position-t.length;break;default:break}}calculateDuration(t){if(this.lastPageHeader&&(t||this.lastPageHeader.headerType.lastPage)&&this.metadata.format.sampleRate&&this.lastPageHeader.absoluteGranulePosition>=0){let o=this.lastPageHeader.absoluteGranulePosition-this.idHeader.preSkip;if(this.metadata.setFormat("numberOfSamples",o),this.metadata.setFormat("duration",o/48e3),this.lastPos!==-1&&this.tokenizer.fileInfo.size&&this.metadata.format.duration){let i=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*i/this.metadata.format.duration)}}}}});var Hre,Kre=ue(()=>{wA();$t();Hre={len:80,get:(n,t)=>({speex:new Ve(8,"ascii").get(n,t+0),version:Iw(new Ve(20,"ascii").get(n,t+8)),version_id:gr.get(n,t+28),header_size:gr.get(n,t+32),rate:gr.get(n,t+36),mode:gr.get(n,t+40),mode_bitstream_version:gr.get(n,t+44),nb_channels:gr.get(n,t+48),bitrate:gr.get(n,t+52),frame_size:gr.get(n,t+56),vbr:gr.get(n,t+60),frames_per_packet:gr.get(n,t+64),extra_headers:gr.get(n,t+68),reserved1:gr.get(n,t+72),reserved2:gr.get(n,t+76)})}});var xre,q3e,cO,Yre=ue(()=>{xre=qe(ct(),1);bB();Kre();q3e=(0,xre.default)("music-metadata:parser:ogg:speex"),cO=class extends Ms{constructor(t,o,i){super(t,o)}parseFirstPage(t,o){q3e("First Ogg/Speex page");let i=Hre.get(o,0);this.metadata.setFormat("codec",`Speex ${i.version}`),this.metadata.setFormat("numberOfChannels",i.nb_channels),this.metadata.setFormat("sampleRate",i.rate),i.bitrate!==-1&&this.metadata.setFormat("bitrate",i.bitrate),this.metadata.setAudioOnly()}}});var jre,Jre=ue(()=>{wA();jre={len:42,get:(n,t)=>({id:new Ve(7,"ascii").get(n,t),vmaj:fA.get(n,t+7),vmin:fA.get(n,t+8),vrev:fA.get(n,t+9),vmbw:LA.get(n,t+10),vmbh:LA.get(n,t+17),nombr:br.get(n,t+37),nqual:fA.get(n,t+40)})}});var zre,qre,IO,Vre=ue(()=>{zre=qe(ct(),1);Jre();qre=(0,zre.default)("music-metadata:parser:ogg:theora"),IO=class{constructor(t,o,i){this.durationOnLastPage=!1,this.metadata=t}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){qre("duration calculation not implemented")}async parseFirstPage(t,o){qre("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");let i=jre.get(o,0);this.metadata.setFormat("bitrate",i.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}});var Wre,lO,Zre=ue(()=>{wA();$t();wA();Wre={len:27,get:(n,t)=>({capturePattern:new Ve(4,"latin1").get(n,t),version:fA.get(n,t+4),headerType:{continued:GA(n,t+5,0),firstPage:GA(n,t+5,1),lastPage:GA(n,t+5,2)},absoluteGranulePosition:Number(Mr.get(n,t+6)),streamSerialNumber:Fe.get(n,t+14),pageSequenceNo:Fe.get(n,t+18),pageChecksum:Fe.get(n,t+22),page_segments:fA.get(n,t+26)})},lO=class n{static sum(t,o,i){let e=new DataView(t.buffer,0),a=0;for(let A=o;A{Xre=qe(ct(),1);mL();SL();Ai();Gw();vL=(0,Xre.default)("music-metadata:parser:ogg:theora"),pO=class{constructor(t,o,i){this.durationOnLastPage=!1,this.metadata=t,this.options=o,this.tokenizer=i,this.flacParser=new TB(this.metadata,this.tokenizer,o)}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){vL("duration calculation not implemented")}async parseFirstPage(t,o){if(vL("First Ogg/FLAC page"),(await rt.get(o,9)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let e=await MB.get(o,13);await this.parseDataBlock(e,o.subarray(13+MB.len))}async parseDataBlock(t,o){switch(vL(`blockHeader type=${t.type}, length=${t.length}`),t.type){case ri.STREAMINFO:{let i=_B.get(o,0);return this.flacParser.processsStreamInfo(i)}case ri.PADDING:break;case ri.APPLICATION:break;case ri.SEEKTABLE:break;case ri.VORBIS_COMMENT:return this.flacParser.parseComment(o);case ri.PICTURE:if(!this.options.skipCovers){let i=new Vc(o.length).get(o,0);return this.flacParser.addPictureTag(i)}break;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}flush(){return Promise.resolve()}}});var Aae={};_r(Aae,{OggContentError:()=>mh,OggParser:()=>GL});var eae,mh,Ts,PL,GL,tae=ue(()=>{wA();Fo();eae=qe(ct(),1);Ni();bB();Ure();Yre();Vre();Xt();Zre();$re();mh=class extends Qt("Ogg"){},Ts=(0,eae.default)("music-metadata:parser:ogg"),PL=class{constructor(t,o,i){this.pageNumber=0,this.closed=!1,this.metadata=t,this.streamSerial=o,this.options=i}async parsePage(t,o){this.pageNumber=o.pageSequenceNo,Ts("serial=%s page#=%s, Ogg.id=%s",o.streamSerialNumber,o.pageSequenceNo,o.capturePattern);let i=await t.readToken(new lO(o));Ts("totalPageSize=%s",i.totalPageSize);let e=await t.readToken(new Dt(i.totalPageSize));if(Ts("firstPage=%s, lastPage=%s, continued=%s",o.headerType.firstPage,o.headerType.lastPage,o.headerType.continued),o.headerType.firstPage){this.metadata.setFormat("container","Ogg");let a=e.subarray(0,7),A=Array.from(a).filter(r=>r>=32&&r<=126).map(r=>String.fromCharCode(r)).join("");switch(A){case"vorbis":Ts(`Set Ogg stream serial ${o.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new Ms(this.metadata,this.options);break;case"OpusHea":Ts("Set page consumer to Ogg/Opus"),this.pageConsumer=new gO(this.metadata,this.options,t);break;case"Speex ":Ts("Set page consumer to Ogg/Speex"),this.pageConsumer=new cO(this.metadata,this.options,t);break;case"fishead":case"theora":Ts("Set page consumer to Ogg/Theora"),this.pageConsumer=new IO(this.metadata,this.options,t);break;case"FLAC":Ts("Set page consumer to Vorbis"),this.pageConsumer=new pO(this.metadata,this.options,t);break;default:throw new mh(`Ogg codec not recognized (id=${A}`)}}if(o.headerType.lastPage&&(this.closed=!0),this.pageConsumer)await this.pageConsumer.parsePage(o,e);else throw new Error("pageConsumer should be initialized")}},GL=class extends Tt{constructor(){super(...arguments),this.streams=new Map}async parse(){this.streams=new Map;let t=!1,o;try{do{if(o=await this.tokenizer.readToken(Wre),o.capturePattern!=="OggS")throw new mh("Invalid Ogg capture pattern");let i=this.streams.get(o.streamSerialNumber);if(i||(i=new PL(this.metadata,o.streamSerialNumber,this.options),this.streams.set(o.streamSerialNumber,i)),await i.parsePage(this.tokenizer,o),i.pageNumber>12&&!(this.options.duration&&[...this.streams.values()].find(e=>e.pageConsumer?.durationOnLastPage))){Ts("Stop processing Ogg stream");break}}while(![...this.streams.values()].every(i=>i.closed))}catch(i){if(i instanceof kA)Ts("Reached end-of-stream"),t=!0;else if(i instanceof mh)this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`);else throw i}for(let i of this.streams.values())i.closed||(this.metadata.addWarning(`End-of-stream reached before reaching last page in Ogg stream serial=${i.streamSerial}`),await i.pageConsumer?.flush()),i.pageConsumer?.calculateDuration(t)}}});var rae,aae=ue(()=>{rae={parserType:"ogg",extensions:[".ogg",".ogv",".oga",".ogm",".ogx",".opus",".spx"],mimeTypes:["audio/ogg","audio/opus","audio/speex","video/ogg"],async load(){return(await Promise.resolve().then(()=>(tae(),Aae))).OggParser}}});function Ns(n,t){return dO(n,t,1)===1}function dO(n,t,o){return n>>>t&4294967295>>>32-o}var z3e,GB,hO,iae=ue(()=>{wA();Ai();z3e=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],GB={len:32,get:(n,t)=>{let o=Fe.get(n,t+24),i={BlockID:rt.get(n,t),blockSize:Fe.get(n,t+4),version:SA.get(n,t+8),totalSamples:Fe.get(n,t+12),blockIndex:Fe.get(n,t+16),blockSamples:Fe.get(n,t+20),flags:{bitsPerSample:(1+dO(o,0,2))*8,isMono:Ns(o,2),isHybrid:Ns(o,3),isJointStereo:Ns(o,4),crossChannel:Ns(o,5),hybridNoiseShaping:Ns(o,6),floatingPoint:Ns(o,7),samplingRate:z3e[dO(o,23,4)],isDSD:Ns(o,31)},crc:new Dt(4).get(n,t+28)};return i.flags.isDSD&&(i.totalSamples*=8),i}},hO={len:1,get:(n,t)=>({functionId:dO(n[t],0,6),isOptional:Ns(n[t],5),isOddSize:Ns(n[t],6),largeBlock:Ns(n[t],7)})}});var nae={};_r(nae,{WavPackContentError:()=>Sh,WavPackParser:()=>FL});var oae,Ol,Sh,FL,sae=ue(()=>{wA();fl();Ai();Ni();iae();oae=qe(ct(),1);lB();Xt();Ol=(0,oae.default)("music-metadata:parser:WavPack"),Sh=class extends Qt("WavPack"){},FL=class extends Tt{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),Bl(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(rt)!=="wvpk")break;let o=await this.tokenizer.readToken(GB);if(o.BlockID!=="wvpk")throw new Sh("Invalid WavPack Block-ID");Ol(`WavPack header blockIndex=${o.blockIndex}, len=${GB.len}`),o.blockIndex===0&&!this.metadata.format.container&&(this.metadata.setFormat("container","WavPack"),this.metadata.setFormat("lossless",!o.flags.isHybrid),this.metadata.setFormat("bitsPerSample",o.flags.bitsPerSample),o.flags.isDSD||(this.metadata.setFormat("sampleRate",o.flags.samplingRate),this.metadata.setFormat("duration",o.totalSamples/o.flags.samplingRate)),this.metadata.setFormat("numberOfChannels",o.flags.isMono?1:2),this.metadata.setFormat("numberOfSamples",o.totalSamples),this.metadata.setFormat("codec",o.flags.isDSD?"DSD":"PCM"));let i=o.blockSize-(GB.len-8);await(o.blockIndex===0?this.parseMetadataSubBlock(o,i):this.tokenizer.ignore(i)),o.blockSamples>0&&(this.audioDataSize+=o.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=GB.len);this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioDataSize*8/this.metadata.format.duration)}async parseMetadataSubBlock(t,o){let i=o;for(;i>hO.len;){let e=await this.tokenizer.readToken(hO),a=await this.tokenizer.readNumber(e.largeBlock?sB:fA),A=new Uint8Array(a*2-(e.isOddSize?1:0));switch(await this.tokenizer.readBuffer(A),Ol(`Metadata Sub-Blocks functionId=0x${e.functionId.toString(16)}, id.largeBlock=${e.largeBlock},data-size=${A.length}`),e.functionId){case 0:break;case 14:{Ol("ID_DSD_BLOCK");let r=1<{gae={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],async load(){return(await Promise.resolve().then(()=>(sae(),nae))).WavPackParser}}});var Dh,EO,Iae=ue(()=>{wA();Dh={len:8,get:(n,t)=>({chunkID:new Ve(4,"latin1").get(n,t),chunkSize:Fe.get(n,t+4)})},EO=class{constructor(t){this.tagHeader=t,this.len=t.chunkSize,this.len+=this.len&1}get(t,o){return new Ve(this.tagHeader.chunkSize,"ascii").get(t,o)}}});var bl,ca,lae,CO,uO,LL=ue(()=>{wA();Xt();bl=class extends Qt("Wave"){},ca={PCM:1,ADPCM:2,IEEE_FLOAT:3,ALAW:6,MULAW:7,DVI_ADPCM:17,GSM610:49,MPEG_ADTS_AAC:5632,MPEG_LOAS:5634,RAW_AAC1:255,DOLBY_AC3_SPDIF:146,DVM:8192,RAW_SPORT:576,ESST_AC3:577,DRM:9,DTS2:8193,MPEG:80,MPEGLAYER3:85},lae={[ca.PCM]:"PCM",[ca.ADPCM]:"ADPCM",[ca.IEEE_FLOAT]:"IEEE_FLOAT",[ca.ALAW]:"ALAW",[ca.MULAW]:"MULAW",[ca.DVI_ADPCM]:"DVI_ADPCM",[ca.GSM610]:"GSM610",[ca.MPEG_ADTS_AAC]:"MPEG_ADTS_AAC",[ca.MPEG_LOAS]:"MPEG_LOAS",[ca.RAW_AAC1]:"RAW_AAC1",[ca.DOLBY_AC3_SPDIF]:"DOLBY_AC3_SPDIF",[ca.DVM]:"DVM",[ca.RAW_SPORT]:"RAW_SPORT",[ca.ESST_AC3]:"ESST_AC3",[ca.DRM]:"DRM",[ca.DTS2]:"DTS2",[ca.MPEG]:"MPEG",[ca.MPEGLAYER3]:"MPEGLAYER3"},CO=class{constructor(t){if(t.chunkSize<16)throw new bl("Invalid chunk size");this.len=t.chunkSize}get(t,o){return{wFormatTag:SA.get(t,o),nChannels:SA.get(t,o+2),nSamplesPerSec:Fe.get(t,o+4),nAvgBytesPerSec:Fe.get(t,o+8),nBlockAlign:SA.get(t,o+12),wBitsPerSample:SA.get(t,o+14)}}},uO=class{constructor(t){if(t.chunkSize<4)throw new bl("Invalid fact chunk size.");this.len=t.chunkSize}get(t,o){return{dwSampleLength:Fe.get(t,o)}}}});var UL,pae=ue(()=>{wA();$t();UL={len:420,get:(n,t)=>({description:Ko(new Ve(256,"ascii").get(n,t)).trim(),originator:Ko(new Ve(32,"ascii").get(n,t+256)).trim(),originatorReference:Ko(new Ve(32,"ascii").get(n,t+288)).trim(),originationDate:Ko(new Ve(10,"ascii").get(n,t+320)).trim(),originationTime:Ko(new Ve(8,"ascii").get(n,t+330)).trim(),timeReferenceLow:Fe.get(n,t+338),timeReferenceHigh:Fe.get(n,t+342),version:SA.get(n,t+346),umid:new Dt(64).get(n,t+348),loudnessValue:SA.get(n,t+412),maxTruePeakLevel:SA.get(n,t+414),maxMomentaryLoudness:SA.get(n,t+416),maxShortTermLoudness:SA.get(n,t+418)})}});var hae={};_r(hae,{WaveParser:()=>HL});var dae,Wc,HL,Eae=ue(()=>{Fo();wA();dae=qe(ct(),1);Iae();LL();gh();$t();Ai();Ni();pae();LL();Wc=(0,dae.default)("music-metadata:parser:RIFF"),HL=class extends Tt{constructor(){super(...arguments),this.blockAlign=0,this.avgBytesPerSec=0}async parse(){let t=await this.tokenizer.readToken(Dh);if(Wc(`pos=${this.tokenizer.position}, parse: chunkID=${t.chunkID}`),t.chunkID==="RIFF")return this.metadata.setAudioOnly(),this.parseRiffChunk(t.chunkSize).catch(o=>{if(!(o instanceof kA))throw o})}async parseRiffChunk(t){let o=await this.tokenizer.readToken(rt);switch(this.metadata.setFormat("container",o),o){case"WAVE":return this.readWaveChunk(t-rt.len);default:throw new bl(`Unsupported RIFF format: RIFF/${o}`)}}async readWaveChunk(t){for(;t>=Dh.len;){let o=await this.tokenizer.readToken(Dh);switch(t-=Dh.len+o.chunkSize,o.chunkSize>t&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=o,Wc(`pos=${this.tokenizer.position}, readChunk: chunkID=RIFF/WAVE/${o.chunkID}`),o.chunkID){case"LIST":await this.parseListTag(o);break;case"fact":this.metadata.setFormat("lossless",!1),this.fact=await this.tokenizer.readToken(new uO(o));break;case"fmt ":{let i=await this.tokenizer.readToken(new CO(o)),e=lae[i.wFormatTag];e||(Wc(`WAVE/non-PCM format=${i.wFormatTag}`),e=`non-PCM (${i.wFormatTag})`),this.metadata.setFormat("codec",e),this.metadata.setFormat("bitsPerSample",i.wBitsPerSample),this.metadata.setFormat("sampleRate",i.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",i.nChannels),this.blockAlign=i.nBlockAlign,this.avgBytesPerSec=i.nAvgBytesPerSec;break}case"id3 ":case"ID3 ":{let i=await this.tokenizer.readToken(new Dt(o.chunkSize)),e=to(i);await new jo().parse(this.metadata,e,this.options);break}case"data":{this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let i=o.chunkSize;if(this.tokenizer.fileInfo.size){let a=this.tokenizer.fileInfo.size-this.tokenizer.position;a0?this.metadata.setFormat("bitrate",this.avgBytesPerSec*8):this.metadata.format.duration&&this.metadata.setFormat("bitrate",i*8/this.metadata.format.duration),await this.tokenizer.ignore(o.chunkSize);break}case"bext":{let i=await this.tokenizer.readToken(UL);Object.keys(i).forEach(a=>{this.metadata.addTag("exif",`bext.${a}`,i[a])});let e=o.chunkSize-UL.len;await this.tokenizer.ignore(e);break}case"\0\0\0\0":Wc(`Ignore padding chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize);break;default:Wc(`Ignore chunk: RIFF/${o.chunkID} of ${o.chunkSize} bytes`),this.metadata.addWarning(`Ignore chunk: RIFF/${o.chunkID}`),await this.tokenizer.ignore(o.chunkSize)}this.header.chunkSize%2===1&&(Wc("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(t){let o=await this.tokenizer.readToken(new Ve(4,"latin1"));switch(Wc("pos=%s, parseListTag: chunkID=RIFF/WAVE/LIST/%s",this.tokenizer.position,o),o){case"INFO":return this.parseRiffInfoTags(t.chunkSize-4);default:return this.metadata.addWarning(`Ignore chunk: RIFF/WAVE/LIST/${o}`),Wc(`Ignoring chunkID=RIFF/WAVE/LIST/${o}`),this.tokenizer.ignore(t.chunkSize-4).then()}}async parseRiffInfoTags(t){for(;t>=8;){let o=await this.tokenizer.readToken(Dh),i=new EO(o),e=await this.tokenizer.readToken(i);this.addTag(o.chunkID,Ko(e)),t-=8+i.len}if(t!==0)throw new bl(`Illegal remaining size: ${t}`)}addTag(t,o){this.metadata.addTag("exif",t,o)}}});var Cae,uae=ue(()=>{Cae={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],async load(){return(await Promise.resolve().then(()=>(Eae(),hae))).WaveParser}}});function Z3e(n){let t=Bae.default.parse(n),o=gAe(t.type);return{type:o.type,subtype:o.subtype,suffix:o.suffix,parameters:t.parameters}}function X3e(n){let t=n.lastIndexOf(".");return t===-1?"":n.substring(t)}var Bae,fae,Ml,_l,KL=ue(()=>{xF();Bae=qe(sAe(),1);cAe();fae=qe(ct(),1);NAe();Cl();ite();Xt();nte();fte();wte();Rte();Hte();zte();are();fre();Lre();aae();cae();uae();BO();Ml=(0,fae.default)("music-metadata:parser:factory");_l=class{constructor(){this.parsers=[],[qte,ate,ote,Bre,rre,Cae,rae,Bte,Nte,gae,Fre,Ute,Dte].forEach(t=>{this.registerParser(t)})}registerParser(t){this.parsers.push(t)}async parse(t,o,i){if(t.supportsRandomAccess()?(Ml("tokenizer supports random-access, scanning for appending headers"),await xL(t,i)):Ml("tokenizer does not support random-access, cannot scan for appending headers"),!o){let r=new Uint8Array(4100);if(t.fileInfo.mimeType&&(o=this.findLoaderForContentType(t.fileInfo.mimeType)),!o&&t.fileInfo.path&&(o=this.findLoaderForExtension(t.fileInfo.path)),!o){Ml("Guess parser on content..."),await t.peekBuffer(r,{mayBeLess:!0});let s=await hB(r,{mpegOffsetTolerance:10});if(!s||!s.mime)throw new Uc("Failed to determine audio format");if(Ml(`Guessed file type is mime=${s.mime}, extension=${s.ext}`),o=this.findLoaderForContentType(s.mime),!o)throw new Hc(`Guessed MIME-type not supported: ${s.mime}`)}}Ml(`Loading ${o.parserType} parser...`);let e=new Sw(i),a=await o.load(),A=new a(e,t,i??{});return Ml(`Parser ${o.parserType} loaded`),await A.parse(),e.format.trackInfo&&(e.format.hasAudio===void 0&&e.setFormat("hasAudio",!!e.format.trackInfo.find(r=>r.type===sa.audio)),e.format.hasVideo===void 0&&e.setFormat("hasVideo",!!e.format.trackInfo.find(r=>r.type===sa.video))),e.toCommonMetadata()}findLoaderForExtension(t){if(!t)return;let o=X3e(t).toLocaleLowerCase()||t;return this.parsers.find(i=>i.extensions.indexOf(o)!==-1)}findLoaderForContentType(t){let o;if(!t)return;try{o=Z3e(t)}catch{Ml(`Invalid HTTP Content-Type header value: ${t}`);return}let i=o.subtype.indexOf("x-")===0?o.subtype.substring(2):o.subtype;return this.parsers.find(e=>e.mimeTypes.find(a=>a.indexOf(`${o.type}/${i}`)!==-1))}getSupportedMimeTypes(){let t=new Set;return this.parsers.forEach(o=>{o.mimeTypes.forEach(i=>{t.add(i),t.add(i.replace("/","/x-"))})}),Array.from(t)}}});async function Qae(n){let t=n.fileInfo.size;if(t>=143){let o=new Uint8Array(15),i=n.position;await n.readBuffer(o,{position:t-143}),n.setPosition(i);let e=Qr(o,"latin1");if(e.substring(6)===$3e)return Number.parseInt(e.substring(0,6),10)+15}return 0}var $3e,yae=ue(()=>{fs();$3e="LYRICS200"});async function eje(n,t={}){let o=ew(n);try{return await wh(o,t)}finally{await o.close()}}async function Aje(n,t,o={}){let i=$D(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await wh(i,o)}finally{await i.close()}}async function tje(n,t,o={}){let i=to(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});return wh(i,o)}function wh(n,t){return new _l().parse(n,void 0,t)}function rje(n){let t={};for(let{id:o,value:i}of n)(t[o]||(t[o]=[])).push(i);return t}function aje(n){return n===void 0?0:1+Math.round(n*4)}function ije(n){return n?n.reduce((t,o)=>o.name&&o.name.toLowerCase()in["front","cover","cover (front)"]?o:t):null}async function xL(n,t={}){let o=n.fileInfo.size;if(await HAe(n)){o-=128;let i=await Qae(n);o-=i}t.apeHeader=await Yc.findApeFooterOffset(n,o)}function oje(){return new _l().getSupportedMimeTypes()}var BO=ue(()=>{Fo();KL();fl();BB();yae();Cl();Xt();Xt()});var Dae={};_r(Dae,{CouldNotDetermineFileTypeError:()=>Uc,FieldDecodingError:()=>Ho,InternalParserError:()=>El,LyricsContentType:()=>rh,TimestampFormat:()=>ah,UnsupportedFileTypeError:()=>Hc,getSupportedMimeTypes:()=>oje,makeParseError:()=>Ah,makeUnexpectedFileContentError:()=>Qt,orderTags:()=>rje,parseBlob:()=>eje,parseBuffer:()=>tje,parseFile:()=>sje,parseFromTokenizer:()=>wh,parseStream:()=>nje,parseWebStream:()=>Aje,ratingToStars:()=>aje,scanAppendingHeaders:()=>xL,selectCover:()=>ije});async function nje(n,t,o={}){let i=await MF(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await wh(i,o)}finally{await i.close()}}async function sje(n,t={}){mae(`parseFile: ${n}`);let o=await yee(n),i=new _l;try{let e=i.findLoaderForExtension(n);e||mae("Parser could not be determined by file extension");try{return await i.parse(o,e,t)}catch(a){throw(a instanceof Uc||a instanceof Hc)&&(a.message+=`: ${n}`),a}}finally{await o.close()}}var Sae,mae,wae=ue(()=>{Fo();Sae=qe(ct(),1);BO();KL();BO();mae=(0,Sae.default)("music-metadata:parser")});var Uie=$((abA,m2)=>{"use strict";var CJe=Object.prototype.hasOwnProperty,ai="~";function WB(){}Object.create&&(WB.prototype=Object.create(null),new WB().__proto__||(ai=!1));function uJe(n,t,o){this.fn=n,this.context=t,this.once=o||!1}function Lie(n,t,o,i,e){if(typeof o!="function")throw new TypeError("The listener must be a function");var a=new uJe(o,i||n,e),A=ai?ai+t:t;return n._events[A]?n._events[A].fn?n._events[A]=[n._events[A],a]:n._events[A].push(a):(n._events[A]=a,n._eventsCount++),n}function RO(n,t){--n._eventsCount===0?n._events=new WB:delete n._events[t]}function Ja(){this._events=new WB,this._eventsCount=0}Ja.prototype.eventNames=function(){var t=[],o,i;if(this._eventsCount===0)return t;for(i in o=this._events)CJe.call(o,i)&&t.push(ai?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};Ja.prototype.listeners=function(t){var o=ai?ai+t:t,i=this._events[o];if(!i)return[];if(i.fn)return[i.fn];for(var e=0,a=i.length,A=new Array(a);e{"use strict";var ef=n=>n&&typeof n.message=="string",G2=n=>{if(!n)return;let t=n.cause;if(typeof t=="function"){let o=n.cause();return ef(o)?o:void 0}else return ef(t)?t:void 0},doe=(n,t)=>{if(!ef(n))return"";let o=n.stack||"";if(t.has(n))return o+` +causes have become circular...`;let i=G2(n);return i?(t.add(n),o+` +caused by: `+doe(i,t)):o},eqe=n=>doe(n,new Set),hoe=(n,t,o)=>{if(!ef(n))return"";let i=o?"":n.message||"";if(t.has(n))return i+": ...";let e=G2(n);if(e){t.add(n);let a=typeof n.cause=="function";return i+(a?"":": ")+hoe(e,t,a)}else return i},Aqe=n=>hoe(n,new Set);Eoe.exports={isErrorLike:ef,getErrorCause:G2,stackWithCauses:eqe,messageWithCauses:Aqe}});var L2=$((R_A,uoe)=>{"use strict";var tqe=Symbol("circular-ref-tag"),jO=Symbol("pino-raw-err-ref"),Coe=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[jO]},set:function(n){this[jO]=n}}});Object.defineProperty(Coe,jO,{writable:!0,value:{}});uoe.exports={pinoErrProto:Coe,pinoErrorSymbols:{seen:tqe,rawSymbol:jO}}});var Qoe=$((k_A,foe)=>{"use strict";foe.exports=H2;var{messageWithCauses:rqe,stackWithCauses:aqe,isErrorLike:Boe}=F2(),{pinoErrProto:iqe,pinoErrorSymbols:oqe}=L2(),{seen:U2}=oqe,{toString:nqe}=Object.prototype;function H2(n){if(!Boe(n))return n;n[U2]=void 0;let t=Object.create(iqe);t.type=nqe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=rqe(n),t.stack=aqe(n),Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>H2(o)));for(let o in n)if(t[o]===void 0){let i=n[o];Boe(i)?o!=="cause"&&!Object.prototype.hasOwnProperty.call(i,U2)&&(t[o]=H2(i)):t[o]=i}return delete n[U2],t.raw=n,t}});var moe=$((v_A,yoe)=>{"use strict";yoe.exports=qO;var{isErrorLike:K2}=F2(),{pinoErrProto:sqe,pinoErrorSymbols:gqe}=L2(),{seen:JO}=gqe,{toString:cqe}=Object.prototype;function qO(n){if(!K2(n))return n;n[JO]=void 0;let t=Object.create(sqe);t.type=cqe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=n.message,t.stack=n.stack,Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>qO(o))),K2(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,JO)&&(t.cause=qO(n.cause));for(let o in n)if(t[o]===void 0){let i=n[o];K2(i)?Object.prototype.hasOwnProperty.call(i,JO)||(t[o]=qO(i)):t[o]=i}return delete n[JO],t.raw=n,t}});var Ooe=$((P_A,woe)=>{"use strict";woe.exports={mapHttpRequest:Iqe,reqSerializer:Doe};var x2=Symbol("pino-raw-req-ref"),Soe=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[x2]},set:function(n){this[x2]=n}}});Object.defineProperty(Soe,x2,{writable:!0,value:{}});function Doe(n){let t=n.info||n.socket,o=Object.create(Soe);if(o.id=typeof n.id=="function"?n.id():n.id||(n.info?n.info.id:void 0),o.method=n.method,n.originalUrl)o.url=n.originalUrl;else{let i=n.path;o.url=typeof i=="string"?i:n.url?n.url.path||n.url:void 0}return n.query&&(o.query=n.query),n.params&&(o.params=n.params),o.headers=n.headers,o.remoteAddress=t&&t.remoteAddress,o.remotePort=t&&t.remotePort,o.raw=n.raw||n,o}function Iqe(n){return{req:Doe(n)}}});var Toe=$((G_A,_oe)=>{"use strict";_oe.exports={mapHttpResponse:lqe,resSerializer:Moe};var Y2=Symbol("pino-raw-res-ref"),boe=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Y2]},set:function(n){this[Y2]=n}}});Object.defineProperty(boe,Y2,{writable:!0,value:{}});function Moe(n){let t=Object.create(boe);return t.statusCode=n.headersSent?n.statusCode:null,t.headers=n.getHeaders?n.getHeaders():n._headers,t.raw=n,t}function lqe(n){return{res:Moe(n)}}});var J2=$((F_A,Noe)=>{"use strict";var j2=Qoe(),pqe=moe(),zO=Ooe(),VO=Toe();Noe.exports={err:j2,errWithCause:pqe,mapHttpRequest:zO.mapHttpRequest,mapHttpResponse:VO.mapHttpResponse,req:zO.reqSerializer,res:VO.resSerializer,wrapErrorSerializer:function(t){return t===j2?t:function(i){return t(j2(i))}},wrapRequestSerializer:function(t){return t===zO.reqSerializer?t:function(i){return t(zO.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===VO.resSerializer?t:function(i){return t(VO.resSerializer(i))}}}});var q2=$((L_A,Roe)=>{"use strict";function dqe(n,t){return t}Roe.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=dqe;let o=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(o))return;let i=o.slice(2),e=[];for(let a of i)a&&e.push(a.getFileName());return e}});var Loe=$((U_A,Foe)=>{"use strict";function z2(n){if(n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array){let t=[];for(let o=0;o{let Q=[...s.slice(0,I),...f];return o(B,Q)}:o,e,a);else if(a)Poe(c,r);else{let d=typeof o=="function"?o(Eqe(c,r),[...s.slice(0,I),...r]):o;voe(c,r,d)}}if(A.length===0)g(n,0);else{let c=n;for(let I=0;I0)o?a===i&&(o=!1,i=""):(o=!0,i=a);else if(a==="["&&!o)t++;else if(a==="]"&&!o&&(t--,t<0))throw new Error(`Invalid redaction path (${n})`)}if(t!==0)throw new Error(`Invalid redaction path (${n})`)}function yqe(n){if(!Array.isArray(n))throw new TypeError("paths must be an array");for(let t of n)Qqe(t)}function mqe(n={}){let{paths:t=[],censor:o="[REDACTED]",serialize:i=JSON.stringify,strict:e=!0,remove:a=!1}=n;yqe(t);let A=Bqe(t);return function(s){if(e&&(s===null||typeof s!="object")&&(s==null||typeof s!="object"))return i?i(s):s;let g=fqe(s,A),c=s,I=o;return typeof o=="function"&&(I=o),Cqe(g,t,I,a),i===!1?(g.restore=function(){return z2(c)},g):typeof i=="function"?i(g):JSON.stringify(g)}}Foe.exports=mqe});var Lh=$((H_A,Uoe)=>{"use strict";var Sqe=Symbol("pino.setLevel"),Dqe=Symbol("pino.getLevel"),wqe=Symbol("pino.levelVal"),Oqe=Symbol("pino.levelComp"),bqe=Symbol("pino.useLevelLabels"),Mqe=Symbol("pino.useOnlyCustomLevels"),_qe=Symbol("pino.mixin"),Tqe=Symbol("pino.lsCache"),Nqe=Symbol("pino.chindings"),Rqe=Symbol("pino.asJson"),kqe=Symbol("pino.write"),vqe=Symbol("pino.redactFmt"),Pqe=Symbol("pino.time"),Gqe=Symbol("pino.timeSliceIndex"),Fqe=Symbol("pino.stream"),Lqe=Symbol("pino.stringify"),Uqe=Symbol("pino.stringifySafe"),Hqe=Symbol("pino.stringifiers"),Kqe=Symbol("pino.end"),xqe=Symbol("pino.formatOpts"),Yqe=Symbol("pino.messageKey"),jqe=Symbol("pino.errorKey"),Jqe=Symbol("pino.nestedKey"),qqe=Symbol("pino.nestedKeyStr"),zqe=Symbol("pino.mixinMergeStrategy"),Vqe=Symbol("pino.msgPrefix"),Wqe=Symbol("pino.wildcardFirst"),Zqe=Symbol.for("pino.serializers"),Xqe=Symbol.for("pino.formatters"),$qe=Symbol.for("pino.hooks"),e4e=Symbol.for("pino.metadata");Uoe.exports={setLevelSym:Sqe,getLevelSym:Dqe,levelValSym:wqe,levelCompSym:Oqe,useLevelLabelsSym:bqe,mixinSym:_qe,lsCacheSym:Tqe,chindingsSym:Nqe,asJsonSym:Rqe,writeSym:kqe,serializersSym:Zqe,redactFmtSym:vqe,timeSym:Pqe,timeSliceIndexSym:Gqe,streamSym:Fqe,stringifySym:Lqe,stringifySafeSym:Uqe,stringifiersSym:Hqe,endSym:Kqe,formatOptsSym:xqe,messageKeySym:Yqe,errorKeySym:jqe,nestedKeySym:Jqe,wildcardFirstSym:Wqe,needsMetadataGsym:e4e,useOnlyCustomLevelsSym:Mqe,formattersSym:Xqe,hooksSym:$qe,nestedKeyStrSym:qqe,mixinMergeStrategySym:zqe,msgPrefixSym:Vqe}});var W2=$((K_A,Yoe)=>{"use strict";var Hoe=Loe(),{redactFmtSym:A4e,wildcardFirstSym:ZO}=Lh(),V2=/[^.[\]]+|\[([^[\]]*?)\]/g,Koe="[Redacted]",xoe=!1;function t4e(n,t){let{paths:o,censor:i,remove:e}=r4e(n),a=o.reduce((s,g)=>{V2.lastIndex=0;let c=V2.exec(g),I=V2.exec(g),d=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(d==="*"&&(d=ZO),I===null)return s[d]=null,s;if(s[d]===null)return s;let{index:B}=I,f=`${g.substr(B,g.length-1)}`;return s[d]=s[d]||[],d!==ZO&&s[d].length===0&&s[d].push(...s[ZO]||[]),d===ZO&&Object.keys(s).forEach(function(Q){s[Q]&&s[Q].push(f)}),s[d].push(f),s},{}),A={[A4e]:Hoe({paths:o,censor:i,serialize:t,strict:xoe,remove:e})},r=(...s)=>t(typeof i=="function"?i(...s):i);return[...Object.keys(a),...Object.getOwnPropertySymbols(a)].reduce((s,g)=>{if(a[g]===null)s[g]=c=>r(c,[g]);else{let c=typeof i=="function"?(I,d)=>i(I,[g,...d]):i;s[g]=Hoe({paths:a[g],censor:c,serialize:t,strict:xoe,remove:e})}return s},A)}function r4e(n){if(Array.isArray(n))return n={paths:n,censor:Koe},n;let{paths:t,censor:o=Koe,remove:i}=n;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(o=void 0),{paths:t,censor:o,remove:i}}Yoe.exports=t4e});var qoe=$((x_A,Joe)=>{"use strict";var a4e=()=>"",i4e=()=>`,"time":${Date.now()}`,o4e=()=>`,"time":${Math.round(Date.now()/1e3)}`,n4e=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,s4e=1000000n,joe=1000000000n,g4e=BigInt(Date.now())*s4e,c4e=process.hrtime.bigint(),I4e=()=>{let n=process.hrtime.bigint()-c4e,t=g4e+n,o=t/joe,i=t%joe,e=Number(o*1000n+i/1000000n),a=new Date(e),A=a.getUTCFullYear(),r=(a.getUTCMonth()+1).toString().padStart(2,"0"),s=a.getUTCDate().toString().padStart(2,"0"),g=a.getUTCHours().toString().padStart(2,"0"),c=a.getUTCMinutes().toString().padStart(2,"0"),I=a.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${A}-${r}-${s}T${g}:${c}:${I}.${i.toString().padStart(9,"0")}Z"`};Joe.exports={nullTime:a4e,epochTime:i4e,unixTime:o4e,isoTime:n4e,isoTimeNano:I4e}});var Voe=$((Y_A,zoe)=>{"use strict";function l4e(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}zoe.exports=p4e;function p4e(n,t,o){var i=o&&o.stringify||l4e,e=1;if(typeof n=="object"&&n!==null){var a=t.length+e;if(a===1)return n;var A=new Array(a);A[0]=i(n);for(var r=1;r-1?I:0,n.charCodeAt(B+1)){case 100:case 102:if(c>=s||t[c]==null)break;I=s||t[c]==null)break;I=s||t[c]===void 0)break;I",I=B+2,B++;break}g+=i(t[c]),I=B+2,B++;break;case 115:if(c>=s)break;I{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(o){if((o>0&&o<1/0)===!1)throw typeof o!="number"&&typeof o!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(n,0,0,Number(o))},n=new Int32Array(new SharedArrayBuffer(4));Z2.exports=t}else{let n=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(t);for(;i>Date.now(););};Z2.exports=n}});var rne=$((J_A,tne)=>{"use strict";var jt=Xe("fs"),d4e=Xe("events"),h4e=Xe("util").inherits,Woe=Xe("path"),eU=X2(),E4e=Xe("assert"),XO=100,$O=Buffer.allocUnsafe(0),C4e=16*1024,Zoe="buffer",Xoe="utf8",[u4e,B4e]=(process.versions.node||"0.0").split(".").map(Number),f4e=u4e>=22&&B4e>=7;function $oe(n,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function o(a,A){if(a){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",a)}):t.emit("error",a);return}let r=t._reopening;t.fd=A,t.file=n,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():r&&process.nextTick(()=>t.emit("drain")))}let i=t.append?"a":"w",e=t.mode;if(t.sync)try{t.mkdir&&jt.mkdirSync(Woe.dirname(n),{recursive:!0});let a=jt.openSync(n,i,e);o(null,a)}catch(a){throw o(a),a}else t.mkdir?jt.mkdir(Woe.dirname(n),{recursive:!0},a=>{if(a)return o(a);jt.open(n,i,e,o)}):jt.open(n,i,e,o)}function bn(n){if(!(this instanceof bn))return new bn(n);let{fd:t,dest:o,minLength:i,maxLength:e,maxWrite:a,periodicFlush:A,sync:r,append:s=!0,mkdir:g,retryEAGAIN:c,fsync:I,contentMode:d,mode:B}=n||{};t=t||o,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=e||0,this.maxWrite=a||C4e,this._periodicFlush=A||0,this._periodicFlushTimer=void 0,this.sync=r||!1,this.writable=!0,this._fsync=I||!1,this.append=s||!1,this.mode=B,this.retryEAGAIN=c||(()=>!0),this.mkdir=g||!1;let f,Q;if(d===Zoe)this._writingBuf=$O,this.write=m4e,this.flush=D4e,this.flushSync=O4e,this._actualWrite=M4e,f=()=>jt.writeSync(this.fd,this._writingBuf),Q=()=>jt.write(this.fd,this._writingBuf,this.release);else if(d===void 0||d===Xoe)this._writingBuf="",this.write=y4e,this.flush=S4e,this.flushSync=w4e,this._actualWrite=b4e,f=()=>Buffer.isBuffer(this._writingBuf)?jt.writeSync(this.fd,this._writingBuf):jt.writeSync(this.fd,this._writingBuf,"utf8"),Q=()=>Buffer.isBuffer(this._writingBuf)?jt.write(this.fd,this._writingBuf,this.release):jt.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Xoe}" and "${Zoe}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")$oe(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,m)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{eU(XO),this.release(void 0,0)}catch(R){this.release(R)}else setTimeout(Q,XO);else this._writing=!1,this.emit("error",y);return}this.emit("write",m);let _=$2(this._writingBuf,this._len,m);if(this._len=_.len,this._writingBuf=_.writingBuf,this._writingBuf.length){if(!this.sync){Q();return}try{do{let R=f(),H=$2(this._writingBuf,this._len,R);this._len=H.len,this._writingBuf=H.writingBuf}while(this._writingBuf.length)}catch(R){this.release(R);return}}this._fsync&&jt.fsyncSync(this.fd);let T=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):T>this.minLength?this._actualWrite():this._ending?T>0?this._actualWrite():(this._writing=!1,eb(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Q4e,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function $2(n,t,o){return typeof n=="string"&&(n=Buffer.from(n)),t=Math.max(t-o,0),n=n.subarray(o),{writingBuf:n,len:t}}function Q4e(n){n.listenerCount("drain")>0&&(n._asyncDrainScheduled=!1,n.emit("drain"))}h4e(bn,d4e);function ene(n,t){return n.length===0?$O:n.length===1?n[0]:Buffer.concat(n,t)}function y4e(n){if(this.destroyed)throw new Error("SonicBoom destroyed");n=""+n;let t=Buffer.byteLength(n),o=this._len+t,i=this._bufs;return this.maxLength&&o>this.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?i.push(n):i[i.length-1]+=n,this._len=o,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._lenthis.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?(o.push([n]),i.push(n.length)):(o[o.length-1].push(n),i[i.length-1]+=n.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len{if(this._fsync)this._flushPending=!1,n();else try{jt.fsync(this.fd,i=>{this._flushPending=!1,n(i)})}catch(i){n(i)}this.off("error",o)},o=i=>{this._flushPending=!1,n(i),this.off("drain",t)};this.once("drain",t),this.once("error",o)}function S4e(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(n){n(t);return}throw t}if(this.minLength<=0){n?.();return}n&&Ane.call(this,n),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function D4e(n){if(n!=null&&typeof n!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(n){n(t);return}throw t}if(this.minLength<=0){n?.();return}n&&Ane.call(this,n),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}bn.prototype.reopen=function(n){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(n)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(n&&(this.file=n),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&jt.close(t,o=>{if(o)return this.emit("error",o)})}),$oe(this.file,this)};bn.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():eb(this)))};function w4e(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let n="";for(;this._bufs.length||n.length;){n.length<=0&&(n=this._bufs[0]);try{let t=Buffer.isBuffer(n)?jt.writeSync(this.fd,n):jt.writeSync(this.fd,n,"utf8"),o=$2(n,this._len,t);n=o.writingBuf,this._len=o.len,n.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,n.length,this._len-n.length))throw t;eU(XO)}}try{jt.fsyncSync(this.fd)}catch{}}function O4e(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=$O);let n=$O;for(;this._bufs.length||n.length;){n.length<=0&&(n=ene(this._bufs[0],this._lens[0]));try{let t=jt.writeSync(this.fd,n);n=n.subarray(t),this._len=Math.max(this._len-t,0),n.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,n.length,this._len-n.length))throw t;eU(XO)}}}bn.prototype.destroy=function(){this.destroyed||eb(this)};function b4e(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let t=Buffer.isBuffer(this._writingBuf)?jt.writeSync(this.fd,this._writingBuf):jt.writeSync(this.fd,this._writingBuf,"utf8");n(null,t)}catch(t){n(t)}else jt.write(this.fd,this._writingBuf,n)}function M4e(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:ene(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=jt.writeSync(this.fd,this._writingBuf);n(null,t)}catch(t){n(t)}else f4e&&(this._writingBuf=Buffer.from(this._writingBuf)),jt.write(this.fd,this._writingBuf,n)}function eb(n){if(n.fd===-1){n.once("ready",eb.bind(null,n));return}n._periodicFlushTimer!==void 0&&clearInterval(n._periodicFlushTimer),n.destroyed=!0,n._bufs=[],n._lens=[],E4e(typeof n.fd=="number",`sonic.fd must be a number, got ${typeof n.fd}`);try{jt.fsync(n.fd,t)}catch{}function t(){n.fd!==1&&n.fd!==2?jt.close(n.fd,o):o()}function o(i){if(i){n.emit("error",i);return}n._ending&&!n._writing&&n.emit("finish"),n.emit("close")}}bn.SonicBoom=bn;bn.default=bn;tne.exports=bn});var AU=$((q_A,sne)=>{"use strict";var Mn={exit:[],beforeExit:[]},ane={exit:N4e,beforeExit:R4e},Uh;function _4e(){Uh===void 0&&(Uh=new FinalizationRegistry(k4e))}function T4e(n){Mn[n].length>0||process.on(n,ane[n])}function ine(n){Mn[n].length>0||(process.removeListener(n,ane[n]),Mn.exit.length===0&&Mn.beforeExit.length===0&&(Uh=void 0))}function N4e(){one("exit")}function R4e(){one("beforeExit")}function one(n){for(let t of Mn[n]){let o=t.deref(),i=t.fn;o!==void 0&&i(o,n)}Mn[n]=[]}function k4e(n){for(let t of["exit","beforeExit"]){let o=Mn[t].indexOf(n);Mn[t].splice(o,o+1),ine(t)}}function nne(n,t,o){if(t===void 0)throw new Error("the object can't be undefined");T4e(n);let i=new WeakRef(t);i.fn=o,_4e(),Uh.register(t,i),Mn[n].push(i)}function v4e(n,t){nne("exit",n,t)}function P4e(n,t){nne("beforeExit",n,t)}function G4e(n){if(Uh!==void 0){Uh.unregister(n);for(let t of["exit","beforeExit"])Mn[t]=Mn[t].filter(o=>{let i=o.deref();return i&&i!==n}),ine(t)}}sne.exports={register:v4e,registerBeforeExit:P4e,unregister:G4e}});var gne=$((z_A,F4e)=>{F4e.exports={name:"thread-stream",version:"3.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina ",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Ine=$((V_A,cne)=>{"use strict";function L4e(n,t,o,i,e){let a=Date.now()+i,A=Atomics.load(n,t);if(A===o){e(null,"ok");return}let r=A,s=g=>{Date.now()>a?e(null,"timed-out"):setTimeout(()=>{r=A,A=Atomics.load(n,t),A===r?s(g>=1e3?1e3:g*2):A===o?e(null,"ok"):e(null,"not-equal")},g)};s(1)}function U4e(n,t,o,i,e){let a=Date.now()+i,A=Atomics.load(n,t);if(A!==o){e(null,"ok");return}let r=s=>{Date.now()>a?e(null,"timed-out"):setTimeout(()=>{A=Atomics.load(n,t),A!==o?e(null,"ok"):r(s>=1e3?1e3:s*2)},s)};r(1)}cne.exports={wait:L4e,waitDiff:U4e}});var pne=$((W_A,lne)=>{"use strict";lne.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var une=$((Z_A,Cne)=>{"use strict";var{version:H4e}=gne(),{EventEmitter:K4e}=Xe("events"),{Worker:x4e}=Xe("worker_threads"),{join:Y4e}=Xe("path"),{pathToFileURL:j4e}=Xe("url"),{wait:J4e}=Ine(),{WRITE_INDEX:qo,READ_INDEX:vi,SEQ_INDEX:tU}=pne(),q4e=Xe("buffer"),z4e=Xe("assert"),_e=Symbol("kImpl"),V4e=q4e.constants.MAX_STRING_LENGTH;function Hh(n,t){Atomics.add(n[_e].state,tU,1),t(),Atomics.add(n[_e].state,tU,1),Atomics.notify(n[_e].state,tU)}var Af=class{constructor(t){this._value=t}deref(){return this._value}},tb=class{register(){}unregister(){}},W4e=process.env.NODE_V8_COVERAGE?tb:global.FinalizationRegistry||tb,Z4e=process.env.NODE_V8_COVERAGE?Af:global.WeakRef||Af,dne=new W4e(n=>{n.exited||n.terminate()});function X4e(n,t){let{filename:o,workerData:i}=t,a=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Y4e(__dirname,"lib","worker.js"),A=new x4e(a,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:o.indexOf("file://")===0?o:j4e(o).href,dataBuf:n[_e].dataBuf,stateBuf:n[_e].stateBuf,workerData:{$context:{threadStreamVersion:H4e},...i}}});return A.stream=new Af(n),A.on("message",$4e),A.on("exit",Ene),dne.register(n,A),A}function hne(n){z4e(!n[_e].sync),n[_e].needDrain&&(n[_e].needDrain=!1,n.emit("drain"))}function Ab(n){let t=Atomics.load(n[_e].state,qo),o=n[_e].data.length-t;if(o>0){if(n[_e].buf.length===0){n[_e].flushing=!1,n[_e].ending?nU(n):n[_e].needDrain&&process.nextTick(hne,n);return}let i=n[_e].buf.slice(0,o),e=Buffer.byteLength(i);e<=o?(n[_e].buf=n[_e].buf.slice(o),rb(n,i,Ab.bind(null,n))):n.flush(()=>{if(!n.destroyed){for(Hh(n,()=>{Atomics.store(n[_e].state,vi,0),Atomics.store(n[_e].state,qo,0)}),Atomics.notify(n[_e].state,vi);e>n[_e].data.length;)o=o/2,i=n[_e].buf.slice(0,o),e=Buffer.byteLength(i);n[_e].buf=n[_e].buf.slice(o),rb(n,i,Ab.bind(null,n))}})}else if(o===0){if(t===0&&n[_e].buf.length===0)return;n.flush(()=>{Hh(n,()=>{Atomics.store(n[_e].state,vi,0),Atomics.store(n[_e].state,qo,0)}),Atomics.notify(n[_e].state,vi),Ab(n)})}else Ps(n,new Error("overwritten"))}function $4e(n){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}if(n?.code!=null)switch(n.code){case"READY":this.stream=new Z4e(t),t.flush(()=>{t[_e].ready=!0,t.emit("ready")});break;case"ERROR":Ps(t,n.err);break;case"EVENT":Array.isArray(n.args)?t.emit(n.name,...n.args):t.emit(n.name,n.args);break;case"WARNING":process.emitWarning(n.err);break;default:Ps(t,new Error("this should not happen: "+n.code))}}function Ene(n){let t=this.stream.deref();t!==void 0&&(dne.unregister(t),t.worker.exited=!0,t.worker.off("exit",Ene),Ps(t,n!==0?new Error("the worker thread exited"):null))}var aU=class extends K4e{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[_e]={},this[_e].stateBuf=new SharedArrayBuffer(128),this[_e].state=new Int32Array(this[_e].stateBuf),this[_e].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[_e].data=Buffer.from(this[_e].dataBuf),this[_e].sync=t.sync||!1,this[_e].ending=!1,this[_e].ended=!1,this[_e].needDrain=!1,this[_e].destroyed=!1,this[_e].flushing=!1,this[_e].ready=!1,this[_e].finished=!1,this[_e].errored=null,this[_e].closed=!1,this[_e].buf="",this.worker=X4e(this,t),this.on("message",(o,i)=>{this.worker.postMessage(o,i)})}write(t){if(this[_e].destroyed)return iU(this,new Error("the worker has exited")),!1;if(this[_e].ending)return iU(this,new Error("the worker is ending")),!1;if(this[_e].flushing&&this[_e].buf.length+t.length>=V4e)try{rU(this),this[_e].flushing=!0}catch(o){return Ps(this,o),!1}if(this[_e].buf+=t,this[_e].sync)try{return rU(this),!0}catch(o){return Ps(this,o),!1}return this[_e].flushing||(this[_e].flushing=!0,setImmediate(Ab,this)),this[_e].needDrain=this[_e].data.length-this[_e].buf.length-Atomics.load(this[_e].state,qo)<=0,!this[_e].needDrain}end(){this[_e].destroyed||(this[_e].ending=!0,nU(this))}flush(t){if(this[_e].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let o=Atomics.load(this[_e].state,qo);J4e(this[_e].state,vi,o,1/0,(i,e)=>{if(i){Ps(this,i),process.nextTick(t,i);return}if(e==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[_e].destroyed||(rU(this),oU(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[_e].ready}get destroyed(){return this[_e].destroyed}get closed(){return this[_e].closed}get writable(){return!this[_e].destroyed&&!this[_e].ending}get writableEnded(){return this[_e].ending}get writableFinished(){return this[_e].finished}get writableNeedDrain(){return this[_e].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[_e].errored}};function iU(n,t){setImmediate(()=>{n.emit("error",t)})}function Ps(n,t){n[_e].destroyed||(n[_e].destroyed=!0,t&&(n[_e].errored=t,iU(n,t)),n.worker.exited?setImmediate(()=>{n[_e].closed=!0,n.emit("close")}):n.worker.terminate().catch(()=>{}).then(()=>{n[_e].closed=!0,n.emit("close")}))}function rb(n,t,o){let i=Atomics.load(n[_e].state,qo),e=Buffer.byteLength(t);return n[_e].data.write(t,i),Hh(n,()=>{Atomics.store(n[_e].state,qo,i+e)}),o(),!0}function nU(n){if(!(n[_e].ended||!n[_e].ending||n[_e].flushing)){n[_e].ended=!0;try{n.flushSync();let t=Atomics.load(n[_e].state,vi);Hh(n,()=>{Atomics.store(n[_e].state,qo,-1)});let o=0;for(;t!==-1;){if(Atomics.wait(n[_e].state,vi,t,1e3),t=Atomics.load(n[_e].state,vi),t===-2){Ps(n,new Error("end() failed"));return}if(++o===10){Ps(n,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{n[_e].finished=!0,n.emit("finish")})}catch(t){Ps(n,t)}}}function rU(n){let t=()=>{n[_e].ending?nU(n):n[_e].needDrain&&process.nextTick(hne,n)};for(n[_e].flushing=!1;n[_e].buf.length!==0;){let o=Atomics.load(n[_e].state,qo),i=n[_e].data.length-o;if(i===0){oU(n),Hh(n,()=>{Atomics.store(n[_e].state,vi,0),Atomics.store(n[_e].state,qo,0)}),Atomics.notify(n[_e].state,vi);continue}else if(i<0)throw new Error("overwritten");let e=n[_e].buf.slice(0,i),a=Buffer.byteLength(e);if(a<=i)n[_e].buf=n[_e].buf.slice(i),rb(n,e,t);else{for(oU(n),Hh(n,()=>{Atomics.store(n[_e].state,vi,0),Atomics.store(n[_e].state,qo,0)}),Atomics.notify(n[_e].state,vi);a>n[_e].buf.length;)i=i/2,e=n[_e].buf.slice(0,i),a=Buffer.byteLength(e);n[_e].buf=n[_e].buf.slice(i),rb(n,e,t)}}}function oU(n){if(n[_e].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(n[_e].state,qo),o=0;for(;;){let i=Atomics.load(n[_e].state,vi);if(i===-2)throw Error("_flushSync failed");if(i!==t)Atomics.wait(n[_e].state,vi,i,1e3);else break;if(++o===10)throw new Error("_flushSync took too long (10s)")}}Cne.exports=aU});var cU=$((X_A,Bne)=>{"use strict";var{createRequire:e8e}=Xe("module"),A8e=q2(),{join:sU,isAbsolute:t8e,sep:r8e}=Xe("node:path"),a8e=X2(),gU=AU(),i8e=une();function o8e(n){gU.register(n,s8e),gU.registerBeforeExit(n,g8e),n.on("close",function(){gU.unregister(n)})}function n8e(n,t,o,i){let e=new i8e({filename:n,workerData:t,workerOpts:o,sync:i});e.on("ready",a),e.on("close",function(){process.removeListener("exit",A)}),process.on("exit",A);function a(){process.removeListener("exit",A),e.unref(),o.autoEnd!==!1&&o8e(e)}function A(){e.closed||(e.flushSync(),a8e(100),e.end())}return e}function s8e(n){n.ref(),n.flushSync(),n.end(),n.once("close",function(){n.unref()})}function g8e(n){n.flushSync()}function c8e(n){let{pipeline:t,targets:o,levels:i,dedupe:e,worker:a={},caller:A=A8e(),sync:r=!1}=n,s={...n.options},g=typeof A=="string"?[A]:A,c="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},I=n.target;if(I&&o)throw new Error("only one of target or targets can be specified");return o?(I=c["pino-worker"]||sU(__dirname,"worker.js"),s.targets=o.filter(B=>B.target).map(B=>({...B,target:d(B.target)})),s.pipelines=o.filter(B=>B.pipeline).map(B=>B.pipeline.map(f=>({...f,level:B.level,target:d(f.target)})))):t&&(I=c["pino-worker"]||sU(__dirname,"worker.js"),s.pipelines=[t.map(B=>({...B,target:d(B.target)}))]),i&&(s.levels=i),e&&(s.dedupe=e),s.pinoWillSendConfig=!0,n8e(d(I),s,a,r);function d(B){if(B=c[B]||B,t8e(B)||B.indexOf("file://")===0)return B;if(B==="pino/file")return sU(__dirname,"..","file.js");let f;for(let Q of g)try{let y=Q==="node:repl"?process.cwd()+r8e:Q;f=e8e(y).resolve(B);break}catch{continue}if(!f)throw new Error(`unable to determine transport target for "${B}"`);return f}}Bne.exports=c8e});var nb=$(($_A,Nne)=>{"use strict";var fne=Xe("node:diagnostics_channel"),Qne=Voe(),{mapHttpRequest:I8e,mapHttpResponse:l8e}=J2(),lU=rne(),yne=AU(),{lsCacheSym:p8e,chindingsSym:wne,writeSym:mne,serializersSym:One,formatOptsSym:Sne,endSym:d8e,stringifiersSym:bne,stringifySym:Mne,stringifySafeSym:pU,wildcardFirstSym:_ne,nestedKeySym:h8e,formattersSym:Tne,messageKeySym:E8e,errorKeySym:C8e,nestedKeyStrSym:u8e,msgPrefixSym:ab}=Lh(),{isMainThread:B8e}=Xe("worker_threads"),f8e=cU(),ob;typeof fne.tracingChannel=="function"?ob=fne.tracingChannel("pino_asJson"):ob={hasSubscribers:!1,traceSync(n,t,o,...i){return n.call(o,...i)}};function Kh(){}function Q8e(n,t){if(!t)return o;return function(...e){t.call(this,e,o,n)};function o(i,...e){if(typeof i=="object"){let a=i;i!==null&&(i.method&&i.headers&&i.socket?i=I8e(i):typeof i.setHeader=="function"&&(i=l8e(i)));let A;a===null&&e.length===0?A=[null]:(a=e.shift(),A=e),typeof this[ab]=="string"&&a!==void 0&&a!==null&&(a=this[ab]+a),this[mne](i,Qne(a,A,this[Sne]),n)}else{let a=i===void 0?e.shift():i;typeof this[ab]=="string"&&a!==void 0&&a!==null&&(a=this[ab]+a),this[mne](null,Qne(a,e,this[Sne]),n)}}}function IU(n){let t="",o=0,i=!1,e=255,a=n.length;if(a>100)return JSON.stringify(n);for(var A=0;A=32;A++)e=n.charCodeAt(A),(e===34||e===92)&&(t+=n.slice(o,A)+"\\",o=A,i=!0);return i?t+=n.slice(o):t=n,e<32?JSON.stringify(n):'"'+t+'"'}function y8e(n,t,o,i){if(ob.hasSubscribers===!1)return Dne.call(this,n,t,o,i);let e={instance:this,arguments};return ob.traceSync(Dne,e,this,n,t,o,i)}function Dne(n,t,o,i){let e=this[Mne],a=this[pU],A=this[bne],r=this[d8e],s=this[wne],g=this[One],c=this[Tne],I=this[E8e],d=this[C8e],B=this[p8e][o]+i;B=B+s;let f;c.log&&(n=c.log(n));let Q=A[_ne],y="";for(let _ in n)if(f=n[_],Object.prototype.hasOwnProperty.call(n,_)&&f!==void 0){g[_]?f=g[_](f):_===d&&g.err&&(f=g.err(f));let T=A[_]||Q;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":T&&(f=T(f));break;case"string":f=(T||IU)(f);break;default:f=(T||e)(f,a)}if(f===void 0)continue;let R=IU(_);y+=","+R+":"+f}let m="";if(t!==void 0){f=g[I]?g[I](t):t;let _=A[I]||Q;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":_&&(f=_(f)),m=',"'+I+'":'+f;break;case"string":f=(_||IU)(f),m=',"'+I+'":'+f;break;default:f=(_||e)(f,a),m=',"'+I+'":'+f}}return this[h8e]&&y?B+this[u8e]+y.slice(1)+"}"+m+r:B+y+m+r}function m8e(n,t){let o,i=n[wne],e=n[Mne],a=n[pU],A=n[bne],r=A[_ne],s=n[One],g=n[Tne].bindings;t=g(t);for(let c in t)if(o=t[c],((c.length<5||c!=="level"&&c!=="serializers"&&c!=="formatters"&&c!=="customLevels")&&t.hasOwnProperty(c)&&o!==void 0)===!0){if(o=s[c]?s[c](o):o,o=(A[c]||r||e)(o,a),o===void 0)continue;i+=',"'+c+'":'+o}return i}function S8e(n){return n.write!==n.constructor.prototype.write}function ib(n){let t=new lU(n);return t.on("error",o),!n.sync&&B8e&&(yne.register(t,D8e),t.on("close",function(){yne.unregister(t)})),t;function o(i){if(i.code==="EPIPE"){t.write=Kh,t.end=Kh,t.flushSync=Kh,t.destroy=Kh;return}t.removeListener("error",o),t.emit("error",i)}}function D8e(n,t){n.destroyed||(t==="beforeExit"?(n.flush(),n.on("drain",function(){n.end()})):n.flushSync())}function w8e(n){return function(o,i,e={},a){if(typeof e=="string")a=ib({dest:e}),e={};else if(typeof a=="string"){if(e&&e.transport)throw Error("only one of option.transport or stream can be specified");a=ib({dest:a})}else if(e instanceof lU||e.writable||e._writableState)a=e,e={};else if(e.transport){if(e.transport instanceof lU||e.transport.writable||e.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(e.transport.targets&&e.transport.targets.length&&e.formatters&&typeof e.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let s;e.customLevels&&(s=e.useOnlyCustomLevels?e.customLevels:Object.assign({},e.levels,e.customLevels)),a=f8e({caller:i,...e.transport,levels:s})}if(e=Object.assign({},n,e),e.serializers=Object.assign({},n.serializers,e.serializers),e.formatters=Object.assign({},n.formatters,e.formatters),e.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:A,onChild:r}=e;return A===!1&&(e.level="silent"),r||(e.onChild=Kh),a||(S8e(process.stdout)?a=process.stdout:a=ib({fd:process.stdout.fd||1})),{opts:e,stream:a}}}function O8e(n,t){try{return JSON.stringify(n)}catch{try{return(t||this[pU])(n)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function b8e(n,t,o){return{level:n,bindings:t,log:o}}function M8e(n){let t=Number(n);return typeof n=="string"&&Number.isFinite(t)?t:n===void 0?1:n}Nne.exports={noop:Kh,buildSafeSonicBoom:ib,asChindings:m8e,asJson:y8e,genLog:Q8e,createArgsNormalizer:w8e,stringify:O8e,buildFormatters:b8e,normalizeDestFileDescriptor:M8e}});var sb=$((eTA,Rne)=>{var _8e={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},T8e={ASC:"ASC",DESC:"DESC"};Rne.exports={DEFAULT_LEVELS:_8e,SORTING_ORDER:T8e}});var EU=$((ATA,Gne)=>{"use strict";var{lsCacheSym:N8e,levelValSym:dU,useOnlyCustomLevelsSym:R8e,streamSym:k8e,formattersSym:v8e,hooksSym:P8e,levelCompSym:kne}=Lh(),{noop:G8e,genLog:Ll}=nb(),{DEFAULT_LEVELS:Gs,SORTING_ORDER:vne}=sb(),Pne={fatal:n=>{let t=Ll(Gs.fatal,n);return function(...o){let i=this[k8e];if(t.call(this,...o),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:n=>Ll(Gs.error,n),warn:n=>Ll(Gs.warn,n),info:n=>Ll(Gs.info,n),debug:n=>Ll(Gs.debug,n),trace:n=>Ll(Gs.trace,n)},hU=Object.keys(Gs).reduce((n,t)=>(n[Gs[t]]=t,n),{}),F8e=Object.keys(hU).reduce((n,t)=>(n[t]='{"level":'+Number(t),n),{});function L8e(n){let t=n[v8e].level,{labels:o}=n.levels,i={};for(let e in o){let a=t(o[e],Number(e));i[e]=JSON.stringify(a).slice(0,-1)}return n[N8e]=i,n}function U8e(n,t){if(t)return!1;switch(n){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function H8e(n){let{labels:t,values:o}=this.levels;if(typeof n=="number"){if(t[n]===void 0)throw Error("unknown level value"+n);n=t[n]}if(o[n]===void 0)throw Error("unknown level "+n);let i=this[dU],e=this[dU]=o[n],a=this[R8e],A=this[kne],r=this[P8e].logMethod;for(let s in o){if(A(o[s],e)===!1){this[s]=G8e;continue}this[s]=U8e(s,a)?Pne[s](r):Ll(o[s],r)}this.emit("level-change",n,e,t[i],i,this)}function K8e(n){let{levels:t,levelVal:o}=this;return t&&t.labels?t.labels[o]:""}function x8e(n){let{values:t}=this.levels,o=t[n];return o!==void 0&&this[kne](o,this[dU])}function Y8e(n,t,o){return n===vne.DESC?t<=o:t>=o}function j8e(n){return typeof n=="string"?Y8e.bind(null,n):n}function J8e(n=null,t=!1){let o=n?Object.keys(n).reduce((a,A)=>(a[n[A]]=A,a),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:hU,o),e=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:Gs,n);return{labels:i,values:e}}function q8e(n,t,o){if(typeof n=="number"){if(![].concat(Object.keys(t||{}).map(a=>t[a]),o?[]:Object.keys(hU).map(a=>+a),1/0).includes(n))throw Error(`default level:${n} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),o?null:Gs,t);if(!(n in i))throw Error(`default level:${n} must be included in custom levels`)}function z8e(n,t){let{labels:o,values:i}=n;for(let e in t){if(e in i)throw Error("levels cannot be overridden");if(t[e]in o)throw Error("pre-existing level values cannot be used for new levels")}}function V8e(n){if(typeof n!="function"&&!(typeof n=="string"&&Object.values(vne).includes(n)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Gne.exports={initialLsCache:F8e,genLsCache:L8e,levelMethods:Pne,getLevel:K8e,setLevel:H8e,isLevelEnabled:x8e,mappings:J8e,assertNoLevelCollisions:z8e,assertDefaultLevelFound:q8e,genLevelComparison:j8e,assertLevelComparison:V8e}});var CU=$((tTA,Fne)=>{"use strict";Fne.exports={version:"9.14.0"}});var Jne=$((aTA,jne)=>{"use strict";var{EventEmitter:W8e}=Xe("node:events"),{lsCacheSym:Z8e,levelValSym:X8e,setLevelSym:cb,getLevelSym:Lne,chindingsSym:Ib,parsedChindingsSym:$8e,mixinSym:eze,asJsonSym:Hne,writeSym:Aze,mixinMergeStrategySym:tze,timeSym:rze,timeSliceIndexSym:aze,streamSym:Kne,serializersSym:Ul,formattersSym:tf,errorKeySym:ize,messageKeySym:oze,useOnlyCustomLevelsSym:nze,needsMetadataGsym:sze,redactFmtSym:gze,stringifySym:cze,formatOptsSym:Ize,stringifiersSym:lze,msgPrefixSym:BU,hooksSym:pze}=Lh(),{getLevel:dze,setLevel:hze,isLevelEnabled:Eze,mappings:Cze,initialLsCache:uze,genLsCache:Bze,assertNoLevelCollisions:fze}=EU(),{asChindings:fU,asJson:Qze,buildFormatters:uU,stringify:Une,noop:xne}=nb(),{version:yze}=CU(),mze=W2(),Sze=class{},Yne={constructor:Sze,child:Dze,bindings:wze,setBindings:Oze,flush:_ze,isLevelEnabled:Eze,version:yze,get level(){return this[Lne]()},set level(n){this[cb](n)},get levelVal(){return this[X8e]},set levelVal(n){throw Error("levelVal is read-only")},get msgPrefix(){return this[BU]},get[Symbol.toStringTag](){return"Pino"},[Z8e]:uze,[Aze]:Mze,[Hne]:Qze,[Lne]:dze,[cb]:hze};Object.setPrototypeOf(Yne,W8e.prototype);jne.exports=function(){return Object.create(Yne)};var gb=n=>n;function Dze(n,t){if(!n)throw Error("missing bindings for child Pino");let o=this[Ul],i=this[tf],e=Object.create(this);if(t==null)return e[tf].bindings!==gb&&(e[tf]=uU(i.level,gb,i.log)),e[Ib]=fU(e,n),e[cb](this.level),this.onChild!==xne&&this.onChild(e),e;if(t.hasOwnProperty("serializers")===!0){e[Ul]=Object.create(null);for(let c in o)e[Ul][c]=o[c];let s=Object.getOwnPropertySymbols(o);for(var a=0;a{"use strict";var{hasOwnProperty:rf}=Object.prototype,Kl=mU();Kl.configure=mU;Kl.stringify=Kl;Kl.default=Kl;SU.stringify=Kl;SU.configure=mU;Vne.exports=Kl;var Tze=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function AI(n){return n.length<5e3&&!Tze.test(n)?`"${n}"`:JSON.stringify(n)}function QU(n,t){if(n.length>200||t)return n.sort(t);for(let o=1;oi;)n[e]=n[e-1],e--;n[e]=i}return n}var Nze=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function yU(n){return Nze.call(n)!==void 0&&n.length!==0}function qne(n,t,o){n.length= 1`)}return o===void 0?1/0:o}function Hl(n){return n===1?"1 item":`${n} items`}function Pze(n){let t=new Set;for(let o of n)(typeof o=="string"||typeof o=="number")&&t.add(String(o));return t}function Gze(n){if(rf.call(n,"strict")){let t=n.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return o=>{let i=`Object can not safely be stringified. Received type ${typeof o}`;throw typeof o!="function"&&(i+=` (${o.toString()})`),new Error(i)}}}function mU(n){n={...n};let t=Gze(n);t&&(n.bigint===void 0&&(n.bigint=!1),"circularValue"in n||(n.circularValue=Error));let o=Rze(n),i=vze(n,"bigint"),e=kze(n),a=typeof e=="function"?e:void 0,A=zne(n,"maximumDepth"),r=zne(n,"maximumBreadth");function s(B,f,Q,y,m,_){let T=f[B];switch(typeof T=="object"&&T!==null&&typeof T.toJSON=="function"&&(T=T.toJSON(B)),T=y.call(f,B,T),typeof T){case"string":return AI(T);case"object":{if(T===null)return"null";if(Q.indexOf(T)!==-1)return o;let R="",H=",",j=_;if(Array.isArray(T)){if(T.length===0)return"[]";if(Ar){let k=T.length-r-1;R+=`${H}"... ${Hl(k)} not stringified"`}return m!==""&&(R+=` +${j}`),Q.pop(),`[${R}]`}let F=Object.keys(T),q=F.length;if(q===0)return"{}";if(Ar){let z=q-r;R+=`${x}"...":${J}"${Hl(z)} not stringified"`,x=H}return m!==""&&x.length>1&&(R=` +${_}${R} +${j}`),Q.pop(),`{${R}}`}case"number":return isFinite(T)?String(T):t?t(T):"null";case"boolean":return T===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(T);default:return t?t(T):void 0}}function g(B,f,Q,y,m,_){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(B)),typeof f){case"string":return AI(f);case"object":{if(f===null)return"null";if(Q.indexOf(f)!==-1)return o;let T=_,R="",H=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let P=f.length-r-1;R+=`${H}"... ${Hl(P)} not stringified"`}return m!==""&&(R+=` +${T}`),Q.pop(),`[${R}]`}Q.push(f);let j="";m!==""&&(_+=m,H=`, +${_}`,j=" ");let F="";for(let q of y){let J=g(q,f[q],Q,y,m,_);J!==void 0&&(R+=`${F}${AI(q)}:${j}${J}`,F=H)}return m!==""&&F.length>1&&(R=` +${_}${R} +${T}`),Q.pop(),`{${R}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function c(B,f,Q,y,m){switch(typeof f){case"string":return AI(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return c(B,f,Q,y,m);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let _=m;if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let N=f.length-r-1;J+=`${x}"... ${Hl(N)} not stringified"`}return J+=` +${_}`,Q.pop(),`[${J}]`}let T=Object.keys(f),R=T.length;if(R===0)return"{}";if(Ar){let J=R-r;j+=`${F}"...": "${Hl(J)} not stringified"`,F=H}return F!==""&&(j=` +${m}${j} +${_}`),Q.pop(),`{${j}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function I(B,f,Q){switch(typeof f){case"string":return AI(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(B),typeof f!="object")return I(B,f,Q);if(f===null)return"null"}if(Q.indexOf(f)!==-1)return o;let y="",m=f.length!==void 0;if(m&&Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let J=f.length-r-1;y+=`,"... ${Hl(J)} not stringified"`}return Q.pop(),`[${y}]`}let _=Object.keys(f),T=_.length;if(T===0)return"{}";if(Ar){let j=T-r;y+=`${R}"...":"${Hl(j)} not stringified"`}return Q.pop(),`{${y}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function d(B,f,Q){if(arguments.length>1){let y="";if(typeof Q=="number"?y=" ".repeat(Math.min(Q,10)):typeof Q=="string"&&(y=Q.slice(0,10)),f!=null){if(typeof f=="function")return s("",{"":B},[],f,y,"");if(Array.isArray(f))return g("",B,[],Pze(f),y,"")}if(y.length!==0)return c("",B,[],y,"")}return I("",B,[])}return d}});var ese=$((iTA,$ne)=>{"use strict";var DU=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Xne}=sb(),Fze=Xne.info;function Lze(n,t){n=n||[],t=t||{dedupe:!1};let o=Object.create(Xne);o.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(I=>{o[I]=t.levels[I]});let i={write:e,add:r,remove:s,emit:a,flushSync:A,end:g,minLevel:0,lastId:0,streams:[],clone:c,[DU]:!0,streamLevels:o};return Array.isArray(n)?n.forEach(r,i):r.call(i,n),n=null,i;function e(I){let d,B=this.lastLevel,{streams:f}=this,Q=0,y;for(let m=Uze(f.length,t.dedupe);Kze(m,f.length,t.dedupe);m=Hze(m,t.dedupe))if(d=f[m],d.level<=B){if(Q!==0&&Q!==d.level)break;if(y=d.stream,y[DU]){let{lastTime:_,lastMsg:T,lastObj:R,lastLogger:H}=this;y.lastLevel=B,y.lastTime=_,y.lastMsg=T,y.lastObj=R,y.lastLogger=H}y.write(I),t.dedupe&&(Q=d.level)}else if(!t.dedupe)break}function a(...I){for(let{stream:d}of this.streams)typeof d.emit=="function"&&d.emit(...I)}function A(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync()}function r(I){if(!I)return i;let d=typeof I.write=="function"||I.stream,B=I.write?I:I.stream;if(!d)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:Q}=this,y;typeof I.levelVal=="number"?y=I.levelVal:typeof I.level=="string"?y=Q[I.level]:typeof I.level=="number"?y=I.level:y=Fze;let m={stream:B,level:y,levelVal:void 0,id:++i.lastId};return f.unshift(m),f.sort(Zne),this.minLevel=f[0].level,i}function s(I){let{streams:d}=this,B=d.findIndex(f=>f.id===I);return B>=0&&(d.splice(B,1),d.sort(Zne),this.minLevel=d.length>0?d[0].level:-1),i}function g(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync(),I.end()}function c(I){let d=new Array(this.streams.length);for(let B=0;B=0:n{"use strict";var xze=Xe("node:os"),sse=J2(),Yze=q2(),jze=W2(),gse=qoe(),Jze=Jne(),cse=Lh(),{configure:qze}=Wne(),{assertDefaultLevelFound:zze,mappings:Ise,genLsCache:Vze,genLevelComparison:Wze,assertLevelComparison:Zze}=EU(),{DEFAULT_LEVELS:lse,SORTING_ORDER:Xze}=sb(),{createArgsNormalizer:$ze,asChindings:eVe,buildSafeSonicBoom:Ase,buildFormatters:AVe,stringify:wU,normalizeDestFileDescriptor:tse,noop:tVe}=nb(),{version:rVe}=CU(),{chindingsSym:rse,redactFmtSym:aVe,serializersSym:ase,timeSym:iVe,timeSliceIndexSym:oVe,streamSym:nVe,stringifySym:ise,stringifySafeSym:OU,stringifiersSym:ose,setLevelSym:sVe,endSym:gVe,formatOptsSym:cVe,messageKeySym:IVe,errorKeySym:lVe,nestedKeySym:pVe,mixinSym:dVe,levelCompSym:hVe,useOnlyCustomLevelsSym:EVe,formattersSym:nse,hooksSym:CVe,nestedKeyStrSym:uVe,mixinMergeStrategySym:BVe,msgPrefixSym:fVe}=cse,{epochTime:pse,nullTime:QVe}=gse,{pid:yVe}=process,mVe=xze.hostname(),SVe=sse.err,DVe={level:"info",levelComparison:Xze.ASC,levels:lse,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:yVe,hostname:mVe},serializers:Object.assign(Object.create(null),{err:SVe}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:pse,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},wVe=$ze(DVe),OVe=Object.assign(Object.create(null),sse);function bU(...n){let t={},{opts:o,stream:i}=wVe(t,Yze(),...n);o.level&&typeof o.level=="string"&&lse[o.level.toLowerCase()]!==void 0&&(o.level=o.level.toLowerCase());let{redact:e,crlf:a,serializers:A,timestamp:r,messageKey:s,errorKey:g,nestedKey:c,base:I,name:d,level:B,customLevels:f,levelComparison:Q,mixin:y,mixinMergeStrategy:m,useOnlyCustomLevels:_,formatters:T,hooks:R,depthLimit:H,edgeLimit:j,onChild:F,msgPrefix:q}=o,J=qze({maximumDepth:H,maximumBreadth:j}),x=AVe(T.level,T.bindings,T.log),P=wU.bind({[OU]:J}),z=e?jze(e,P):{},U=e?{stringify:z[aVe]}:{stringify:P},N="}"+(a?`\r `:` -`),P=fze.bind(null,{[Pne]:"",[Gne]:A,[Lne]:W,[Fne]:cU,[IU]:j,[Une]:K}),V="";I!==null&&(d===void 0?V=P(I):V=P(Object.assign({},I,{name:d})));let te=r instanceof Function?r:r?Jne:Hze,ne=te().indexOf(":")+1;if(_&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);if(q&&typeof q!="string")throw Error(`Unknown msgPrefix type "${typeof q}" - expected "string"`);dze(B,f,_);let Ne=Yne(f,_);typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:Ne,messageKey:s,errorKey:g}}),Cze(Q);let ce=Eze(Q);return Object.assign(t,{levels:Ne,[vze]:ce,[Pze]:_,[Oze]:i,[Dze]:te,[wze]:ne,[Fne]:cU,[IU]:j,[Lne]:W,[Mze]:N,[_ze]:Y,[Tze]:s,[Nze]:g,[Rze]:c,[Fze]:c?`,${JSON.stringify(c)}:{`:"",[Gne]:A,[kze]:y,[Lze]:m,[Pne]:V,[Une]:K,[Gze]:G,silent:yze,onChild:L,[Uze]:q}),Object.setPrototypeOf(t,lze()),hze(t),t[bze](B),t}qo.exports=lU;qo.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=vne(n.dest||process.stdout.fd),kne(n)):kne({dest:vne(n),minLength:0});qo.exports.transport=z2();qo.exports.multistream=Rne();qo.exports.levels=Yne();qo.exports.stdSerializers=qze;qo.exports.stdTimeFunctions=Object.assign({},Kne);qo.exports.symbols=xne;qo.exports.version=mze;qo.exports.default=lU;qo.exports.pino=lU});import{unlink as Ide}from"node:fs/promises";import{homedir as lde}from"node:os";import{join as nE,resolve as iI}from"node:path";import{createHash as uge,randomUUID as BH}from"node:crypto";import{mkdir as Bge,readFile as fge,rename as Qge,unlink as uH,writeFile as yge}from"node:fs/promises";import{dirname as mge}from"node:path";var tH={"\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002":"This question has already been answered from another client; no further reply is needed.","\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002":"Task completed.",\u7ED3\u679C\u6587\u4EF6:"result file","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u7684\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'The delivery result of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Slack \u5E94\u7528\u7F3A\u5C11 files:write \u6743\u9650\u3002\u8BF7\u66F4\u65B0 Manifest\u3001\u91CD\u65B0\u5B89\u88C5\u5E94\u7528\u5E76\u91CD\u65B0\u8FDE\u63A5\u673A\u5668\u4EBA\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but the Slack app is missing the files:write permission. Please update the Manifest, reinstall the app, reconnect the bot, and try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11 Discord \u7684 Send Messages\u3001Attach Files \u6216 Read Message History \u6743\u9650\u3002":'The result file "{name}" was generated, but the bot is missing the Discord Send Messages, Attach Files, or Read Message History permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Telegram \u4E0D\u5141\u8BB8\u673A\u5668\u4EBA\u5728\u5F53\u524D\u804A\u5929\u53D1\u9001\u6587\u6863\uFF0C\u8BF7\u68C0\u67E5\u804A\u5929\u6743\u9650\u3002":'The result file "{name}" was generated, but Telegram does not allow the bot to send documents in this chat. Please check the chat permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u6E20\u9053\u6743\u9650\u3002":'The result file "{name}" was generated, but the bot does not have permission to send files. Please check the channel permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the size limit of this channel and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" is empty and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002":'The result file "{name}" cannot be read or prepared for sending right now. Please make sure the file is still accessible and try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5F53\u524D\u6E20\u9053\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by this channel and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but this channel rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but this channel could not send it right now. Please try again later.',"\u6D88\u606F\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Failed to process the message. Please try again later.","\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002":"This card has ended. Please check the next message.","\u5DE5\u5177\u8C03\u7528\u300C{name}\u300D\u672A\u6210\u529F\uFF0C\u8BF7\u68C0\u67E5\u5DE5\u5177\u914D\u7F6E\u6216\u7A0D\u540E\u91CD\u8BD5\u3002":'Tool call "{name}" did not succeed. Check the tool configuration or try again later.',"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002":"Could not connect to the processing service, so the message was not submitted. Make sure DeepSeek Harness is running, then try again.","\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The processing service timed out before the message started. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"The task status could not be confirmed and the task may have started. Wait or send /stop before submitting it again.","\u6D88\u606F\u63D0\u4EA4\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /status \u67E5\u770B\u72B6\u6001\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"The message submission could not be confirmed and the task may have started. Wait or send /status before submitting it again.","\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4EFB\u52A1\u8FDB\u5EA6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Task progress is temporarily unavailable and the task may still be running. Wait or send /stop before submitting it again.","\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002":"The processing service rejected the bot connection. Ask an administrator to check the Harness address, proxy, or access settings.","\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002":"The bot and DeepSeek Harness use incompatible APIs. Ask an administrator to check the Harness address and update the related components.","DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DeepSeek Harness could not complete the request. Please try again later.","\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Waiting for the model reply timed out and the task may still be running. Wait or send /stop before submitting it again.","\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002":"The model credentials are missing or invalid. Ask an administrator to check the model settings.","\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002":"The model quota or balance is insufficient. Ask an administrator to add quota or switch models, then try again.","\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is rate-limiting requests. Please try again later.","\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002":"This conversation exceeds the model context limit. Send /compact or /new, then try again.","\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u4F7F\u7528 /model \u5207\u6362\u6A21\u578B\u3002":"The current model does not exist or is unavailable. Send /models and use /model to switch models.","\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u5E76\u4F7F\u7528 /model \u91CD\u65B0\u9009\u62E9\u3002":"The current model does not exist or does not support the selected settings. Send /models and use /model to choose again.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002":"The current model does not support this content or the selected settings. Adjust the content, model, or reasoning effort and try again.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u5207\u6362\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002":"The current model does not support the selected settings. Switch the model or reasoning effort, then try again.","\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service timed out and the task did not finish. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is temporarily unreachable and the task did not finish. Please try again later.","\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is temporarily unavailable and the task did not finish. Please try again later.","\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002":"The model reply was interrupted or malformed, so the task did not finish. Please try again.","\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002":"The model returned no displayable content. Try again, or switch models if this keeps happening.","\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002":"The model rejected the current content. Revise the request and try again.","\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002":"The model reached its output limit without producing a displayable result. Reduce the task scope and try again.","\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\u3002":"The task is waiting for an action that cannot be completed in this channel. Handle it in DeepSeek Harness, then try again.","\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002":"The task was unexpectedly interrupted and did not finish. Please try again.","\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The current Session no longer exists. Send /new to create one, then try again.","\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002":"The current Session is still processing the previous task. Wait for it to finish, or send /stop before trying again.","\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002":"The Workspace or Session state just changed. Please send this message again.","\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002":"The current Workspace does not exist or is unavailable. Select another Workspace and try again.","\u5F53\u524D Agent Preset \u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u540E\u91CD\u65B0\u9009\u62E9\u3002":"The current Agent Preset does not exist or is unavailable. Send /presetlist and select another one.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002":"The reply was generated, but the bot cannot send it. Ask an administrator to check channel permissions or reconnect the bot.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The reply was generated, but this channel is rate-limiting messages. Please try again later.","\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Reply delivery could not be confirmed. Check whether it already arrived before submitting the task again.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The reply was generated, but this channel could not send it. Please try again later.","\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002":"This message contains an image or file that cannot be processed. Adjust it and send it again.","\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002":"The task did not finish and the cause could not be determined. Try again; if it persists, give the reference ID to an administrator.","\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}":"Error code: {code}; reference: {referenceId}","{label}\u673A\u5668\u4EBA":"{label} bot","\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002":"Only text and image messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002":"Only text, image, and file messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Only text, image, file, and voice-transcription messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Only text, image, file, and voice messages already transcribed to text by WeChat are supported at the moment.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6216\u56FE\u7247\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text, an image, or a file directly to continue the current session.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5E26\u6587\u5B57\u8BC6\u522B\u7ED3\u679C\u7684\u8BED\u97F3\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text, an image, a file, or a voice message already transcribed to text to continue the current session.","{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The {label} bot is connected to DeepSeek Harness.","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD":"/new Start a brand-new session","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587":"/compact Compact the earlier context of the current session","/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace Switch workspace","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84":"/workspacelist List absolute workspace paths","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"/sessionlist [workspace index or absolute path] List session IDs and titles","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD":"/session Bind this chat to the specified session","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B":"/models List all available models by index","/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7":"/reasoninglist or /reasonings List reasoning efforts for the current model by index","/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7":"/reasoning [index, effort ID, or --default] Show or switch the current reasoning effort","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B":"/model [index or full model ID] Show or switch the model of the current session","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B":"/model [index or full model ID] [reasoning effort ID] Show or switch the current Session model","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2":"Example: send /models first, then /model 2","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]":"Example: send /models first, then /model 2 [reasoning effort ID]","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets by index","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset":"/preset [index or full ID] Show or set the Agent Preset of this bot","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:":"Numeric-only ID: /preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4":"/preset --default Follow the Host default","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1":"/stop Stop the current task","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1":"/steer Steer the current task","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001":"/status Check the connection status","/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C":"/version Show the plugin version","/help \u663E\u793A\u672C\u5E2E\u52A9":"/help Show this help","{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The {label} bot is connected to DeepSeek Harness and working normally.","{label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"{label} bot credentials are missing. Remove the bot and connect it again.","{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The {label} connection is not ready yet. The plugin will retry automatically.","{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The {label} bot is connected, but its message connection is not ready yet.","{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The {label} connection is still not ready. Please try again later.","{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5":"The {label} bot is not connected yet","{name}\uFF08{id}\uFF09":"{name} ({id})","{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38":"The {label}{connectionLabel} is running normally","{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The {label} connection is not ready. The plugin will retry automatically","{label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The {label} connection is currently offline","\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002":"A new session has started. Please send your question.","\u6B63\u5728\u4F7F\u7528{name}\u2026":"Using {name}\u2026","\u5DF2\u505C\u6B62\u3002":"Stopped.","\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002":"Please answer the current question with text.","{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the {label} interaction question.","\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\u3002":"Failed to submit the answer.","\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u5F53\u524D\u95EE\u9898\u7684\u7B54\u6848\u3002":"Failed to submit the answer. Please resend your answer to the current question.","\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002":"A pending question left over in this Session was detected. It has been safely cancelled, and your latest message is being processed."};var rH={"\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09":"Usage: /session Session ID or the session index in the current Workspace (/session N)","\u7528\u6CD5\uFF1A\n/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD\n/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7 \u6309 /workspacelist \u5E8F\u53F7\u5217\u51FA\u4F1A\u8BDD\n/sessionlist \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5217\u51FA\u6307\u5B9A\u5DE5\u4F5C\u533A\u4F1A\u8BDD":`Usage: +`),k=eVe.bind(null,{[rse]:"",[ase]:A,[ose]:z,[ise]:wU,[OU]:J,[nse]:x}),V="";I!==null&&(d===void 0?V=k(I):V=k(Object.assign({},I,{name:d})));let ee=r instanceof Function?r:r?pse:QVe,ie=ee().indexOf(":")+1;if(_&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);if(q&&typeof q!="string")throw Error(`Unknown msgPrefix type "${typeof q}" - expected "string"`);zze(B,f,_);let Te=Ise(f,_);typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:Te,messageKey:s,errorKey:g}}),Zze(Q);let se=Wze(Q);return Object.assign(t,{levels:Te,[hVe]:se,[EVe]:_,[nVe]:i,[iVe]:ee,[oVe]:ie,[ise]:wU,[OU]:J,[ose]:z,[gVe]:N,[cVe]:U,[IVe]:s,[lVe]:g,[pVe]:c,[uVe]:c?`,${JSON.stringify(c)}:{`:"",[ase]:A,[dVe]:y,[BVe]:m,[rse]:V,[nse]:x,[CVe]:R,silent:tVe,onChild:F,[fVe]:q}),Object.setPrototypeOf(t,Jze()),Vze(t),t[sVe](B),t}zo.exports=bU;zo.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=tse(n.dest||process.stdout.fd),Ase(n)):Ase({dest:tse(n),minLength:0});zo.exports.transport=cU();zo.exports.multistream=ese();zo.exports.levels=Ise();zo.exports.stdSerializers=OVe;zo.exports.stdTimeFunctions=Object.assign({},gse);zo.exports.symbols=cse;zo.exports.version=rVe;zo.exports.default=bU;zo.exports.pino=bU});import{unlink as jde}from"node:fs/promises";import{homedir as Jde}from"node:os";import{join as pE,resolve as II}from"node:path";import{createHash as Xge,randomUUID as KH}from"node:crypto";import{mkdir as $ge,readFile as ece,rename as Ace,unlink as HH,writeFile as tce}from"node:fs/promises";import{dirname as rce}from"node:path";var DH={"\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002":"This question has already been answered from another client; no further reply is needed.","\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002":"Task completed.",\u7ED3\u679C\u6587\u4EF6:"result file","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u7684\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'The delivery result of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Slack \u5E94\u7528\u7F3A\u5C11 files:write \u6743\u9650\u3002\u8BF7\u66F4\u65B0 Manifest\u3001\u91CD\u65B0\u5B89\u88C5\u5E94\u7528\u5E76\u91CD\u65B0\u8FDE\u63A5\u673A\u5668\u4EBA\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but the Slack app is missing the files:write permission. Please update the Manifest, reinstall the app, reconnect the bot, and try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11 Discord \u7684 Send Messages\u3001Attach Files \u6216 Read Message History \u6743\u9650\u3002":'The result file "{name}" was generated, but the bot is missing the Discord Send Messages, Attach Files, or Read Message History permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Telegram \u4E0D\u5141\u8BB8\u673A\u5668\u4EBA\u5728\u5F53\u524D\u804A\u5929\u53D1\u9001\u6587\u6863\uFF0C\u8BF7\u68C0\u67E5\u804A\u5929\u6743\u9650\u3002":'The result file "{name}" was generated, but Telegram does not allow the bot to send documents in this chat. Please check the chat permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u6E20\u9053\u6743\u9650\u3002":'The result file "{name}" was generated, but the bot does not have permission to send files. Please check the channel permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the size limit of this channel and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" is empty and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002":'The result file "{name}" cannot be read or prepared for sending right now. Please make sure the file is still accessible and try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5F53\u524D\u6E20\u9053\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by this channel and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but this channel rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but this channel could not send it right now. Please try again later.',"\u6D88\u606F\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Failed to process the message. Please try again later.","\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002":"This card has ended. Please check the next message.","\u5DE5\u5177\u8C03\u7528\u300C{name}\u300D\u672A\u6210\u529F\uFF0C\u8BF7\u68C0\u67E5\u5DE5\u5177\u914D\u7F6E\u6216\u7A0D\u540E\u91CD\u8BD5\u3002":'Tool call "{name}" did not succeed. Check the tool configuration or try again later.',"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002":"Could not connect to the processing service, so the message was not submitted. Make sure DeepSeek Harness is running, then try again.","\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The processing service timed out before the message started. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"The task status could not be confirmed and the task may have started. Wait or send /stop before submitting it again.","\u6D88\u606F\u63D0\u4EA4\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /status \u67E5\u770B\u72B6\u6001\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"The message submission could not be confirmed and the task may have started. Wait or send /status before submitting it again.","\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4EFB\u52A1\u8FDB\u5EA6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Task progress is temporarily unavailable and the task may still be running. Wait or send /stop before submitting it again.","\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002":"The processing service rejected the bot connection. Ask an administrator to check the Harness address, proxy, or access settings.","\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002":"The bot and DeepSeek Harness use incompatible APIs. Ask an administrator to check the Harness address and update the related components.","DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DeepSeek Harness could not complete the request. Please try again later.","\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Waiting for the model reply timed out and the task may still be running. Wait or send /stop before submitting it again.","\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002":"The model credentials are missing or invalid. Ask an administrator to check the model settings.","\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002":"The model quota or balance is insufficient. Ask an administrator to add quota or switch models, then try again.","\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is rate-limiting requests. Please try again later.","\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002":"This conversation exceeds the model context limit. Send /compact or /new, then try again.","\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u4F7F\u7528 /model \u5207\u6362\u6A21\u578B\u3002":"The current model does not exist or is unavailable. Send /models and use /model to switch models.","\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u5E76\u4F7F\u7528 /model \u91CD\u65B0\u9009\u62E9\u3002":"The current model does not exist or does not support the selected settings. Send /models and use /model to choose again.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002":"The current model does not support this content or the selected settings. Adjust the content, model, or reasoning effort and try again.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u5207\u6362\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002":"The current model does not support the selected settings. Switch the model or reasoning effort, then try again.","\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service timed out and the task did not finish. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is temporarily unreachable and the task did not finish. Please try again later.","\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The model service is temporarily unavailable and the task did not finish. Please try again later.","\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002":"The model reply was interrupted or malformed, so the task did not finish. Please try again.","\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002":"The model returned no displayable content. Try again, or switch models if this keeps happening.","\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002":"The model rejected the current content. Revise the request and try again.","\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002":"The model reached its output limit without producing a displayable result. Reduce the task scope and try again.","\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\u3002":"The task is waiting for an action that cannot be completed in this channel. Handle it in DeepSeek Harness, then try again.","\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002":"The task was unexpectedly interrupted and did not finish. Please try again.","\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The current Session no longer exists. Send /new to create one, then try again.","\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002":"The current Session is still processing the previous task. Wait for it to finish, or send /stop before trying again.","\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002":"The Workspace or Session state just changed. Please send this message again.","\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002":"The current Workspace does not exist or is unavailable. Select another Workspace and try again.","\u5F53\u524D Agent Preset \u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u540E\u91CD\u65B0\u9009\u62E9\u3002":"The current Agent Preset does not exist or is unavailable. Send /presetlist and select another one.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002":"The reply was generated, but the bot cannot send it. Ask an administrator to check channel permissions or reconnect the bot.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The reply was generated, but this channel is rate-limiting messages. Please try again later.","\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002":"Reply delivery could not be confirmed. Check whether it already arrived before submitting the task again.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The reply was generated, but this channel could not send it. Please try again later.","\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002":"This message contains an image or file that cannot be processed. Adjust it and send it again.","\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002":"The task did not finish and the cause could not be determined. Try again; if it persists, give the reference ID to an administrator.","\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}":"Error code: {code}; reference: {referenceId}","{label}\u673A\u5668\u4EBA":"{label} bot","\u76EE\u524D\u652F\u6301\u6587\u5B57\u548C\u56FE\u7247\u6D88\u606F\u3002":"Only text and image messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002":"Only text, image, and file messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Only text, image, file, and voice-transcription messages are supported at the moment.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Only text, image, file, and voice messages already transcribed to text by WeChat are supported at the moment.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u6216\u56FE\u7247\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text, an image, or a file directly to continue the current session.","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5E26\u6587\u5B57\u8BC6\u522B\u7ED3\u679C\u7684\u8BED\u97F3\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text, an image, a file, or a voice message already transcribed to text to continue the current session.","{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The {label} bot is connected to DeepSeek Harness.","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD":"/new Start a brand-new session","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587":"/compact Compact the earlier context of the current session","/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace Switch workspace","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84":"/workspacelist List absolute workspace paths","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"/sessionlist [workspace index or absolute path] List session IDs and titles","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD":"/session Bind this chat to the specified session","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B":"/models List all available models by index","/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7":"/reasoninglist or /reasonings List reasoning efforts for the current model by index","/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7":"/reasoning [index, effort ID, or --default] Show or switch the current reasoning effort","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B":"/model [index or full model ID] Show or switch the model of the current session","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B":"/model [index or full model ID] [reasoning effort ID] Show or switch the current Session model","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2":"Example: send /models first, then /model 2","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]":"Example: send /models first, then /model 2 [reasoning effort ID]","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets by index","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset":"/preset [index or full ID] Show or set the Agent Preset of this bot","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:":"Numeric-only ID: /preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4":"/preset --default Follow the Host default","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1":"/stop Stop the current task","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1":"/steer Steer the current task","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001":"/status Check the connection status","/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C":"/version Show the plugin version","/help \u663E\u793A\u672C\u5E2E\u52A9":"/help Show this help","{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The {label} bot is connected to DeepSeek Harness and working normally.","{label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"{label} bot credentials are missing. Remove the bot and connect it again.","{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The {label} connection is not ready yet. The plugin will retry automatically.","{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The {label} bot is connected, but its message connection is not ready yet.","{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The {label} connection is still not ready. Please try again later.","{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5":"The {label} bot is not connected yet","{name}\uFF08{id}\uFF09":"{name} ({id})","{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38":"The {label}{connectionLabel} is running normally","{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The {label} connection is not ready. The plugin will retry automatically","{label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The {label} connection is currently offline","\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002":"A new session has started. Please send your question.","\u6B63\u5728\u4F7F\u7528{name}\u2026":"Using {name}\u2026","\u5DF2\u505C\u6B62\u3002":"Stopped.","\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002":"Please answer the current question with text.","{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the {label} interaction question.","\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\u3002":"Failed to submit the answer.","\u56DE\u7B54\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u5F53\u524D\u95EE\u9898\u7684\u7B54\u6848\u3002":"Failed to submit the answer. Please resend your answer to the current question.","\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002":"A pending question left over in this Session was detected. It has been safely cancelled, and your latest message is being processed."};var wH={"\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09":"Usage: /session Session ID or the session index in the current Workspace (/session N)","\u7528\u6CD5\uFF1A\n/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD\n/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7 \u6309 /workspacelist \u5E8F\u53F7\u5217\u51FA\u4F1A\u8BDD\n/sessionlist \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5217\u51FA\u6307\u5B9A\u5DE5\u4F5C\u533A\u4F1A\u8BDD":`Usage: /sessionlist List Sessions in the current Workspace /sessionlist Workspace index List Sessions by /workspacelist index /sessionlist Workspace absolute path List Sessions in the given Workspace`,"\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002\n{usage}":`The Workspace must be an absolute path. @@ -103,7 +103,7 @@ Subsequent messages will use this model and reasoning effort.`,"\u63A8\u7406\u7B {effort} Current model: {model} -Subsequent messages will use this reasoning effort.`,"\u7528\u6CD5\uFF1A/compact\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09":"Usage: /compact (no arguments)","\u6682\u65E0\u53EF\u538B\u7F29\u7684\u5386\u53F2\u8BB0\u5F55\u3002":"No compactable history yet.","\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\u6216\u6267\u884C\u538B\u7F29\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The current Session is generating a reply or compacting; please try again later.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002":"Context compaction was cancelled.","\u538B\u7F29\u671F\u95F4\u4F1A\u8BDD\u5386\u53F2\u53D1\u751F\u53D8\u5316\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u8BD5\u3002":"The Session history changed during compaction; the Session was not modified this time, please try again.","\u672A\u80FD\u751F\u6210\u6709\u6548\u7684\u538B\u7F29\u6458\u8981\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\u3002":"Could not produce a useful compaction summary; the Session was not modified this time.","\u4E0A\u4E0B\u6587\u538B\u7F29\u672A\u6B63\u5E38\u5B8C\u6210\uFF0C\u90E8\u5206\u4F1A\u8BDD\u5386\u53F2\u53EF\u80FD\u5DF2\u53D8\u5316\uFF0C\u8BF7\u68C0\u67E5\u4F1A\u8BDD\u540E\u518D\u91CD\u8BD5\u3002":"Context compaction did not finish cleanly; some Session history may have changed. Please inspect the Session before retrying.","\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29\uFF0C\u4F46\u4F1A\u8BDD\u4FDD\u5B58\u5931\u8D25\u3002":"Context was compacted, but saving the Session failed.","\u5DF2\u538B\u7F29 {count} \u6761\u5386\u53F2\u8BB0\u5F55\uFF08\u7EA6 {tokens} \u4E2A token\uFF09\u3002":"Compacted {count} history items (~{tokens} tokens).","\u4E0A\u4E0B\u6587\u538B\u7F29\u5B8C\u6210\u3002":"Context compaction completed.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\u3002":"Context compaction failed.","\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u53D1\u9001\u65B0\u6D88\u606F\u5F00\u542F\u4F1A\u8BDD\u3002":"The Session bound to this chat no longer exists; please send a new message to start a Session.","\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The current Session is generating a reply; please try again later.","\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u4ECE\u673A\u5668\u4EBA\u6267\u884C\u4E0A\u4E0B\u6587\u538B\u7F29\u3002":"The current Harness does not support running context compaction from a bot yet.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Context compaction failed; please try again later.","\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u4F1A\u8BDD\u72B6\u6001\u3002":"This bot has no available Session state.","\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u53EF\u538B\u7F29\u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u6D88\u606F\u3002":"This chat has no Session to compact yet; please send a message first.","\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u4E0A\u4E0B\u6587\u538B\u7F29\u3002":"This bot does not support context compaction yet.","\u5F53\u524D Harness \u672A\u6CE8\u518C /compact \u547D\u4EE4\uFF0C\u8BF7\u786E\u8BA4\u4E0A\u4E0B\u6587\u538B\u7F29\u7EC4\u4EF6\u5DF2\u542F\u7528\u3002":"The current Harness has not registered the /compact command; please make sure the context compaction component is enabled.","\u7528\u6CD5\uFF1A/stop\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09":"Usage: /stop (no arguments)","\u7528\u6CD5\uFF1A/version\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09":"Usage: /version (no arguments)","\u7528\u6CD5\uFF1A/steer <\u8865\u5145\u6307\u4EE4>":"Usage: /steer ","\u63A7\u5236\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002":"Control commands support text only; please remove images and try again.","\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002":"This chat has no running task.","\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\u3002":"Stop requested for the current task.","\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\uFF0C\u8BF7\u76F4\u63A5\u53D1\u9001\u666E\u901A\u6D88\u606F\u3002":"This chat has no running task; just send a regular message.","\u5F53\u524D\u804A\u5929\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u3002":"No session is bound to this chat, so an additional instruction cannot be given. Bind a session first.","\u4EFB\u52A1\u5DF2\u7ED3\u675F\uFF0C\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u76F4\u63A5\u53D1\u9001\u6D88\u606F\u5F00\u59CB\u65B0\u4EFB\u52A1\u3002":"The task has ended and there is no running task to steer. Send a message to start a new task.","\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\uFF0CAgent \u4F1A\u5728\u4E0B\u4E00\u6B65\u8BFB\u53D6\u3002":"Additional instruction submitted; the Agent will read it at the next step."};var aH={"/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09":"/history [count] Preview recent messages (default 3, maximum 5)","\u7528\u6CD5\uFF1A/history [\u6570\u91CF]\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09":"Usage: /history [count] (default 3, maximum 5)","[\u56FE\u7247]":"[Image]","[\u6587\u4EF6]":"[File]","\u672C\u6761\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6587\u5B57\u3002":"This message has no text to preview.","\uFF08\u5DF2\u622A\u65AD\uFF09":" (truncated)","\u4F1A\u8BDD\u5386\u53F2\uFF5C{session}\uFF5C\u6700\u8FD1 {count} \u6761":"Session history | {session} | Recent messages: {count}","\u4EE5\u4E0A\u4E3A\u5386\u53F2\u8BB0\u5F55\uFF0C\u4E0D\u662F\u672C\u6B21\u65B0\u56DE\u590D\u3002":"These are history records, not a new reply.","\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u4EC5\u627E\u5230 {count} \u6761\u53EF\u9884\u89C8\u6D88\u606F\u3002":"Messages available to preview within this bounded read: {count}.","\u5F53\u524D\u4F1A\u8BDD\u4EC5\u6709 {count} \u6761\u53EF\u9884\u89C8\u6D88\u606F\u3002":"Messages available to preview in this Session: {count}.",\u7528\u6237:"User",\u52A9\u624B:"Assistant","\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u4F1A\u8BDD\u3002":"The Session bound to this chat no longer exists. Please bind a Session again.","\u4F1A\u8BDD\u3001\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /history\u3002":"The Session, workspace, or bot state has changed. Please run /history again.","\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002":"This Harness does not support reading Session history.","\u5386\u53F2\u8BFB\u53D6\u5DF2\u53D6\u6D88\u3002":"History reading was cancelled.","\u8BFB\u53D6\u5386\u53F2\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Reading history timed out. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to read Session history right now. Please try again later.","\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528 /history\u3002":"Please use /history in a direct chat with the bot.","/history \u4EC5\u652F\u6301\u6587\u5B57\u547D\u4EE4\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002":"/history supports text commands only. Remove images or files and try again.","\u5F53\u524D\u804A\u5929\u5C1A\u672A\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u6D88\u606F\u6216\u4F7F\u7528 /session \u7ED1\u5B9A\u4F1A\u8BDD\u3002":"This chat has no bound Session. Send a message or use /session to bind one first.","\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u672A\u627E\u5230\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002":"No history messages were available to preview within this bounded read.","\u5F53\u524D\u4F1A\u8BDD\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002":"This Session has no history messages available to preview yet.","\u8BF7\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\uFF08\u4E5F\u652F\u6301\uFF1A\u540C\u610F / \u4E0D\u540C\u610F / yes / no\uFF09\u3002":"Please reply exactly with \u300C\u6279\u51C6\u300D (approve) or \u300C\u62D2\u7EDD\u300D (reject). Also accepted: \u540C\u610F / \u4E0D\u540C\u610F / yes / no.","\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u95EE\u9898\uFF0C\u518D\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002":"Please finish the current question first, then reply exactly with \u300C\u6279\u51C6\u300D (approve) or \u300C\u62D2\u7EDD\u300D (reject).","\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u590D\u3002":"This approval has already been handled; no need to reply again.","DeepSeek Harness \u9700\u8981\u4F60\u7684\u5BA1\u6279\uFF1A":"DeepSeek Harness needs your approval:","\u5DE5\u5177\uFF1A{tool}":"Tool: {tool}","\u64CD\u4F5C\u53C2\u6570\uFF1A":"Operation parameters:","\u539F\u56E0\uFF1A{reason}":"Reason: {reason}","\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u5BA1\u6279\u51B3\u5B9A\u3002":"In group chats, please @ the bot before sending your approval decision.","\u53EA\u6709\u53D1\u8D77\u5F53\u524D\u4EFB\u52A1\u7684\u7528\u6237\u53EF\u4EE5\u5904\u7406\u8FD9\u6761\u5BA1\u6279\u3002":"Only the user who started the current task can handle this approval.","\u5BA1\u6279\u51B3\u5B9A\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7A0D\u5019\u3002":"Your approval decision is being submitted; please wait.","\u5DF2\u6279\u51C6\uFF0C\u4EC5\u5BF9\u672C\u6B21\u64CD\u4F5C\u6709\u6548\u3002":"Approved \u2014 valid for this operation only.","\u5DF2\u62D2\u7EDD\u6B64\u6B21\u64CD\u4F5C\u3002":"This operation was rejected.","\u65E0\u6CD5\u5B8C\u6574\u5C55\u793A\u8FD9\u6B21\u64CD\u4F5C\uFF0C\u5DF2\u5B89\u5168\u62D2\u7EDD\u6B64\u6B21\u5BA1\u6279\u3002":"The operation could not be displayed in full, so this approval was safely rejected.","\u5BA1\u6279\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002":"Failed to submit the approval; please reply with \u300C\u6279\u51C6\u300D (approve) or \u300C\u62D2\u7EDD\u300D (reject) again.","DeepSeek Harness \u9700\u8981\u4F60\u8865\u5145\u4FE1\u606F{progress}\uFF1A":"DeepSeek Harness needs more information{progress}:","\u8BF7\u8F93\u5165\u4F60\u7684\u56DE\u7B54\u3002":"Please enter your answer.","\u8BF7\u56DE\u590D\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF1B\u591A\u9009\u7528\u9017\u53F7\u5206\u9694\uFF0C\u4E5F\u53EF\u8865\u5145\u5176\u4ED6\u5185\u5BB9\u3002":"Reply with option numbers or text; separate multiple choices with commas, or add anything else.","\u8BF7\u56DE\u590D\u4E00\u4E2A\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF0C\u4E5F\u53EF\u76F4\u63A5\u8F93\u5165\u5176\u4ED6\u7B54\u6848\u3002":"Reply with an option number or its text, or type your own answer directly.","\u8BF7\u76F4\u63A5\u56DE\u590D\u4F60\u7684\u7B54\u6848\u3002":"Please reply with your answer directly.","\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u7B54\u6848\u3002":"In group chats, please @ the bot before sending your answer.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\uFF0C\u8BF7\u7528 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u5207\u6362\u540E\u91CD\u53D1\u3002":"The current model does not support images. Use /models to list available models, switch with /model , then resend.","\u56FE\u7247\u8D85\u8FC7\u5BBF\u4E3B\u5141\u8BB8\u7684\u5927\u5C0F\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The image exceeds the size allowed by the host; compress it and try again.","\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u9AD8\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The image resolution is too high; compress it and try again.","\u56FE\u7247\u5185\u5BB9\u65E0\u6548\u6216\u683C\u5F0F\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The image content is invalid or its format is unsupported; please resend it.","\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"Could not read the image content; please resend it.","\u56FE\u7247\u683C\u5F0F\u4E0E\u5B9E\u9645\u5185\u5BB9\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The image format does not match its actual content; please resend it.","\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u540E\u91CD\u8BD5\u3002":"The number of images sent at once exceeds the host limit; send fewer and try again.","\u56FE\u7247\u603B\u5927\u5C0F\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The total image size exceeds the host limit; send fewer images or compress them and try again.","\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u53D1\u751F\u4E86\u91CD\u5B9A\u5411\uFF0C\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u3002":"The image download URL redirected and cannot be read right now.","\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP {status}\uFF09\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002":"Image download failed (HTTP {status}); please resend it and try again.","\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The image is larger than 5 MB; compress it and try again.","\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002":"At most {maxImages} images can be processed at once.","\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The total size of the images sent is too large; send fewer images or compress them and try again.","\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002":"Image download failed; please resend it and try again.","\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u7247\u683C\u5F0F\uFF0C\u8BF7\u53D1\u9001 JPEG\u3001PNG\u3001WebP \u6216 GIF \u56FE\u7247\u3002":"This image format is not supported yet; please send a JPEG, PNG, WebP, or GIF image.","\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F":"\u2705 DeepSeek Harness connection test succeeded","\u8FD9\u6761\u6D88\u606F\u7531\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u4E2D\u7684\u201C{name}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002":'This message was sent from the "{name}" bot card on the IM Bot settings page.',"{channelLabel}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002":"The {channelLabel} has not received a direct message that can be used for testing yet.",\u673A\u5668\u4EBA:"bot","\u6B63\u5728\u5904\u7406\u2026":"Processing\u2026","\u5904\u7406\u5B8C\u6210\u3002":"Processing complete.",\u5DE5\u5177:"tool","\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026":"Gathering results\u2026","_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_":"_Searching the web and gathering information\u2026_","_\u6B63\u5728\u4F7F\u7528 {name}\u2026_":"_Using {name}\u2026_","\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002":"Analyze this image.","\u6587\u4EF6\u63A5\u6536\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002":"File reception failed. Please resend it.","\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002":"File download failed. Please resend it.","Agent Preset \u65E0\u6548\u3002":"Invalid Agent Preset.","/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09":"/batch Start batch input (direct messages only, up to 10 text messages)","/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21":"/send Submit the current batch","/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21":"/cancel Cancel the current batch","\u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF09":"Start batch input (direct messages only)",\u63D0\u4EA4\u5F53\u524D\u6279\u6B21:"Submit the current batch",\u53D6\u6D88\u5F53\u524D\u6279\u6B21:"Cancel the current batch","\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002\n\u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002":`Batch input is already active with {count}/{limit} messages collected. +Subsequent messages will use this reasoning effort.`,"\u7528\u6CD5\uFF1A/compact\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09":"Usage: /compact (no arguments)","\u6682\u65E0\u53EF\u538B\u7F29\u7684\u5386\u53F2\u8BB0\u5F55\u3002":"No compactable history yet.","\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\u6216\u6267\u884C\u538B\u7F29\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The current Session is generating a reply or compacting; please try again later.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002":"Context compaction was cancelled.","\u538B\u7F29\u671F\u95F4\u4F1A\u8BDD\u5386\u53F2\u53D1\u751F\u53D8\u5316\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u8BD5\u3002":"The Session history changed during compaction; the Session was not modified this time, please try again.","\u672A\u80FD\u751F\u6210\u6709\u6548\u7684\u538B\u7F29\u6458\u8981\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\u3002":"Could not produce a useful compaction summary; the Session was not modified this time.","\u4E0A\u4E0B\u6587\u538B\u7F29\u672A\u6B63\u5E38\u5B8C\u6210\uFF0C\u90E8\u5206\u4F1A\u8BDD\u5386\u53F2\u53EF\u80FD\u5DF2\u53D8\u5316\uFF0C\u8BF7\u68C0\u67E5\u4F1A\u8BDD\u540E\u518D\u91CD\u8BD5\u3002":"Context compaction did not finish cleanly; some Session history may have changed. Please inspect the Session before retrying.","\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29\uFF0C\u4F46\u4F1A\u8BDD\u4FDD\u5B58\u5931\u8D25\u3002":"Context was compacted, but saving the Session failed.","\u5DF2\u538B\u7F29 {count} \u6761\u5386\u53F2\u8BB0\u5F55\uFF08\u7EA6 {tokens} \u4E2A token\uFF09\u3002":"Compacted {count} history items (~{tokens} tokens).","\u4E0A\u4E0B\u6587\u538B\u7F29\u5B8C\u6210\u3002":"Context compaction completed.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\u3002":"Context compaction failed.","\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u53D1\u9001\u65B0\u6D88\u606F\u5F00\u542F\u4F1A\u8BDD\u3002":"The Session bound to this chat no longer exists; please send a new message to start a Session.","\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The current Session is generating a reply; please try again later.","\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u4ECE\u673A\u5668\u4EBA\u6267\u884C\u4E0A\u4E0B\u6587\u538B\u7F29\u3002":"The current Harness does not support running context compaction from a bot yet.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Context compaction failed; please try again later.","\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u4F1A\u8BDD\u72B6\u6001\u3002":"This bot has no available Session state.","\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u53EF\u538B\u7F29\u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u6D88\u606F\u3002":"This chat has no Session to compact yet; please send a message first.","\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u4E0A\u4E0B\u6587\u538B\u7F29\u3002":"This bot does not support context compaction yet.","\u5F53\u524D Harness \u672A\u6CE8\u518C /compact \u547D\u4EE4\uFF0C\u8BF7\u786E\u8BA4\u4E0A\u4E0B\u6587\u538B\u7F29\u7EC4\u4EF6\u5DF2\u542F\u7528\u3002":"The current Harness has not registered the /compact command; please make sure the context compaction component is enabled.","\u7528\u6CD5\uFF1A/stop\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09":"Usage: /stop (no arguments)","\u7528\u6CD5\uFF1A/version\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09":"Usage: /version (no arguments)","\u7528\u6CD5\uFF1A/steer <\u8865\u5145\u6307\u4EE4>":"Usage: /steer ","\u63A7\u5236\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002":"Control commands support text only; please remove images and try again.","\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002":"This chat has no running task.","\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\u3002":"Stop requested for the current task.","\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\uFF0C\u8BF7\u76F4\u63A5\u53D1\u9001\u666E\u901A\u6D88\u606F\u3002":"This chat has no running task; just send a regular message.","\u5F53\u524D\u804A\u5929\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u3002":"No session is bound to this chat, so an additional instruction cannot be given. Bind a session first.","\u4EFB\u52A1\u5DF2\u7ED3\u675F\uFF0C\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u76F4\u63A5\u53D1\u9001\u6D88\u606F\u5F00\u59CB\u65B0\u4EFB\u52A1\u3002":"The task has ended and there is no running task to steer. Send a message to start a new task.","\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\uFF0CAgent \u4F1A\u5728\u4E0B\u4E00\u6B65\u8BFB\u53D6\u3002":"Additional instruction submitted; the Agent will read it at the next step."};var OH={"/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09":"/history [count] Preview recent messages (default 3, maximum 5)","\u7528\u6CD5\uFF1A/history [\u6570\u91CF]\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09":"Usage: /history [count] (default 3, maximum 5)","[\u56FE\u7247]":"[Image]","[\u6587\u4EF6]":"[File]","\u672C\u6761\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6587\u5B57\u3002":"This message has no text to preview.","\uFF08\u5DF2\u622A\u65AD\uFF09":" (truncated)","\u4F1A\u8BDD\u5386\u53F2\uFF5C{session}\uFF5C\u6700\u8FD1 {count} \u6761":"Session history | {session} | Recent messages: {count}","\u4EE5\u4E0A\u4E3A\u5386\u53F2\u8BB0\u5F55\uFF0C\u4E0D\u662F\u672C\u6B21\u65B0\u56DE\u590D\u3002":"These are history records, not a new reply.","\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u4EC5\u627E\u5230 {count} \u6761\u53EF\u9884\u89C8\u6D88\u606F\u3002":"Messages available to preview within this bounded read: {count}.","\u5F53\u524D\u4F1A\u8BDD\u4EC5\u6709 {count} \u6761\u53EF\u9884\u89C8\u6D88\u606F\u3002":"Messages available to preview in this Session: {count}.",\u7528\u6237:"User",\u52A9\u624B:"Assistant","\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u4F1A\u8BDD\u3002":"The Session bound to this chat no longer exists. Please bind a Session again.","\u4F1A\u8BDD\u3001\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /history\u3002":"The Session, workspace, or bot state has changed. Please run /history again.","\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002":"This Harness does not support reading Session history.","\u5386\u53F2\u8BFB\u53D6\u5DF2\u53D6\u6D88\u3002":"History reading was cancelled.","\u8BFB\u53D6\u5386\u53F2\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Reading history timed out. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to read Session history right now. Please try again later.","\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528 /history\u3002":"Please use /history in a direct chat with the bot.","/history \u4EC5\u652F\u6301\u6587\u5B57\u547D\u4EE4\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002":"/history supports text commands only. Remove images or files and try again.","\u5F53\u524D\u804A\u5929\u5C1A\u672A\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u6D88\u606F\u6216\u4F7F\u7528 /session \u7ED1\u5B9A\u4F1A\u8BDD\u3002":"This chat has no bound Session. Send a message or use /session to bind one first.","\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u672A\u627E\u5230\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002":"No history messages were available to preview within this bounded read.","\u5F53\u524D\u4F1A\u8BDD\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002":"This Session has no history messages available to preview yet.","\u8BF7\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\uFF08\u4E5F\u652F\u6301\uFF1A\u540C\u610F / \u4E0D\u540C\u610F / yes / no\uFF09\u3002":"Please reply exactly with \u300C\u6279\u51C6\u300D (approve) or \u300C\u62D2\u7EDD\u300D (reject). Also accepted: \u540C\u610F / \u4E0D\u540C\u610F / yes / no.","\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u95EE\u9898\uFF0C\u518D\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002":"Please finish the current question first, then reply exactly with \u300C\u6279\u51C6\u300D (approve) or \u300C\u62D2\u7EDD\u300D (reject).","\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u590D\u3002":"This approval has already been handled; no need to reply again.","DeepSeek Harness \u9700\u8981\u4F60\u7684\u5BA1\u6279\uFF1A":"DeepSeek Harness needs your approval:","\u5DE5\u5177\uFF1A{tool}":"Tool: {tool}","\u64CD\u4F5C\u53C2\u6570\uFF1A":"Operation parameters:","\u539F\u56E0\uFF1A{reason}":"Reason: {reason}","\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u5BA1\u6279\u51B3\u5B9A\u3002":"In group chats, please @ the bot before sending your approval decision.","\u53EA\u6709\u53D1\u8D77\u5F53\u524D\u4EFB\u52A1\u7684\u7528\u6237\u53EF\u4EE5\u5904\u7406\u8FD9\u6761\u5BA1\u6279\u3002":"Only the user who started the current task can handle this approval.","\u5BA1\u6279\u51B3\u5B9A\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7A0D\u5019\u3002":"Your approval decision is being submitted; please wait.","\u5DF2\u6279\u51C6\uFF0C\u4EC5\u5BF9\u672C\u6B21\u64CD\u4F5C\u6709\u6548\u3002":"Approved \u2014 valid for this operation only.","\u5DF2\u62D2\u7EDD\u6B64\u6B21\u64CD\u4F5C\u3002":"This operation was rejected.","\u65E0\u6CD5\u5B8C\u6574\u5C55\u793A\u8FD9\u6B21\u64CD\u4F5C\uFF0C\u5DF2\u5B89\u5168\u62D2\u7EDD\u6B64\u6B21\u5BA1\u6279\u3002":"The operation could not be displayed in full, so this approval was safely rejected.","\u5BA1\u6279\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002":"Failed to submit the approval; please reply with \u300C\u6279\u51C6\u300D (approve) or \u300C\u62D2\u7EDD\u300D (reject) again.","DeepSeek Harness \u9700\u8981\u4F60\u8865\u5145\u4FE1\u606F{progress}\uFF1A":"DeepSeek Harness needs more information{progress}:","\u8BF7\u8F93\u5165\u4F60\u7684\u56DE\u7B54\u3002":"Please enter your answer.","\u8BF7\u56DE\u590D\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF1B\u591A\u9009\u7528\u9017\u53F7\u5206\u9694\uFF0C\u4E5F\u53EF\u8865\u5145\u5176\u4ED6\u5185\u5BB9\u3002":"Reply with option numbers or text; separate multiple choices with commas, or add anything else.","\u8BF7\u56DE\u590D\u4E00\u4E2A\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF0C\u4E5F\u53EF\u76F4\u63A5\u8F93\u5165\u5176\u4ED6\u7B54\u6848\u3002":"Reply with an option number or its text, or type your own answer directly.","\u8BF7\u76F4\u63A5\u56DE\u590D\u4F60\u7684\u7B54\u6848\u3002":"Please reply with your answer directly.","\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u7B54\u6848\u3002":"In group chats, please @ the bot before sending your answer.","\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\uFF0C\u8BF7\u7528 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u5207\u6362\u540E\u91CD\u53D1\u3002":"The current model does not support images. Use /models to list available models, switch with /model , then resend.","\u56FE\u7247\u8D85\u8FC7\u5BBF\u4E3B\u5141\u8BB8\u7684\u5927\u5C0F\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The image exceeds the size allowed by the host; compress it and try again.","\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u9AD8\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The image resolution is too high; compress it and try again.","\u56FE\u7247\u5185\u5BB9\u65E0\u6548\u6216\u683C\u5F0F\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The image content is invalid or its format is unsupported; please resend it.","\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"Could not read the image content; please resend it.","\u56FE\u7247\u683C\u5F0F\u4E0E\u5B9E\u9645\u5185\u5BB9\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The image format does not match its actual content; please resend it.","\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u540E\u91CD\u8BD5\u3002":"The number of images sent at once exceeds the host limit; send fewer and try again.","\u56FE\u7247\u603B\u5927\u5C0F\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The total image size exceeds the host limit; send fewer images or compress them and try again.","\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u53D1\u751F\u4E86\u91CD\u5B9A\u5411\uFF0C\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u3002":"The image download URL redirected and cannot be read right now.","\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP {status}\uFF09\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002":"Image download failed (HTTP {status}); please resend it and try again.","\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The image is larger than 5 MB; compress it and try again.","\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002":"At most {maxImages} images can be processed at once.","\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002":"The total size of the images sent is too large; send fewer images or compress them and try again.","\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002":"Image download failed; please resend it and try again.","\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u7247\u683C\u5F0F\uFF0C\u8BF7\u53D1\u9001 JPEG\u3001PNG\u3001WebP \u6216 GIF \u56FE\u7247\u3002":"This image format is not supported yet; please send a JPEG, PNG, WebP, or GIF image.","\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F":"\u2705 DeepSeek Harness connection test succeeded","\u8FD9\u6761\u6D88\u606F\u7531\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u4E2D\u7684\u201C{name}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002":'This message was sent from the "{name}" bot card on the IM Bot settings page.',"{channelLabel}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002":"The {channelLabel} has not received a direct message that can be used for testing yet.",\u673A\u5668\u4EBA:"bot","\u6B63\u5728\u5904\u7406\u2026":"Processing\u2026","\u5904\u7406\u5B8C\u6210\u3002":"Processing complete.",\u5DE5\u5177:"tool","\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026":"Gathering results\u2026","_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_":"_Searching the web and gathering information\u2026_","_\u6B63\u5728\u4F7F\u7528 {name}\u2026_":"_Using {name}\u2026_","\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002":"Analyze this image.","\u6587\u4EF6\u63A5\u6536\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002":"File reception failed. Please resend it.","\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002":"File download failed. Please resend it.","Agent Preset \u65E0\u6548\u3002":"Invalid Agent Preset.","/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09":"/batch Start batch input (direct messages only, up to 10 text messages)","/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21":"/send Submit the current batch","/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21":"/cancel Cancel the current batch","\u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF09":"Start batch input (direct messages only)",\u63D0\u4EA4\u5F53\u524D\u6279\u6B21:"Submit the current batch",\u53D6\u6D88\u5F53\u524D\u6279\u6B21:"Cancel the current batch","\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002\n\u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002":`Batch input is already active with {count}/{limit} messages collected. Send /send to submit or /cancel to cancel.`,"\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002\n\u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002":`Batch input is already active with {count}/{limit} messages collected. Send /send when finished or /cancel to cancel.`,"[\u6D88\u606F {index}]":"[Message {index}]","\u4EE5\u4E0B\u662F\u7528\u6237\u901A\u8FC7\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u53D1\u9001\u7684\u591A\u6761\u5185\u5BB9\uFF0C\u8BF7\u6309\u987A\u5E8F\u4F5C\u4E3A\u540C\u4E00\u6B21\u8F93\u5165\u7EDF\u4E00\u5904\u7406\u3002":"The user sent the following messages in batch input mode. Process them in order as one input.","\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u4EC5\u652F\u6301\u79C1\u804A\uFF0C\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528\u3002":"Batch input is available only in direct messages. Please use it in a direct chat with the bot.","\u5F53\u524D\u804A\u5929\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3001\u5F85\u56DE\u7B54\u95EE\u9898\u6216\u5F85\u5BA1\u6279\u8BF7\u6C42\u3002\n\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u4EA4\u4E92\u6216\u53D1\u9001 /stop\uFF0C\u518D\u4F7F\u7528 /batch\u3002":`This chat has a running task, unanswered question, or pending approval. Finish the current interaction or send /stop before using /batch.`,"\u7528\u6CD5\uFF1A/{command}\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09":"Usage: /{command} (without arguments)","\u6279\u91CF\u8F93\u5165\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002":"Batch input commands support text only. Remove the image or file and try again.","\u5F53\u524D\u6CA1\u6709\u5F85\u63D0\u4EA4\u7684\u6279\u91CF\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001 /batch\u3002":"There is no batch to submit. Send /batch first.","\u5F53\u524D\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u6279\u91CF\u8F93\u5165\u3002":"There is no active batch input.","\u5DF2\u8FDB\u5165\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u6700\u591A\u53EF\u53D1\u9001 {limit} \u6761\u6587\u5B57\u3002\n\u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002":`Batch input started. You can send up to {limit} text messages. @@ -111,7 +111,7 @@ Send /send when finished or /cancel to cancel.`,"\u6279\u91CF\u8F93\u5165\u6A21\ Continue with text, or use /send or /cancel.`,"\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u52FF\u91CD\u590D\u53D1\u9001 /send\u3002":"The current batch is being submitted. Do not send /send again.","\u6279\u91CF\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF0C\u65E0\u6CD5\u53D6\u6D88\u3002\n\u5982\u9700\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\uFF0C\u8BF7\u53D1\u9001 /stop\u3002":`The batch has already been submitted and cannot be cancelled. Send /stop if you need to stop the current task.`,"\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5904\u7406\u5B8C\u6210\u540E\u518D\u5F00\u542F\u65B0\u6279\u6B21\u3002":"The current batch is being submitted. Wait for it to finish before starting another batch.","\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\u3002":"Batch input cancelled.","\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\uFF0C\u5171\u4E22\u5F03 {count} \u6761\u6D88\u606F\u3002":"Batch input cancelled; {count} messages were discarded.","\u5F53\u524D\u6279\u6B21\u8FD8\u6CA1\u6709\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /cancel \u53D6\u6D88\u3002":"The current batch is empty. Send some text first or use /cancel.","\u5F53\u524D\u6B63\u5728\u6279\u91CF\u8F93\u5165\uFF0C\u8BF7\u5148\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002":"Batch input is active. Send /send to submit or /cancel to cancel first.","\u5F53\u524D\u6279\u6B21\u5DF2\u6EE1\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002\n\u8BF7\u5148\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\uFF0C\u7136\u540E\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002":`The current batch is full, so this message was not collected. Send /send or /cancel first, then resend this message.`,"\u5DF2\u6536\u96C6 {count}/{limit} \u6761\uFF0C\u5F53\u524D\u6279\u6B21\u5DF2\u6EE1\uFF0C\u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002":"Collected {count}/{limit} messages. The batch is full; send /send or /cancel.","\u6279\u91CF\u5185\u5BB9\u63D0\u4EA4\u5931\u8D25\uFF0C\u5DF2\u4FDD\u7559 {count} \u6761\u6D88\u606F\u3002\n\u8BF7\u518D\u6B21\u53D1\u9001 /send \u91CD\u8BD5\u6216 /cancel \u53D6\u6D88\u3002":`Batch submission failed; {count} messages were retained. -Send /send to retry or /cancel to cancel.`};var iH={"\u5317\u6C47\u661F\u6CB3 AIOS \u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"BeiHui XingHe AIOS is connected to DeepSeek Harness.","/repair \u8865\u5168\u98DE\u4E66\u6743\u9650\u4E0E\u5361\u7247\u56DE\u8C03":"/repair Complete Feishu permissions and the card callback","/m\uFF08\u6216 /menu\uFF09 \u6253\u5F00\u4EA4\u4E92\u5361\u7247\u83DC\u5355":"/m (or /menu) Open the interactive card menu","/watch [Session ID \u6216\u5E8F\u53F7] \u5173\u6CE8\u4F1A\u8BDD\uFF0C\u4EFB\u52A1\u5B8C\u6210\u81EA\u52A8\u63A8\u9001":"/watch [Session ID or index] Watch a session; completion is pushed automatically","/unwatch [Session ID \u6216\u5E8F\u53F7] \u53D6\u6D88\u5173\u6CE8":"/unwatch [Session ID or index] Stop watching","/watchlist \u67E5\u770B\u5173\u6CE8\u5217\u8868":"/watchlist View the watch list","/archived on|off \u4F1A\u8BDD\u5217\u8868\u662F\u5426\u5305\u542B\u5F52\u6863\u4F1A\u8BDD":"/archived on|off Whether the session list includes archived sessions","\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002":"The workspace must be an absolute path.","\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002":"The workspace path does not exist.","\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002":"The workspace path must point to a directory.","\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u64CD\u4F5C\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002":"The bot is being removed or has been reconnected; the original session\u2019s workspace cannot be changed.","\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The operation failed. Please try again later.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11\u98DE\u4E66\u6587\u4EF6\u4E0A\u4F20\u6743\u9650 im:resource\u3002\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u6267\u884C /repair \u547D\u4EE4\uFF0C\u6216\u8005\u5728\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u70B9\u51FB\u201C\u8865\u5168\u6743\u9650\u201D\u6309\u94AE\u5E76\u626B\u7801\u3002\u5B8C\u6210\u98DE\u4E66\u8981\u6C42\u7684\u53D1\u5E03\u5BA1\u6279\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but the bot lacks the Feishu file-upload scope im:resource. Run /repair in a direct chat with the bot, or click the \u201CComplete permissions\u201D button on the IM Bot settings page and scan the QR code. Complete any publishing approval Feishu requires, then try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u98DE\u4E66 30 MB \u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the Feishu 30 MB limit and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u98DE\u4E66\u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty; Feishu does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u98DE\u4E66\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by Feishu and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent right now. Please try again later.',"\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002\u5982\u679C\u95EE\u9898\u6301\u7EED\uFF0C\u8BF7\u5728 DeepSeek Harness \u7684\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u68C0\u67E5\u98DE\u4E66\u8FDE\u63A5\u72B6\u6001\u3002":"Message processing failed. Please try again later. If the problem persists, check the Feishu connection status on the IM Bot settings page in DeepSeek Harness.","\u5DF2\u5F00\u542F\u5168\u65B0 Harness \u4F1A\u8BDD\u3002":"A brand-new Harness session has started.","\u98DE\u4E66\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The Feishu bot is connected to DeepSeek Harness and working normally.","\u7528\u6CD5\uFF1A/archived on\uFF08\u5305\u542B\u5F52\u6863\u4F1A\u8BDD\uFF09\u6216 /archived off\uFF08\u9690\u85CF\u5F52\u6863\u4F1A\u8BDD\uFF09":"Usage: /archived on (include archived sessions) or /archived off (hide archived sessions)","\u5DF2\u5F00\u542F\uFF1A\u4F1A\u8BDD\u5217\u8868\u5305\u542B\u5F52\u6863\u4F1A\u8BDD\u3002":"On: the session list includes archived sessions.","\u5DF2\u5173\u95ED\uFF1A\u4F1A\u8BDD\u5217\u8868\u9690\u85CF\u5F52\u6863\u4F1A\u8BDD\u3002":"Off: the session list hides archived sessions.","\u4E3A\u907F\u514D\u6388\u6743\u94FE\u63A5\u66B4\u9732\uFF0C\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u53D1\u9001 /repair\u3002":"To keep the authorization link private, send /repair to the bot in a direct message.","\u65E0\u6CD5\u8BC6\u522B\u5F53\u524D\u53D1\u9001\u8005\uFF0C\u672A\u53D1\u8D77\u4FEE\u590D\u3002":"The current sender could not be identified, so repair was not started.","\u5F53\u524D Host \u7248\u672C\u6682\u4E0D\u652F\u6301\u804A\u5929\u5185\u4FEE\u590D\uFF0C\u8BF7\u5148\u66F4\u65B0\u63D2\u4EF6\u3002":"The current Host version does not support in-chat repair. Update the plugin first.","\u7528\u6CD5\uFF1A/repair\u3001/repair qr\u3001/repair status\u3001/repair cancel \u6216 /repair verify":"Usage: /repair, /repair qr, /repair status, /repair cancel, or /repair verify","\u5F53\u524D Runtime \u6CA1\u6709\u53EF\u6062\u590D\u7684\u4FEE\u590D\u4EFB\u52A1\u8BB0\u5F55\uFF08\u673A\u5668\u4EBA\u53EF\u80FD\u521A\u5B8C\u6210\u5BC6\u94A5\u66F4\u65B0\u5E76\u91CD\u542F\uFF09\u3002\u672C\u547D\u4EE4\u4E0D\u4F1A\u542F\u52A8\u65B0\u7684\u6388\u6743\uFF1B\u8BF7\u67E5\u770B\u673A\u5668\u4EBA\u53D1\u9001\u7684\u9A8C\u8BC1\u7ED3\u679C\uFF0C\u786E\u8BA4\u4E0A\u4E00\u6B21\u4EFB\u52A1\u5DF2\u7ED3\u675F\u540E\u518D\u53D1\u9001 /repair\u3002":"The current Runtime has no recoverable repair attempt (the bot may have just rotated its secret and restarted). This command starts no new authorization. Check the verification result the bot sent, then send /repair after the previous attempt has finished.","\u53E6\u4E00\u4F4D\u7528\u6237\u6B63\u5728\u4FEE\u590D\u8BE5\u673A\u5668\u4EBA\uFF0C\u672C\u6B21\u4E0D\u4F1A\u663E\u793A\u5176\u6388\u6743\u4FE1\u606F\u3002":"Another user is repairing this bot; its authorization info will not be shown this time.","\u6682\u65F6\u65E0\u6CD5\u53D6\u6D88\u4FEE\u590D\u4EFB\u52A1\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not cancel the repair task right now. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u53D6\u6D88\u65E7\u4FEE\u590D\u4EFB\u52A1\uFF0C\u672A\u751F\u6210\u65B0\u94FE\u63A5\uFF1B\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not cancel the previous repair attempt, so no new link was generated. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u67E5\u8BE2\u4FEE\u590D\u72B6\u6001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not check the repair status right now. Please try again later.","\u4FEE\u590D\u6D41\u7A0B\u6682\u65F6\u5931\u8D25\uFF0C\u73B0\u6709\u673A\u5668\u4EBA\u8FDE\u63A5\u4E0D\u53D7\u5F71\u54CD\uFF1B\u8BF7\u7A0D\u540E\u53D1\u9001 /repair \u91CD\u8BD5\u3002":"The repair flow failed for now; the existing bot connection is unaffected. Send /repair again later.","\u98DE\u4E66\u8FD4\u56DE\u4E86\u65E0\u6CD5\u5B89\u5168\u9A8C\u8BC1\u7684\u6388\u6743\u94FE\u63A5\uFF0C\u5DF2\u4E2D\u6B62\u672C\u6B21\u4FEE\u590D\u3002":"Feishu returned an authorization link that cannot be verified safely. This repair was aborted.","\u98DE\u4E66\u672A\u8FD4\u56DE\u6388\u6743\u94FE\u63A5\uFF0C\u5DF2\u4E2D\u6B62\u672C\u6B21\u4FEE\u590D\u3002":"Feishu did not return an authorization link. This repair was aborted.","\u6388\u6743\u5DF2\u786E\u8BA4\uFF0C\u6B63\u5728\u53D1\u9001\u5E76\u7B49\u5F85\u6D4B\u8BD5\u6309\u94AE\u56DE\u8C03\uFF1B\u6536\u5230\u771F\u5B9E\u56DE\u8C03\u540E\u624D\u4F1A\u5B8C\u6210\u3002":"Authorization confirmed. Sending a test button and waiting for its callback; this completes only after a real callback arrives.","\u4FEE\u590D\u72B6\u6001\u67E5\u8BE2\u4E2D\u65AD\uFF0C\u73B0\u6709\u673A\u5668\u4EBA\u8FDE\u63A5\u4E0D\u53D7\u5F71\u54CD\uFF1B\u53D1\u9001 /repair status \u91CD\u8BD5\u67E5\u8BE2\u3002":"The repair status query was interrupted; the existing bot connection is unaffected. Send /repair status to retry.",\u94FE\u63A5\u4E3A\u77ED\u671F\u6709\u6548:"The link is valid for a short time.","\u94FE\u63A5\u7EA6 {minutes} \u5206\u949F\u540E\u8FC7\u671F":"The link expires in about {minutes} minutes","\u65E7\u6388\u6743\u94FE\u63A5\u5DF2\u4F5C\u5E9F\uFF0C\u5DF2\u751F\u6210\u65B0\u7684\u4FEE\u590D\u94FE\u63A5\u3002":"The previous authorization link was invalidated and a new repair link was generated.","\u{1F527} \u51C6\u5907\u8865\u5168\u6743\u9650\u4E0E\u56DE\u8C03\u3002":"\u{1F527} Preparing to complete permissions and the callback.","\u672C\u6B21\u6700\u591A\u589E\u91CF\u6DFB\u52A0\u4E09\u9879\uFF1A\u5361\u7247\u56DE\u8C03 card.action.trigger\uFF1B\u98DE\u4E66\u663E\u793A\u4E3A\u201C\u83B7\u53D6\u5355\u804A\u3001\u7FA4\u7EC4\u6D88\u606F\u201D\u7684\u79DF\u6237\u6743\u9650 im:message:readonly\uFF08\u7528\u4E8E\u8BFB\u53D6\u7528\u6237\u6D88\u606F\u4E2D\u7684\u56FE\u7247\u6216\u6587\u4EF6\uFF09\uFF1B\u4EE5\u53CA im:resource\uFF08\u7528\u4E8E\u4E0A\u4F20\u673A\u5668\u4EBA\u53D1\u9001\u7684\u56FE\u7247\u6216\u6587\u4EF6\uFF09\u3002\u786E\u8BA4\u9875\u53EA\u4F1A\u663E\u793A\u5F53\u524D\u7F3A\u5C11\u7684\u9879\uFF1B\u82E5\u51FA\u73B0\u4E0A\u8FF0\u8303\u56F4\u4E4B\u5916\u7684\u914D\u7F6E\uFF0C\u8BF7\u53D6\u6D88\u3002":"This may incrementally add up to three items: the card callback card.action.trigger; the tenant scope im:message:readonly, shown by Feishu as \u201CRead direct and group messages\u201D and used to read images or files in user messages; and im:resource, used to upload images or files sent by the bot. The confirmation page shows only items the app is currently missing; cancel if anything outside this scope appears.","\u5F53\u524D\u8BBE\u5907\u76F4\u63A5\u6253\u5F00\uFF1A":"Open directly on this device:","\u82E5\u8981\u7528\u53E6\u4E00\u53F0\u8BBE\u5907\u626B\u7801\uFF0C\u53D1\u9001 /repair qr\u3002{expiry}\u3002":"To scan with another device, send /repair qr. {expiry}.","\u8BF7\u7528\u53E6\u4E00\u53F0\u8BBE\u5907\u626B\u7801\u5B8C\u6210\u6388\u6743{remaining}\u3002":"Complete authorization by scanning with another device{remaining}.","\uFF08\u5269\u4F59\u7EA6 {minutes} \u5206\u949F\uFF09":" (about {minutes} minutes left)","\u4E8C\u7EF4\u7801\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\uFF0C\u8BF7\u76F4\u63A5\u6253\u5F00\u6388\u6743\u94FE\u63A5\uFF1A\n{url}":`The QR code could not be sent. Open the authorization link directly: +Send /send to retry or /cancel to cancel.`};var bH={"\u5317\u6C47\u661F\u6CB3 AIOS \u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"BeiHui XingHe AIOS is connected to DeepSeek Harness.","/repair \u8865\u5168\u98DE\u4E66\u6743\u9650\u4E0E\u5361\u7247\u56DE\u8C03":"/repair Complete Feishu permissions and the card callback","/m\uFF08\u6216 /menu\uFF09 \u6253\u5F00\u4EA4\u4E92\u5361\u7247\u83DC\u5355":"/m (or /menu) Open the interactive card menu","/watch [Session ID \u6216\u5E8F\u53F7] \u5173\u6CE8\u4F1A\u8BDD\uFF0C\u4EFB\u52A1\u5B8C\u6210\u81EA\u52A8\u63A8\u9001":"/watch [Session ID or index] Watch a session; completion is pushed automatically","/unwatch [Session ID \u6216\u5E8F\u53F7] \u53D6\u6D88\u5173\u6CE8":"/unwatch [Session ID or index] Stop watching","/watchlist \u67E5\u770B\u5173\u6CE8\u5217\u8868":"/watchlist View the watch list","/archived on|off \u4F1A\u8BDD\u5217\u8868\u662F\u5426\u5305\u542B\u5F52\u6863\u4F1A\u8BDD":"/archived on|off Whether the session list includes archived sessions","\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002":"The workspace must be an absolute path.","\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002":"The workspace path does not exist.","\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002":"The workspace path must point to a directory.","\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u64CD\u4F5C\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002":"The bot is being removed or has been reconnected; the original session\u2019s workspace cannot be changed.","\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The operation failed. Please try again later.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11\u98DE\u4E66\u6587\u4EF6\u4E0A\u4F20\u6743\u9650 im:resource\u3002\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u6267\u884C /repair \u547D\u4EE4\uFF0C\u6216\u8005\u5728\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u70B9\u51FB\u201C\u8865\u5168\u6743\u9650\u201D\u6309\u94AE\u5E76\u626B\u7801\u3002\u5B8C\u6210\u98DE\u4E66\u8981\u6C42\u7684\u53D1\u5E03\u5BA1\u6279\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated, but the bot lacks the Feishu file-upload scope im:resource. Run /repair in a direct chat with the bot, or click the \u201CComplete permissions\u201D button on the IM Bot settings page and scan the QR code. Complete any publishing approval Feishu requires, then try again.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u98DE\u4E66 30 MB \u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the Feishu 30 MB limit and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u98DE\u4E66\u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty; Feishu does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u98DE\u4E66\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by Feishu and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent right now. Please try again later.',"\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002\u5982\u679C\u95EE\u9898\u6301\u7EED\uFF0C\u8BF7\u5728 DeepSeek Harness \u7684\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u68C0\u67E5\u98DE\u4E66\u8FDE\u63A5\u72B6\u6001\u3002":"Message processing failed. Please try again later. If the problem persists, check the Feishu connection status on the IM Bot settings page in DeepSeek Harness.","\u5DF2\u5F00\u542F\u5168\u65B0 Harness \u4F1A\u8BDD\u3002":"A brand-new Harness session has started.","\u98DE\u4E66\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The Feishu bot is connected to DeepSeek Harness and working normally.","\u7528\u6CD5\uFF1A/archived on\uFF08\u5305\u542B\u5F52\u6863\u4F1A\u8BDD\uFF09\u6216 /archived off\uFF08\u9690\u85CF\u5F52\u6863\u4F1A\u8BDD\uFF09":"Usage: /archived on (include archived sessions) or /archived off (hide archived sessions)","\u5DF2\u5F00\u542F\uFF1A\u4F1A\u8BDD\u5217\u8868\u5305\u542B\u5F52\u6863\u4F1A\u8BDD\u3002":"On: the session list includes archived sessions.","\u5DF2\u5173\u95ED\uFF1A\u4F1A\u8BDD\u5217\u8868\u9690\u85CF\u5F52\u6863\u4F1A\u8BDD\u3002":"Off: the session list hides archived sessions.","\u4E3A\u907F\u514D\u6388\u6743\u94FE\u63A5\u66B4\u9732\uFF0C\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u53D1\u9001 /repair\u3002":"To keep the authorization link private, send /repair to the bot in a direct message.","\u65E0\u6CD5\u8BC6\u522B\u5F53\u524D\u53D1\u9001\u8005\uFF0C\u672A\u53D1\u8D77\u4FEE\u590D\u3002":"The current sender could not be identified, so repair was not started.","\u5F53\u524D Host \u7248\u672C\u6682\u4E0D\u652F\u6301\u804A\u5929\u5185\u4FEE\u590D\uFF0C\u8BF7\u5148\u66F4\u65B0\u63D2\u4EF6\u3002":"The current Host version does not support in-chat repair. Update the plugin first.","\u7528\u6CD5\uFF1A/repair\u3001/repair qr\u3001/repair status\u3001/repair cancel \u6216 /repair verify":"Usage: /repair, /repair qr, /repair status, /repair cancel, or /repair verify","\u5F53\u524D Runtime \u6CA1\u6709\u53EF\u6062\u590D\u7684\u4FEE\u590D\u4EFB\u52A1\u8BB0\u5F55\uFF08\u673A\u5668\u4EBA\u53EF\u80FD\u521A\u5B8C\u6210\u5BC6\u94A5\u66F4\u65B0\u5E76\u91CD\u542F\uFF09\u3002\u672C\u547D\u4EE4\u4E0D\u4F1A\u542F\u52A8\u65B0\u7684\u6388\u6743\uFF1B\u8BF7\u67E5\u770B\u673A\u5668\u4EBA\u53D1\u9001\u7684\u9A8C\u8BC1\u7ED3\u679C\uFF0C\u786E\u8BA4\u4E0A\u4E00\u6B21\u4EFB\u52A1\u5DF2\u7ED3\u675F\u540E\u518D\u53D1\u9001 /repair\u3002":"The current Runtime has no recoverable repair attempt (the bot may have just rotated its secret and restarted). This command starts no new authorization. Check the verification result the bot sent, then send /repair after the previous attempt has finished.","\u53E6\u4E00\u4F4D\u7528\u6237\u6B63\u5728\u4FEE\u590D\u8BE5\u673A\u5668\u4EBA\uFF0C\u672C\u6B21\u4E0D\u4F1A\u663E\u793A\u5176\u6388\u6743\u4FE1\u606F\u3002":"Another user is repairing this bot; its authorization info will not be shown this time.","\u6682\u65F6\u65E0\u6CD5\u53D6\u6D88\u4FEE\u590D\u4EFB\u52A1\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not cancel the repair task right now. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u53D6\u6D88\u65E7\u4FEE\u590D\u4EFB\u52A1\uFF0C\u672A\u751F\u6210\u65B0\u94FE\u63A5\uFF1B\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not cancel the previous repair attempt, so no new link was generated. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u67E5\u8BE2\u4FEE\u590D\u72B6\u6001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not check the repair status right now. Please try again later.","\u4FEE\u590D\u6D41\u7A0B\u6682\u65F6\u5931\u8D25\uFF0C\u73B0\u6709\u673A\u5668\u4EBA\u8FDE\u63A5\u4E0D\u53D7\u5F71\u54CD\uFF1B\u8BF7\u7A0D\u540E\u53D1\u9001 /repair \u91CD\u8BD5\u3002":"The repair flow failed for now; the existing bot connection is unaffected. Send /repair again later.","\u98DE\u4E66\u8FD4\u56DE\u4E86\u65E0\u6CD5\u5B89\u5168\u9A8C\u8BC1\u7684\u6388\u6743\u94FE\u63A5\uFF0C\u5DF2\u4E2D\u6B62\u672C\u6B21\u4FEE\u590D\u3002":"Feishu returned an authorization link that cannot be verified safely. This repair was aborted.","\u98DE\u4E66\u672A\u8FD4\u56DE\u6388\u6743\u94FE\u63A5\uFF0C\u5DF2\u4E2D\u6B62\u672C\u6B21\u4FEE\u590D\u3002":"Feishu did not return an authorization link. This repair was aborted.","\u6388\u6743\u5DF2\u786E\u8BA4\uFF0C\u6B63\u5728\u53D1\u9001\u5E76\u7B49\u5F85\u6D4B\u8BD5\u6309\u94AE\u56DE\u8C03\uFF1B\u6536\u5230\u771F\u5B9E\u56DE\u8C03\u540E\u624D\u4F1A\u5B8C\u6210\u3002":"Authorization confirmed. Sending a test button and waiting for its callback; this completes only after a real callback arrives.","\u4FEE\u590D\u72B6\u6001\u67E5\u8BE2\u4E2D\u65AD\uFF0C\u73B0\u6709\u673A\u5668\u4EBA\u8FDE\u63A5\u4E0D\u53D7\u5F71\u54CD\uFF1B\u53D1\u9001 /repair status \u91CD\u8BD5\u67E5\u8BE2\u3002":"The repair status query was interrupted; the existing bot connection is unaffected. Send /repair status to retry.",\u94FE\u63A5\u4E3A\u77ED\u671F\u6709\u6548:"The link is valid for a short time.","\u94FE\u63A5\u7EA6 {minutes} \u5206\u949F\u540E\u8FC7\u671F":"The link expires in about {minutes} minutes","\u65E7\u6388\u6743\u94FE\u63A5\u5DF2\u4F5C\u5E9F\uFF0C\u5DF2\u751F\u6210\u65B0\u7684\u4FEE\u590D\u94FE\u63A5\u3002":"The previous authorization link was invalidated and a new repair link was generated.","\u{1F527} \u51C6\u5907\u8865\u5168\u6743\u9650\u4E0E\u56DE\u8C03\u3002":"\u{1F527} Preparing to complete permissions and the callback.","\u672C\u6B21\u6700\u591A\u589E\u91CF\u6DFB\u52A0\u4E09\u9879\uFF1A\u5361\u7247\u56DE\u8C03 card.action.trigger\uFF1B\u98DE\u4E66\u663E\u793A\u4E3A\u201C\u83B7\u53D6\u5355\u804A\u3001\u7FA4\u7EC4\u6D88\u606F\u201D\u7684\u79DF\u6237\u6743\u9650 im:message:readonly\uFF08\u7528\u4E8E\u8BFB\u53D6\u7528\u6237\u6D88\u606F\u4E2D\u7684\u56FE\u7247\u6216\u6587\u4EF6\uFF09\uFF1B\u4EE5\u53CA im:resource\uFF08\u7528\u4E8E\u4E0A\u4F20\u673A\u5668\u4EBA\u53D1\u9001\u7684\u56FE\u7247\u6216\u6587\u4EF6\uFF09\u3002\u786E\u8BA4\u9875\u53EA\u4F1A\u663E\u793A\u5F53\u524D\u7F3A\u5C11\u7684\u9879\uFF1B\u82E5\u51FA\u73B0\u4E0A\u8FF0\u8303\u56F4\u4E4B\u5916\u7684\u914D\u7F6E\uFF0C\u8BF7\u53D6\u6D88\u3002":"This may incrementally add up to three items: the card callback card.action.trigger; the tenant scope im:message:readonly, shown by Feishu as \u201CRead direct and group messages\u201D and used to read images or files in user messages; and im:resource, used to upload images or files sent by the bot. The confirmation page shows only items the app is currently missing; cancel if anything outside this scope appears.","\u5F53\u524D\u8BBE\u5907\u76F4\u63A5\u6253\u5F00\uFF1A":"Open directly on this device:","\u82E5\u8981\u7528\u53E6\u4E00\u53F0\u8BBE\u5907\u626B\u7801\uFF0C\u53D1\u9001 /repair qr\u3002{expiry}\u3002":"To scan with another device, send /repair qr. {expiry}.","\u8BF7\u7528\u53E6\u4E00\u53F0\u8BBE\u5907\u626B\u7801\u5B8C\u6210\u6388\u6743{remaining}\u3002":"Complete authorization by scanning with another device{remaining}.","\uFF08\u5269\u4F59\u7EA6 {minutes} \u5206\u949F\uFF09":" (about {minutes} minutes left)","\u4E8C\u7EF4\u7801\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\uFF0C\u8BF7\u76F4\u63A5\u6253\u5F00\u6388\u6743\u94FE\u63A5\uFF1A\n{url}":`The QR code could not be sent. Open the authorization link directly: {url}`,"\u6388\u6743\u94FE\u63A5\u5DF2\u8FC7\u671F\uFF1B\u5E73\u53F0\u672A\u8FD4\u56DE\u6210\u529F\u7ED3\u679C\uFF0C\u65E0\u6CD5\u786E\u8BA4\u5DF2\u4FEE\u590D\u3002\u53D1\u9001 /repair \u751F\u6210\u65B0\u94FE\u63A5\u3002":"The authorization link expired; the platform returned no success, so the repair cannot be confirmed. Send /repair for a new link.","\u5DF2\u53D6\u6D88\u672C\u6B21\u4FEE\u590D\u6388\u6743\uFF0C\u672A\u786E\u8BA4\u5B8C\u6210\u4FEE\u590D\u3002":"Repair authorization was cancelled; the repair was not confirmed.","\u4F60\u5DF2\u53D6\u6D88\u6216\u62D2\u7EDD\u6388\u6743\uFF0C\u6CA1\u6709\u786E\u8BA4\u4FEE\u590D\uFF1B\u53D1\u9001 /repair \u53EF\u91CD\u8BD5\u3002":"You cancelled or declined authorization, so the repair was not confirmed. Send /repair to retry.","\u6388\u6743\u5DF2\u63D0\u4EA4\uFF0C\u4F46\u672A\u6536\u5230\u6D4B\u8BD5\u6309\u94AE\u56DE\u8C03\u3002\u53EF\u80FD\u5C1A\u672A\u70B9\u51FB\u6216\u914D\u7F6E\u4ECD\u5728\u4F20\u64AD\uFF1B\u7A0D\u540E\u53D1\u9001 /repair verify \u67E5\u8BE2\uFF0C\u4E0D\u8981\u76F2\u76EE\u91CD\u590D\u6388\u6743\u3002":"Authorization was submitted, but no test-button callback arrived. It may not have been tapped yet, or the config is still propagating. Send /repair verify later to check; do not authorize blindly again.","\u4FEE\u590D\u6D41\u7A0B\u6682\u65F6\u5931\u8D25\uFF0C\u73B0\u6709\u673A\u5668\u4EBA\u8FDE\u63A5\u4E0D\u53D7\u5F71\u54CD\uFF1B\u53D1\u9001 /repair \u53EF\u91CD\u8BD5\u3002":"The repair flow failed for now; the existing bot connection is unaffected. Send /repair to retry.","\u6388\u6743\u5DF2\u786E\u8BA4\uFF0C\u6B63\u5728\u7B49\u5F85\u4E13\u7528\u6D4B\u8BD5\u6309\u94AE\u7684\u771F\u5B9E\u56DE\u8C03\uFF1B\u56DE\u8C03\u5230\u8FBE\u524D\u4E0D\u4F1A\u5BA3\u544A\u6210\u529F\u3002":"Authorization confirmed. Waiting for the real callback from the dedicated test button; success is not declared until it arrives.","\u6388\u6743\u5C1A\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u4E0D\u80FD\u9A8C\u8BC1\u5361\u7247\u6309\u94AE\u3002\u8BF7\u5148\u6253\u5F00\u6388\u6743\u94FE\u63A5\u5E76\u786E\u8BA4\u3002":"Authorization is not complete, so the card buttons cannot be verified yet. Open the authorization link and confirm first.","\u4FEE\u590D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u6388\u6743{remaining}\u3002\u53D1\u9001 /repair qr \u53EF\u83B7\u53D6\u4E8C\u7EF4\u7801\uFF0C/repair cancel \u53EF\u53D6\u6D88\u3002":"The repair task is waiting for authorization{remaining}. Send /repair qr for the QR code, or /repair cancel to cancel.","\uFF0C\u5269\u4F59\u7EA6 {minutes} \u5206\u949F":", about {minutes} minutes left","\u8FD9\u4E2A\u83DC\u5355\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u56DE\u590D /m \u91CD\u65B0\u6253\u5F00\u3002":"This menu has expired. Send /m to reopen it.","\u83DC\u5355\u6CA1\u6709\u8FD9\u4E2A\u7F16\u53F7\uFF0C\u56DE\u590D /m \u91CD\u65B0\u6253\u5F00\u3002":"This menu has no such number. Send /m to reopen it.","\u672C\u9875\u53EA\u6709 {count} \u4E2A\u4F1A\u8BDD\uFF0C\u56DE\u590D /sessionlist \u91CD\u65B0\u67E5\u770B\u3002":"This page has only {count} sessions. Send /sessionlist to view them again.","\u53EA\u6709 {count} \u4E2A\u5DE5\u4F5C\u533A\uFF0C\u56DE\u590D /workspacelist \u91CD\u65B0\u67E5\u770B\u3002":"There are only {count} workspaces. Send /workspacelist to view them again.","\u5173\u6CE8\u5217\u8868\u53EA\u6709 {count} \u4E2A\u4F1A\u8BDD\u3002":"The watch list has only {count} sessions.","\u5DF2\u7ED1\u5B9A\u4F1A\u8BDD\u300C{title}\u300D\nID\uFF1A{id}":`Session bound: "{title}" ID: {id}`,"\u7ED1\u5B9A\u5931\u8D25\uFF1A{message}":"Binding failed: {message}","\u5207\u6362\u5931\u8D25\uFF1A{message}":"Switch failed: {message}","\u7528\u6CD5\uFF1A/watch ":"Usage: /watch ","\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u4F5C\u533A\uFF0C\u65E0\u6CD5\u6309\u5E8F\u53F7\u89E3\u6790\u4F1A\u8BDD\u3002":"This bot has no available workspace, so sessions cannot be resolved by index.","\u5F53\u524D\u5DE5\u4F5C\u533A\u53EA\u6709 {count} \u4E2A\u4F1A\u8BDD\u3002":"The current workspace has only {count} sessions.","\u6CA1\u6709\u627E\u5230\u8FD9\u4E2A\u4F1A\u8BDD\uFF0C\u8BF7\u7528 /sessionlist \u67E5\u770B\u53EF\u7528\u4F1A\u8BDD\u3002":"Session not found. Use /sessionlist to see the available sessions.","\u5F53\u524D\u72B6\u6001\u5B58\u50A8\u4E0D\u652F\u6301\u5173\u6CE8\u3002":"The current state store does not support watching.","\u65E0\u6CD5\u89E3\u6790\u4F1A\u8BDD\uFF1A{message}":"Could not resolve the session: {message}","\u6BCF\u4E2A\u804A\u5929\u6700\u591A\u5173\u6CE8 {count} \u4E2A\u4F1A\u8BDD\u3002":"Each chat can watch at most {count} sessions.","\u5173\u6CE8\u5217\u8868\u91CC\u6CA1\u6709\u8FD9\u4E2A\u4F1A\u8BDD\uFF0C\u56DE\u590D /watchlist \u67E5\u770B\u3002":"This session is not in the watch list. Send /watchlist to view it.","\u5DF2\u5173\u6CE8\u4F1A\u8BDD\u300C{title}\u300D\uFF0C\u4EFB\u52A1\u5B8C\u6210\u4F1A\u63A8\u9001\u7ED3\u679C\u3002":'Watching session "{title}"; results are pushed when the task completes.',"\u5173\u6CE8\u5931\u8D25\uFF1A{message}":"Could not watch: {message}","\u5DF2\u53D6\u6D88\u5173\u6CE8\u300C{title}\u300D\u3002":'Unwatched "{title}".',"\u53D6\u6D88\u5931\u8D25\uFF1A{message}":"Could not unwatch: {message}","\u98DE\u4E66\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the Feishu interaction question.","\u5F53\u524D\u4EFB\u52A1\u4ECD\u5728\u8FD0\u884C\uFF0C\u8BF7\u5148\u505C\u6B62\u4EFB\u52A1\u6216\u7B49\u5F85\u4EFB\u52A1\u5B8C\u6210\u540E\u518D\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002":"The current task is still running. Stop it or wait for it to finish before starting a new session.","\u8BF7\u8F93\u5165\u8865\u5145\u6307\u4EE4\u540E\u518D\u63D0\u4EA4\u3002":"Enter an instruction before submitting.","\u64CD\u4F5C\u8FC7\u4E8E\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002":"Too many card actions are pending. Please try again shortly.","\u5361\u7247\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The card action failed. Please try again later.","\u8BF7\u5148\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u4F1A\u8BDD\u3002":"Select at least one session first.","\u5DF2\u6279\u91CF\u5173\u6CE8 {count} \u4E2A\u4F1A\u8BDD\u3002":"Now watching {count} sessions.","\u5DF2\u6279\u91CF\u5173\u6CE8 {count} \u4E2A\u4F1A\u8BDD\uFF0C\u53E6\u6709 {failed} \u4E2A\u672A\u6210\u529F\u3002":"Now watching {count} sessions; {failed} could not be processed.","\u5DF2\u5173\u6CE8\uFF08\u6216\u5DF2\u8FBE\u5173\u6CE8\u4E0A\u9650\uFF09\u3002":"Sessions are already watched, or the watch limit has been reached.","\u5DF2\u53D6\u6D88\u5173\u6CE8 {count} \u4E2A\u4F1A\u8BDD\u3002":"Stopped watching {count} sessions.","\u5DF2\u53D6\u6D88\u5173\u6CE8 {count} \u4E2A\u4F1A\u8BDD\uFF0C\u53E6\u6709 {failed} \u4E2A\u672A\u6210\u529F\u3002":"Stopped watching {count} sessions; {failed} could not be processed.","\u6240\u9009\u4F1A\u8BDD\u5747\u672A\u5904\u7406\u6210\u529F\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"None of the selected sessions could be processed. Please try again later.","\u6240\u9009\u4F1A\u8BDD\u5DF2\u5728\u5173\u6CE8\u5217\u8868\u4E2D\u3002":"The selected sessions are already being watched.","\u6240\u9009\u4F1A\u8BDD\u5DF2\u4E0D\u5728\u5173\u6CE8\u5217\u8868\u4E2D\u3002":"The selected sessions are no longer in the watch list.","\u672A\u53D6\u6D88\u4EFB\u4F55\u5173\u6CE8\u3002":"No watches were removed.","\u5F53\u524D\u6CA1\u6709\u7ED1\u5B9A\u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u4ECE\u4F1A\u8BDD\u5217\u8868\u9009\u62E9\u3002":"No session is currently bound. Select one from the session list first.","\u5DF2\u5C31\u7EEA\uFF0C\u76F4\u63A5\u53D1\u6D88\u606F\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Ready. Send a message to continue the current session.","\u4FEE\u590D\u9700\u5728\u79C1\u804A\u4E2D\u9A8C\u8BC1\u63A5\u5165\u8005\u8EAB\u4EFD\uFF0C\u8BF7\u76F4\u63A5\u53D1\u9001 /repair \u5F00\u59CB\u3002":"Repair must verify the owner in a direct chat. Send /repair there to begin.","\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u9884\u8BBE\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not load the preset list. Please try again later.","\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u7CFB\u7EDF\u72B6\u6001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not load system status. Please try again later.",\u8FDE\u63A5\u6B63\u5E38:"Connected","\u9884\u8BBE\uFF1A{preset}":"Preset: {preset}",\u672A\u77E5:"Unknown","/stop \u6267\u884C\u5B8C\u6210\u3002":"/stop completed.","\u505C\u6B62\u4EFB\u52A1\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not stop the task. Please try again later.","\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\u3002":"Instruction submitted.","\u9884\u8BBE\u91CD\u7F6E\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not reset the preset. Please try again later.","\u9884\u8BBE\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not switch the preset. Please try again later.","\u{1F916} \u52A9\u624B\u4E2D\u5FC3":"\u{1F916} Assistant center","**\u8BBE\u7F6E**":"**Settings**",\u5207\u6362\u4F1A\u8BDD:"Switch session","\u9009\u62E9\u4F1A\u8BDD\uFF08\u5F53\u524D\u672A\u7ED1\u5B9A\uFF09":"Select a session (none currently bound)",\u8DDF\u968F\u9ED8\u8BA4:"Follow default",\u5207\u6362\u9884\u8BBE:"Switch preset",\u5207\u6362\u6A21\u578B:"Switch model","\u5F53\u524D\u5DE5\u4F5C\u533A\u6682\u65E0\u53EF\u7528\u4F1A\u8BDD\u3002":"There are no available sessions in the current workspace.","\u{1F916} \u5207\u6362\u9884\u8BBE":"\u{1F916} Switch preset","\u{1F9E0} \u5207\u6362\u6A21\u578B":"\u{1F9E0} Switch model","\u{1F195} \u65B0\u4F1A\u8BDD":"\u{1F195} New session","\u{1F4CB} \u4F1A\u8BDD/\u5173\u6CE8":"\u{1F4CB} Sessions / watches","\u{1F5C2} \u5DE5\u4F5C\u533A\u5217\u8868":"\u{1F5C2} Workspace list","**\u4EFB\u52A1\u63A7\u5236**":"**Task controls**","\u23F9 \u505C\u6B62":"\u23F9 Stop","\u{1F4D0} \u538B\u7F29":"\u{1F4D0} Compact","**\u8865\u5145\u6307\u4EE4**":"**Steer task**",\u9009\u62E9\u8865\u5145\u6307\u4EE4:"Choose an instruction",\u7EE7\u7EED:"Continue",\u52A0\u901F\u8FD0\u884C:"Move faster",\u603B\u7ED3\u5F53\u524D\u8FDB\u5C55:"Summarize current progress",\u66F4\u7B80\u6D01\u4E9B:"Be more concise",\u66F4\u8BE6\u7EC6\u4E9B:"Be more detailed","\u270F\uFE0F \u66F4\u591A / \u81EA\u5B9A\u4E49\u2026":"\u270F\uFE0F More / custom\u2026","\u{1F5C4} \u5F52\u6863\uFF1A{state}":"\u{1F5C4} Archived: {state}",\u5DF2\u663E\u793A:"shown",\u5DF2\u9690\u85CF:"hidden",\u5207\u6362\u5F52\u6863\u663E\u793A:"Toggle archived sessions","\u{1F4CA} \u72B6\u6001":"\u{1F4CA} Status","\u{1F4D6} \u5E2E\u52A9":"\u{1F4D6} Help","**\u6570\u5B57\u515C\u5E95**\n**1**\u5DE5\u4F5C\u533A\u5217\u8868 \xB7 **2**\u65B0\u4F1A\u8BDD \xB7 **3**\u4F1A\u8BDD\u5217\u8868 \xB7 **4**\u72B6\u6001\n**5**\u{1F527}\u8865\u5168\u6743\u9650 \xB7 **6**\u5E2E\u52A9":`**Number fallback** **1** Workspace list \xB7 **2** New session \xB7 **3** Session list \xB7 **4** Status @@ -132,134 +132,134 @@ ID: {id}`,"\u7ED1\u5B9A\u5931\u8D25\uFF1A{message}":"Binding failed: {message}", Reply with a number for a quick action: **1** Workspace list \xB7 **2** New session \xB7 **3** Sessions/watches **4** Status \xB7 **5** Complete permissions \xB7 **6** Help`,"\u4ECE\u4E0B\u65B9\u4E0B\u62C9\u9009\u62E9\u8865\u5145\u6307\u4EE4\uFF1B\u6700\u540E\u4E00\u9879\u53EF\u81EA\u5B9A\u4E49\u8F93\u5165\u3002":"Choose an instruction below; the last option lets you enter a custom one.","\u5F53\u524D\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u518D\u8865\u5145\u6307\u4EE4\u3002":"No session is bound. Bind one before steering the task.","\u2795 \u8865\u5145\u6307\u4EE4":"\u2795 Steer task","\u8F93\u5165\u8865\u5145\u6307\u4EE4\u540E\u70B9\u300C\u63D0\u4EA4\u300D\uFF0C\u53D1\u9001\u7ED9\u5F53\u524D\u8FD0\u884C\u7684\u4EFB\u52A1\u3002":"Enter an instruction and press Submit to send it to the running task.",\u8F93\u5165\u4F60\u7684\u8865\u5145\u6307\u4EE4:"Enter your instruction",\u63D0\u4EA4:"Submit","\u2795 \u81EA\u5B9A\u4E49\u6307\u4EE4":"\u2795 Custom instruction","\u{1F916} \u52A9\u624B\u83DC\u5355":"\u{1F916} Assistant menu","**\u70B9\u51FB\u6309\u94AE\u6216\u76F4\u63A5\u56DE\u590D\u6570\u5B57**":"**Tap a button or reply with a number**","1 \xB7 \u4F1A\u8BDD\u5217\u8868":"1 \xB7 Sessions","2 \xB7 \u5DE5\u4F5C\u533A":"2 \xB7 Workspace","3 \xB7 \u65B0\u4F1A\u8BDD":"3 \xB7 New session","4 \xB7 \u72B6\u6001":"4 \xB7 Status","5 \xB7 \u5E2E\u52A9":"5 \xB7 Help","**6 \xB7 \u8865\u5168\u6743\u9650**\uFF08\u8BF7\u76F4\u63A5\u56DE\u590D\u6570\u5B57 **6**\uFF09":"**6 \xB7 Complete permissions** (reply with the number **6**)","7 \xB7 \u5173\u6CE8\u5217\u8868":"7 \xB7 Watch list","\u{1F9EA} \u9A8C\u8BC1\u5361\u7247\u6309\u94AE":"\u{1F9EA} Verify card buttons","\u6388\u6743\u5DF2\u63D0\u4EA4\u3002\u8BF7\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\uFF1B\u673A\u5668\u4EBA\u771F\u5B9E\u6536\u5230\u56DE\u8C03\u540E\u624D\u4F1A\u5224\u5B9A\u4FEE\u590D\u6210\u529F\u3002":"Authorization submitted. Tap the button below; the repair is confirmed only after the bot receives the real callback.",\u5B8C\u6210\u9A8C\u8BC1:"Finish verification","**\u5DE5\u4F5C\u533A**\uFF1A{workspace}\n\u5171 **{total}** \u4E2A\u4F1A\u8BDD{paging}":`**Workspace**: {workspace} -**{total}** sessions in total{paging}`,"\uFF08\u7B2C {page}/{pageCount} \u9875\uFF09":" (page {page}/{pageCount})","\u2B50\u53D6\u5173":"\u2B50 Unwatch","\u2B50\u5173\u6CE8":"\u2B50 Watch","\u25C0 \u4E0A\u4E00\u9875":"\u25C0 Previous","\u4E0B\u4E00\u9875 \u25B6":"Next \u25B6","\u56DE\u590D\u6570\u5B57\uFF081~N\uFF09\u7ED1\u5B9A\u672C\u9875\u4F1A\u8BDD\u3002":"Reply with a number (1\u2013N) to bind a session on this page.","\u{1F4C2} \u4F1A\u8BDD\u5217\u8868":"\u{1F4C2} Session list","\u5F53\u524D Host \u4E0A\u6CA1\u6709\u5DF2\u767B\u8BB0\u7684\u5DE5\u4F5C\u533A\u3002":"No workspaces are registered on the current Host.","\u56DE\u590D\u6570\u5B57\u5207\u6362\u5DE5\u4F5C\u533A\uFF0C\u6216\u70B9\u51FB\u6309\u94AE\uFF1A":"Reply with a number to switch workspaces, or tap a button:","\u{1F5C2} \u5DE5\u4F5C\u533A":"\u{1F5C2} Workspace","\u{1F916} \u52A9\u624B\u83DC\u5355\uFF08\u56DE\u590D\u6570\u5B57\u5373\u53EF\uFF0C\u65E0\u9700\u8BB0\u547D\u4EE4\uFF09":"\u{1F916} Assistant menu (reply with a number \u2014 no need to memorize commands)","1 \xB7 /sessionlist \u5217\u51FA\u4F1A\u8BDD\uFF08\u56DE\u590D\u6570\u5B57\u7ED1\u5B9A\uFF09":"1 \xB7 /sessionlist List sessions (reply with a number to bind)","2 \xB7 /workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\uFF08\u56DE\u590D\u6570\u5B57\u5207\u6362\uFF09":"2 \xB7 /workspacelist List workspaces (reply with a number to switch)","3 \xB7 /new \u5F00\u542F\u65B0\u4F1A\u8BDD":"3 \xB7 /new Start a new session","4 \xB7 /status \u8FDE\u63A5\u72B6\u6001":"4 \xB7 /status Connection status","5 \xB7 /help \u672C\u5E2E\u52A9":"5 \xB7 /help This help","6 \xB7 /repair \u8865\u5168\u6743\u9650\u4E0E\u56DE\u8C03\uFF08\u8BF7\u56DE\u590D\u6570\u5B57 6\uFF09":"6 \xB7 /repair Complete permissions and callback (reply with the number 6)","7 \xB7 /watchlist \u5173\u6CE8\u5217\u8868":"7 \xB7 /watchlist Watch list","\u76F4\u63A5\u53D1\u9001\u6587\u5B57/\u56FE\u7247\u5373\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","/session ID \u6216\u5E8F\u53F7 \u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD":"/session ID or index Bind an existing session","/watch ID \u6216\u5E8F\u53F7 \u5173\u6CE8\u4F1A\u8BDD\uFF08\u5B8C\u6210\u540E\u63A8\u9001\uFF09":"/watch ID or index Watch a session (push when done)","/compact \u538B\u7F29\u4E0A\u4E0B\u6587":"/compact Compact the context","/workspace \u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace Switch workspace","/presetlist \u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets","\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\uFF0C\u56DE\u590D\u6570\u5B57\u6216\u70B9\u6309\u94AE\u53D6\u6D88\u5173\u6CE8\uFF1A":"Completion is pushed automatically. Reply with a number or tap a button to unwatch:","\u{1F441} \u5173\u6CE8\u5217\u8868":"\u{1F441} Watch list","\u2B50 \u53D6\u6D88\u5173\u6CE8":"\u2B50 Unwatch","\u2606 \u5173\u6CE8":"\u2606 Watch","\u{1F50D} \u5173\u6CE8\u5217\u8868":"\u{1F50D} Watch list",\u52FE\u9009\u8981\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to watch",\u52FE\u9009\u8981\u53D6\u6D88\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to unwatch","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u7ED3\u679C\u3002":"No sessions are being watched. Results are pushed automatically when tasks complete.","\u5F53\u524D\u5173\u6CE8 **{count}** \u4E2A\u4F1A\u8BDD\uFF1A":"Currently watching **{count}** sessions:","**\u2795 \u6DFB\u52A0\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2795 Add watch** (select from the multi-select dropdown)","**\u2796 \u53D6\u6D88\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2796 Remove watch** (select from the multi-select dropdown)","\u{1F4CB} \u4F1A\u8BDD\u5217\u8868":"\u{1F4CB} Session list","\u{1F519} \u8FD4\u56DE\u83DC\u5355":"\u{1F519} Back to menu",\u5DF2\u5B8C\u6210:"Completed",\u5DF2\u505C\u6B62:"Stopped",\u5DF2\u4E2D\u6B62:"Aborted",\u5DF2\u53D6\u6D88:"Cancelled",\u5DF2\u7ED3\u675F:"Ended","\u2705 \u4EFB\u52A1\u5B8C\u6210":"\u2705 Task complete","**\u72B6\u6001**\uFF1A{reason}":"**Status**: {reason}",\u6253\u5F00\u4F1A\u8BDD\u5217\u8868:"Open session list",\u5DE5\u4F5C\u533A:"Workspace","\u7ED1\u5B9A\u8BE5\u4F1A\u8BDD\u540E\u53EF\u7EE7\u7EED\u8FFD\u95EE\uFF0C\u8F93\u5165\u6587\u5B57\u5373\u53EF\u3002":"After binding this session you can keep asking; just type a message.","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\n`/watch ` \u5173\u6CE8\u540E\uFF0C\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u3002":"No sessions are being watched.\nWatch one with `/watch ` and completion is pushed automatically.","\u6B63\u5728\u751F\u6210\u2026":"Generating\u2026",\u56DE\u7B54\u5B8C\u6210:"Answer complete",\u98DE\u4E66\u673A\u5668\u4EBA:"Feishu bot","\u98DE\u4E66\u673A\u5668\u4EBA\u7F3A\u5C11\u56FE\u7247\u8BFB\u53D6\u6743\u9650 im:message:readonly\uFF08\u98DE\u4E66\u663E\u793A\u4E3A\u201C\u83B7\u53D6\u5355\u804A\u3001\u7FA4\u7EC4\u6D88\u606F\u201D\uFF09\u3002\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u6267\u884C /repair \u547D\u4EE4\uFF0C\u6216\u8005\u5728\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u70B9\u51FB\u201C\u8865\u5168\u6743\u9650\u201D\u6309\u94AE\u5E76\u626B\u7801\u3002\u6309\u98DE\u4E66\u63D0\u793A\u53D1\u5E03\u65B0\u7248\u672C\u3001\u5B8C\u6210\u5FC5\u8981\u5BA1\u6279\u540E\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"The Feishu bot is missing the image-read scope im:message:readonly, shown by Feishu as \u201CRead direct and group messages.\u201D Run /repair in a direct chat with the bot, or click the \u201CComplete permissions\u201D button on the IM Bot settings page and scan the QR code. Publish a new version and complete any approval requested by Feishu, then resend the image.","\u2705 \u4FEE\u590D\u5B8C\u6210\uFF1A\u5DF2\u5B9E\u6D4B\u6536\u5230 card.action.trigger\uFF0C\u83DC\u5355\u6309\u94AE\u73B0\u5728\u53EF\u7528\u3002":"\u2705 Repair complete: card.action.trigger was received in a real test; the menu buttons now work.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u8D85\u65F6\uFF1A\u672A\u6536\u5230\u6D4B\u8BD5\u5361\u6309\u94AE\u7684 card.action.trigger\uFF0C\u4E0D\u80FD\u786E\u8BA4\u6309\u94AE\u5DF2\u4FEE\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u98DE\u4E66\u5F00\u653E\u5E73\u53F0\u7684\u5361\u7247\u56DE\u8C03\u914D\u7F6E\uFF0C\u786E\u8BA4\u540E\u518D\u53D1\u9001 /repair\u3002":"\u26A0\uFE0F Repair verification timed out: no card.action.trigger from the test card button was received, so the buttons cannot be confirmed repaired. Do not authorize again; check the card-callback configuration in Feishu Open Platform first, then send /repair.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u5931\u8D25\uFF1A\u65E0\u6CD5\u53D1\u9001\u4E13\u7528\u6D4B\u8BD5\u5361\uFF0C\u4E0D\u80FD\u786E\u8BA4 card.action.trigger \u5DF2\u6062\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u673A\u5668\u4EBA\u6D88\u606F\u6743\u9650\u548C\u8FDE\u63A5\u72B6\u6001\u3002":"\u26A0\uFE0F Repair verification failed: the dedicated test card could not be sent, so card.action.trigger cannot be confirmed restored. Do not authorize again; check the bot message permission and connection status first.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u4E2D\u65AD\uFF1ARuntime \u5DF2\u505C\u6B62\uFF0C\u672A\u5B8C\u6210 card.action.trigger \u5B9E\u6D4B\uFF0C\u4E0D\u80FD\u786E\u8BA4\u4FEE\u590D\u6210\u529F\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u7B49\u5F85\u673A\u5668\u4EBA\u6062\u590D\u8FDE\u63A5\u3002":"\u26A0\uFE0F Repair verification interrupted: the Runtime stopped before the card.action.trigger test completed, so the repair cannot be confirmed. Do not authorize again; wait for the bot to reconnect."};var oH={"\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026":"Connected to DeepSeek Harness, thinking\u2026","\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The DingTalk bot is connected to DeepSeek Harness.","\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002":`DingTalk could not provide the image download address. Please resend; if it keeps failing, check the bot's "Send messages as an internal robot" permission.`,"\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"DingTalk did not return an image download address. Please resend.","\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The temporary image address returned by DingTalk could not be read. Please resend.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'Delivery of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002":`Result file "{name}" was generated, but the DingTalk app or bot lacks file message permission. Enable the app's qyapi_base permission and make sure the bot can send file messages.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'Result file "{name}" exceeds the file size limit of the current DingTalk bot and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was rate-limited by DingTalk and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002":`Result file "{name}" was generated, but DingTalk rejected the file message. Check the file type and the bot's file message configuration.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was generated but could not be sent via DingTalk right now. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002":"The result file has been generated.","\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The DingTalk bot is connected to DeepSeek Harness normally.","\u9489\u9489\u547D\u4EE4\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk command.","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002":"The DingTalk message has no safe reply address.","\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk approval.","\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk message.","\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002":"Invalid DingTalk message format.","\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the DingTalk interaction question.",\u9489\u9489\u7528\u6237:"DingTalk user",\u9489\u9489\u673A\u5668\u4EBA:"DingTalk bot",\u8EAB\u4EFD\u5DF2\u9690\u85CF:"Identity hidden","\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The DingTalk bot credentials are missing. Remove the bot and scan the QR code again.","\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is not ready. Please try again later.","\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is still not ready. Please try again later.","\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002":"QR code setup has been cancelled.","\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not generate the DingTalk QR code. Please try again later.","\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The QR code has expired. Generate a new one.","\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DingTalk is connected, but the message connection is not ready yet. Please try again later.","\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002":"DingTalk did not complete the bot authorization. Please scan the QR code again.","\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization status is temporarily unavailable. Retrying.","\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"DingTalk authorization succeeded, but the configuration could not be saved safely.","\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization query failed temporarily. Retrying.","\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09":"DingTalk bot ({clientId})","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The DingTalk Stream message connection is running normally",\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The DingTalk message connection is currently offline"};var nH={"\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The Enterprise WeChat bot is connected to DeepSeek Harness.","\u5F53\u524D\u5F85\u5904\u7406\u56FE\u7247\u8F83\u591A\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u53D1\u9001\u3002":"Too many images are pending. Please send them again later.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u667A\u80FD\u673A\u5668\u4EBA\u7F3A\u5C11\u7D20\u6750\u4E0A\u4F20\u6216\u6587\u4EF6\u6D88\u606F\u80FD\u529B\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6743\u9650\u3002":'The result file "{name}" was generated, but the Enterprise WeChat bot lacks media upload or file message capability. Please check the bot permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size this Enterprise WeChat bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u4F01\u4E1A\u5FAE\u4FE1\u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty. Enterprise WeChat does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u4F01\u4E1A\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was rate-limited by Enterprise WeChat and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but Enterprise WeChat rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u4F01\u4E1A\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via Enterprise WeChat right now. Please try again later.',"\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u6587\u672C\u3002":"The task completed, but no displayable text was generated.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Currently only text, images, and voice transcription messages are supported.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The connection between the Enterprise WeChat bot and DeepSeek Harness is working.","\u6B63\u5728\u601D\u8003\u4E2D\u2026":"Thinking\u2026","\u4F01\u4E1A\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the Enterprise WeChat interaction question.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The Enterprise WeChat bot credentials are missing. Please remove the bot and scan the QR code again.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is not ready. The plugin will retry automatically.","\u626B\u7801\u7ED1\u5B9A\u5DF2\u53D6\u6D88\u3002":"QR code binding has been cancelled.","\u65E0\u6CD5\u751F\u6210\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the Enterprise WeChat QR code. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The Enterprise WeChat QR code has expired. Please generate a new one.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Enterprise WeChat bot is bound, but the message connection is not ready yet.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is still not ready. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u6CA1\u6709\u5B8C\u6210\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR scan was not completed. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR service is temporarily unavailable. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"Enterprise WeChat authorization succeeded, but the connection configuration could not be saved safely.",\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA:"Enterprise WeChat bot","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{botId}\uFF09":"Enterprise WeChat bot ({botId})","\u4F01\u4E1A\u5FAE\u4FE1 WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Enterprise WeChat WebSocket long connection is running normally","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Enterprise WeChat connection is not ready. The plugin will retry automatically",\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Enterprise WeChat connection is currently offline"};var sH={"QQ \u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The QQ bot is connected to DeepSeek Harness.","\u56DE\u7B54\u8F83\u957F\uFF0C\u540E\u7EED\u5185\u5BB9\u672A\u80FD\u901A\u8FC7 QQ \u5B8C\u6574\u53D1\u9001\uFF0C\u8BF7\u56DE\u590D\u201C\u7EE7\u7EED\u201D\u3002":"The answer is long and the rest could not be sent fully through QQ. Reply \u201C\u7EE7\u7EED\u201D (continue) to receive it.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u4ECA\u65E5\u6587\u4EF6\u4E0A\u4F20\u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":`The result file "{name}" was generated, but QQ's daily file upload quota is used up. Please try again later.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D QQ \u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002":'The result file "{name}" was generated, but the current QQ bot does not have file message permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D QQ \u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size the current QQ bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0CQQ \u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty, and QQ does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB QQ \u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by QQ and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but QQ rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7 QQ \u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via QQ right now. Please try again later.',"QQ \u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The QQ bot is connected to DeepSeek Harness normally.","QQ \u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the QQ interaction question.","QQ \u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The QQ bot credentials are missing. Remove the bot and scan the QR code again.","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The QQ connection is not ready; the plugin will retry automatically.","QQ \u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The QQ QR service is temporarily unavailable. Please generate a new QR code.","\u65E0\u6CD5\u751F\u6210 QQ \u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the QQ QR code. Please try again later.","QQ \u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The QQ bot is bound, but the message connection is not ready yet.","QQ \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The QQ connection is still not ready. Please try again later.",QQ\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The QQ bot is not connected yet","QQ \u673A\u5668\u4EBA\uFF08{appId}\uFF09":"QQ bot ({appId})",QQ\u673A\u5668\u4EBA:"QQ bot","QQ WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The QQ WebSocket long connection is running normally","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The QQ connection is not ready; the plugin will retry automatically","QQ \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The QQ connection is currently offline","QQ \u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"QQ authorization succeeded, but the connection configuration could not be saved safely."};var gH={"\u5FAE\u4FE1\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"WeChat is connected to DeepSeek Harness.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u673A\u5668\u4EBA\u5F53\u524D\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u80FD\u529B\u3002":`The result file "{name}" was generated, but the WeChat bot currently has no permission to send file messages. Please check the bot's file messaging capability.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u5FAE\u4FE1\u4F1A\u8BDD\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size limit of the current WeChat conversation and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by WeChat and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but WeChat rejected the file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via WeChat right now. Please try again later.',"\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Currently supports text, images, and voice messages that WeChat has converted to text.","\u5FAE\u4FE1\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"WeChat is connected to DeepSeek Harness normally.","\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the WeChat interaction question.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u53D1\u9001\u5931\u8D25\uFF0C\u53EF\u80FD\u53EA\u6536\u5230\u90E8\u5206\u5185\u5BB9\u3002\u8BF7\u5C06\u4E0B\u9762\u7684\u8BCA\u65AD\u4FE1\u606F\u5B8C\u6574\u53CD\u9988\u7ED9\u7BA1\u7406\u5458\u3002":"The reply was generated, but WeChat delivery failed and only part of it may have arrived. Please send the complete diagnostic below to the administrator.","\u5FAE\u4FE1\u53D1\u9001\u8BCA\u65AD\uFF1A{diagnostic}":"WeChat delivery diagnostic: {diagnostic}","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u8BFB\u53D6\u73B0\u6709\u767B\u5F55\u51ED\u636E\u3002\u8BF7\u68C0\u67E5 DSH \u51ED\u636E\u5B58\u50A8\u3002":"WeChat was authorized, but the existing login credential could not be read. Please check the DSH credential store.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u767B\u5F55\u51ED\u636E\u65E0\u6CD5\u5199\u5165 DSH \u51ED\u636E\u5B58\u50A8\u3002\u8BF7\u68C0\u67E5\u51ED\u636E\u5B58\u50A8\u662F\u5426\u53EF\u5199\u3002":"WeChat was authorized, but the login credential could not be written to the DSH credential store. Please check that the credential store is writable.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u8D26\u53F7\u914D\u7F6E\u65E0\u6CD5\u5199\u5165\u672C\u673A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u76EE\u5F55\u6743\u9650\u3002":"WeChat was authorized, but the account configuration could not be written locally. Please check the DSH_HOME directory permissions.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u521D\u59CB\u5316\u8D26\u53F7\u72B6\u6001\u6216\u5DE5\u4F5C\u533A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u548C\u5DE5\u4F5C\u533A\u76EE\u5F55\u3002":"WeChat was authorized, but the account state or workspace could not be initialized. Please check DSH_HOME and the workspace directories.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002\u8BF7\u68C0\u67E5 dsh web \u5730\u5740\u548C\u7AEF\u53E3\u3002":"WeChat was authorized, but the plugin could not connect to the local Harness. Please check the dsh web address and port.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8D85\u65F6\u3002\u8BF7\u786E\u8BA4 dsh web \u672A\u963B\u585E\u3002":"WeChat was authorized, but the Harness health check timed out. Please confirm dsh web is not blocked.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u9700\u8981\u8EAB\u4EFD\u8BA4\u8BC1\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u3001\u7F51\u5173\u6216\u81EA\u5B9A\u4E49\u9274\u6743\u914D\u7F6E\u3002":"WeChat was authorized, but the Harness health check requires authentication. Please check proxy, gateway, or custom auth configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u672C\u673A Harness \u8BF7\u6C42\u88AB\u4EE3\u7406\u8981\u6C42\u8BA4\u8BC1\u3002\u8BF7\u8BA9\u56DE\u73AF\u5730\u5740\u7ED5\u8FC7\u4EE3\u7406\uFF0C\u5E76\u68C0\u67E5 NO_PROXY \u914D\u7F6E\u3002":"WeChat was authorized, but the local Harness request was challenged for proxy authentication. Please bypass the proxy for loopback addresses and check the NO_PROXY configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5F02\u5E38\u62D2\u7EDD\u4E86\u56DE\u73AF\u5730\u5740\u7684\u5065\u5EB7\u68C0\u67E5\u3002\u8BF7\u68C0\u67E5 HTTP \u4EE3\u7406\u3001Harness \u6E90\u7801\u7248\u672C\u548C\u6784\u5EFA\u4EA7\u7269\u3002":"WeChat was authorized, but Harness unexpectedly rejected the health check from a loopback address. Please check the HTTP proxy, Harness source version, and build artifacts.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u7684 Host \u4FE1\u4EFB\u68C0\u67E5\u62D2\u7EDD\u4E86\u975E\u56DE\u73AF\u5730\u5740\u8BF7\u6C42\u3002\u8BF7\u68C0\u67E5 harnessBaseUrl \u4E0E trustedHosts \u914D\u7F6E\u3002":"WeChat was authorized, but the Harness Host trust check rejected a non-loopback request. Please check the harnessBaseUrl and trustedHosts configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u5065\u5EB7\u68C0\u67E5\u6536\u5230\u4E86\u975E Harness \u6807\u51C6\u7684 403 \u62D2\u7EDD\u54CD\u5E94\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u6216\u7F51\u5173\u914D\u7F6E\u3002":"WeChat was authorized, but the health check received a non-standard Harness 403 rejection. Please check the proxy or gateway configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u627E\u4E0D\u5230 Harness \u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but the Harness health check endpoint was not found. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8FD4\u56DE\u670D\u52A1\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check returned a server error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but Harness returned an unrecognized response. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u62D2\u7EDD\u4E86\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but Harness rejected the health check request. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check failed with an unknown error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u521D\u59CB\u5316\u5931\u8D25\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u540E\u91CD\u8BD5\u3002":"WeChat was authorized, but the message connection failed to initialize. Please check the dsh web logs and try again.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6FC0\u6D3B\u8FC7\u7A0B\u4E2D\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but an unknown error occurred during activation. Please check the dsh web logs.","\u767B\u5F55\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The login credential is missing. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WeChat connection is not ready; the plugin will retry automatically.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The WeChat connection is not ready; the plugin will retry automatically","\u65E0\u6CD5\u751F\u6210\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the WeChat QR code. Please try again later.","\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WeChat connection is still not ready. Please try again later.",\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeChat Bot","\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{name}\uFF09":"WeChat Bot ({name})",\u5FAE\u4FE1\u6D88\u606F\u957F\u8F6E\u8BE2\u8FD0\u884C\u6B63\u5E38:"WeChat message long-polling is running normally",\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The WeChat connection is currently offline","\u914D\u5BF9\u7801\u591A\u6B21\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The pairing code was entered incorrectly too many times. Please generate a new QR code.","\u8BE5\u5FAE\u4FE1\u8D26\u53F7\u5DF2\u7ED1\u5B9A\uFF0C\u4F46\u672C\u673A\u6CA1\u6709\u53EF\u6062\u590D\u7684\u51ED\u636E\u3002":"This WeChat account is already bound, but no recoverable credential exists on this machine.","\u5FAE\u4FE1\u6388\u6743\u6210\u529F\uFF0C\u4F46\u8FD4\u56DE\u7684\u8D26\u53F7\u51ED\u636E\u4E0D\u5B8C\u6574\u3002":"WeChat authorization succeeded, but the returned account credential is incomplete.","\u5FAE\u4FE1\u767B\u5F55\u51ED\u636E\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WeChat login credential has expired. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u6D88\u606F\u540C\u6B65\u8BF7\u6C42\u88AB\u62D2\u7EDD\u3002":"The WeChat message sync request was rejected.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u5BC6\u94A5\u65E0\u6548\u3002":"The encryption key of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u6570\u636E\u65E0\u6548\u3002":"The encrypted data of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u89E3\u5BC6\u5931\u8D25\u3002":"Failed to decrypt the WeChat image.","\u5FAE\u4FE1\u56FE\u7247\u6CA1\u6709\u53EF\u7528\u7684\u4E0B\u8F7D\u5730\u5740\u3002":"The WeChat image has no usable download URL.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u65E0\u6548\u3002":"The download URL of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002":"The download URL of the WeChat image is not trusted.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an invalid connection URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an untrusted connection URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u626B\u7801\u5730\u5740\u3002":"The WeChat service did not return a QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an invalid QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an untrusted QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an invalid file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an untrusted file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service did not return a file upload URL.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u88AB\u62D2\u7EDD\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload was rejected (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload failed (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u54CD\u5E94\u7F3A\u5C11\u4E0B\u8F7D\u53C2\u6570\u3002":"The WeChat file upload response is missing the download parameter.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u3002":"The WeChat file upload failed.","\u62D2\u7EDD\u8BBF\u95EE\u4E0D\u53D7\u4FE1\u4EFB\u7684\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u3002":"Refusing to access an untrusted WeChat service URL.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat service request failed (HTTP {status}).","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002":"The WeChat service returned an unparseable response.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002":"The WeChat service request timed out.","\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u5FAE\u4FE1\u670D\u52A1\u3002":"The WeChat service is temporarily unreachable.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u626B\u7801\u72B6\u6001\u3002":"The WeChat service returned an unrecognized QR-code status.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u4E8C\u7EF4\u7801\u4EE4\u724C\u3002":"The WeChat service did not return a QR-code token.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002":"The WeChat service rejected the reply message.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002":"The WeChat service rejected the file upload request.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002":"The WeChat service rejected the file message.","\u5FAE\u4FE1\u8D26\u53F7\u8FDE\u63A5\u542F\u52A8\u5931\u8D25\u3002":"Failed to start the WeChat account connection."};var cH={Slack\u673A\u5668\u4EBA:"Slack bot","Slack\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"Slack bot credentials are missing. Remove the bot and connect it again.","Slack Socket Mode \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Slack Socket Mode connection is not ready yet. The plugin will retry automatically.","Slack\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0CSocket Mode \u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Slack bot is connected, but the Socket Mode connection is not ready yet.","Slack Socket Mode \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u68C0\u67E5\u4E24\u4E2A Token\u3002":"The Slack Socket Mode connection is still not ready. Check both tokens.",Slack\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The Slack bot is not connected yet","Slack Socket Mode \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Slack Socket Mode long-lived connection is running normally","Slack\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Slack connection is not ready. The plugin will retry automatically",Slack\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Slack connection is currently offline","Slack \u672A\u6388\u6743\u673A\u5668\u4EBA\u8BFB\u53D6\u8BE5\u6587\u4EF6\u3002\u8BF7\u4E3A\u5E94\u7528\u6DFB\u52A0 files:read \u540E\u91CD\u65B0\u5B89\u88C5\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"Slack has not granted the bot access to this file. Add the files:read scope to the app, reinstall it, then send the image again.","Slack Bot Token \u5FC5\u987B\u4EE5 xoxb- \u5F00\u5934\u3002":"The Slack Bot Token must start with xoxb-.","Slack App Token \u5FC5\u987B\u4EE5 xapp- \u5F00\u5934\u3002":"The Slack App Token must start with xapp-.","Slack Bot Token \u6CA1\u6709\u8FD4\u56DE\u5B8C\u6574\u7684\u673A\u5668\u4EBA\u8EAB\u4EFD\u3002":"The Slack Bot Token did not return a complete bot identity.","Slack App Token \u65E0\u6CD5\u521B\u5EFA Socket Mode \u8FDE\u63A5\uFF0C\u8BF7\u786E\u8BA4\u5DF2\u542F\u7528 Socket Mode \u548C connections:write\u3002":"The Slack App Token could not create a Socket Mode connection. Make sure Socket Mode and connections:write are enabled."};var IH={\u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD:"Start a brand-new Session",\u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587:"Compact the earlier context of the current Session",\u5207\u6362\u5DE5\u4F5C\u533A:"Switch Workspace",\u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84:"List Workspace absolute paths","\u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"List Session IDs and titles",\u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD:"Bind the current chat to a specific Session",\u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B:"List all available models by number",\u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B:"View or switch the model of the current Session","\u5217\u51FA\u53EF\u7528 Agent Preset":"List available Agent Presets","\u67E5\u770B\u6216\u8BBE\u7F6E\u65B0\u4F1A\u8BDD Agent Preset":"View or set the Agent Preset for new Sessions",\u505C\u6B62\u5F53\u524D\u4EFB\u52A1:"Stop the current task",\u7EA0\u504F\u5F53\u524D\u4EFB\u52A1:"Steer the current task",\u68C0\u67E5\u8FDE\u63A5\u72B6\u6001:"Check connection status",\u67E5\u770B\u63D2\u4EF6\u7248\u672C:"Show plugin version",\u663E\u793A\u5E2E\u52A9:"Show help","\u8BE5 Telegram \u673A\u5668\u4EBA\u5DF2\u914D\u7F6E Webhook\uFF0C\u8BF7\u5148\u5728\u539F\u670D\u52A1\u4E2D\u79FB\u9664 Webhook \u540E\u91CD\u8BD5\u3002":"This Telegram bot already has a Webhook configured. Remove the Webhook from the original service and try again.",Telegram\u673A\u5668\u4EBA:"Telegram Bot"," Bot API \u957F\u8F6E\u8BE2":" Bot API long polling"};var lH={"Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002":"The Discord Bot Token is invalid. Please enter it again.","Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002":"The Discord Gateway Intents are misconfigured. Please check the Bot settings in the Developer Portal.",Discord\u673A\u5668\u4EBA:"Discord Bot"," Gateway \u957F\u8FDE\u63A5":" Gateway long-lived connection"};var pH={"WhatsApp \u5173\u8054\u8BBE\u5907\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WhatsApp linked device is no longer valid. Remove it and scan the QR code again.","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WhatsApp connection is not ready yet; the plugin will retry automatically.","WhatsApp \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WhatsApp connection is still not ready. Please try again later.",WhatsApp\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The WhatsApp bot is not connected yet",WhatsApp\u673A\u5668\u4EBA:"WhatsApp bot","WhatsApp Web \u5173\u8054\u8BBE\u5907\u8FD0\u884C\u6B63\u5E38":"The WhatsApp Web linked device is working normally","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA":"The WhatsApp connection is not ready","WhatsApp \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The WhatsApp connection is currently offline","WhatsApp \u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"WhatsApp is linked, but the messaging connection is not ready yet.","WhatsApp \u5DF2\u626B\u7801\uFF0C\u4F46\u65E0\u6CD5\u4FDD\u5B58\u5173\u8054\u8BBE\u5907\u3002":"The QR code was scanned, but the linked device could not be saved.","\u65E0\u6CD5\u8FDE\u63A5 WhatsApp\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"Unable to connect to WhatsApp. Please generate a new QR code.",WhatsApp\u8D26\u53F7:"WhatsApp account"," Web \u5173\u8054\u8BBE\u5907":" Web linked device"};var dH={"AI Office \u62D2\u7EDD\u4E86 Device Token\u3002":"AI Office rejected the Device Token.","AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002":"The AI Office Connector Hook is not ready yet.","AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002":"The AI Office Connector protocol version is incompatible.","\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002":"This machine cannot reach AI Office right now.","AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002":"The AI Office connection was interrupted.","\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002":"The local Harness stopped this run.","Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002":"The Office Job has already been claimed, cancelled, or finished.","\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The local Harness could not complete the task; check the Harness Session and try again.","Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002":"The Office Job references a Workspace/Preset alias that is not configured locally.","\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002":"You are continuing an AI Office task inside the local DeepSeek Harness.","\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002":"Act only within the current Workspace. When finished you must return: a result summary, changed files, verification evidence, and unresolved risks.","## \u672C\u673A Instruction Preset":"## Local Instruction Preset","## \u672C\u8F6E\u8865\u5145\u6307\u4EE4":"## Additional Instructions for This Round","## Office \u65F6\u95F4\u7EBF":"## Office Timeline","\u6279\u51C6 {tool}":"Approve {tool}","Harness \u5DE5\u5177":"Harness tool","Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F":"Harness needs {count} pieces of additional information","\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}":"Job claimed; preparing Workspace alias: {alias}","Harness Session \u5DF2\u521B\u5EFA\u3002":"Harness Session created.","\u6B63\u5728\u4F7F\u7528 {tool}\u2026":"Using {tool}\u2026"};var hH=Object.freeze(Object.assign({},tH,rH,aH,iH,oH,nH,sH,gH,cH,IH,lH,pH,dH));var EH="zh";function CH(n){let t=typeof n=="string"?n.trim().toLowerCase():"";EH=t==="english"||/^en(?:[-_].*)?$/u.test(t)?"en":"zh"}function D(n,t){if(typeof n!="string")return n;let o=EH==="en"?hH[n]??n:n;return t==null?o:o.replace(/\{(\w+)\}/g,(i,e)=>Object.hasOwn(t,e)?String(t[e]):i)}var bb=Object.freeze({version:1,bots:Object.freeze([])}),Sge=new Set(["clientId","secretRef","approvedSenders"]);function Zo(n){return typeof n=="string"&&n.trim()?n.trim():null}function Dge(n){return uge("sha256").update(n).digest("hex")}function fH(n){let t=Zo(n);return t&&/^dt_[a-f0-9]{24}$/.test(t)?t:null}function wge(n){let t=Zo(n);return t&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(t)?t:null}function Oge(n){let t=Zo(n);return t&&/^dt_sender_[a-f0-9]{32}$/.test(t)?t:null}function bge(n){let t=typeof n=="string"?{staffId:n}:n;if(!t||typeof t!="object"||Array.isArray(t))return null;let o=Oge(t.senderKey),i=Zo(t.staffId);return!o||!i?null:Object.freeze({senderKey:o,staffId:i,displayName:Zo(t.displayName),approvedAt:Zo(t.approvedAt)})}function Mge(n){if(!Array.isArray(n))return null;let t=n.map(bge);if(t.some(e=>e===null))return null;let o=new Set,i=new Set;for(let e of t){if(o.has(e.staffId)||i.has(e.senderKey))return null;o.add(e.staffId),i.add(e.senderKey)}return Object.freeze(t)}function hf(n){let t=Zo(n);if(!t)throw new TypeError("clientId is required");let o=Dge(t).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function QH(){return`dt_sender_${BH().replaceAll("-","")}`}function Mb(n){return Zo(n)?D("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):D("\u9489\u9489\u7528\u6237")}function _b(n){let t=Zo(n);return t?t.length<=8?`${t.slice(0,2)}\u2022\u2022\u2022\u2022`:`${t.slice(0,4)}\u2022\u2022\u2022\u2022${t.slice(-4)}`:D("\u9489\u9489\u673A\u5668\u4EBA")}function yH(n,{stored:t=!1}={}){if(!n||typeof n!="object"||Array.isArray(n)||"clientSecret"in n||"client_secret"in n||"deviceCode"in n||t&&Object.keys(n).some(r=>!Sge.has(r)))return null;let o=Zo(n.clientId),i=wge(n.secretRef),e=Mge(n.approvedSenders??[]);if(!o||!i||!e)return null;let a=hf(o);return a.secretRef!==i||(n.botId===void 0?a.botId:fH(n.botId))!==a.botId?null:Object.freeze({botId:a.botId,clientId:o,secretRef:i,approvedSenders:e})}function _ge(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let t=n.bots.map(a=>yH(a,{stored:!0}));if(t.some(a=>a===null))return null;let o=new Set,i=new Set,e=new Set;for(let a of t){if(o.has(a.botId)||i.has(a.clientId)||e.has(a.secretRef))return null;o.add(a.botId),i.add(a.clientId),e.add(a.secretRef)}return Object.freeze({version:1,bots:Object.freeze(t)})}function Tge(n){return{version:1,bots:n.bots.map(t=>({clientId:t.clientId,secretRef:t.secretRef,approvedSenders:t.approvedSenders.map(o=>({senderKey:o.senderKey,staffId:o.staffId,displayName:o.displayName,approvedAt:o.approvedAt}))}))}}var df=class{#e;#A=bb;#t=Promise.resolve();constructor(t){if(!Zo(t))throw new TypeError("config path is required");this.#e=t}async load(){try{let t=_ge(JSON.parse(await fge(this.#e,"utf8")));if(!t)throw new Error("dsh-dingtalk config contains invalid bot data");this.#A=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=bb}return this}list(){return structuredClone(this.#A.bots)}get(t){let o=this.#A.bots.find(i=>i.botId===t);return o?structuredClone(o):null}getByClientId(t){let o=this.#A.bots.find(i=>i.clientId===t);return o?structuredClone(o):null}async save(t){let o=yH(t);if(!o)throw new Error("Refusing to persist invalid dsh-dingtalk bot data");return this.#r(i=>{if(i.find(A=>(A.clientId===o.clientId||A.secretRef===o.secretRef)&&A.botId!==o.botId))throw new Error("Duplicate DingTalk bot identity");let a=i.findIndex(A=>A.botId===o.botId);return a===-1?i.push(o):i[a]=o,structuredClone(o)})}async remove(t){if(!fH(t))throw new TypeError("Invalid DingTalk bot id");return this.#r(o=>{let i=o.findIndex(a=>a.botId===t);if(i===-1)return null;let[e]=o.splice(i,1);return structuredClone(e)})}async clear(){let t=this.#t.then(async()=>{try{await uH(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=bb});this.#t=t.then(()=>{},()=>{}),await t}async#r(t){let o,i=this.#t.then(async()=>{let e=[...this.#A.bots];o=t(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#a(a),this.#A=a});return this.#t=i.then(()=>{},()=>{}),await i,o}async#a(t){await Bge(mge(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${BH()}.tmp`;try{await yge(o,`${JSON.stringify(Tge(t),null,2)} -`,{encoding:"utf8",flag:"wx",mode:384}),await Qge(o,this.#e)}catch(i){try{await uH(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([i,e])}throw i}}};var SH="https://oapi.dingtalk.com",Nge="DING_DWS_CLAW";function Xo(n){return typeof n=="string"&&n.trim()?n.trim():null}function mH(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function Rge(n){let t;try{t=new URL(Xo(n)??SH)}catch{throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL")}let o=t.hostname==="dingtalk.com"||t.hostname.endsWith(".dingtalk.com");if(t.protocol!=="https:"||t.port||!o||t.username||t.password||t.search||t.hash)throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL");return t.pathname=t.pathname.replace(/\/+$/,""),t.href.replace(/\/$/,"")}function kge(n){let t=typeof n?.now=="function"?n.now():n();if(!Number.isFinite(t))throw new TypeError("clock must return a finite timestamp");return t}function vge(n,t){if(!n||typeof n!="object"||Array.isArray(n))throw new _n("invalid-response",`DingTalk ${t} returned an invalid response`,t);if(Number(n.errcode)!==0)throw new _n("api-error",`DingTalk ${t} request was rejected`,t);return n}var _n=class extends Error{constructor(t,o,i,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=t,this.action=i}},Ef=class{#e;#A;#t;#r;constructor({fetch:t=globalThis.fetch,clock:o=Date,baseUrl:i=SH,timeoutMs:e=15e3}={}){if(typeof t!="function")throw new TypeError("fetch is required");if(typeof o!="function"&&typeof o?.now!="function")throw new TypeError("clock must be a function or expose now()");if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive number");this.#e=t,this.#A=o,this.#t=Rge(i),this.#r=e}async start({signal:t}={}){let o=await this.#a("/app/registration/init",{source:Nge},"initialization",t),i=Xo(o.nonce);if(!i)throw new _n("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#a("/app/registration/begin",{nonce:i},"begin",t),a=Xo(e.device_code),A=Xo(e.verification_uri_complete);if(!a||!A)throw new _n("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=mH(e.expires_in,7200),s=mH(e.interval,5)*1e3;return Object.freeze({deviceCode:a,verificationUrl:A,verificationUri:Xo(e.verification_uri),userCode:Xo(e.user_code),expiresAt:kge(this.#A)+r*1e3,pollIntervalMs:s})}async poll(t){let o=Xo(typeof t=="string"?t:t?.deviceCode),i=typeof t=="object"?t?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#a("/app/registration/poll",{device_code:o},"poll",i),a=Xo(e.status)?.toUpperCase(),A=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(a)?a:"UNKNOWN";return Object.freeze({status:A,clientId:Xo(e.client_id),clientSecret:Xo(e.client_secret),failReason:Xo(e.fail_reason)})}async#a(t,o,i,e){let a,A=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,A]):A;try{a=await this.#e(`${this.#t}${t}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:r})}catch(g){throw e?.aborted?e.reason??g:A.aborted?new _n("timeout",`DingTalk ${i} request timed out`,i,{cause:g}):g?.name==="AbortError"?g:new _n("network-error",`DingTalk ${i} request could not be completed`,i,{cause:g})}if(!a||a.ok===!1||typeof a.json!="function")throw new _n("http-error",`DingTalk ${i} request failed`,i);let s;try{s=await a.json()}catch(g){throw new _n("invalid-json",`DingTalk ${i} returned invalid JSON`,i,{cause:g})}return vge(s,i)}};import{randomUUID as jge}from"node:crypto";var DH=new WeakMap,Tb=Symbol("dsh-im.connection-test-state-identity");function wH(n){return n?.[Tb]??n}function Pge(n){return typeof n=="string"&&n.trim()?n.trim():null}function so(n,t){if(!n||!t||typeof t!="object")return!1;try{return DH.set(wH(n),structuredClone(t)),!0}catch{return!1}}function Jh(n){let t=n?DH.get(wH(n)):null;return t?structuredClone(t):null}function Sa(n,t=D("\u673A\u5668\u4EBA")){let o=Pge(n)??t;return`${D("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")} -${D("\u8FD9\u6761\u6D88\u606F\u7531\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u4E2D\u7684\u201C{name}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002",{name:o})}`}function Ir(n=D("\u673A\u5668\u4EBA")){let t=new Error(D("{channelLabel}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002",{channelLabel:n}));return t.code="test-target-unavailable",t}async function Pg({state:n,send:t,text:o,channelLabel:i}){let e=Jh(n);if(!e)throw Ir(i);return await t(e,o),{sent:!0}}function rr(n){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed"}:{sent:!0})}import{randomUUID as Gge}from"node:crypto";var Fge=Object.freeze({AUTH:"MODEL_AUTH",MISSING_CREDENTIAL:"MODEL_AUTH",INVALID_CREDENTIAL:"MODEL_AUTH",QUOTA:"MODEL_QUOTA",RATE_LIMIT:"MODEL_RATE_LIMIT",CONTEXT_WINDOW_EXCEEDED:"MODEL_CONTEXT_LIMIT",UNKNOWN_MODEL:"MODEL_UNAVAILABLE",NO_ADAPTER:"MODEL_UNAVAILABLE",UNSUPPORTED_OPTION:"MODEL_CONFIG",UNSUPPORTED_REASONING_EFFORT:"MODEL_CONFIG",TIMEOUT:"MODEL_TIMEOUT",TRANSPORT:"MODEL_TRANSPORT",SERVER:"MODEL_SERVICE",STREAM_CLOSED:"MODEL_STREAM",MALFORMED_RESPONSE:"MODEL_STREAM",EMPTY_RESPONSE:"MODEL_EMPTY_REPLY",CONTENT_FILTER:"MODEL_CONTENT_REJECTED",UNSUPPORTED_CONTENT:"MODEL_CONFIG"}),Lge=Object.freeze({HARNESS_CONNECT:"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002",HARNESS_TIMEOUT:"\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",HARNESS_RESULT_UNCERTAIN:"\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",HARNESS_ACCESS:"\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",HARNESS_PROTOCOL:"\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002",HARNESS_SERVICE:"DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_REPLY_TIMEOUT:"\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",MODEL_AUTH:"\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",MODEL_QUOTA:"\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002",MODEL_RATE_LIMIT:"\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_CONTEXT_LIMIT:"\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002",MODEL_UNAVAILABLE:"\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u5E76\u4F7F\u7528 /model \u91CD\u65B0\u9009\u62E9\u3002",MODEL_CONFIG:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002",MODEL_TIMEOUT:"\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_TRANSPORT:"\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_SERVICE:"\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_STREAM:"\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",MODEL_EMPTY_REPLY:"\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002",MODEL_CONTENT_REJECTED:"\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002",MODEL_OUTPUT_LIMIT:"\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002",TURN_BLOCKED:"\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\u3002",TURN_INTERRUPTED:"\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",SESSION_NOT_FOUND:"\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002",SESSION_BUSY:"\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002",SESSION_STALE:"\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002",WORKSPACE_UNAVAILABLE:"\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002",PRESET_UNAVAILABLE:"\u5F53\u524D Agent Preset \u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u540E\u91CD\u65B0\u9009\u62E9\u3002",CHANNEL_PERMISSION:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002",CHANNEL_RATE_LIMIT:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",CHANNEL_DELIVERY_UNCERTAIN:"\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",CHANNEL_DELIVERY:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",INPUT_INVALID:"\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002",INTERNAL_UNKNOWN:"\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002"});function Uge(n){if(n?.code!=="harness-turn-failed")return null;let t=n?.providerCode??n?.details?.providerCode;return typeof t!="string"?null:Fge[t.trim().toUpperCase()]??null}function Hge(n){let t=typeof n?.code=="string"?n.code:"",o=Uge(n);if(o)return o;if(t==="harness-connect-failed")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_CONNECT";if(t==="harness-timeout")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_TIMEOUT";if(t==="harness-reply-timeout")return"MODEL_REPLY_TIMEOUT";if(["harness-auth-required","harness-proxy-auth-required","harness-loopback-forbidden","harness-host-untrusted","harness-request-forbidden"].includes(t))return"HARNESS_ACCESS";if(["harness-api-not-found","harness-response-invalid"].includes(t))return"HARNESS_PROTOCOL";if(t==="harness-turn-failed")return"INTERNAL_UNKNOWN";if(["harness-http-failed","harness-rpc-rejected"].includes(t))return"HARNESS_SERVICE";if(t==="model-empty-response")return"MODEL_EMPTY_REPLY";if(t==="model-max-tokens")return"MODEL_OUTPUT_LIMIT";if(t==="turn-blocked")return"TURN_BLOCKED";if(["turn-interrupted","turn-aborted"].includes(t))return"TURN_INTERRUPTED";if(t==="session-not-found")return"SESSION_NOT_FOUND";if(t==="agent-busy")return"SESSION_BUSY";if(t==="workspace-session-stale")return"SESSION_STALE";if(t.startsWith("workspace-"))return"WORKSPACE_UNAVAILABLE";if(t.startsWith("agent-preset-"))return"PRESET_UNAVAILABLE";if(t.startsWith("image-")||t.startsWith("inbound-file-")||t==="attachment-error")return"INPUT_INVALID";let i=Number(n?.status??n?.httpStatus);return i===401||i===403||["channel-permission","permission-required","artifact-permission-required","forbidden","stale-token"].includes(t)?"CHANNEL_PERMISSION":i===429||["channel-rate-limit","rate-limited","artifact-rate-limited"].includes(t)?"CHANNEL_RATE_LIMIT":["channel-delivery-uncertain","delivery-uncertain","artifact-delivery-uncertain"].includes(t)?"CHANNEL_DELIVERY_UNCERTAIN":t==="channel-delivery-failed"||t.startsWith("artifact-")||["network-error","timeout"].includes(t)?"CHANNEL_DELIVERY":"INTERNAL_UNKNOWN"}function Kge(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${Gge().slice(0,8).toUpperCase()}`}function xge(n){return typeof n!="string"||!/^[A-Za-z0-9_-]{1,64}$/u.test(n)?null:n.toUpperCase().replaceAll("-","_")}function Yge(n,{userMessage:t,reason:o,referenceId:i,at:e=Date.now()}={}){let a=xge(o),A=Hge(n),r=A==="INTERNAL_UNKNOWN"&&a&&typeof t=="string"&&t.trim()?"INPUT_INVALID":A;return Object.freeze({code:r,reason:a??r,message:typeof t=="string"&&t.trim()?t.trim():D(Lge[r]),referenceId:Kge(i),at:Number.isFinite(e)?e:Date.now()})}function dt(n){return`${n.message} +**{total}** sessions in total{paging}`,"\uFF08\u7B2C {page}/{pageCount} \u9875\uFF09":" (page {page}/{pageCount})","\u2B50\u53D6\u5173":"\u2B50 Unwatch","\u2B50\u5173\u6CE8":"\u2B50 Watch","\u25C0 \u4E0A\u4E00\u9875":"\u25C0 Previous","\u4E0B\u4E00\u9875 \u25B6":"Next \u25B6","\u56DE\u590D\u6570\u5B57\uFF081~N\uFF09\u7ED1\u5B9A\u672C\u9875\u4F1A\u8BDD\u3002":"Reply with a number (1\u2013N) to bind a session on this page.","\u{1F4C2} \u4F1A\u8BDD\u5217\u8868":"\u{1F4C2} Session list","\u5F53\u524D Host \u4E0A\u6CA1\u6709\u5DF2\u767B\u8BB0\u7684\u5DE5\u4F5C\u533A\u3002":"No workspaces are registered on the current Host.","\u56DE\u590D\u6570\u5B57\u5207\u6362\u5DE5\u4F5C\u533A\uFF0C\u6216\u70B9\u51FB\u6309\u94AE\uFF1A":"Reply with a number to switch workspaces, or tap a button:","\u{1F5C2} \u5DE5\u4F5C\u533A":"\u{1F5C2} Workspace","\u{1F916} \u52A9\u624B\u83DC\u5355\uFF08\u56DE\u590D\u6570\u5B57\u5373\u53EF\uFF0C\u65E0\u9700\u8BB0\u547D\u4EE4\uFF09":"\u{1F916} Assistant menu (reply with a number \u2014 no need to memorize commands)","1 \xB7 /sessionlist \u5217\u51FA\u4F1A\u8BDD\uFF08\u56DE\u590D\u6570\u5B57\u7ED1\u5B9A\uFF09":"1 \xB7 /sessionlist List sessions (reply with a number to bind)","2 \xB7 /workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\uFF08\u56DE\u590D\u6570\u5B57\u5207\u6362\uFF09":"2 \xB7 /workspacelist List workspaces (reply with a number to switch)","3 \xB7 /new \u5F00\u542F\u65B0\u4F1A\u8BDD":"3 \xB7 /new Start a new session","4 \xB7 /status \u8FDE\u63A5\u72B6\u6001":"4 \xB7 /status Connection status","5 \xB7 /help \u672C\u5E2E\u52A9":"5 \xB7 /help This help","6 \xB7 /repair \u8865\u5168\u6743\u9650\u4E0E\u56DE\u8C03\uFF08\u8BF7\u56DE\u590D\u6570\u5B57 6\uFF09":"6 \xB7 /repair Complete permissions and callback (reply with the number 6)","7 \xB7 /watchlist \u5173\u6CE8\u5217\u8868":"7 \xB7 /watchlist Watch list","\u76F4\u63A5\u53D1\u9001\u6587\u5B57/\u56FE\u7247\u5373\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002":"Send text or an image directly to continue the current session.","/session ID \u6216\u5E8F\u53F7 \u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD":"/session ID or index Bind an existing session","/watch ID \u6216\u5E8F\u53F7 \u5173\u6CE8\u4F1A\u8BDD\uFF08\u5B8C\u6210\u540E\u63A8\u9001\uFF09":"/watch ID or index Watch a session (push when done)","/compact \u538B\u7F29\u4E0A\u4E0B\u6587":"/compact Compact the context","/workspace \u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A":"/workspace Switch workspace","/presetlist \u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist List available Agent Presets","\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\uFF0C\u56DE\u590D\u6570\u5B57\u6216\u70B9\u6309\u94AE\u53D6\u6D88\u5173\u6CE8\uFF1A":"Completion is pushed automatically. Reply with a number or tap a button to unwatch:","\u{1F441} \u5173\u6CE8\u5217\u8868":"\u{1F441} Watch list","\u2B50 \u53D6\u6D88\u5173\u6CE8":"\u2B50 Unwatch","\u2606 \u5173\u6CE8":"\u2606 Watch","\u{1F50D} \u5173\u6CE8\u5217\u8868":"\u{1F50D} Watch list",\u52FE\u9009\u8981\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to watch",\u52FE\u9009\u8981\u53D6\u6D88\u5173\u6CE8\u7684\u4F1A\u8BDD:"Select sessions to unwatch","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u7ED3\u679C\u3002":"No sessions are being watched. Results are pushed automatically when tasks complete.","\u5F53\u524D\u5173\u6CE8 **{count}** \u4E2A\u4F1A\u8BDD\uFF1A":"Currently watching **{count}** sessions:","**\u2795 \u6DFB\u52A0\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2795 Add watch** (select from the multi-select dropdown)","**\u2796 \u53D6\u6D88\u5173\u6CE8**\uFF08\u591A\u9009\u4E0B\u62C9\u52FE\u9009\uFF09":"**\u2796 Remove watch** (select from the multi-select dropdown)","\u{1F4CB} \u4F1A\u8BDD\u5217\u8868":"\u{1F4CB} Session list","\u{1F519} \u8FD4\u56DE\u83DC\u5355":"\u{1F519} Back to menu",\u5DF2\u5B8C\u6210:"Completed",\u5DF2\u505C\u6B62:"Stopped",\u5DF2\u4E2D\u6B62:"Aborted",\u5DF2\u53D6\u6D88:"Cancelled",\u5DF2\u7ED3\u675F:"Ended","\u2705 \u4EFB\u52A1\u5B8C\u6210":"\u2705 Task complete","**\u72B6\u6001**\uFF1A{reason}":"**Status**: {reason}",\u6253\u5F00\u4F1A\u8BDD\u5217\u8868:"Open session list",\u5DE5\u4F5C\u533A:"Workspace","\u7ED1\u5B9A\u8BE5\u4F1A\u8BDD\u540E\u53EF\u7EE7\u7EED\u8FFD\u95EE\uFF0C\u8F93\u5165\u6587\u5B57\u5373\u53EF\u3002":"After binding this session you can keep asking; just type a message.","\u5F53\u524D\u6CA1\u6709\u5173\u6CE8\u7684\u4F1A\u8BDD\u3002\n`/watch ` \u5173\u6CE8\u540E\uFF0C\u4EFB\u52A1\u5B8C\u6210\u4F1A\u81EA\u52A8\u63A8\u9001\u3002":"No sessions are being watched.\nWatch one with `/watch ` and completion is pushed automatically.","\u6B63\u5728\u751F\u6210\u2026":"Generating\u2026",\u56DE\u7B54\u5B8C\u6210:"Answer complete",\u98DE\u4E66\u673A\u5668\u4EBA:"Feishu bot","\u98DE\u4E66\u673A\u5668\u4EBA\u7F3A\u5C11\u56FE\u7247\u8BFB\u53D6\u6743\u9650 im:message:readonly\uFF08\u98DE\u4E66\u663E\u793A\u4E3A\u201C\u83B7\u53D6\u5355\u804A\u3001\u7FA4\u7EC4\u6D88\u606F\u201D\uFF09\u3002\u8BF7\u79C1\u804A\u673A\u5668\u4EBA\u6267\u884C /repair \u547D\u4EE4\uFF0C\u6216\u8005\u5728\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u70B9\u51FB\u201C\u8865\u5168\u6743\u9650\u201D\u6309\u94AE\u5E76\u626B\u7801\u3002\u6309\u98DE\u4E66\u63D0\u793A\u53D1\u5E03\u65B0\u7248\u672C\u3001\u5B8C\u6210\u5FC5\u8981\u5BA1\u6279\u540E\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"The Feishu bot is missing the image-read scope im:message:readonly, shown by Feishu as \u201CRead direct and group messages.\u201D Run /repair in a direct chat with the bot, or click the \u201CComplete permissions\u201D button on the IM Bot settings page and scan the QR code. Publish a new version and complete any approval requested by Feishu, then resend the image.","\u2705 \u4FEE\u590D\u5B8C\u6210\uFF1A\u5DF2\u5B9E\u6D4B\u6536\u5230 card.action.trigger\uFF0C\u83DC\u5355\u6309\u94AE\u73B0\u5728\u53EF\u7528\u3002":"\u2705 Repair complete: card.action.trigger was received in a real test; the menu buttons now work.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u8D85\u65F6\uFF1A\u672A\u6536\u5230\u6D4B\u8BD5\u5361\u6309\u94AE\u7684 card.action.trigger\uFF0C\u4E0D\u80FD\u786E\u8BA4\u6309\u94AE\u5DF2\u4FEE\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u98DE\u4E66\u5F00\u653E\u5E73\u53F0\u7684\u5361\u7247\u56DE\u8C03\u914D\u7F6E\uFF0C\u786E\u8BA4\u540E\u518D\u53D1\u9001 /repair\u3002":"\u26A0\uFE0F Repair verification timed out: no card.action.trigger from the test card button was received, so the buttons cannot be confirmed repaired. Do not authorize again; check the card-callback configuration in Feishu Open Platform first, then send /repair.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u5931\u8D25\uFF1A\u65E0\u6CD5\u53D1\u9001\u4E13\u7528\u6D4B\u8BD5\u5361\uFF0C\u4E0D\u80FD\u786E\u8BA4 card.action.trigger \u5DF2\u6062\u590D\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u68C0\u67E5\u673A\u5668\u4EBA\u6D88\u606F\u6743\u9650\u548C\u8FDE\u63A5\u72B6\u6001\u3002":"\u26A0\uFE0F Repair verification failed: the dedicated test card could not be sent, so card.action.trigger cannot be confirmed restored. Do not authorize again; check the bot message permission and connection status first.","\u26A0\uFE0F \u4FEE\u590D\u9A8C\u8BC1\u4E2D\u65AD\uFF1ARuntime \u5DF2\u505C\u6B62\uFF0C\u672A\u5B8C\u6210 card.action.trigger \u5B9E\u6D4B\uFF0C\u4E0D\u80FD\u786E\u8BA4\u4FEE\u590D\u6210\u529F\u3002\u8BF7\u4E0D\u8981\u91CD\u590D\u6388\u6743\uFF1B\u5148\u7B49\u5F85\u673A\u5668\u4EBA\u6062\u590D\u8FDE\u63A5\u3002":"\u26A0\uFE0F Repair verification interrupted: the Runtime stopped before the card.action.trigger test completed, so the repair cannot be confirmed. Do not authorize again; wait for the bot to reconnect."};var MH={"\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026":"Connected to DeepSeek Harness, thinking\u2026","\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The DingTalk bot is connected to DeepSeek Harness.","\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002":`DingTalk could not provide the image download address. Please resend; if it keeps failing, check the bot's "Send messages as an internal robot" permission.`,"\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"DingTalk did not return an image download address. Please resend.","\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002":"The temporary image address returned by DingTalk could not be read. Please resend.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002":'Delivery of the result file "{name}" could not be confirmed. Please check whether it already arrived in the chat before retrying.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002":`Result file "{name}" was generated, but the DingTalk app or bot lacks file message permission. Enable the app's qyapi_base permission and make sure the bot can send file messages.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'Result file "{name}" exceeds the file size limit of the current DingTalk bot and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was rate-limited by DingTalk and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002":`Result file "{name}" was generated, but DingTalk rejected the file message. Check the file type and the bot's file message configuration.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'Result file "{name}" was generated but could not be sent via DingTalk right now. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002":"The result file has been generated.","\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The DingTalk bot is connected to DeepSeek Harness normally.","\u9489\u9489\u547D\u4EE4\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk command.","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002":"The DingTalk message has no safe reply address.","\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk approval.","\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002":"Failed to process the DingTalk message.","\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002":"Invalid DingTalk message format.","\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the DingTalk interaction question.",\u9489\u9489\u7528\u6237:"DingTalk user",\u9489\u9489\u673A\u5668\u4EBA:"DingTalk bot",\u8EAB\u4EFD\u5DF2\u9690\u85CF:"Identity hidden","\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The DingTalk bot credentials are missing. Remove the bot and scan the QR code again.","\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is not ready. Please try again later.","\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The DingTalk connection is still not ready. Please try again later.","\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002":"QR code setup has been cancelled.","\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Could not generate the DingTalk QR code. Please try again later.","\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The QR code has expired. Generate a new one.","\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"DingTalk is connected, but the message connection is not ready yet. Please try again later.","\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002":"DingTalk did not complete the bot authorization. Please scan the QR code again.","\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization status is temporarily unavailable. Retrying.","\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"DingTalk authorization succeeded, but the configuration could not be saved safely.","\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002":"The DingTalk authorization query failed temporarily. Retrying.","\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09":"DingTalk bot ({clientId})","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The DingTalk Stream message connection is running normally",\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The DingTalk message connection is currently offline"};var _H={"\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The Enterprise WeChat bot is connected to DeepSeek Harness.","\u5F53\u524D\u5F85\u5904\u7406\u56FE\u7247\u8F83\u591A\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u53D1\u9001\u3002":"Too many images are pending. Please send them again later.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u667A\u80FD\u673A\u5668\u4EBA\u7F3A\u5C11\u7D20\u6750\u4E0A\u4F20\u6216\u6587\u4EF6\u6D88\u606F\u80FD\u529B\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6743\u9650\u3002":'The result file "{name}" was generated, but the Enterprise WeChat bot lacks media upload or file message capability. Please check the bot permissions.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size this Enterprise WeChat bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u4F01\u4E1A\u5FAE\u4FE1\u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty. Enterprise WeChat does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u4F01\u4E1A\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was rate-limited by Enterprise WeChat and could not be sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u4F01\u4E1A\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but Enterprise WeChat rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u4F01\u4E1A\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via Enterprise WeChat right now. Please try again later.',"\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u6587\u672C\u3002":"The task completed, but no displayable text was generated.","\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u8BED\u97F3\u8F6C\u5199\u6D88\u606F\u3002":"Currently only text, images, and voice transcription messages are supported.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The connection between the Enterprise WeChat bot and DeepSeek Harness is working.","\u6B63\u5728\u601D\u8003\u4E2D\u2026":"Thinking\u2026","\u4F01\u4E1A\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the Enterprise WeChat interaction question.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The Enterprise WeChat bot credentials are missing. Please remove the bot and scan the QR code again.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is not ready. The plugin will retry automatically.","\u626B\u7801\u7ED1\u5B9A\u5DF2\u53D6\u6D88\u3002":"QR code binding has been cancelled.","\u65E0\u6CD5\u751F\u6210\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the Enterprise WeChat QR code. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002":"The Enterprise WeChat QR code has expired. Please generate a new one.","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Enterprise WeChat bot is bound, but the message connection is not ready yet.","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The Enterprise WeChat connection is still not ready. Please try again later.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u6CA1\u6709\u5B8C\u6210\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR scan was not completed. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The Enterprise WeChat QR service is temporarily unavailable. Please generate a new QR code.","\u4F01\u4E1A\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"Enterprise WeChat authorization succeeded, but the connection configuration could not be saved safely.",\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA:"Enterprise WeChat bot","\u4F01\u4E1A\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{botId}\uFF09":"Enterprise WeChat bot ({botId})","\u4F01\u4E1A\u5FAE\u4FE1 WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Enterprise WeChat WebSocket long connection is running normally","\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Enterprise WeChat connection is not ready. The plugin will retry automatically",\u4F01\u4E1A\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Enterprise WeChat connection is currently offline"};var TH={"QQ \u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"The QQ bot is connected to DeepSeek Harness.","\u56DE\u7B54\u8F83\u957F\uFF0C\u540E\u7EED\u5185\u5BB9\u672A\u80FD\u901A\u8FC7 QQ \u5B8C\u6574\u53D1\u9001\uFF0C\u8BF7\u56DE\u590D\u201C\u7EE7\u7EED\u201D\u3002":"The answer is long and the rest could not be sent fully through QQ. Reply \u201C\u7EE7\u7EED\u201D (continue) to receive it.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u4ECA\u65E5\u6587\u4EF6\u4E0A\u4F20\u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":`The result file "{name}" was generated, but QQ's daily file upload quota is used up. Please try again later.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D QQ \u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002":'The result file "{name}" was generated, but the current QQ bot does not have file message permission.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D QQ \u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size the current QQ bot can send and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0CQQ \u4E0D\u5141\u8BB8\u53D1\u9001\u7A7A\u6587\u4EF6\u3002":'The result file "{name}" is empty, and QQ does not allow sending empty files.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB QQ \u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by QQ and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 QQ \u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but QQ rejected the file or file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7 QQ \u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via QQ right now. Please try again later.',"QQ \u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"The QQ bot is connected to DeepSeek Harness normally.","QQ \u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the QQ interaction question.","QQ \u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The QQ bot credentials are missing. Remove the bot and scan the QR code again.","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The QQ connection is not ready; the plugin will retry automatically.","QQ \u626B\u7801\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The QQ QR service is temporarily unavailable. Please generate a new QR code.","\u65E0\u6CD5\u751F\u6210 QQ \u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the QQ QR code. Please try again later.","QQ \u673A\u5668\u4EBA\u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The QQ bot is bound, but the message connection is not ready yet.","QQ \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The QQ connection is still not ready. Please try again later.",QQ\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The QQ bot is not connected yet","QQ \u673A\u5668\u4EBA\uFF08{appId}\uFF09":"QQ bot ({appId})",QQ\u673A\u5668\u4EBA:"QQ bot","QQ WebSocket \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The QQ WebSocket long connection is running normally","QQ \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The QQ connection is not ready; the plugin will retry automatically","QQ \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The QQ connection is currently offline","QQ \u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002":"QQ authorization succeeded, but the connection configuration could not be saved safely."};var NH={"\u5FAE\u4FE1\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002":"WeChat is connected to DeepSeek Harness.","\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u673A\u5668\u4EBA\u5F53\u524D\u6CA1\u6709\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u80FD\u529B\u3002":`The result file "{name}" was generated, but the WeChat bot currently has no permission to send file messages. Please check the bot's file messaging capability.`,"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u5FAE\u4FE1\u4F1A\u8BDD\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002":'The result file "{name}" exceeds the file size limit of the current WeChat conversation and was not sent.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5FAE\u4FE1\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was temporarily rate-limited by WeChat and was not sent. Please try again later.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\u3002":'The result file "{name}" was generated, but WeChat rejected the file message.',"\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u5FAE\u4FE1\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":'The result file "{name}" was generated but could not be sent via WeChat right now. Please try again later.',"\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\uFF0C\u4EE5\u53CA\u5FAE\u4FE1\u5DF2\u8F6C\u6210\u6587\u5B57\u7684\u8BED\u97F3\u6D88\u606F\u3002":"Currently supports text, images, and voice messages that WeChat has converted to text.","\u5FAE\u4FE1\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002":"WeChat is connected to DeepSeek Harness normally.","\u5FAE\u4FE1\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002":"Failed to send the WeChat interaction question.","\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5FAE\u4FE1\u53D1\u9001\u5931\u8D25\uFF0C\u53EF\u80FD\u53EA\u6536\u5230\u90E8\u5206\u5185\u5BB9\u3002\u8BF7\u5C06\u4E0B\u9762\u7684\u8BCA\u65AD\u4FE1\u606F\u5B8C\u6574\u53CD\u9988\u7ED9\u7BA1\u7406\u5458\u3002":"The reply was generated, but WeChat delivery failed and only part of it may have arrived. Please send the complete diagnostic below to the administrator.","\u5FAE\u4FE1\u53D1\u9001\u8BCA\u65AD\uFF1A{diagnostic}":"WeChat delivery diagnostic: {diagnostic}","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u8BFB\u53D6\u73B0\u6709\u767B\u5F55\u51ED\u636E\u3002\u8BF7\u68C0\u67E5 DSH \u51ED\u636E\u5B58\u50A8\u3002":"WeChat was authorized, but the existing login credential could not be read. Please check the DSH credential store.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u767B\u5F55\u51ED\u636E\u65E0\u6CD5\u5199\u5165 DSH \u51ED\u636E\u5B58\u50A8\u3002\u8BF7\u68C0\u67E5\u51ED\u636E\u5B58\u50A8\u662F\u5426\u53EF\u5199\u3002":"WeChat was authorized, but the login credential could not be written to the DSH credential store. Please check that the credential store is writable.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u8D26\u53F7\u914D\u7F6E\u65E0\u6CD5\u5199\u5165\u672C\u673A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u76EE\u5F55\u6743\u9650\u3002":"WeChat was authorized, but the account configuration could not be written locally. Please check the DSH_HOME directory permissions.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u521D\u59CB\u5316\u8D26\u53F7\u72B6\u6001\u6216\u5DE5\u4F5C\u533A\u3002\u8BF7\u68C0\u67E5 DSH_HOME \u548C\u5DE5\u4F5C\u533A\u76EE\u5F55\u3002":"WeChat was authorized, but the account state or workspace could not be initialized. Please check DSH_HOME and the workspace directories.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002\u8BF7\u68C0\u67E5 dsh web \u5730\u5740\u548C\u7AEF\u53E3\u3002":"WeChat was authorized, but the plugin could not connect to the local Harness. Please check the dsh web address and port.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8D85\u65F6\u3002\u8BF7\u786E\u8BA4 dsh web \u672A\u963B\u585E\u3002":"WeChat was authorized, but the Harness health check timed out. Please confirm dsh web is not blocked.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u9700\u8981\u8EAB\u4EFD\u8BA4\u8BC1\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u3001\u7F51\u5173\u6216\u81EA\u5B9A\u4E49\u9274\u6743\u914D\u7F6E\u3002":"WeChat was authorized, but the Harness health check requires authentication. Please check proxy, gateway, or custom auth configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u672C\u673A Harness \u8BF7\u6C42\u88AB\u4EE3\u7406\u8981\u6C42\u8BA4\u8BC1\u3002\u8BF7\u8BA9\u56DE\u73AF\u5730\u5740\u7ED5\u8FC7\u4EE3\u7406\uFF0C\u5E76\u68C0\u67E5 NO_PROXY \u914D\u7F6E\u3002":"WeChat was authorized, but the local Harness request was challenged for proxy authentication. Please bypass the proxy for loopback addresses and check the NO_PROXY configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5F02\u5E38\u62D2\u7EDD\u4E86\u56DE\u73AF\u5730\u5740\u7684\u5065\u5EB7\u68C0\u67E5\u3002\u8BF7\u68C0\u67E5 HTTP \u4EE3\u7406\u3001Harness \u6E90\u7801\u7248\u672C\u548C\u6784\u5EFA\u4EA7\u7269\u3002":"WeChat was authorized, but Harness unexpectedly rejected the health check from a loopback address. Please check the HTTP proxy, Harness source version, and build artifacts.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u7684 Host \u4FE1\u4EFB\u68C0\u67E5\u62D2\u7EDD\u4E86\u975E\u56DE\u73AF\u5730\u5740\u8BF7\u6C42\u3002\u8BF7\u68C0\u67E5 harnessBaseUrl \u4E0E trustedHosts \u914D\u7F6E\u3002":"WeChat was authorized, but the Harness Host trust check rejected a non-loopback request. Please check the harnessBaseUrl and trustedHosts configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u5065\u5EB7\u68C0\u67E5\u6536\u5230\u4E86\u975E Harness \u6807\u51C6\u7684 403 \u62D2\u7EDD\u54CD\u5E94\u3002\u8BF7\u68C0\u67E5\u4EE3\u7406\u6216\u7F51\u5173\u914D\u7F6E\u3002":"WeChat was authorized, but the health check received a non-standard Harness 403 rejection. Please check the proxy or gateway configuration.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u627E\u4E0D\u5230 Harness \u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but the Harness health check endpoint was not found. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u8FD4\u56DE\u670D\u52A1\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check returned a server error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002\u8BF7\u786E\u8BA4 Harness \u4E0E\u63D2\u4EF6\u7248\u672C\u517C\u5BB9\u3002":"WeChat was authorized, but Harness returned an unrecognized response. Please confirm the Harness and plugin versions are compatible.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u62D2\u7EDD\u4E86\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but Harness rejected the health check request. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46 Harness \u5065\u5EB7\u68C0\u67E5\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but the Harness health check failed with an unknown error. Please check the dsh web logs.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u521D\u59CB\u5316\u5931\u8D25\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u540E\u91CD\u8BD5\u3002":"WeChat was authorized, but the message connection failed to initialize. Please check the dsh web logs and try again.","\u5FAE\u4FE1\u5DF2\u6388\u6743\uFF0C\u4F46\u6FC0\u6D3B\u8FC7\u7A0B\u4E2D\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u3002\u8BF7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"WeChat was authorized, but an unknown error occurred during activation. Please check the dsh web logs.","\u767B\u5F55\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The login credential is missing. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WeChat connection is not ready; the plugin will retry automatically.","\u5FAE\u4FE1\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The WeChat connection is not ready; the plugin will retry automatically","\u65E0\u6CD5\u751F\u6210\u5FAE\u4FE1\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"Unable to generate the WeChat QR code. Please try again later.","\u5FAE\u4FE1\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WeChat connection is still not ready. Please try again later.",\u5FAE\u4FE1\u673A\u5668\u4EBA:"WeChat Bot","\u5FAE\u4FE1\u673A\u5668\u4EBA\uFF08{name}\uFF09":"WeChat Bot ({name})",\u5FAE\u4FE1\u6D88\u606F\u957F\u8F6E\u8BE2\u8FD0\u884C\u6B63\u5E38:"WeChat message long-polling is running normally",\u5FAE\u4FE1\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The WeChat connection is currently offline","\u914D\u5BF9\u7801\u591A\u6B21\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"The pairing code was entered incorrectly too many times. Please generate a new QR code.","\u8BE5\u5FAE\u4FE1\u8D26\u53F7\u5DF2\u7ED1\u5B9A\uFF0C\u4F46\u672C\u673A\u6CA1\u6709\u53EF\u6062\u590D\u7684\u51ED\u636E\u3002":"This WeChat account is already bound, but no recoverable credential exists on this machine.","\u5FAE\u4FE1\u6388\u6743\u6210\u529F\uFF0C\u4F46\u8FD4\u56DE\u7684\u8D26\u53F7\u51ED\u636E\u4E0D\u5B8C\u6574\u3002":"WeChat authorization succeeded, but the returned account credential is incomplete.","\u5FAE\u4FE1\u767B\u5F55\u51ED\u636E\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u8D26\u53F7\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WeChat login credential has expired. Please remove the account and scan the QR code again.","\u5FAE\u4FE1\u6D88\u606F\u540C\u6B65\u8BF7\u6C42\u88AB\u62D2\u7EDD\u3002":"The WeChat message sync request was rejected.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u5BC6\u94A5\u65E0\u6548\u3002":"The encryption key of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u52A0\u5BC6\u6570\u636E\u65E0\u6548\u3002":"The encrypted data of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u89E3\u5BC6\u5931\u8D25\u3002":"Failed to decrypt the WeChat image.","\u5FAE\u4FE1\u56FE\u7247\u6CA1\u6709\u53EF\u7528\u7684\u4E0B\u8F7D\u5730\u5740\u3002":"The WeChat image has no usable download URL.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u65E0\u6548\u3002":"The download URL of the WeChat image is invalid.","\u5FAE\u4FE1\u56FE\u7247\u7684\u4E0B\u8F7D\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002":"The download URL of the WeChat image is not trusted.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an invalid connection URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u8FDE\u63A5\u5730\u5740\u3002":"The WeChat service returned an untrusted connection URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u626B\u7801\u5730\u5740\u3002":"The WeChat service did not return a QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an invalid QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u626B\u7801\u5730\u5740\u3002":"The WeChat service returned an untrusted QR-code URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an invalid file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u4E0D\u53D7\u4FE1\u4EFB\u7684\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service returned an untrusted file upload URL.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u6587\u4EF6\u4E0A\u4F20\u5730\u5740\u3002":"The WeChat service did not return a file upload URL.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u88AB\u62D2\u7EDD\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload was rejected (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat file upload failed (HTTP {status}).","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u54CD\u5E94\u7F3A\u5C11\u4E0B\u8F7D\u53C2\u6570\u3002":"The WeChat file upload response is missing the download parameter.","\u5FAE\u4FE1\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u3002":"The WeChat file upload failed.","\u62D2\u7EDD\u8BBF\u95EE\u4E0D\u53D7\u4FE1\u4EFB\u7684\u5FAE\u4FE1\u670D\u52A1\u5730\u5740\u3002":"Refusing to access an untrusted WeChat service URL.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP {status}\uFF09\u3002":"The WeChat service request failed (HTTP {status}).","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002":"The WeChat service returned an unparseable response.","\u5FAE\u4FE1\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002":"The WeChat service request timed out.","\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u5FAE\u4FE1\u670D\u52A1\u3002":"The WeChat service is temporarily unreachable.","\u5FAE\u4FE1\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u626B\u7801\u72B6\u6001\u3002":"The WeChat service returned an unrecognized QR-code status.","\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u4E8C\u7EF4\u7801\u4EE4\u724C\u3002":"The WeChat service did not return a QR-code token.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002":"The WeChat service rejected the reply message.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002":"The WeChat service rejected the file upload request.","\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002":"The WeChat service rejected the file message.","\u5FAE\u4FE1\u8D26\u53F7\u8FDE\u63A5\u542F\u52A8\u5931\u8D25\u3002":"Failed to start the WeChat account connection."};var RH={Slack\u673A\u5668\u4EBA:"Slack bot","Slack\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002":"Slack bot credentials are missing. Remove the bot and connect it again.","Slack Socket Mode \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The Slack Socket Mode connection is not ready yet. The plugin will retry automatically.","Slack\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0CSocket Mode \u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"The Slack bot is connected, but the Socket Mode connection is not ready yet.","Slack Socket Mode \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u68C0\u67E5\u4E24\u4E2A Token\u3002":"The Slack Socket Mode connection is still not ready. Check both tokens.",Slack\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The Slack bot is not connected yet","Slack Socket Mode \u957F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38":"The Slack Socket Mode long-lived connection is running normally","Slack\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5":"The Slack connection is not ready. The plugin will retry automatically",Slack\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF:"The Slack connection is currently offline","Slack \u672A\u6388\u6743\u673A\u5668\u4EBA\u8BFB\u53D6\u8BE5\u6587\u4EF6\u3002\u8BF7\u4E3A\u5E94\u7528\u6DFB\u52A0 files:read \u540E\u91CD\u65B0\u5B89\u88C5\uFF0C\u518D\u91CD\u65B0\u53D1\u9001\u56FE\u7247\u3002":"Slack has not granted the bot access to this file. Add the files:read scope to the app, reinstall it, then send the image again.","Slack Bot Token \u5FC5\u987B\u4EE5 xoxb- \u5F00\u5934\u3002":"The Slack Bot Token must start with xoxb-.","Slack App Token \u5FC5\u987B\u4EE5 xapp- \u5F00\u5934\u3002":"The Slack App Token must start with xapp-.","Slack Bot Token \u6CA1\u6709\u8FD4\u56DE\u5B8C\u6574\u7684\u673A\u5668\u4EBA\u8EAB\u4EFD\u3002":"The Slack Bot Token did not return a complete bot identity.","Slack App Token \u65E0\u6CD5\u521B\u5EFA Socket Mode \u8FDE\u63A5\uFF0C\u8BF7\u786E\u8BA4\u5DF2\u542F\u7528 Socket Mode \u548C connections:write\u3002":"The Slack App Token could not create a Socket Mode connection. Make sure Socket Mode and connections:write are enabled."};var kH={\u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD:"Start a brand-new Session",\u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587:"Compact the earlier context of the current Session",\u5207\u6362\u5DE5\u4F5C\u533A:"Switch Workspace",\u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84:"List Workspace absolute paths","\u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"List Session IDs and titles",\u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD:"Bind the current chat to a specific Session",\u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B:"List all available models by number",\u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B:"View or switch the model of the current Session","\u5217\u51FA\u53EF\u7528 Agent Preset":"List available Agent Presets","\u67E5\u770B\u6216\u8BBE\u7F6E\u65B0\u4F1A\u8BDD Agent Preset":"View or set the Agent Preset for new Sessions",\u505C\u6B62\u5F53\u524D\u4EFB\u52A1:"Stop the current task",\u7EA0\u504F\u5F53\u524D\u4EFB\u52A1:"Steer the current task",\u68C0\u67E5\u8FDE\u63A5\u72B6\u6001:"Check connection status",\u67E5\u770B\u63D2\u4EF6\u7248\u672C:"Show plugin version",\u663E\u793A\u5E2E\u52A9:"Show help","\u8BE5 Telegram \u673A\u5668\u4EBA\u5DF2\u914D\u7F6E Webhook\uFF0C\u8BF7\u5148\u5728\u539F\u670D\u52A1\u4E2D\u79FB\u9664 Webhook \u540E\u91CD\u8BD5\u3002":"This Telegram bot already has a Webhook configured. Remove the Webhook from the original service and try again.",Telegram\u673A\u5668\u4EBA:"Telegram Bot"," Bot API \u957F\u8F6E\u8BE2":" Bot API long polling"};var vH={"Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002":"The Discord Bot Token is invalid. Please enter it again.","Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002":"The Discord Gateway Intents are misconfigured. Please check the Bot settings in the Developer Portal.",Discord\u673A\u5668\u4EBA:"Discord Bot"," Gateway \u957F\u8FDE\u63A5":" Gateway long-lived connection"};var PH={"WhatsApp \u5173\u8054\u8BBE\u5907\u5DF2\u5931\u6548\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002":"The WhatsApp linked device is no longer valid. Remove it and scan the QR code again.","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002":"The WhatsApp connection is not ready yet; the plugin will retry automatically.","WhatsApp \u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002":"The WhatsApp connection is still not ready. Please try again later.",WhatsApp\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5:"The WhatsApp bot is not connected yet",WhatsApp\u673A\u5668\u4EBA:"WhatsApp bot","WhatsApp Web \u5173\u8054\u8BBE\u5907\u8FD0\u884C\u6B63\u5E38":"The WhatsApp Web linked device is working normally","WhatsApp \u8FDE\u63A5\u672A\u5C31\u7EEA":"The WhatsApp connection is not ready","WhatsApp \u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF":"The WhatsApp connection is currently offline","WhatsApp \u5DF2\u7ED1\u5B9A\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002":"WhatsApp is linked, but the messaging connection is not ready yet.","WhatsApp \u5DF2\u626B\u7801\uFF0C\u4F46\u65E0\u6CD5\u4FDD\u5B58\u5173\u8054\u8BBE\u5907\u3002":"The QR code was scanned, but the linked device could not be saved.","\u65E0\u6CD5\u8FDE\u63A5 WhatsApp\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u4E8C\u7EF4\u7801\u3002":"Unable to connect to WhatsApp. Please generate a new QR code.",WhatsApp\u8D26\u53F7:"WhatsApp account"," Web \u5173\u8054\u8BBE\u5907":" Web linked device"};var GH={"AI Office \u62D2\u7EDD\u4E86 Device Token\u3002":"AI Office rejected the Device Token.","AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002":"The AI Office Connector Hook is not ready yet.","AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002":"The AI Office Connector protocol version is incompatible.","\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002":"This machine cannot reach AI Office right now.","AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002":"The AI Office connection was interrupted.","\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002":"The local Harness stopped this run.","Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002":"The Office Job has already been claimed, cancelled, or finished.","\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002":"The local Harness could not complete the task; check the Harness Session and try again.","Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002":"The Office Job references a Workspace/Preset alias that is not configured locally.","\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002":"You are continuing an AI Office task inside the local DeepSeek Harness.","\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002":"Act only within the current Workspace. When finished you must return: a result summary, changed files, verification evidence, and unresolved risks.","## \u672C\u673A Instruction Preset":"## Local Instruction Preset","## \u672C\u8F6E\u8865\u5145\u6307\u4EE4":"## Additional Instructions for This Round","## Office \u65F6\u95F4\u7EBF":"## Office Timeline","\u6279\u51C6 {tool}":"Approve {tool}","Harness \u5DE5\u5177":"Harness tool","Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F":"Harness needs {count} pieces of additional information","\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}":"Job claimed; preparing Workspace alias: {alias}","Harness Session \u5DF2\u521B\u5EFA\u3002":"Harness Session created.","\u6B63\u5728\u4F7F\u7528 {tool}\u2026":"Using {tool}\u2026"};var FH=Object.freeze(Object.assign({},DH,wH,OH,bH,MH,_H,TH,NH,RH,kH,vH,PH,GH));var LH="zh";function UH(n){let t=typeof n=="string"?n.trim().toLowerCase():"";LH=t==="english"||/^en(?:[-_].*)?$/u.test(t)?"en":"zh"}function D(n,t){if(typeof n!="string")return n;let o=LH==="en"?FH[n]??n:n;return t==null?o:o.replace(/\{(\w+)\}/g,(i,e)=>Object.hasOwn(t,e)?String(t[e]):i)}var Yb=Object.freeze({version:1,bots:Object.freeze([])}),ace=new Set(["clientId","secretRef","approvedSenders"]);function Xo(n){return typeof n=="string"&&n.trim()?n.trim():null}function ice(n){return Xge("sha256").update(n).digest("hex")}function xH(n){let t=Xo(n);return t&&/^dt_[a-f0-9]{24}$/.test(t)?t:null}function oce(n){let t=Xo(n);return t&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(t)?t:null}function nce(n){let t=Xo(n);return t&&/^dt_sender_[a-f0-9]{32}$/.test(t)?t:null}function sce(n){let t=typeof n=="string"?{staffId:n}:n;if(!t||typeof t!="object"||Array.isArray(t))return null;let o=nce(t.senderKey),i=Xo(t.staffId);return!o||!i?null:Object.freeze({senderKey:o,staffId:i,displayName:Xo(t.displayName),approvedAt:Xo(t.approvedAt)})}function gce(n){if(!Array.isArray(n))return null;let t=n.map(sce);if(t.some(e=>e===null))return null;let o=new Set,i=new Set;for(let e of t){if(o.has(e.staffId)||i.has(e.senderKey))return null;o.add(e.staffId),i.add(e.senderKey)}return Object.freeze(t)}function wf(n){let t=Xo(n);if(!t)throw new TypeError("clientId is required");let o=ice(t).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function YH(){return`dt_sender_${KH().replaceAll("-","")}`}function jb(n){return Xo(n)?D("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):D("\u9489\u9489\u7528\u6237")}function Jb(n){let t=Xo(n);return t?t.length<=8?`${t.slice(0,2)}\u2022\u2022\u2022\u2022`:`${t.slice(0,4)}\u2022\u2022\u2022\u2022${t.slice(-4)}`:D("\u9489\u9489\u673A\u5668\u4EBA")}function jH(n,{stored:t=!1}={}){if(!n||typeof n!="object"||Array.isArray(n)||"clientSecret"in n||"client_secret"in n||"deviceCode"in n||t&&Object.keys(n).some(r=>!ace.has(r)))return null;let o=Xo(n.clientId),i=oce(n.secretRef),e=gce(n.approvedSenders??[]);if(!o||!i||!e)return null;let a=wf(o);return a.secretRef!==i||(n.botId===void 0?a.botId:xH(n.botId))!==a.botId?null:Object.freeze({botId:a.botId,clientId:o,secretRef:i,approvedSenders:e})}function cce(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let t=n.bots.map(a=>jH(a,{stored:!0}));if(t.some(a=>a===null))return null;let o=new Set,i=new Set,e=new Set;for(let a of t){if(o.has(a.botId)||i.has(a.clientId)||e.has(a.secretRef))return null;o.add(a.botId),i.add(a.clientId),e.add(a.secretRef)}return Object.freeze({version:1,bots:Object.freeze(t)})}function Ice(n){return{version:1,bots:n.bots.map(t=>({clientId:t.clientId,secretRef:t.secretRef,approvedSenders:t.approvedSenders.map(o=>({senderKey:o.senderKey,staffId:o.staffId,displayName:o.displayName,approvedAt:o.approvedAt}))}))}}var Df=class{#e;#A=Yb;#t=Promise.resolve();constructor(t){if(!Xo(t))throw new TypeError("config path is required");this.#e=t}async load(){try{let t=cce(JSON.parse(await ece(this.#e,"utf8")));if(!t)throw new Error("dsh-dingtalk config contains invalid bot data");this.#A=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=Yb}return this}list(){return structuredClone(this.#A.bots)}get(t){let o=this.#A.bots.find(i=>i.botId===t);return o?structuredClone(o):null}getByClientId(t){let o=this.#A.bots.find(i=>i.clientId===t);return o?structuredClone(o):null}async save(t){let o=jH(t);if(!o)throw new Error("Refusing to persist invalid dsh-dingtalk bot data");return this.#r(i=>{if(i.find(A=>(A.clientId===o.clientId||A.secretRef===o.secretRef)&&A.botId!==o.botId))throw new Error("Duplicate DingTalk bot identity");let a=i.findIndex(A=>A.botId===o.botId);return a===-1?i.push(o):i[a]=o,structuredClone(o)})}async remove(t){if(!xH(t))throw new TypeError("Invalid DingTalk bot id");return this.#r(o=>{let i=o.findIndex(a=>a.botId===t);if(i===-1)return null;let[e]=o.splice(i,1);return structuredClone(e)})}async clear(){let t=this.#t.then(async()=>{try{await HH(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=Yb});this.#t=t.then(()=>{},()=>{}),await t}async#r(t){let o,i=this.#t.then(async()=>{let e=[...this.#A.bots];o=t(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#a(a),this.#A=a});return this.#t=i.then(()=>{},()=>{}),await i,o}async#a(t){await $ge(rce(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${KH()}.tmp`;try{await tce(o,`${JSON.stringify(Ice(t),null,2)} +`,{encoding:"utf8",flag:"wx",mode:384}),await Ace(o,this.#e)}catch(i){try{await HH(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([i,e])}throw i}}};var qH="https://oapi.dingtalk.com",lce="DING_DWS_CLAW";function $o(n){return typeof n=="string"&&n.trim()?n.trim():null}function JH(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function pce(n){let t;try{t=new URL($o(n)??qH)}catch{throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL")}let o=t.hostname==="dingtalk.com"||t.hostname.endsWith(".dingtalk.com");if(t.protocol!=="https:"||t.port||!o||t.username||t.password||t.search||t.hash)throw new TypeError("DingTalk registration base URL must be a valid HTTPS URL");return t.pathname=t.pathname.replace(/\/+$/,""),t.href.replace(/\/$/,"")}function dce(n){let t=typeof n?.now=="function"?n.now():n();if(!Number.isFinite(t))throw new TypeError("clock must return a finite timestamp");return t}function hce(n,t){if(!n||typeof n!="object"||Array.isArray(n))throw new Rn("invalid-response",`DingTalk ${t} returned an invalid response`,t);if(Number(n.errcode)!==0)throw new Rn("api-error",`DingTalk ${t} request was rejected`,t);return n}var Rn=class extends Error{constructor(t,o,i,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=t,this.action=i}},Of=class{#e;#A;#t;#r;constructor({fetch:t=globalThis.fetch,clock:o=Date,baseUrl:i=qH,timeoutMs:e=15e3}={}){if(typeof t!="function")throw new TypeError("fetch is required");if(typeof o!="function"&&typeof o?.now!="function")throw new TypeError("clock must be a function or expose now()");if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive number");this.#e=t,this.#A=o,this.#t=pce(i),this.#r=e}async start({signal:t}={}){let o=await this.#a("/app/registration/init",{source:lce},"initialization",t),i=$o(o.nonce);if(!i)throw new Rn("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#a("/app/registration/begin",{nonce:i},"begin",t),a=$o(e.device_code),A=$o(e.verification_uri_complete);if(!a||!A)throw new Rn("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=JH(e.expires_in,7200),s=JH(e.interval,5)*1e3;return Object.freeze({deviceCode:a,verificationUrl:A,verificationUri:$o(e.verification_uri),userCode:$o(e.user_code),expiresAt:dce(this.#A)+r*1e3,pollIntervalMs:s})}async poll(t){let o=$o(typeof t=="string"?t:t?.deviceCode),i=typeof t=="object"?t?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#a("/app/registration/poll",{device_code:o},"poll",i),a=$o(e.status)?.toUpperCase(),A=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(a)?a:"UNKNOWN";return Object.freeze({status:A,clientId:$o(e.client_id),clientSecret:$o(e.client_secret),failReason:$o(e.fail_reason)})}async#a(t,o,i,e){let a,A=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,A]):A;try{a=await this.#e(`${this.#t}${t}`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(o),redirect:"error",signal:r})}catch(g){throw e?.aborted?e.reason??g:A.aborted?new Rn("timeout",`DingTalk ${i} request timed out`,i,{cause:g}):g?.name==="AbortError"?g:new Rn("network-error",`DingTalk ${i} request could not be completed`,i,{cause:g})}if(!a||a.ok===!1||typeof a.json!="function")throw new Rn("http-error",`DingTalk ${i} request failed`,i);let s;try{s=await a.json()}catch(g){throw new Rn("invalid-json",`DingTalk ${i} returned invalid JSON`,i,{cause:g})}return hce(s,i)}};import{randomUUID as Dce}from"node:crypto";var zH=new WeakMap,qb=Symbol("dsh-im.connection-test-state-identity");function VH(n){return n?.[qb]??n}function Ece(n){return typeof n=="string"&&n.trim()?n.trim():null}function go(n,t){if(!n||!t||typeof t!="object")return!1;try{return zH.set(VH(n),structuredClone(t)),!0}catch{return!1}}function Xh(n){let t=n?zH.get(VH(n)):null;return t?structuredClone(t):null}function Da(n,t=D("\u673A\u5668\u4EBA")){let o=Ece(n)??t;return`${D("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")} +${D("\u8FD9\u6761\u6D88\u606F\u7531\u300CIM\u673A\u5668\u4EBA\u300D\u8BBE\u7F6E\u9875\u4E2D\u7684\u201C{name}\u201D\u673A\u5668\u4EBA\u5361\u7247\u53D1\u51FA\u3002",{name:o})}`}function lr(n=D("\u673A\u5668\u4EBA")){let t=new Error(D("{channelLabel}\u5C1A\u672A\u6536\u5230\u53EF\u7528\u4E8E\u6D4B\u8BD5\u7684\u79C1\u804A\u6D88\u606F\u3002",{channelLabel:n}));return t.code="test-target-unavailable",t}async function Hg({state:n,send:t,text:o,channelLabel:i}){let e=Xh(n);if(!e)throw lr(i);return await t(e,o),{sent:!0}}function ar(n){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed"}:{sent:!0})}import{randomUUID as Cce}from"node:crypto";var uce=Object.freeze({AUTH:"MODEL_AUTH",MISSING_CREDENTIAL:"MODEL_AUTH",INVALID_CREDENTIAL:"MODEL_AUTH",QUOTA:"MODEL_QUOTA",RATE_LIMIT:"MODEL_RATE_LIMIT",CONTEXT_WINDOW_EXCEEDED:"MODEL_CONTEXT_LIMIT",UNKNOWN_MODEL:"MODEL_UNAVAILABLE",NO_ADAPTER:"MODEL_UNAVAILABLE",UNSUPPORTED_OPTION:"MODEL_CONFIG",UNSUPPORTED_REASONING_EFFORT:"MODEL_CONFIG",TIMEOUT:"MODEL_TIMEOUT",TRANSPORT:"MODEL_TRANSPORT",SERVER:"MODEL_SERVICE",STREAM_CLOSED:"MODEL_STREAM",MALFORMED_RESPONSE:"MODEL_STREAM",EMPTY_RESPONSE:"MODEL_EMPTY_REPLY",CONTENT_FILTER:"MODEL_CONTENT_REJECTED",UNSUPPORTED_CONTENT:"MODEL_CONFIG"}),Bce=Object.freeze({HARNESS_CONNECT:"\u65E0\u6CD5\u8FDE\u63A5\u5904\u7406\u670D\u52A1\uFF0C\u6D88\u606F\u5C1A\u672A\u63D0\u4EA4\u3002\u8BF7\u786E\u8BA4 DeepSeek Harness \u6B63\u5728\u8FD0\u884C\u540E\u91CD\u8BD5\u3002",HARNESS_TIMEOUT:"\u5904\u7406\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u6D88\u606F\u5C1A\u672A\u5F00\u59CB\u5904\u7406\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",HARNESS_RESULT_UNCERTAIN:"\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u4EFB\u52A1\u72B6\u6001\uFF0C\u4EFB\u52A1\u53EF\u80FD\u5DF2\u7ECF\u5F00\u59CB\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",HARNESS_ACCESS:"\u5904\u7406\u670D\u52A1\u62D2\u7EDD\u4E86\u673A\u5668\u4EBA\u8FDE\u63A5\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u3001\u4EE3\u7406\u6216\u8BBF\u95EE\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",HARNESS_PROTOCOL:"\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u7684\u63A5\u53E3\u4E0D\u517C\u5BB9\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5 Harness \u5730\u5740\u5E76\u66F4\u65B0\u76F8\u5173\u7248\u672C\u3002",HARNESS_SERVICE:"DeepSeek Harness \u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u8BF7\u6C42\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_REPLY_TIMEOUT:"\u7B49\u5F85\u6A21\u578B\u56DE\u590D\u8D85\u65F6\uFF0C\u4EFB\u52A1\u53EF\u80FD\u4ECD\u5728\u8FD0\u884C\u3002\u8BF7\u5148\u7B49\u5F85\u6216\u53D1\u9001 /stop\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",MODEL_AUTH:"\u6A21\u578B\u51ED\u636E\u7F3A\u5931\u6216\u5DF2\u5931\u6548\u3002\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u540E\u91CD\u8BD5\u3002",MODEL_QUOTA:"\u6A21\u578B\u989D\u5EA6\u6216\u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7BA1\u7406\u5458\u8865\u5145\u989D\u5EA6\u6216\u5207\u6362\u6A21\u578B\u540E\u91CD\u8BD5\u3002",MODEL_RATE_LIMIT:"\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_CONTEXT_LIMIT:"\u5F53\u524D\u4F1A\u8BDD\u5185\u5BB9\u8D85\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u4E0A\u9650\u3002\u8BF7\u53D1\u9001 /compact \u6216 /new \u540E\u91CD\u8BD5\u3002",MODEL_UNAVAILABLE:"\u5F53\u524D\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u652F\u6301\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u53D1\u9001 /models\uFF0C\u5E76\u4F7F\u7528 /model \u91CD\u65B0\u9009\u62E9\u3002",MODEL_CONFIG:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u8FD9\u7C7B\u5185\u5BB9\u6216\u6240\u9009\u914D\u7F6E\u3002\u8BF7\u8C03\u6574\u5185\u5BB9\u3001\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u540E\u91CD\u8BD5\u3002",MODEL_TIMEOUT:"\u6A21\u578B\u670D\u52A1\u54CD\u5E94\u8D85\u65F6\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_TRANSPORT:"\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u6A21\u578B\u670D\u52A1\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_SERVICE:"\u6A21\u578B\u670D\u52A1\u6682\u65F6\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",MODEL_STREAM:"\u6A21\u578B\u56DE\u590D\u4E2D\u65AD\u6216\u683C\u5F0F\u5F02\u5E38\uFF0C\u672C\u6B21\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",MODEL_EMPTY_REPLY:"\u6A21\u578B\u6CA1\u6709\u8FD4\u56DE\u53EF\u663E\u793A\u7684\u5185\u5BB9\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5207\u6362\u6A21\u578B\u3002",MODEL_CONTENT_REJECTED:"\u6A21\u578B\u62D2\u7EDD\u5904\u7406\u5F53\u524D\u5185\u5BB9\u3002\u8BF7\u8C03\u6574\u95EE\u9898\u5185\u5BB9\u540E\u91CD\u8BD5\u3002",MODEL_OUTPUT_LIMIT:"\u6A21\u578B\u8FBE\u5230\u8F93\u51FA\u957F\u5EA6\u4E0A\u9650\uFF0C\u4F46\u6CA1\u6709\u751F\u6210\u53EF\u663E\u793A\u7684\u7ED3\u679C\u3002\u8BF7\u7F29\u5C0F\u4EFB\u52A1\u8303\u56F4\u540E\u91CD\u8BD5\u3002",TURN_BLOCKED:"\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u65E0\u6CD5\u5728\u5F53\u524D\u6E20\u9053\u5B8C\u6210\u7684\u64CD\u4F5C\u3002\u8BF7\u5728 DeepSeek Harness \u4E2D\u5904\u7406\u540E\u518D\u8BD5\u3002",TURN_INTERRUPTED:"\u4EFB\u52A1\u88AB\u610F\u5916\u4E2D\u65AD\uFF0C\u672C\u6B21\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u3002",SESSION_NOT_FOUND:"\u5F53\u524D\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\u3002\u8BF7\u53D1\u9001 /new \u521B\u5EFA\u65B0\u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002",SESSION_BUSY:"\u5F53\u524D\u4F1A\u8BDD\u4ECD\u5728\u5904\u7406\u4E0A\u4E00\u9879\u4EFB\u52A1\u3002\u8BF7\u7B49\u5F85\u5B8C\u6210\uFF0C\u6216\u53D1\u9001 /stop \u540E\u91CD\u8BD5\u3002",SESSION_STALE:"\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u521A\u521A\u53D1\u751F\u53D8\u5316\u3002\u8BF7\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002",WORKSPACE_UNAVAILABLE:"\u5F53\u524D\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u5DE5\u4F5C\u533A\u540E\u91CD\u8BD5\u3002",PRESET_UNAVAILABLE:"\u5F53\u524D Agent Preset \u4E0D\u5B58\u5728\u6216\u6682\u4E0D\u53EF\u7528\u3002\u8BF7\u53D1\u9001 /presetlist \u540E\u91CD\u65B0\u9009\u62E9\u3002",CHANNEL_PERMISSION:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u6CA1\u6709\u53D1\u9001\u6743\u9650\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u6E20\u9053\u6743\u9650\u6216\u91CD\u65B0\u7ED1\u5B9A\u673A\u5668\u4EBA\u3002",CHANNEL_RATE_LIMIT:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6B63\u5728\u9650\u6D41\uFF0C\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",CHANNEL_DELIVERY_UNCERTAIN:"\u56DE\u590D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\u3002\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u7ECF\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u590D\u63D0\u4EA4\u3002",CHANNEL_DELIVERY:"\u56DE\u590D\u5DF2\u7ECF\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u65E0\u6CD5\u53D1\u9001\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",INPUT_INVALID:"\u5F53\u524D\u6D88\u606F\u5305\u542B\u65E0\u6CD5\u5904\u7406\u7684\u56FE\u7247\u6216\u6587\u4EF6\u3002\u8BF7\u8C03\u6574\u540E\u91CD\u65B0\u53D1\u9001\u3002",INTERNAL_UNKNOWN:"\u4EFB\u52A1\u672A\u5B8C\u6210\uFF0C\u6682\u65F6\u65E0\u6CD5\u786E\u5B9A\u539F\u56E0\u3002\u8BF7\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u53D1\u751F\uFF0C\u8BF7\u5C06\u53C2\u8003\u53F7\u63D0\u4F9B\u7ED9\u7BA1\u7406\u5458\u3002"});function fce(n){if(n?.code!=="harness-turn-failed")return null;let t=n?.providerCode??n?.details?.providerCode;return typeof t!="string"?null:uce[t.trim().toUpperCase()]??null}function Qce(n){let t=typeof n?.code=="string"?n.code:"",o=fce(n);if(o)return o;if(t==="harness-connect-failed")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_CONNECT";if(t==="harness-timeout")return["session.prompt","session.history"].includes(n?.method)?"HARNESS_RESULT_UNCERTAIN":"HARNESS_TIMEOUT";if(t==="harness-reply-timeout")return"MODEL_REPLY_TIMEOUT";if(["harness-auth-required","harness-proxy-auth-required","harness-loopback-forbidden","harness-host-untrusted","harness-request-forbidden"].includes(t))return"HARNESS_ACCESS";if(["harness-api-not-found","harness-response-invalid"].includes(t))return"HARNESS_PROTOCOL";if(t==="harness-turn-failed")return"INTERNAL_UNKNOWN";if(["harness-http-failed","harness-rpc-rejected"].includes(t))return"HARNESS_SERVICE";if(t==="model-empty-response")return"MODEL_EMPTY_REPLY";if(t==="model-max-tokens")return"MODEL_OUTPUT_LIMIT";if(t==="turn-blocked")return"TURN_BLOCKED";if(["turn-interrupted","turn-aborted"].includes(t))return"TURN_INTERRUPTED";if(t==="session-not-found")return"SESSION_NOT_FOUND";if(t==="agent-busy")return"SESSION_BUSY";if(t==="workspace-session-stale")return"SESSION_STALE";if(t.startsWith("workspace-"))return"WORKSPACE_UNAVAILABLE";if(t.startsWith("agent-preset-"))return"PRESET_UNAVAILABLE";if(t.startsWith("image-")||t.startsWith("inbound-file-")||t==="attachment-error")return"INPUT_INVALID";let i=Number(n?.status??n?.httpStatus);return i===401||i===403||["channel-permission","permission-required","artifact-permission-required","forbidden","stale-token"].includes(t)?"CHANNEL_PERMISSION":i===429||["channel-rate-limit","rate-limited","artifact-rate-limited"].includes(t)?"CHANNEL_RATE_LIMIT":["channel-delivery-uncertain","delivery-uncertain","artifact-delivery-uncertain"].includes(t)?"CHANNEL_DELIVERY_UNCERTAIN":t==="channel-delivery-failed"||t.startsWith("artifact-")||["network-error","timeout"].includes(t)?"CHANNEL_DELIVERY":"INTERNAL_UNKNOWN"}function yce(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${Cce().slice(0,8).toUpperCase()}`}function mce(n){return typeof n!="string"||!/^[A-Za-z0-9_-]{1,64}$/u.test(n)?null:n.toUpperCase().replaceAll("-","_")}function Sce(n,{userMessage:t,reason:o,referenceId:i,at:e=Date.now()}={}){let a=mce(o),A=Qce(n),r=A==="INTERNAL_UNKNOWN"&&a&&typeof t=="string"&&t.trim()?"INPUT_INVALID":A;return Object.freeze({code:r,reason:a??r,message:typeof t=="string"&&t.trim()?t.trim():D(Bce[r]),referenceId:yce(i),at:Number.isFinite(e)?e:Date.now()})}function dt(n){return`${n.message} -${D("\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}",n)}`}function At(n,t,o){let i=Yge(t,o);return n.lastMessageError=i,i}function go(n){n.lastMessageError=null}function Da(n,{uncertain:t=!0}={}){let o=new Error("Channel message delivery failed",{cause:n}),i=Number(n?.status??n?.httpStatus);return o.code=i===401||i===403?"channel-permission":i===429?"channel-rate-limit":t?"channel-delivery-uncertain":"channel-delivery-failed",Number.isInteger(i)&&(o.status=i),o}function qr(n){return!n||typeof n!="object"||typeof n.code!="string"||!n.code||typeof n.reason!="string"||!n.reason||typeof n.message!="string"||!n.message||typeof n.referenceId!="string"||!n.referenceId||!Number.isFinite(n.at)?null:{code:n.code.slice(0,64),reason:n.reason.slice(0,64),message:n.message.slice(0,500),referenceId:n.referenceId.slice(0,40),at:n.at}}var OH=new Set(["starting","pending","connecting"]),Cf=new Set(["connected","expired","failed","cancelled"]);function zr(n){return typeof n=="string"&&n.trim()?n.trim():null}function wa(n,t){return Object.freeze({code:n,message:t})}function _H(n){return typeof n?.now=="function"?n.now():n()}function Jge(n){return new Date(_H(n)).toISOString()}function Gg(){return new DOMException("DingTalk provisioning was cancelled","AbortError")}function Xc(n){return n?{attemptId:n.id,status:n.state,...n.verificationUrl?{verificationUrl:n.verificationUrl}:{},...n.expiresAt?{expiresAt:n.expiresAt}:{},...n.pollIntervalMs?{pollIntervalMs:n.pollIntervalMs}:{},...n.botId?{botId:n.botId}:{},...n.alreadyConnected?{alreadyConnected:!0}:{},...n.error?{error:structuredClone(n.error)}:{}}:null}function Nb(n){if(!n)return{};let t=typeof n.status=="function"?n.status():n.status;return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function bH(n,t){if(!n||t.connected===!1||t.ready===!1)return!1;let o=zr(t.dingtalkStreamState??t.dingtalkConnectionState??t.connectionState??t.state)?.toLowerCase();return["failed","error","offline","disconnected","stopped"].includes(o)?!1:t.connected===!0||t.ready===!0||o==="connected"||o==="ready"}function TH(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=zr(n.staffId??n.senderStaffId??n.senderId);if(!t)return null;let o=zr(n.requestId),i=o&&/^ding_sender_[A-Za-z0-9_-]{1,100}$/.test(o)&&!o.includes(t)?o:null;return i?{requestId:i,staffId:t,displayName:zr(n.displayName??n.senderName??n.senderNick)??D("\u9489\u9489\u7528\u6237"),requestedAt:zr(n.requestedAt)}:null}function MH(n){if(!Array.isArray(n.pendingSenders))return[];let t=new Set,o=[];for(let i of n.pendingSenders){let e=TH(i);!e||t.has(e.staffId)||(t.add(e.staffId),o.push(e))}return o}function qge(n){return{requestId:n.requestId,displayName:n.displayName,senderIdMasked:Mb(n.staffId),requestedAt:n.requestedAt}}function zge(n){return{senderKey:n.senderKey,displayName:zr(n.displayName)??D("\u9489\u9489\u7528\u6237"),senderIdMasked:Mb(n.staffId),approvedAt:zr(n.approvedAt)}}var qh=class{#e;#A;#t;#r;#a;#i;#c;#s=new Map;#I=new Map;#n=new Map;#o=null;#g=new Map;#l=0;#p=!1;constructor({deviceAuth:t,credentials:o,configStore:i,createRuntime:e,deleteState:a=async()=>{},logger:A=console,clock:r=Date}){if(!t||typeof t.start!="function"||typeof t.poll!="function")throw new TypeError("DingtalkController requires a DingTalk device auth client");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError("DingtalkController requires the DSH credential provider");if(!i||typeof i.list!="function"||typeof i.get!="function"||typeof i.getByClientId!="function"||typeof i.save!="function"||typeof i.remove!="function")throw new TypeError("DingtalkController requires a loaded config store");if(typeof e!="function")throw new TypeError("createRuntime is required");if(typeof a!="function")throw new TypeError("deleteState must be a function");if(typeof r!="function"&&typeof r?.now!="function")throw new TypeError("clock must be a function or expose now()");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r}async initialize(){if(this.#p)return this.status();for(let t of this.#t.list()){let o=this.#s.get(t.botId);try{if(bH(o,Nb(o)))continue}catch{}await this.#Q(t.botId,async()=>{let i=this.#t.get(t.botId);if(!i||this.#p)return;let e=await this.#f(i.secretRef);if(!e){this.#I.set(i.botId,wa("missing-secret",D("\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002"))),this.#M();return}try{await this.#B(i,e),this.#I.delete(i.botId)}catch{this.#I.set(i.botId,wa("connection-failed",D("\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#i.warn?.(`[dsh-dingtalk] bot ${i.botId} failed to initialize`)}this.#M()})}return this.status()}async startProvisioning({signal:t}={}){if(this.#p)throw new Error("dsh-dingtalk controller is closed");this.#o&&await this.cancelProvisioning(this.#o);let o={id:jge(),state:"starting",controller:new AbortController,deviceCode:null,verificationUrl:null,expiresAt:null,pollIntervalMs:null,pollTask:null,botId:null,alreadyConnected:!1,error:null};this.#n.set(o.id,o),this.#o=o.id,this.#M();let i=()=>o.controller.abort(t?.reason);t?.aborted?i():t?.addEventListener("abort",i,{once:!0});try{let e=await this.#e.start({signal:o.controller.signal});if(this.#y(o),o.deviceCode=zr(e.deviceCode),o.verificationUrl=zr(e.verificationUrl),o.expiresAt=Number(e.expiresAt),o.pollIntervalMs=Number(e.pollIntervalMs),!o.deviceCode||!o.verificationUrl||!Number.isFinite(o.expiresAt)||!Number.isFinite(o.pollIntervalMs)||o.pollIntervalMs<=0)throw new Error("DingTalk device auth returned incomplete registration metadata");return o.state="pending",this.#M(),Xc(o)}catch(e){if(o.controller.signal.aborted||e?.name==="AbortError"?(o.state="cancelled",o.error=wa("cancelled",D("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))):(o.state="failed",o.error=wa("qr-start-failed",D("\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#o===o.id&&(this.#o=null),this.#M(),o.state==="failed")throw e;return Xc(o)}finally{t?.removeEventListener("abort",i)}}async bindCredentials({clientId:t,clientSecret:o}={}){if(this.#p)throw new Error("dsh-dingtalk controller is closed");let i=zr(t),e=zr(o);if(!i||!e)throw new TypeError("DingTalk Client ID and Client Secret are required");if(this.#o&&await this.cancelProvisioning(this.#o),this.#p)throw new Error("dsh-dingtalk controller is closed");let a=hf(i);return await this.#Q(a.botId,async()=>{if(this.#p)throw Gg();let A=this.#t.getByClientId(i),r=await this.#A.resolve(a.secretRef).catch(()=>{});if(this.#p)throw Gg();let s={botId:a.botId,clientId:i,secretRef:a.secretRef,approvedSenders:A?.approvedSenders??[]};await this.#A.set(a.secretRef,e);try{await this.#t.save(s)}catch(g){throw await this.#m(a.secretRef,r),g}try{await this.#B(s,e),this.#I.delete(a.botId)}catch{this.#I.set(a.botId,wa("connection-failed",D("\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#i.warn?.("[dsh-dingtalk] credential-bound bot saved but its connection is not ready")}this.#M()}),this.status()}async registrationStatus(t){let o=this.#n.get(t);if(!o)return null;if(Cf.has(o.state)||o.state==="starting")return Xc(o);if(_H(this.#c)>=o.expiresAt)return o.state="expired",o.error=wa("expired",D("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#o===o.id&&(this.#o=null),this.#M(),Xc(o);if(!o.pollTask){let i=this.#d(o).finally(()=>{o.pollTask===i&&(o.pollTask=null)});o.pollTask=i}return await o.pollTask,Xc(o)}async cancelProvisioning(t){let o=this.#n.get(t);return o?(Cf.has(o.state)||(o.controller.abort(),await o.pollTask?.catch(()=>{}),Cf.has(o.state)||(o.state="cancelled"),o.error??=wa("cancelled",D("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))),this.#o===o.id&&(this.#o=null),this.#M(),Xc(o)):null}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#Q(t,async()=>{let i=await this.#f(o.secretRef);if(!i)throw new Error("The DingTalk client secret is missing");try{await this.#B(o,i),this.#I.delete(t)}catch(e){throw this.#I.set(t,wa("connection-failed",D("\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),e}finally{this.#M()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return this.#Q(t,async()=>{let i=this.#s.get(t);if(!i?.status?.ready||typeof i.sendConnectionTest!="function")throw Ir(D("\u9489\u9489\u673A\u5668\u4EBA"));return i.sendConnectionTest(Sa(D("\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09",{clientId:_b(o.clientId)})))})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#Q(t,async()=>{let i=await this.#A.resolve(o.secretRef).catch(()=>{});await this.#u(t);try{await this.#A.unset(o.secretRef),await this.#t.remove(t)}catch(e){throw zr(i?.value)&&(await this.#A.set(o.secretRef,i.value).catch(()=>{}),await this.#B(o,i.value).catch(()=>{})),new Error("Unable to remove the DingTalk bot safely.",{cause:e})}try{await this.#a({botId:t,config:o})}catch{this.#i.warn?.(`[dsh-dingtalk] bot ${t} state cleanup failed`)}this.#I.delete(t),this.#M()}),this.status()}async approveSender(t,o){let i=this.#t.get(t);if(!i)throw new Error("Unknown DingTalk bot");let e=this.#s.get(t),a=typeof e?.pendingSender=="function"?TH(e.pendingSender(o)):null,A=MH(Nb(e)),r=a?.requestId===o?a:A.find(g=>g.requestId===o);if(!r)throw new Error("Unknown DingTalk sender approval request");if(i.approvedSenders.some(g=>g.staffId===r.staffId))return this.status();let s={...i,approvedSenders:[...i.approvedSenders,{senderKey:QH(),staffId:r.staffId,displayName:r.displayName,approvedAt:Jge(this.#c)}]};return await this.#E(i,s),this.status()}async revokeSender(t,o){let i=this.#t.get(t);if(!i)throw new Error("Unknown DingTalk bot");let e=i.approvedSenders.findIndex(A=>A.senderKey===o);if(e===-1)throw new Error("Unknown approved DingTalk sender");let a=[...i.approvedSenders];return a.splice(e,1),await this.#E(i,{...i,approvedSenders:a}),this.status()}status(){let t=this.#t.list().map(e=>{let a=this.#s.get(e.botId),A={};try{A=Nb(a)}catch{A={state:"error"}}let r=bH(a,A),s=this.#I.get(e.botId),g=r?"connected":s?"error":"offline",c=new Set(e.approvedSenders.map(d=>d.staffId)),I=MH(A).filter(d=>!c.has(d.staffId)).map(qge);return{botId:e.botId,state:g,connected:r,configured:!0,bot:{name:D("\u9489\u9489\u673A\u5668\u4EBA"),clientIdMasked:_b(e.clientId)},health:{status:r?"healthy":s?"error":"offline",summary:r?D("\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38"):s?.message??D("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"),lastCheckedAt:A.lastCheckedAt??null},stats:{messagesReceived:Number(A.messagesReceived)||0,messagesReplied:Number(A.messagesReplied)||0},lastMessageError:qr(A.lastMessageError),senders:{pending:I,approved:e.approvedSenders.map(zge)},error:s?structuredClone(s):null}}),o=t.filter(e=>e.connected).length,i=this.#o?this.#n.get(this.#o):null;return{schemaVersion:1,revision:this.#l,state:i&&OH.has(i.state)?"provisioning":t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o},...i&&OH.has(i.state)?{provisioning:Xc(i)}:{}}}async close(){this.#p||(this.#p=!0,this.#o&&await this.cancelProvisioning(this.#o),await Promise.allSettled([...this.#s.keys()].map(t=>this.#u(t))),await Promise.allSettled([...this.#g.values()]),await Promise.allSettled([...this.#s.keys()].map(t=>this.#u(t))))}async#d(t){try{this.#y(t);let o=await this.#e.poll({deviceCode:t.deviceCode,signal:t.controller.signal});this.#y(t);let i=zr(o.status)?.toUpperCase();if(i==="WAITING")t.state="pending",t.error=null;else if(i==="SUCCESS"){let e=zr(o.clientId),a=zr(o.clientSecret);if(!e||!a)throw new Error("DingTalk returned incomplete credentials");t.state="connecting",t.error=null,this.#M();let A=await this.#h(t,{clientId:e,clientSecret:a});t.botId=A.botId,t.alreadyConnected=A.alreadyConnected,t.state="connected",this.#o===t.id&&(this.#o=null)}else i==="EXPIRED"?(t.state="expired",t.error=wa("expired",D("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#o===t.id&&(this.#o=null)):i==="FAIL"?(t.state="failed",t.error=wa("authorization-failed",D("\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002")),this.#o===t.id&&(this.#o=null)):(t.state="pending",t.error=wa("poll-pending",D("\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}catch(o){t.controller.signal.aborted||o?.name==="AbortError"?(t.state="cancelled",t.error=wa("cancelled",D("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")),this.#o===t.id&&(this.#o=null)):t.state==="connecting"?(t.state="failed",t.error=wa("activation-failed",D("\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002")),this.#o===t.id&&(this.#o=null),this.#i.error?.("[dsh-dingtalk] bot activation failed")):(t.state="pending",t.error=wa("poll-failed",D("\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}finally{this.#M(),this.#C()}}async#h(t,{clientId:o,clientSecret:i}){let e=hf(o),a=this.#t.getByClientId(o),A=await this.#A.resolve(e.secretRef).catch(()=>{}),r={botId:e.botId,clientId:o,secretRef:e.secretRef,approvedSenders:a?.approvedSenders??[]};return this.#Q(e.botId,async()=>{let s=async()=>{await this.#u(e.botId),a?await this.#t.save(a).catch(()=>{}):this.#t.get(e.botId)&&await this.#t.remove(e.botId).catch(()=>null)&&await this.#a({botId:e.botId,config:r}).catch(c=>{this.#i.warn?.("[dsh-dingtalk] failed to clean up cancelled bot state:",c)}),await this.#m(e.secretRef,A),a&&zr(A?.value)&&await this.#B(a,A.value).catch(()=>{})};await this.#A.set(e.secretRef,i);try{this.#y(t),await this.#t.save(r),this.#y(t)}catch(g){throw await s(),g}try{await this.#B(r,i),this.#y(t),this.#I.delete(e.botId)}catch{if(t.controller.signal.aborted||this.#o!==t.id)throw await s(),Gg();this.#I.set(e.botId,wa("connection-failed",D("\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#i.warn?.("[dsh-dingtalk] authorized bot saved but its connection is not ready")}return{botId:e.botId,alreadyConnected:!!a}})}async#E(t,o){return this.#Q(t.botId,async()=>{let i=await this.#f(t.secretRef);if(!i)throw new Error("The DingTalk client secret is missing");await this.#t.save(o);try{await this.#B(o,i),this.#I.delete(t.botId)}catch(e){throw await this.#t.save(t).catch(()=>{}),await this.#B(t,i).catch(()=>{}),this.#I.set(t.botId,wa("connection-failed",D("\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),e}finally{this.#M()}})}async#B(t,o){if(this.#p||(await this.#u(t.botId),this.#p))throw Gg();let i=await this.#r({botId:t.botId,config:structuredClone(t),clientSecret:o});if(!i||typeof i.start!="function"||typeof i.stop!="function")throw new TypeError("createRuntime returned an invalid DingTalk runtime");if(this.#p)throw await i.stop().catch(()=>{}),Gg();this.#s.set(t.botId,i);try{if(await i.start(),this.#p)throw await i.stop().catch(()=>{}),Gg()}catch(e){throw this.#s.get(t.botId)===i&&this.#s.delete(t.botId),await i.stop().catch(()=>{}),e}}async#u(t){let o=this.#s.get(t);this.#s.delete(t),await o?.stop().catch(()=>{this.#i.warn?.(`[dsh-dingtalk] bot ${t} failed to stop cleanly`)})}async#f(t){let o=await this.#A.resolve(t).catch(()=>{});return zr(o?.value)}async#m(t,o){try{zr(o?.value)?await this.#A.set(t,o.value):await this.#A.unset(t)}catch{this.#i.error?.(`[dsh-dingtalk] failed to restore credential ${t}`)}}#y(t){if(t.controller.signal.aborted||this.#o!==t.id)throw Gg()}#Q(t,o){if(this.#p)return Promise.reject(new Error("dsh-dingtalk controller is closed"));let a=(this.#g.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#g.get(t)===a&&this.#g.delete(t)});return this.#g.set(t,a),a}#C(){for(let[t,o]of this.#n)t!==this.#o&&Cf.has(o.state)&&this.#n.size>16&&this.#n.delete(t)}#M(){this.#l+=1}};import{randomUUID as zh}from"node:crypto";import{extname as tce}from"node:path";var kH=5*1024*1024,Vge=20,Wge=20*1024*1024,Zge="\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002",ut=class extends Error{constructor(t,o,i,e={}){super(o,e),this.name="ImagePromptError",this.code=t,this.userMessage=i}},NH=Object.freeze({MODEL_DOES_NOT_SUPPORT_IMAGES:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\uFF0C\u8BF7\u7528 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u5207\u6362\u540E\u91CD\u53D1\u3002",IMAGE_TOO_LARGE:"\u56FE\u7247\u8D85\u8FC7\u5BBF\u4E3B\u5141\u8BB8\u7684\u5927\u5C0F\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",IMAGE_TOO_MANY_PIXELS:"\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u9AD8\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",INVALID_IMAGE:"\u56FE\u7247\u5185\u5BB9\u65E0\u6548\u6216\u683C\u5F0F\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",INVALID_IMAGE_BASE64:"\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",IMAGE_TYPE_MISMATCH:"\u56FE\u7247\u683C\u5F0F\u4E0E\u5B9E\u9645\u5185\u5BB9\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",TOO_MANY_IMAGES:"\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u540E\u91CD\u8BD5\u3002",IMAGES_TOO_LARGE:"\u56FE\u7247\u603B\u5927\u5C0F\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"});function Xge(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}async function Rb(n){try{await n?.body?.cancel?.()}catch{}}async function co(n,{fetchImpl:t=fetch,headers:o,signal:i,maxBytes:e=kH,timeoutMs:a=15e3,allowedHosts:A}={}){let r=new URL(n);if(r.protocol!=="https:")throw new Error("Image download URL must use HTTPS");if(Array.isArray(A)&&!A.some(I=>typeof I=="string"&&(r.hostname===I||I.startsWith(".")&&(r.hostname===I.slice(1)||r.hostname.endsWith(I)))))throw new Error("Image download URL is not hosted by the messaging platform");let s=await t(r,{method:"GET",headers:o,signal:Xge(i,a),redirect:"manual"});if(Number.isInteger(s?.status)&&s.status>=300&&s.status<400)throw await Rb(s),new ut("image-redirect-blocked",`Image download redirect was blocked (HTTP ${s.status})`,D("\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u53D1\u751F\u4E86\u91CD\u5B9A\u5411\uFF0C\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u3002"));if(!s?.ok)throw await Rb(s),new ut("image-http-error",`Image download failed with HTTP ${s?.status??"unknown"}`,D("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP {status}\uFF09\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002",{status:s?.status??"unknown"}));let g=Number(s.headers?.get?.("content-length"));if(Number.isFinite(g)&&g>e)throw await Rb(s),new ut("image-too-large",`Image response declares ${g} bytes; the limit is ${e}`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s.body?.[Symbol.asyncIterator]){let I=[],d=0;for await(let B of s.body){let f=Buffer.from(B);if(d+=f.length,d>e)throw await s.body.cancel?.().catch?.(()=>{}),new ut("image-too-large",`Image response exceeded ${e} bytes`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));I.push(f)}return Buffer.concat(I,d)}let c=Buffer.from(await s.arrayBuffer());if(c.length>e)throw new ut("image-too-large",`Image response contains ${c.length} bytes; the limit is ${e}`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));return c}function $ge(n){return typeof n=="string"?n.trim():""}function vH(n){return Array.isArray(n?.images)?n.images.filter(Boolean):[]}function RH(n){return typeof n!="string"?void 0:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim().slice(0,255)||void 0}function ece(n){if(n.length>=8&&n[0]===137&&n[1]===80&&n[2]===78&&n[3]===71&&n[4]===13&&n[5]===10&&n[6]===26&&n[7]===10)return"image/png";if(n.length>=3&&n[0]===255&&n[1]===216&&n[2]===255)return"image/jpeg";if(n.length>=6){let t=n.subarray(0,6).toString("ascii");if(t==="GIF87a"||t==="GIF89a")return"image/gif"}return n.length>=12&&n.subarray(0,4).toString("ascii")==="RIFF"&&n.subarray(8,12).toString("ascii")==="WEBP"?"image/webp":null}function Ace(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let t=n?.data??n?.buffer;return Buffer.isBuffer(t)||t instanceof Uint8Array?{data:Buffer.from(t),name:n?.name??n?.filename}:null}function qt(n){return vH(n).length>0}async function Io(n,{signal:t,maxImageBytes:o=kH,maxImages:i=Vge,maxTotalImageBytes:e=Wge}={}){let a=vH(n);if(a.length>i)throw new ut("too-many-images",`Image message contains ${a.length} images; the limit is ${i}`,D("\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002",{maxImages:i}));let A=$ge(n?.content),r=[],s=0;A?r.push({type:"text",text:A}):a.length>0&&r.push({type:"text",text:D(Zge)});for(let[g,c]of a.entries()){if(t?.throwIfAborted(),Number.isFinite(c?.size)&&c.size>o)throw new ut("image-too-large",`Image ${g+1} declares ${c.size} bytes; the limit is ${o}`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(Number.isFinite(c?.size)&&s+c.size>e)throw new ut("images-too-large",`Images declare more than ${e} bytes in total`,D("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));let I;try{I=c?.data===void 0?await c?.load?.({signal:t,maxBytes:o}):c.data}catch(f){throw t?.aborted||f?.name==="AbortError"||f?.name==="TimeoutError"||f instanceof ut?f:new ut("image-download-failed",`Unable to download image ${g+1}: ${f?.message??String(f)}`,D("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let d=Ace(I);if(!d?.data.length)throw new ut("invalid-image-data",`Image ${g+1} returned no data`,D("\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002"));if(d.data.length>o)throw new ut("image-too-large",`Image ${g+1} contains ${d.data.length} bytes; the limit is ${o}`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s+d.data.length>e)throw new ut("images-too-large",`Images contain more than ${e} bytes in total`,D("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));s+=d.data.length;let B=ece(d.data);if(!B)throw new ut("unsupported-image-type",`Image ${g+1} is not JPEG, PNG, GIF, or WebP`,D("\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u7247\u683C\u5F0F\uFF0C\u8BF7\u53D1\u9001 JPEG\u3001PNG\u3001WebP \u6216 GIF \u56FE\u7247\u3002"));r.push({type:"image",mediaType:B,data:d.data.toString("base64"),...RH(d.name??c?.name)?{name:RH(d.name??c?.name)}:{}})}return r}function Gi(n){if(n instanceof ut)return{code:"image-prompt-error",reason:n.code,userMessage:n.userMessage};if(n?.code!=="attachment-error"||typeof n?.details?.reason!="string")return null;let t=n.details.reason,o=Object.hasOwn(NH,t)?D(NH[t]):null;return o?{code:"attachment-error",reason:t,userMessage:o}:null}function lo(n){return Gi(n)?.userMessage??null}var PH="https://oapi.dingtalk.com/",rce="https://api.dingtalk.com/",ace="DING_DWS_CLAW",ice="02fcf2f4-5e02-4a85-b672-46d1f715543e.schema",$c="\u{1F914}\u601D\u8003\u4E2D",FH="\u2705\u5DF2\u5B8C\u6210",LH="\u274C\u5904\u7406\u5931\u8D25",oce=15e3,nce=5e3,sce="2659900",gce="im_bg_1",cce=new Set(["WAITING","SUCCESS","FAIL","EXPIRED"]),gt=class extends Error{constructor(t,o,i={}){super(o,i),this.name="DingtalkApiError",this.code=t,this.status=i.status,this.providerCode=i.providerCode}};function WA(n){return typeof n=="string"&&n.trim()?n.trim():null}function Zh(n){let t=n==null?null:String(n).trim();return t&&/^-?[A-Za-z0-9_.:-]{1,160}$/.test(t)?t:void 0}function UH(n,t){return Number.isInteger(t?.status)&&(n.status=t.status),t?.providerCode!==void 0&&(n.providerCode=t.providerCode),n}function Vh(n,{fallback:t="artifact-provider-rejected"}={}){if(n?.code?.startsWith?.("artifact-"))return n;let o=Number(n?.status),i=Zh(n?.providerCode),e=i??"",a=t,A="DingTalk could not prepare the file for delivery.";o===401||o===403||i==="401"||i==="403"||/(?:permission|forbidden|unauthor|access.?denied|\.auth(?:\.|$))/i.test(e)?(a="artifact-permission-required",A="DingTalk denied permission to send the file."):o===413||i==="413"||/(?:too.?large|size.?limit)/i.test(e)?(a="artifact-too-large",A="The file exceeds DingTalk's size limit."):o===429||i==="429"||/(?:rate.?limit|too.?many|throttl)/i.test(e)?(a="artifact-rate-limited",A="DingTalk rate-limited file delivery."):t==="artifact-provider-rejected"&&(A="DingTalk rejected the file message.");let r=new Error(A,{cause:n});return r.code=a,UH(r,n)}function Ice(n){let t=new Error("DingTalk file delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",UH(t,n)}function kb(n){if(!n||typeof n!="object")return null;for(let t of["errcode","code"])if(n[t]!==void 0&&n[t]!==0&&n[t]!=="0")return Zh(n[t])??"rejected";return null}function lce(n,t){if(t?.aborted)throw Nn(t);let o=Number(n?.status);return n?.code==="network-error"||n?.code==="timeout"||n?.code==="invalid-response"||o>=500&&o<600?Ice(n):Vh(n)}function pce(n){let t;try{t=new URL(n)}catch(o){throw new gt("invalid-image-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u3002",{cause:o})}return t.protocol==="http:"&&(!t.port||t.port==="80")&&(t.protocol="https:",t.port=""),t}function GH(n){let t=n.toLowerCase().replace(/\.$/,"");return t==="dingtalk.com"||t.endsWith(".dingtalk.com")}function Fb(n,{label:t,requireSubdomain:o=!0}={}){let i;try{i=new URL(n)}catch{throw new gt("invalid-url",`${t??"\u9489\u9489\u670D\u52A1"}\u8FD4\u56DE\u4E86\u65E0\u6548\u5730\u5740\u3002`)}let e=i.hostname.toLowerCase().replace(/\.$/,""),a=o?e!=="dingtalk.com"&&GH(e):GH(e);if(i.protocol!=="https:"||!a||i.port&&i.port!=="443")throw new gt("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);if(i.username||i.password)throw new gt("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);return i}function Fg(n){let t=WA(n);if(!t)throw new gt("invalid-session-webhook","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u53EF\u7528\u7684\u56DE\u590D\u5730\u5740\u3002");let o=Fb(t,{label:"\u9489\u9489\u56DE\u590D",requireSubdomain:!1});return o.hash="",o.toString()}function HH(n,t=4e3){let o=typeof n=="string"?n.trim():"";if(!o)return[];if(!Number.isInteger(t)||t<1)throw new TypeError("maxChars must be a positive integer");if(o.length<=t)return[o];let i=[],e=o;for(;e.length>t;){let a=e.lastIndexOf(` -`,t);a{if(t?.aborted){i(Nn(t));return}let e=setTimeout(()=>{t?.removeEventListener("abort",a),o()},n),a=()=>{clearTimeout(e),i(Nn(t))};t?.addEventListener("abort",a,{once:!0})})}async function Tn(n,t,{body:o,signal:i,timeoutMs:e=oce,headers:a={},method:A="POST",action:r="request"}={}){let s=new AbortController,g=!1,c=()=>s.abort(i?.reason);if(i?.aborted)throw Nn(i);i?.addEventListener("abort",c,{once:!0});let I=e>0?setTimeout(()=>{g=!0,s.abort()},e):null;try{let d=await n(t,{method:A,redirect:"error",headers:{"content-type":"application/json",...a},body:JSON.stringify(o??{}),signal:s.signal});if(!d.ok){let B;try{let f=await d.json();B=Zh(f?.code??f?.errcode)}catch{}throw new gt("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${d.status}\uFF09\u3002`,{status:d.status,providerCode:B})}try{return await d.json()}catch(B){throw new gt("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:B})}}catch(d){throw i?.aborted?Nn(i):g?new gt("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:d}):d instanceof gt?d:new gt("network-error",`\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489${r}\u8BF7\u6C42\u3002`,{cause:d})}finally{I&&clearTimeout(I),i?.removeEventListener("abort",c)}}async function hce(n,t,{body:o,signal:i,timeoutMs:e=6e4}={}){let a=new AbortController,A=!1,r=()=>a.abort(i?.reason);if(i?.aborted)throw Nn(i);i?.addEventListener("abort",r,{once:!0});let s=setTimeout(()=>{A=!0,a.abort()},e);try{let g=await n(t,{method:"POST",body:o,signal:a.signal,redirect:"error"}),c,I;try{c=await g.json()}catch(d){I=d}if(!g.ok)throw new gt("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${g.status}\uFF09\u3002`,{status:g.status,providerCode:Zh(c?.code??c?.errcode)});if(I)throw new gt("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:I});return c}catch(g){throw i?.aborted?Nn(i):A?new gt("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:g}):g instanceof gt?g:new gt("network-error","\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002",{cause:g})}finally{clearTimeout(s),i?.removeEventListener("abort",r)}}function Ece(n){let t=WA(n?.robotCode);if(!t)throw new TypeError("DingTalk robotCode is required");if(n?.type==="group"){let o=WA(n.openConversationId);if(o)return{type:"group",robotCode:t,openConversationId:o}}if(n?.type==="user"){let o=WA(n.userId);if(o)return{type:"user",robotCode:t,userId:o}}throw new TypeError("DingTalk file target is invalid")}function Cce(n){return tce(n).slice(1).toLowerCase()}function uce(n){if(n?.type==="user"){let t=WA(n.userId);if(t)return{type:"user",userId:t}}if(n?.type==="group"){let t=WA(n.openConversationId);if(t)return{type:"group",openConversationId:t}}throw new TypeError("DingTalk AI Card target is invalid")}function vb(n,t){return{cardParamMap:{flowStatus:t,msgContent:Wh(n),staticMsgContent:"",sys_full_json_obj:JSON.stringify({order:["msgContent"]}),config:JSON.stringify({autoLayout:!0})}}}function Bce(n,t,o){let i={outTrackId:n,userIdType:1};return t.type==="group"?{...i,openSpaceId:`dtv1.card//IM_GROUP.${t.openConversationId}`,imGroupOpenDeliverModel:{robotCode:o}}:{...i,openSpaceId:`dtv1.card//IM_ROBOT.${t.userId}`,imRobotOpenDeliverModel:{spaceType:"IM_ROBOT",robotCode:o,extension:{dynamicSummary:"true"}}}}function Wh(n){let o=(typeof n=="string"?n.replace(/\r\n?/g,` +${D("\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}",n)}`}function At(n,t,o){let i=Sce(t,o);return n.lastMessageError=i,i}function co(n){n.lastMessageError=null}function wa(n,{uncertain:t=!0}={}){let o=new Error("Channel message delivery failed",{cause:n}),i=Number(n?.status??n?.httpStatus);return o.code=i===401||i===403?"channel-permission":i===429?"channel-rate-limit":t?"channel-delivery-uncertain":"channel-delivery-failed",Number.isInteger(i)&&(o.status=i),o}function zr(n){return!n||typeof n!="object"||typeof n.code!="string"||!n.code||typeof n.reason!="string"||!n.reason||typeof n.message!="string"||!n.message||typeof n.referenceId!="string"||!n.referenceId||!Number.isFinite(n.at)?null:{code:n.code.slice(0,64),reason:n.reason.slice(0,64),message:n.message.slice(0,500),referenceId:n.referenceId.slice(0,40),at:n.at}}var WH=new Set(["starting","pending","connecting"]),bf=new Set(["connected","expired","failed","cancelled"]);function Vr(n){return typeof n=="string"&&n.trim()?n.trim():null}function Oa(n,t){return Object.freeze({code:n,message:t})}function $H(n){return typeof n?.now=="function"?n.now():n()}function wce(n){return new Date($H(n)).toISOString()}function Kg(){return new DOMException("DingTalk provisioning was cancelled","AbortError")}function iI(n){return n?{attemptId:n.id,status:n.state,...n.verificationUrl?{verificationUrl:n.verificationUrl}:{},...n.expiresAt?{expiresAt:n.expiresAt}:{},...n.pollIntervalMs?{pollIntervalMs:n.pollIntervalMs}:{},...n.botId?{botId:n.botId}:{},...n.alreadyConnected?{alreadyConnected:!0}:{},...n.error?{error:structuredClone(n.error)}:{}}:null}function zb(n){if(!n)return{};let t=typeof n.status=="function"?n.status():n.status;return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function ZH(n,t){if(!n||t.connected===!1||t.ready===!1)return!1;let o=Vr(t.dingtalkStreamState??t.dingtalkConnectionState??t.connectionState??t.state)?.toLowerCase();return["failed","error","offline","disconnected","stopped"].includes(o)?!1:t.connected===!0||t.ready===!0||o==="connected"||o==="ready"}function eK(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=Vr(n.staffId??n.senderStaffId??n.senderId);if(!t)return null;let o=Vr(n.requestId),i=o&&/^ding_sender_[A-Za-z0-9_-]{1,100}$/.test(o)&&!o.includes(t)?o:null;return i?{requestId:i,staffId:t,displayName:Vr(n.displayName??n.senderName??n.senderNick)??D("\u9489\u9489\u7528\u6237"),requestedAt:Vr(n.requestedAt)}:null}function XH(n){if(!Array.isArray(n.pendingSenders))return[];let t=new Set,o=[];for(let i of n.pendingSenders){let e=eK(i);!e||t.has(e.staffId)||(t.add(e.staffId),o.push(e))}return o}function Oce(n){return{requestId:n.requestId,displayName:n.displayName,senderIdMasked:jb(n.staffId),requestedAt:n.requestedAt}}function bce(n){return{senderKey:n.senderKey,displayName:Vr(n.displayName)??D("\u9489\u9489\u7528\u6237"),senderIdMasked:jb(n.staffId),approvedAt:Vr(n.approvedAt)}}var $h=class{#e;#A;#t;#r;#a;#i;#c;#s=new Map;#I=new Map;#n=new Map;#o=null;#g=new Map;#l=0;#p=!1;constructor({deviceAuth:t,credentials:o,configStore:i,createRuntime:e,deleteState:a=async()=>{},logger:A=console,clock:r=Date}){if(!t||typeof t.start!="function"||typeof t.poll!="function")throw new TypeError("DingtalkController requires a DingTalk device auth client");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError("DingtalkController requires the DSH credential provider");if(!i||typeof i.list!="function"||typeof i.get!="function"||typeof i.getByClientId!="function"||typeof i.save!="function"||typeof i.remove!="function")throw new TypeError("DingtalkController requires a loaded config store");if(typeof e!="function")throw new TypeError("createRuntime is required");if(typeof a!="function")throw new TypeError("deleteState must be a function");if(typeof r!="function"&&typeof r?.now!="function")throw new TypeError("clock must be a function or expose now()");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r}async initialize(){if(this.#p)return this.status();for(let t of this.#t.list()){let o=this.#s.get(t.botId);try{if(ZH(o,zb(o)))continue}catch{}await this.#Q(t.botId,async()=>{let i=this.#t.get(t.botId);if(!i||this.#p)return;let e=await this.#f(i.secretRef);if(!e){this.#I.set(i.botId,Oa("missing-secret",D("\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002"))),this.#M();return}try{await this.#B(i,e),this.#I.delete(i.botId)}catch{this.#I.set(i.botId,Oa("connection-failed",D("\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#i.warn?.(`[dsh-dingtalk] bot ${i.botId} failed to initialize`)}this.#M()})}return this.status()}async startProvisioning({signal:t}={}){if(this.#p)throw new Error("dsh-dingtalk controller is closed");this.#o&&await this.cancelProvisioning(this.#o);let o={id:Dce(),state:"starting",controller:new AbortController,deviceCode:null,verificationUrl:null,expiresAt:null,pollIntervalMs:null,pollTask:null,botId:null,alreadyConnected:!1,error:null};this.#n.set(o.id,o),this.#o=o.id,this.#M();let i=()=>o.controller.abort(t?.reason);t?.aborted?i():t?.addEventListener("abort",i,{once:!0});try{let e=await this.#e.start({signal:o.controller.signal});if(this.#y(o),o.deviceCode=Vr(e.deviceCode),o.verificationUrl=Vr(e.verificationUrl),o.expiresAt=Number(e.expiresAt),o.pollIntervalMs=Number(e.pollIntervalMs),!o.deviceCode||!o.verificationUrl||!Number.isFinite(o.expiresAt)||!Number.isFinite(o.pollIntervalMs)||o.pollIntervalMs<=0)throw new Error("DingTalk device auth returned incomplete registration metadata");return o.state="pending",this.#M(),iI(o)}catch(e){if(o.controller.signal.aborted||e?.name==="AbortError"?(o.state="cancelled",o.error=Oa("cancelled",D("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))):(o.state="failed",o.error=Oa("qr-start-failed",D("\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#o===o.id&&(this.#o=null),this.#M(),o.state==="failed")throw e;return iI(o)}finally{t?.removeEventListener("abort",i)}}async bindCredentials({clientId:t,clientSecret:o}={}){if(this.#p)throw new Error("dsh-dingtalk controller is closed");let i=Vr(t),e=Vr(o);if(!i||!e)throw new TypeError("DingTalk Client ID and Client Secret are required");if(this.#o&&await this.cancelProvisioning(this.#o),this.#p)throw new Error("dsh-dingtalk controller is closed");let a=wf(i);return await this.#Q(a.botId,async()=>{if(this.#p)throw Kg();let A=this.#t.getByClientId(i),r=await this.#A.resolve(a.secretRef).catch(()=>{});if(this.#p)throw Kg();let s={botId:a.botId,clientId:i,secretRef:a.secretRef,approvedSenders:A?.approvedSenders??[]};await this.#A.set(a.secretRef,e);try{await this.#t.save(s)}catch(g){throw await this.#m(a.secretRef,r),g}try{await this.#B(s,e),this.#I.delete(a.botId)}catch{this.#I.set(a.botId,Oa("connection-failed",D("\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#i.warn?.("[dsh-dingtalk] credential-bound bot saved but its connection is not ready")}this.#M()}),this.status()}async registrationStatus(t){let o=this.#n.get(t);if(!o)return null;if(bf.has(o.state)||o.state==="starting")return iI(o);if($H(this.#c)>=o.expiresAt)return o.state="expired",o.error=Oa("expired",D("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#o===o.id&&(this.#o=null),this.#M(),iI(o);if(!o.pollTask){let i=this.#d(o).finally(()=>{o.pollTask===i&&(o.pollTask=null)});o.pollTask=i}return await o.pollTask,iI(o)}async cancelProvisioning(t){let o=this.#n.get(t);return o?(bf.has(o.state)||(o.controller.abort(),await o.pollTask?.catch(()=>{}),bf.has(o.state)||(o.state="cancelled"),o.error??=Oa("cancelled",D("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))),this.#o===o.id&&(this.#o=null),this.#M(),iI(o)):null}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#Q(t,async()=>{let i=await this.#f(o.secretRef);if(!i)throw new Error("The DingTalk client secret is missing");try{await this.#B(o,i),this.#I.delete(t)}catch(e){throw this.#I.set(t,Oa("connection-failed",D("\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),e}finally{this.#M()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return this.#Q(t,async()=>{let i=this.#s.get(t);if(!i?.status?.ready||typeof i.sendConnectionTest!="function")throw lr(D("\u9489\u9489\u673A\u5668\u4EBA"));return i.sendConnectionTest(Da(D("\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09",{clientId:Jb(o.clientId)})))})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#Q(t,async()=>{let i=await this.#A.resolve(o.secretRef).catch(()=>{});await this.#u(t);try{await this.#A.unset(o.secretRef),await this.#t.remove(t)}catch(e){throw Vr(i?.value)&&(await this.#A.set(o.secretRef,i.value).catch(()=>{}),await this.#B(o,i.value).catch(()=>{})),new Error("Unable to remove the DingTalk bot safely.",{cause:e})}try{await this.#a({botId:t,config:o})}catch{this.#i.warn?.(`[dsh-dingtalk] bot ${t} state cleanup failed`)}this.#I.delete(t),this.#M()}),this.status()}async approveSender(t,o){let i=this.#t.get(t);if(!i)throw new Error("Unknown DingTalk bot");let e=this.#s.get(t),a=typeof e?.pendingSender=="function"?eK(e.pendingSender(o)):null,A=XH(zb(e)),r=a?.requestId===o?a:A.find(g=>g.requestId===o);if(!r)throw new Error("Unknown DingTalk sender approval request");if(i.approvedSenders.some(g=>g.staffId===r.staffId))return this.status();let s={...i,approvedSenders:[...i.approvedSenders,{senderKey:YH(),staffId:r.staffId,displayName:r.displayName,approvedAt:wce(this.#c)}]};return await this.#E(i,s),this.status()}async revokeSender(t,o){let i=this.#t.get(t);if(!i)throw new Error("Unknown DingTalk bot");let e=i.approvedSenders.findIndex(A=>A.senderKey===o);if(e===-1)throw new Error("Unknown approved DingTalk sender");let a=[...i.approvedSenders];return a.splice(e,1),await this.#E(i,{...i,approvedSenders:a}),this.status()}status(){let t=this.#t.list().map(e=>{let a=this.#s.get(e.botId),A={};try{A=zb(a)}catch{A={state:"error"}}let r=ZH(a,A),s=this.#I.get(e.botId),g=r?"connected":s?"error":"offline",c=new Set(e.approvedSenders.map(d=>d.staffId)),I=XH(A).filter(d=>!c.has(d.staffId)).map(Oce);return{botId:e.botId,state:g,connected:r,configured:!0,bot:{name:D("\u9489\u9489\u673A\u5668\u4EBA"),clientIdMasked:Jb(e.clientId)},health:{status:r?"healthy":s?"error":"offline",summary:r?D("\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38"):s?.message??D("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"),lastCheckedAt:A.lastCheckedAt??null},stats:{messagesReceived:Number(A.messagesReceived)||0,messagesReplied:Number(A.messagesReplied)||0},lastMessageError:zr(A.lastMessageError),senders:{pending:I,approved:e.approvedSenders.map(bce)},error:s?structuredClone(s):null}}),o=t.filter(e=>e.connected).length,i=this.#o?this.#n.get(this.#o):null;return{schemaVersion:1,revision:this.#l,state:i&&WH.has(i.state)?"provisioning":t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o},...i&&WH.has(i.state)?{provisioning:iI(i)}:{}}}async close(){this.#p||(this.#p=!0,this.#o&&await this.cancelProvisioning(this.#o),await Promise.allSettled([...this.#s.keys()].map(t=>this.#u(t))),await Promise.allSettled([...this.#g.values()]),await Promise.allSettled([...this.#s.keys()].map(t=>this.#u(t))))}async#d(t){try{this.#y(t);let o=await this.#e.poll({deviceCode:t.deviceCode,signal:t.controller.signal});this.#y(t);let i=Vr(o.status)?.toUpperCase();if(i==="WAITING")t.state="pending",t.error=null;else if(i==="SUCCESS"){let e=Vr(o.clientId),a=Vr(o.clientSecret);if(!e||!a)throw new Error("DingTalk returned incomplete credentials");t.state="connecting",t.error=null,this.#M();let A=await this.#h(t,{clientId:e,clientSecret:a});t.botId=A.botId,t.alreadyConnected=A.alreadyConnected,t.state="connected",this.#o===t.id&&(this.#o=null)}else i==="EXPIRED"?(t.state="expired",t.error=Oa("expired",D("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#o===t.id&&(this.#o=null)):i==="FAIL"?(t.state="failed",t.error=Oa("authorization-failed",D("\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002")),this.#o===t.id&&(this.#o=null)):(t.state="pending",t.error=Oa("poll-pending",D("\u9489\u9489\u6388\u6743\u72B6\u6001\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}catch(o){t.controller.signal.aborted||o?.name==="AbortError"?(t.state="cancelled",t.error=Oa("cancelled",D("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")),this.#o===t.id&&(this.#o=null)):t.state==="connecting"?(t.state="failed",t.error=Oa("activation-failed",D("\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002")),this.#o===t.id&&(this.#o=null),this.#i.error?.("[dsh-dingtalk] bot activation failed")):(t.state="pending",t.error=Oa("poll-failed",D("\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}finally{this.#M(),this.#C()}}async#h(t,{clientId:o,clientSecret:i}){let e=wf(o),a=this.#t.getByClientId(o),A=await this.#A.resolve(e.secretRef).catch(()=>{}),r={botId:e.botId,clientId:o,secretRef:e.secretRef,approvedSenders:a?.approvedSenders??[]};return this.#Q(e.botId,async()=>{let s=async()=>{await this.#u(e.botId),a?await this.#t.save(a).catch(()=>{}):this.#t.get(e.botId)&&await this.#t.remove(e.botId).catch(()=>null)&&await this.#a({botId:e.botId,config:r}).catch(c=>{this.#i.warn?.("[dsh-dingtalk] failed to clean up cancelled bot state:",c)}),await this.#m(e.secretRef,A),a&&Vr(A?.value)&&await this.#B(a,A.value).catch(()=>{})};await this.#A.set(e.secretRef,i);try{this.#y(t),await this.#t.save(r),this.#y(t)}catch(g){throw await s(),g}try{await this.#B(r,i),this.#y(t),this.#I.delete(e.botId)}catch{if(t.controller.signal.aborted||this.#o!==t.id)throw await s(),Kg();this.#I.set(e.botId,Oa("connection-failed",D("\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#i.warn?.("[dsh-dingtalk] authorized bot saved but its connection is not ready")}return{botId:e.botId,alreadyConnected:!!a}})}async#E(t,o){return this.#Q(t.botId,async()=>{let i=await this.#f(t.secretRef);if(!i)throw new Error("The DingTalk client secret is missing");await this.#t.save(o);try{await this.#B(o,i),this.#I.delete(t.botId)}catch(e){throw await this.#t.save(t).catch(()=>{}),await this.#B(t,i).catch(()=>{}),this.#I.set(t.botId,Oa("connection-failed",D("\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),e}finally{this.#M()}})}async#B(t,o){if(this.#p||(await this.#u(t.botId),this.#p))throw Kg();let i=await this.#r({botId:t.botId,config:structuredClone(t),clientSecret:o});if(!i||typeof i.start!="function"||typeof i.stop!="function")throw new TypeError("createRuntime returned an invalid DingTalk runtime");if(this.#p)throw await i.stop().catch(()=>{}),Kg();this.#s.set(t.botId,i);try{if(await i.start(),this.#p)throw await i.stop().catch(()=>{}),Kg()}catch(e){throw this.#s.get(t.botId)===i&&this.#s.delete(t.botId),await i.stop().catch(()=>{}),e}}async#u(t){let o=this.#s.get(t);this.#s.delete(t),await o?.stop().catch(()=>{this.#i.warn?.(`[dsh-dingtalk] bot ${t} failed to stop cleanly`)})}async#f(t){let o=await this.#A.resolve(t).catch(()=>{});return Vr(o?.value)}async#m(t,o){try{Vr(o?.value)?await this.#A.set(t,o.value):await this.#A.unset(t)}catch{this.#i.error?.(`[dsh-dingtalk] failed to restore credential ${t}`)}}#y(t){if(t.controller.signal.aborted||this.#o!==t.id)throw Kg()}#Q(t,o){if(this.#p)return Promise.reject(new Error("dsh-dingtalk controller is closed"));let a=(this.#g.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#g.get(t)===a&&this.#g.delete(t)});return this.#g.set(t,a),a}#C(){for(let[t,o]of this.#n)t!==this.#o&&bf.has(o.state)&&this.#n.size>16&&this.#n.delete(t)}#M(){this.#l+=1}};import{randomUUID as eE}from"node:crypto";import{extname as Pce}from"node:path";var rK=5*1024*1024,Mce=20,_ce=20*1024*1024,Tce="\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002",ut=class extends Error{constructor(t,o,i,e={}){super(o,e),this.name="ImagePromptError",this.code=t,this.userMessage=i}},AK=Object.freeze({MODEL_DOES_NOT_SUPPORT_IMAGES:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u56FE\u7247\uFF0C\u8BF7\u7528 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u7528 /model <\u5E8F\u53F7> \u5207\u6362\u540E\u91CD\u53D1\u3002",IMAGE_TOO_LARGE:"\u56FE\u7247\u8D85\u8FC7\u5BBF\u4E3B\u5141\u8BB8\u7684\u5927\u5C0F\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",IMAGE_TOO_MANY_PIXELS:"\u56FE\u7247\u5206\u8FA8\u7387\u8FC7\u9AD8\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002",INVALID_IMAGE:"\u56FE\u7247\u5185\u5BB9\u65E0\u6548\u6216\u683C\u5F0F\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",INVALID_IMAGE_BASE64:"\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",IMAGE_TYPE_MISMATCH:"\u56FE\u7247\u683C\u5F0F\u4E0E\u5B9E\u9645\u5185\u5BB9\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002",TOO_MANY_IMAGES:"\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u6570\u91CF\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u540E\u91CD\u8BD5\u3002",IMAGES_TOO_LARGE:"\u56FE\u7247\u603B\u5927\u5C0F\u8D85\u8FC7\u5BBF\u4E3B\u9650\u5236\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"});function Nce(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}async function Vb(n){try{await n?.body?.cancel?.()}catch{}}async function Io(n,{fetchImpl:t=fetch,headers:o,signal:i,maxBytes:e=rK,timeoutMs:a=15e3,allowedHosts:A}={}){let r=new URL(n);if(r.protocol!=="https:")throw new Error("Image download URL must use HTTPS");if(Array.isArray(A)&&!A.some(I=>typeof I=="string"&&(r.hostname===I||I.startsWith(".")&&(r.hostname===I.slice(1)||r.hostname.endsWith(I)))))throw new Error("Image download URL is not hosted by the messaging platform");let s=await t(r,{method:"GET",headers:o,signal:Nce(i,a),redirect:"manual"});if(Number.isInteger(s?.status)&&s.status>=300&&s.status<400)throw await Vb(s),new ut("image-redirect-blocked",`Image download redirect was blocked (HTTP ${s.status})`,D("\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u53D1\u751F\u4E86\u91CD\u5B9A\u5411\uFF0C\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u3002"));if(!s?.ok)throw await Vb(s),new ut("image-http-error",`Image download failed with HTTP ${s?.status??"unknown"}`,D("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP {status}\uFF09\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002",{status:s?.status??"unknown"}));let g=Number(s.headers?.get?.("content-length"));if(Number.isFinite(g)&&g>e)throw await Vb(s),new ut("image-too-large",`Image response declares ${g} bytes; the limit is ${e}`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s.body?.[Symbol.asyncIterator]){let I=[],d=0;for await(let B of s.body){let f=Buffer.from(B);if(d+=f.length,d>e)throw await s.body.cancel?.().catch?.(()=>{}),new ut("image-too-large",`Image response exceeded ${e} bytes`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));I.push(f)}return Buffer.concat(I,d)}let c=Buffer.from(await s.arrayBuffer());if(c.length>e)throw new ut("image-too-large",`Image response contains ${c.length} bytes; the limit is ${e}`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));return c}function Rce(n){return typeof n=="string"?n.trim():""}function aK(n){return Array.isArray(n?.images)?n.images.filter(Boolean):[]}function tK(n){return typeof n!="string"?void 0:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim().slice(0,255)||void 0}function kce(n){if(n.length>=8&&n[0]===137&&n[1]===80&&n[2]===78&&n[3]===71&&n[4]===13&&n[5]===10&&n[6]===26&&n[7]===10)return"image/png";if(n.length>=3&&n[0]===255&&n[1]===216&&n[2]===255)return"image/jpeg";if(n.length>=6){let t=n.subarray(0,6).toString("ascii");if(t==="GIF87a"||t==="GIF89a")return"image/gif"}return n.length>=12&&n.subarray(0,4).toString("ascii")==="RIFF"&&n.subarray(8,12).toString("ascii")==="WEBP"?"image/webp":null}function vce(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let t=n?.data??n?.buffer;return Buffer.isBuffer(t)||t instanceof Uint8Array?{data:Buffer.from(t),name:n?.name??n?.filename}:null}function zt(n){return aK(n).length>0}async function lo(n,{signal:t,maxImageBytes:o=rK,maxImages:i=Mce,maxTotalImageBytes:e=_ce}={}){let a=aK(n);if(a.length>i)throw new ut("too-many-images",`Image message contains ${a.length} images; the limit is ${i}`,D("\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002",{maxImages:i}));let A=Rce(n?.content),r=[],s=0;A?r.push({type:"text",text:A}):a.length>0&&r.push({type:"text",text:D(Tce)});for(let[g,c]of a.entries()){if(t?.throwIfAborted(),Number.isFinite(c?.size)&&c.size>o)throw new ut("image-too-large",`Image ${g+1} declares ${c.size} bytes; the limit is ${o}`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(Number.isFinite(c?.size)&&s+c.size>e)throw new ut("images-too-large",`Images declare more than ${e} bytes in total`,D("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));let I;try{I=c?.data===void 0?await c?.load?.({signal:t,maxBytes:o}):c.data}catch(f){throw t?.aborted||f?.name==="AbortError"||f?.name==="TimeoutError"||f instanceof ut?f:new ut("image-download-failed",`Unable to download image ${g+1}: ${f?.message??String(f)}`,D("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let d=vce(I);if(!d?.data.length)throw new ut("invalid-image-data",`Image ${g+1} returned no data`,D("\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002"));if(d.data.length>o)throw new ut("image-too-large",`Image ${g+1} contains ${d.data.length} bytes; the limit is ${o}`,D("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s+d.data.length>e)throw new ut("images-too-large",`Images contain more than ${e} bytes in total`,D("\u4E00\u6B21\u53D1\u9001\u7684\u56FE\u7247\u603B\u5927\u5C0F\u8FC7\u5927\uFF0C\u8BF7\u51CF\u5C11\u56FE\u7247\u6570\u91CF\u6216\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));s+=d.data.length;let B=kce(d.data);if(!B)throw new ut("unsupported-image-type",`Image ${g+1} is not JPEG, PNG, GIF, or WebP`,D("\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u7247\u683C\u5F0F\uFF0C\u8BF7\u53D1\u9001 JPEG\u3001PNG\u3001WebP \u6216 GIF \u56FE\u7247\u3002"));r.push({type:"image",mediaType:B,data:d.data.toString("base64"),...tK(d.name??c?.name)?{name:tK(d.name??c?.name)}:{}})}return r}function Fi(n){if(n instanceof ut)return{code:"image-prompt-error",reason:n.code,userMessage:n.userMessage};if(n?.code!=="attachment-error"||typeof n?.details?.reason!="string")return null;let t=n.details.reason,o=Object.hasOwn(AK,t)?D(AK[t]):null;return o?{code:"attachment-error",reason:t,userMessage:o}:null}function po(n){return Fi(n)?.userMessage??null}var iK="https://oapi.dingtalk.com/",Gce="https://api.dingtalk.com/",Fce="DING_DWS_CLAW",Lce="02fcf2f4-5e02-4a85-b672-46d1f715543e.schema",oI="\u{1F914}\u601D\u8003\u4E2D",nK="\u2705\u5DF2\u5B8C\u6210",sK="\u274C\u5904\u7406\u5931\u8D25",Uce=15e3,Hce=5e3,Kce="2659900",xce="im_bg_1",Yce=new Set(["WAITING","SUCCESS","FAIL","EXPIRED"]),gt=class extends Error{constructor(t,o,i={}){super(o,i),this.name="DingtalkApiError",this.code=t,this.status=i.status,this.providerCode=i.providerCode}};function WA(n){return typeof n=="string"&&n.trim()?n.trim():null}function rE(n){let t=n==null?null:String(n).trim();return t&&/^-?[A-Za-z0-9_.:-]{1,160}$/.test(t)?t:void 0}function gK(n,t){return Number.isInteger(t?.status)&&(n.status=t.status),t?.providerCode!==void 0&&(n.providerCode=t.providerCode),n}function AE(n,{fallback:t="artifact-provider-rejected"}={}){if(n?.code?.startsWith?.("artifact-"))return n;let o=Number(n?.status),i=rE(n?.providerCode),e=i??"",a=t,A="DingTalk could not prepare the file for delivery.";o===401||o===403||i==="401"||i==="403"||/(?:permission|forbidden|unauthor|access.?denied|\.auth(?:\.|$))/i.test(e)?(a="artifact-permission-required",A="DingTalk denied permission to send the file."):o===413||i==="413"||/(?:too.?large|size.?limit)/i.test(e)?(a="artifact-too-large",A="The file exceeds DingTalk's size limit."):o===429||i==="429"||/(?:rate.?limit|too.?many|throttl)/i.test(e)?(a="artifact-rate-limited",A="DingTalk rate-limited file delivery."):t==="artifact-provider-rejected"&&(A="DingTalk rejected the file message.");let r=new Error(A,{cause:n});return r.code=a,gK(r,n)}function jce(n){let t=new Error("DingTalk file delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",gK(t,n)}function Wb(n){if(!n||typeof n!="object")return null;for(let t of["errcode","code"])if(n[t]!==void 0&&n[t]!==0&&n[t]!=="0")return rE(n[t])??"rejected";return null}function Jce(n,t){if(t?.aborted)throw vn(t);let o=Number(n?.status);return n?.code==="network-error"||n?.code==="timeout"||n?.code==="invalid-response"||o>=500&&o<600?jce(n):AE(n)}function qce(n){let t;try{t=new URL(n)}catch(o){throw new gt("invalid-image-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\u3002",{cause:o})}return t.protocol==="http:"&&(!t.port||t.port==="80")&&(t.protocol="https:",t.port=""),t}function oK(n){let t=n.toLowerCase().replace(/\.$/,"");return t==="dingtalk.com"||t.endsWith(".dingtalk.com")}function eM(n,{label:t,requireSubdomain:o=!0}={}){let i;try{i=new URL(n)}catch{throw new gt("invalid-url",`${t??"\u9489\u9489\u670D\u52A1"}\u8FD4\u56DE\u4E86\u65E0\u6548\u5730\u5740\u3002`)}let e=i.hostname.toLowerCase().replace(/\.$/,""),a=o?e!=="dingtalk.com"&&oK(e):oK(e);if(i.protocol!=="https:"||!a||i.port&&i.port!=="443")throw new gt("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);if(i.username||i.password)throw new gt("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);return i}function xg(n){let t=WA(n);if(!t)throw new gt("invalid-session-webhook","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u53EF\u7528\u7684\u56DE\u590D\u5730\u5740\u3002");let o=eM(t,{label:"\u9489\u9489\u56DE\u590D",requireSubdomain:!1});return o.hash="",o.toString()}function cK(n,t=4e3){let o=typeof n=="string"?n.trim():"";if(!o)return[];if(!Number.isInteger(t)||t<1)throw new TypeError("maxChars must be a positive integer");if(o.length<=t)return[o];let i=[],e=o;for(;e.length>t;){let a=e.lastIndexOf(` +`,t);a{if(t?.aborted){i(vn(t));return}let e=setTimeout(()=>{t?.removeEventListener("abort",a),o()},n),a=()=>{clearTimeout(e),i(vn(t))};t?.addEventListener("abort",a,{once:!0})})}async function kn(n,t,{body:o,signal:i,timeoutMs:e=Uce,headers:a={},method:A="POST",action:r="request"}={}){let s=new AbortController,g=!1,c=()=>s.abort(i?.reason);if(i?.aborted)throw vn(i);i?.addEventListener("abort",c,{once:!0});let I=e>0?setTimeout(()=>{g=!0,s.abort()},e):null;try{let d=await n(t,{method:A,redirect:"error",headers:{"content-type":"application/json",...a},body:JSON.stringify(o??{}),signal:s.signal});if(!d.ok){let B;try{let f=await d.json();B=rE(f?.code??f?.errcode)}catch{}throw new gt("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${d.status}\uFF09\u3002`,{status:d.status,providerCode:B})}try{return await d.json()}catch(B){throw new gt("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:B})}}catch(d){throw i?.aborted?vn(i):g?new gt("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:d}):d instanceof gt?d:new gt("network-error",`\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489${r}\u8BF7\u6C42\u3002`,{cause:d})}finally{I&&clearTimeout(I),i?.removeEventListener("abort",c)}}async function Vce(n,t,{body:o,signal:i,timeoutMs:e=6e4}={}){let a=new AbortController,A=!1,r=()=>a.abort(i?.reason);if(i?.aborted)throw vn(i);i?.addEventListener("abort",r,{once:!0});let s=setTimeout(()=>{A=!0,a.abort()},e);try{let g=await n(t,{method:"POST",body:o,signal:a.signal,redirect:"error"}),c,I;try{c=await g.json()}catch(d){I=d}if(!g.ok)throw new gt("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${g.status}\uFF09\u3002`,{status:g.status,providerCode:rE(c?.code??c?.errcode)});if(I)throw new gt("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:I});return c}catch(g){throw i?.aborted?vn(i):A?new gt("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:g}):g instanceof gt?g:new gt("network-error","\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002",{cause:g})}finally{clearTimeout(s),i?.removeEventListener("abort",r)}}function Wce(n){let t=WA(n?.robotCode);if(!t)throw new TypeError("DingTalk robotCode is required");if(n?.type==="group"){let o=WA(n.openConversationId);if(o)return{type:"group",robotCode:t,openConversationId:o}}if(n?.type==="user"){let o=WA(n.userId);if(o)return{type:"user",robotCode:t,userId:o}}throw new TypeError("DingTalk file target is invalid")}function Zce(n){return Pce(n).slice(1).toLowerCase()}function Xce(n){if(n?.type==="user"){let t=WA(n.userId);if(t)return{type:"user",userId:t}}if(n?.type==="group"){let t=WA(n.openConversationId);if(t)return{type:"group",openConversationId:t}}throw new TypeError("DingTalk AI Card target is invalid")}function Zb(n,t){return{cardParamMap:{flowStatus:t,msgContent:tE(n),staticMsgContent:"",sys_full_json_obj:JSON.stringify({order:["msgContent"]}),config:JSON.stringify({autoLayout:!0})}}}function $ce(n,t,o){let i={outTrackId:n,userIdType:1};return t.type==="group"?{...i,openSpaceId:`dtv1.card//IM_GROUP.${t.openConversationId}`,imGroupOpenDeliverModel:{robotCode:o}}:{...i,openSpaceId:`dtv1.card//IM_ROBOT.${t.userId}`,imRobotOpenDeliverModel:{spaceType:"IM_ROBOT",robotCode:o,extension:{dynamicSummary:"true"}}}}function tE(n){let o=(typeof n=="string"?n.replace(/\r\n?/g,` `):"").split(` `),i=!1;return o.map((e,a)=>{let A=/^\s{0,3}```/.test(e),r=i;return A&&(i=!i),a===o.length-1?e:r||A||i||!e||!o[a+1]?`${e} `:/^\s{0,3}(?:[-*+] |\d+[.)] |#{1,6} |\||> )/.test(o[a+1])?`${e} -`:`${e}
`}).join("")}function Pb(n,t){if(!n||typeof n!="object"||n.errcode!==0)throw new gt("registration-rejected",`\u9489\u9489\u626B\u7801${t}\u5931\u8D25\u3002`);return n}function Gb(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function KH({fetchImpl:n=fetch,registrationBaseUrl:t=process.env.DINGTALK_REGISTRATION_BASE_URL||PH,registrationSource:o=process.env.DINGTALK_REGISTRATION_SOURCE||ace,now:i=()=>Date.now(),cardMinIntervalMs:e=50,cardBackoffMs:a=1e3,delay:A=dce}={}){if(typeof n!="function")throw new TypeError("fetchImpl must be a function");if(typeof i!="function")throw new TypeError("now must be a function");if(!Number.isFinite(e)||e<0)throw new TypeError("cardMinIntervalMs must be a non-negative number");if(!Number.isFinite(a)||a<0)throw new TypeError("cardBackoffMs must be a non-negative number");if(typeof A!="function")throw new TypeError("delay must be a function");let r=Fb(t,{label:"\u9489\u9489\u6CE8\u518C\u670D\u52A1",requireSubdomain:!1}),s=new URL(rce),g=WA(o);if(!g)throw new TypeError("registrationSource is required");let c=new Map,I=new Map,d=new Map,B=Promise.resolve(),f=0,Q=(L,q)=>new URL(q.replace(/^\//,""),L);async function y({clientId:L,clientSecret:q,signal:j,requestKind:K="normal"}){let v=WA(L),W=WA(q);if(!v||!W)throw new TypeError("clientId and clientSecret are required");let Y=c.get(v);if(Y&&Y.expiresAt>i())return Y.token;let N=K==="reaction"?d:I;if(N.has(v))return N.get(v);let V=(async()=>{let te=await Tn(n,Q(s,"v1.0/oauth2/accessToken"),{body:{appKey:v,appSecret:W},signal:j,action:"\u9274\u6743"}),ne=WA(te?.accessToken);if(!ne)throw new gt("invalid-access-token","\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u8BBF\u95EE\u4EE4\u724C\u3002");let Ne=Gb(te?.expireIn??te?.expiresIn,7200),ce=Math.max(1e3,(Ne-60)*1e3);return c.set(v,{token:ne,expiresAt:i()+ce}),ne})().finally(()=>N.delete(v));return N.set(v,V),V}async function m({clientId:L,clientSecret:q,robotCode:j,messageId:K,conversationId:v,reactionName:W=$c,signal:Y},N){let P=WA(L),V=WA(q),te=WA(j)??P,ne=WA(K),Ne=WA(v),ce=WA(W);if(!P||!V)throw new TypeError("clientId and clientSecret are required");if(!te)throw new TypeError("robotCode is required");if(!ne||!Ne)throw new TypeError("messageId and conversationId are required");if(!ce)throw new TypeError("reactionName is required");let Te=await y({clientId:P,clientSecret:V,signal:Y,requestKind:"reaction"}),fe=await Tn(n,Q(s,`v1.0/robot/emotion/${N}`),{body:{robotCode:te,openMsgId:ne,openConversationId:Ne,emotionType:2,emotionName:ce,textEmotion:{emotionId:sce,emotionName:ce,text:ce,backgroundId:gce}},headers:{"x-acs-dingtalk-access-token":Te},signal:Y,timeoutMs:nce,action:N==="reply"?"\u6D88\u606F\u72B6\u6001\u6DFB\u52A0":"\u6D88\u606F\u72B6\u6001\u64A4\u56DE"}),De=fe?.success===!1?Zh(fe?.code??fe?.errcode)??"rejected":kb(fe);if(De)throw new gt("reaction-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6D88\u606F\u72B6\u6001\u8BF7\u6C42\u3002",{providerCode:De});return!0}async function _({clientId:L,clientSecret:q,robotCode:j,downloadCode:K,signal:v,kind:W}){let Y=WA(j),N=WA(K);if(!Y||!N)throw new TypeError("robotCode and downloadCode are required");let P=await y({clientId:L,clientSecret:q,signal:v}),V;try{V=await Tn(n,Q(s,"v1.0/robot/messageFiles/download"),{body:{downloadCode:N,robotCode:Y},headers:{"x-acs-dingtalk-access-token":P},signal:v,action:`${W==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740`})}catch(ne){throw v?.aborted?ne:new gt(`${W}-download-address-failed`,`\u9489\u9489${W==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u83B7\u53D6\u5931\u8D25\u3002`,{cause:ne,status:ne?.status,providerCode:ne?.providerCode})}let te=WA(V?.downloadUrl??V?.download_url);if(!te)throw new gt(`invalid-${W}-download`,`\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE${W==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u3002`);return pce(te)}function T(L){let q=async()=>{let K=Math.max(0,f-i());K>0&&await A(K,L),f=Math.max(f,i())+e},j=B.then(q,q);return B=j.catch(()=>{}),j}async function G(L,q){await T(q.signal);try{return await Tn(n,Q(s,L),q)}catch(j){if(!(j instanceof gt)||j.status!==403)throw j;return await A(a,q.signal),await T(q.signal),Tn(n,Q(s,L),q)}}async function x({clientId:L,clientSecret:q,cardInstanceId:j,text:K,signal:v}){let W=WA(j),Y=WA(K);if(!W)throw new TypeError("cardInstanceId is required");if(!Y)throw new TypeError("text is required");let P={"x-acs-dingtalk-access-token":await y({clientId:L,clientSecret:q,signal:v})},V=[G("v1.0/card/streaming",{method:"PUT",body:{outTrackId:W,guid:zh(),key:"msgContent",content:Wh(Y),isFull:!0,isFinalize:!1,isError:!0},headers:P,signal:v,action:"AI Card \u5931\u8D25\u6536\u53E3"}),G("v1.0/card/instances",{method:"PUT",body:{outTrackId:W,cardData:vb(Y,"5"),cardUpdateOptions:{updateCardDataByKey:!0}},headers:P,signal:v,action:"AI Card \u5931\u8D25\u72B6\u6001"})],te=await Promise.allSettled(V);if(te.every(({status:ne})=>ne==="rejected"))throw te[0].reason;return!0}async function J({clientId:L,clientSecret:q,target:j,file:K,signal:v},{uploadType:W,messageKey:Y,createMessageParams:N}){if(!K||typeof K!="object"||typeof K.fileName!="string"||!K.fileName||!Buffer.isBuffer(K.bytes))throw new TypeError("A DingTalk file is required");let P=Ece(j),V;try{V=await y({clientId:L,clientSecret:q,signal:v})}catch(ve){if(v?.aborted)throw Nn(v);let iA=Number(ve?.status),Ce=ve?.code==="http-error"&&iA>=400&&iA<500?"artifact-provider-rejected":"artifact-provider-failed";throw Vh(ve,{fallback:Ce})}let te=new URL("media/upload",PH);te.searchParams.set("access_token",V),te.searchParams.set("type",W);let ne=new FormData;ne.append("media",new Blob([K.bytes],{type:K.mediaType??"application/octet-stream"}),K.fileName);let Ne;try{Ne=await hce(n,te,{body:ne,signal:v})}catch(ve){if(v?.aborted)throw Nn(v);let iA=Number(ve?.status),Ce=ve?.code==="http-error"&&iA>=400&&iA<500?"artifact-provider-rejected":"artifact-provider-failed";throw Vh(ve,{fallback:Ce})}let ce=kb(Ne),Te=WA(Ne?.media_id);if(ce||!Te)throw Vh(new gt("upload-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u3002",{providerCode:ce??"missing-media-id"}));v?.throwIfAborted();let fe={robotCode:P.robotCode,msgKey:Y,msgParam:JSON.stringify(N(Te,K)),...P.type==="group"?{openConversationId:P.openConversationId}:{userIds:[P.userId]}},De=P.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",Ke;try{Ke=await Tn(n,Q(s,De),{body:fe,headers:{"x-acs-dingtalk-access-token":V},signal:v,action:"\u6587\u4EF6\u6D88\u606F\u53D1\u9001"})}catch(ve){throw lce(ve,v)}let rA=kb(Ke);if(rA)throw Vh(new gt("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002",{providerCode:rA}));return Ke}return Object.freeze({async beginRegistration({signal:L}={}){let q=Pb(await Tn(n,Q(r,"app/registration/init"),{body:{source:g},signal:L,action:"\u521D\u59CB\u5316"}),"\u521D\u59CB\u5316"),j=WA(q.nonce);if(!j)throw new gt("invalid-registration","\u9489\u9489\u626B\u7801\u521D\u59CB\u5316\u7F3A\u5C11 nonce\u3002");let K=Pb(await Tn(n,Q(r,"app/registration/begin"),{body:{nonce:j},signal:L,action:"\u521B\u5EFA"}),"\u521B\u5EFA"),v=WA(K.device_code),W=WA(K.verification_uri_complete);if(!v||!W)throw new gt("invalid-registration","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u7684\u4FE1\u606F\u4E0D\u5B8C\u6574\u3002");let Y=Fb(W,{label:"\u9489\u9489\u626B\u7801",requireSubdomain:!1}).toString();return{deviceCode:v,userCode:WA(K.user_code)??void 0,verificationUri:WA(K.verification_uri)??void 0,verificationUriComplete:Y,expiresInSeconds:Gb(K.expires_in,7200),intervalSeconds:Gb(K.interval,5)}},async pollRegistration({deviceCode:L,signal:q}={}){let j=WA(L);if(!j)throw new TypeError("deviceCode is required");let K=Pb(await Tn(n,Q(r,"app/registration/poll"),{body:{device_code:j},signal:q,action:"\u72B6\u6001\u67E5\u8BE2"}),"\u72B6\u6001\u67E5\u8BE2"),v=WA(K.status)?.toUpperCase();if(!v||!cce.has(v))throw new gt("invalid-registration-status","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u72B6\u6001\u3002");let W={status:v,failReason:WA(K.fail_reason)??void 0};if(v==="SUCCESS"&&(W.clientId=WA(K.client_id)??void 0,W.clientSecret=WA(K.client_secret)??void 0,!W.clientId||!W.clientSecret))throw new gt("missing-credentials","\u9489\u9489\u626B\u7801\u5DF2\u786E\u8BA4\uFF0C\u4F46\u6CA1\u6709\u8FD4\u56DE\u673A\u5668\u4EBA\u51ED\u636E\u3002");return W},accessToken:y,async addReaction(L){return m(L,"reply")},async recallReaction(L){return m(L,"recall")},async addThinkingReaction(L){return m({...L,reactionName:$c},"reply")},async recallThinkingReaction(L){return m({...L,reactionName:$c},"recall")},async downloadImage({clientId:L,clientSecret:q,robotCode:j,downloadCode:K,signal:v,maxBytes:W}){let Y=await _({clientId:L,clientSecret:q,robotCode:j,downloadCode:K,signal:v,kind:"image"});try{return await co(Y,{fetchImpl:n,signal:v,maxBytes:W})}catch(N){throw v?.aborted||N instanceof ut?N:new gt("image-content-download-failed","\u9489\u9489\u56FE\u7247\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:N})}},async downloadFile({clientId:L,clientSecret:q,robotCode:j,downloadCode:K,signal:v}){let W=await _({clientId:L,clientSecret:q,robotCode:j,downloadCode:K,signal:v,kind:"file"});if(W.protocol!=="https:")throw new gt("invalid-file-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u3002");try{let Y=await n(W,{method:"GET",redirect:"follow",signal:v});if(!Y?.ok)throw await Y?.body?.cancel?.().catch?.(()=>{}),new gt("file-content-download-failed",`\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP ${Y?.status??"unknown"}\uFF09\u3002`,{status:Y?.status});return Buffer.from(await Y.arrayBuffer())}catch(Y){throw v?.aborted?Nn(v):Y instanceof gt?Y:new gt("file-content-download-failed","\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:Y})}},async createAiCard({clientId:L,clientSecret:q,target:j,initialText:K,signal:v}){let W=WA(L),Y=WA(q),N=WA(K);if(!W||!Y)throw new TypeError("clientId and clientSecret are required");if(!N)throw new TypeError("initialText is required");let P=uce(j),V=await y({clientId:W,clientSecret:Y,signal:v}),te=`dsh_${zh()}`,ne={"x-acs-dingtalk-access-token":V},Ne=!1;try{await G("v1.0/card/instances",{body:{cardTemplateId:ice,outTrackId:te,cardData:{cardParamMap:{config:JSON.stringify({autoLayout:!0})}},callbackType:"STREAM",imGroupOpenSpaceModel:{supportForward:!0},imRobotOpenSpaceModel:{supportForward:!0}},headers:ne,signal:v,action:"AI Card \u521B\u5EFA"}),await G("v1.0/card/instances/deliver",{body:Bce(te,P,W),headers:ne,signal:v,action:"AI Card \u6295\u653E"}),Ne=!0,await G("v1.0/card/instances",{method:"PUT",body:{outTrackId:te,cardData:vb(N,"2")},headers:ne,signal:v,action:"AI Card \u542F\u52A8"}),await G("v1.0/card/streaming",{method:"PUT",body:{outTrackId:te,guid:zh(),key:"msgContent",content:Wh(N).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:ne,signal:v,action:"AI Card \u542F\u52A8"})}catch(ce){if(Ne){let Te=AbortSignal.timeout(5e3);await x({clientId:W,clientSecret:Y,cardInstanceId:te,text:D("\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002"),signal:Te}).catch(()=>{})}throw ce}return{cardInstanceId:te}},async updateAiCard({clientId:L,clientSecret:q,cardInstanceId:j,text:K,signal:v}){let W=WA(j),Y=WA(K);if(!W)throw new TypeError("cardInstanceId is required");if(!Y)throw new TypeError("text is required");let N=await y({clientId:L,clientSecret:q,signal:v});return await G("v1.0/card/streaming",{method:"PUT",body:{outTrackId:W,guid:zh(),key:"msgContent",content:Wh(Y).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:{"x-acs-dingtalk-access-token":N},signal:v,action:"AI Card \u66F4\u65B0"}),!0},async finishAiCard({clientId:L,clientSecret:q,cardInstanceId:j,text:K,signal:v}){let W=WA(j),Y=WA(K);if(!W)throw new TypeError("cardInstanceId is required");if(!Y)throw new TypeError("text is required");let P={"x-acs-dingtalk-access-token":await y({clientId:L,clientSecret:q,signal:v})},V=Wh(Y);await G("v1.0/card/streaming",{method:"PUT",body:{outTrackId:W,guid:zh(),key:"msgContent",content:V,isFull:!0,isFinalize:!0,isError:!1},headers:P,signal:v,action:"AI Card \u5B8C\u6210"});let te=!0,ne={method:"PUT",body:{outTrackId:W,cardData:vb(Y,"3"),cardUpdateOptions:{updateCardDataByKey:!0}},headers:P,signal:v,action:"AI Card \u6536\u53E3"};try{await G("v1.0/card/instances",ne)}catch{try{await G("v1.0/card/instances",ne)}catch{te=!1}}return{delivered:!0,completed:te}},failAiCard:x,async sendText({clientId:L,clientSecret:q,sessionWebhook:j,text:K,signal:v}){let W=WA(K);if(!W)throw new TypeError("text is required");let Y=Fg(j),N=await y({clientId:L,clientSecret:q,signal:v}),P=await Tn(n,Y,{body:{msgtype:"text",text:{content:W}},headers:{"x-acs-dingtalk-access-token":N},signal:v,action:"\u6D88\u606F\u56DE\u590D"});if(P?.errcode!==void 0&&P.errcode!==0||P?.code!==void 0&&P.code!==0)throw new gt("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002");return!0},async sendFile(L){return J(L,{uploadType:"file",messageKey:"sampleFile",createMessageParams:(q,j)=>({mediaId:q,fileName:j.fileName,fileType:Cce(j.fileName)})})},async sendImage(L){return J(L,{uploadType:"image",messageKey:"sampleImageMsg",createMessageParams:q=>({photoURL:q})})},clearAccessToken(L){let q=WA(L);q&&c.delete(q)}})}var fce=500,Qce="\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002";function Lb(n,t){if(typeof n!="string")throw new TypeError(`${t} must be a string`);return n}function xH(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} is required`);return n.trim()}function YH({api:n,clientId:t,clientSecret:o,target:i,signal:e,logger:a=console,updateIntervalMs:A=fce,clock:r=()=>Date.now(),timer:s={setTimeout:(g,c)=>globalThis.setTimeout(g,c),clearTimeout:g=>globalThis.clearTimeout(g)}}={}){if(!n||typeof n.createAiCard!="function"||typeof n.updateAiCard!="function"||typeof n.finishAiCard!="function")throw new TypeError("DingTalk AI Card API is required");let g=xH(t,"clientId"),c=xH(o,"clientSecret");if(i==null)throw new TypeError("target is required");if(!Number.isFinite(A)||A<0)throw new TypeError("updateIntervalMs must be a non-negative number");if(typeof r!="function")throw new TypeError("clock must be a function");if(typeof s?.setTimeout!="function"||typeof s?.clearTimeout!="function")throw new TypeError("timer must provide setTimeout and clearTimeout");let I=()=>{let N=r();if(!Number.isFinite(N))throw new TypeError("clock must return a finite timestamp");return N};I();let d=e?.aborted?"aborted":"idle",B=null,f=null,Q=null,y=null,m=null,_=null,T=0,G=()=>{Q!==null&&(s.clearTimeout(Q),Q=null)},x=()=>e?.removeEventListener("abort",j),J=N=>{d=N,f=null,G(),x()},L=()=>!B||typeof n.failAiCard!="function"?Promise.resolve(!1):(_||(_=n.failAiCard({...B,text:D(Qce),signal:AbortSignal.timeout(5e3)}).then(()=>!0,()=>!1)),_),q=N=>{d==="failed"||d==="finished"||d==="aborted"||(L(),J("failed"),a?.error?.(`[dsh-dingtalk] AI Card ${N} failed`))};function j(){d==="finished"||d==="failed"||d==="aborted"||(L(),J("aborted"))}d!=="aborted"&&e?.addEventListener("abort",j,{once:!0});let K=()=>{if(d!=="active"||y||f===null)return;let N=Math.max(0,T+A-I());if(N>0){Q=s.setTimeout(()=>{Q=null,K()},N);return}let P=f;f=null,y=(async()=>{try{await n.updateAiCard({...B,text:P,finished:!1}),T=I()}catch{if(e?.aborted||d==="aborted")return;q("update")}})().finally(()=>{y=null,d==="active"&&f!==null&&K()})};return Object.freeze({start:async N=>{if(Lb(N,"initialText"),d!=="idle")return!1;d="starting";try{let P=await n.createAiCard({clientId:g,clientSecret:c,target:i,initialText:N,signal:e}),V=typeof P?.cardInstanceId=="string"?P.cardInstanceId.trim():"";if(!V)throw new TypeError("DingTalk did not return a card instance id");return B=Object.freeze({clientId:g,clientSecret:c,target:i,cardInstanceId:V,signal:e}),d!=="starting"?(L(),!1):(T=I(),d="active",!0)}catch{return e?.aborted||d==="aborted"?(J("aborted"),!1):(q("creation"),!1)}},push:N=>{Lb(N,"progressText"),d==="active"&&(f=N,!Q&&!y&&K())},finish:N=>{if(Lb(N,"finalText"),d==="finished")return Promise.resolve(!0);if(d==="finishing")return m;if(d!=="active")return Promise.resolve(!1);d="finishing",f=null,G();let P=y;return m=(async()=>{if(P&&await P,d!=="finishing")return!1;try{return await n.finishAiCard({...B,text:N}),d!=="finishing"?!1:(J("finished"),!0)}catch{return e?.aborted||d==="aborted"?(J("aborted"),!1):(q("finish"),!1)}})(),m}})}function uf(n){return typeof n=="string"&&n.trim()?n.trim():null}function ai(n){return n&&typeof n.id=="string"&&typeof n.question=="string"&&(n.header===void 0||typeof n.header=="string")&&(n.detail===void 0||typeof n.detail=="string")&&(n.multiSelect===void 0||typeof n.multiSelect=="boolean")&&(n.options===void 0||Array.isArray(n.options)&&n.options.every(t=>t&&typeof t.label=="string"&&(t.description===void 0||typeof t.description=="string")))}function ii(n,t,o,{requiresMention:i=!1}={}){let e=[],a=o>1?`\uFF08${t+1}/${o}\uFF09`:"";e.push(D("DeepSeek Harness \u9700\u8981\u4F60\u8865\u5145\u4FE1\u606F{progress}\uFF1A",{progress:a})),uf(n.header)&&e.push("",n.header.trim()),e.push("",uf(n.question)??D("\u8BF7\u8F93\u5165\u4F60\u7684\u56DE\u7B54\u3002")),uf(n.detail)&&e.push("",n.detail.trim());let A=Array.isArray(n.options)?n.options:[];return A.length>0?(e.push(""),A.forEach((r,s)=>{let g=typeof r?.label=="string"?r.label:"",c=uf(r?.description);e.push(`${s+1}. ${g}${c?` \u2014 ${c}`:""}`)}),e.push("",n.multiSelect===!0?D("\u8BF7\u56DE\u590D\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF1B\u591A\u9009\u7528\u9017\u53F7\u5206\u9694\uFF0C\u4E5F\u53EF\u8865\u5145\u5176\u4ED6\u5185\u5BB9\u3002"):D("\u8BF7\u56DE\u590D\u4E00\u4E2A\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF0C\u4E5F\u53EF\u76F4\u63A5\u8F93\u5165\u5176\u4ED6\u7B54\u6848\u3002"))):e.push("",D("\u8BF7\u76F4\u63A5\u56DE\u590D\u4F60\u7684\u7B54\u6848\u3002")),i&&e.push("",D("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u7B54\u6848\u3002")),e.join(` -`)}function jH(n,t){let o=n.trim();if(!o)return null;if(/^\d+$/.test(o)){let e=t[Number(o)-1];return typeof e?.label=="string"?e.label:null}let i=t.find(e=>e?.label===o);return typeof i?.label=="string"?i.label:null}function oi(n,t){let o=Array.isArray(n.options)?n.options:[];if(o.length===0)return{id:n.id,selected:[],custom:t};let i=jH(t,o);if(n.multiSelect!==!0)return i?{id:n.id,selected:[i]}:{id:n.id,selected:[],custom:t};if(i)return{id:n.id,selected:[i]};let e=[],a=[];for(let A of t.split(/[,,、;;\n]+/)){let r=A.trim();if(!r)continue;let s=jH(r,o);s?e.includes(s)||e.push(s):a.push(r)}return{id:n.id,selected:e,...a.length>0?{custom:a.join("\u3001")}:{}}}var yce=new Map([["\u6279\u51C6","allowed-once"],["\u540C\u610F","allowed-once"],["yes","allowed-once"],["\u62D2\u7EDD","rejected"],["\u4E0D\u540C\u610F","rejected"],["no","rejected"]]),Ub="\u8BF7\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\uFF08\u4E5F\u652F\u6301\uFF1A\u540C\u610F / \u4E0D\u540C\u610F / yes / no\uFF09\u3002",mce="\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u95EE\u9898\uFF0C\u518D\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002",Hl="\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u590D\u3002",Sce=5*6e4,Dce=2048;function Oa(n){return typeof n=="string"?n.trim():""}function Hb(n){return Oa(n).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g,"")}function wce(n){return yce.get(Oa(n).toLowerCase())??null}function qH(n){return n?.type==="approval/requested"&&!!Oa(n.sessionId)&&!!Oa(n.approvalId)&&!!Oa(n.toolName)&&(n.callId===void 0||!!Oa(n.callId))&&(n.reason===void 0||typeof n.reason=="string")}function Oce(n){let t=n?.arguments;if(t!==null&&typeof t=="object")try{return JSON.stringify(t,null,2)}catch{return null}if(typeof t!="string")return null;let o=Hb(t);if(!o)return t===""?"{}":null;try{return JSON.stringify(JSON.parse(o),null,2)}catch{return o}}function Kb(n,{toolCall:t,requiresMention:o=!1,maxArgumentsLength:i=6e3}={}){if(!qH(n))return null;let e=Oa(n.callId);if(!e||Oa(t?.callId)!==e||Oa(t?.name)!==Oa(n.toolName))return null;let a=Oce(t);if(!a||a.length>i)return null;let A=[D("DeepSeek Harness \u9700\u8981\u4F60\u7684\u5BA1\u6279\uFF1A"),"",D("\u5DE5\u5177\uFF1A{tool}",{tool:Hb(n.toolName)}),D("\u64CD\u4F5C\u53C2\u6570\uFF1A"),a],r=Hb(n.reason);return r&&A.push(D("\u539F\u56E0\uFF1A{reason}",{reason:r})),A.push("",D(Ub)),o&&A.push("",D("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u5BA1\u6279\u51B3\u5B9A\u3002")),A.join(` -`)}function JH(n,t){return{ok:!0,value:{sessionId:n.sessionId,approvalId:n.approvalId,outcome:t}}}function Bf(n){return n==="allowed-once"?D("\u5DF2\u6279\u51C6\uFF0C\u4EC5\u5BF9\u672C\u6B21\u64CD\u4F5C\u6709\u6548\u3002"):n==="rejected"?D("\u5DF2\u62D2\u7EDD\u6B64\u6B21\u64CD\u4F5C\u3002"):D(Hl)}var ni=class{#e;#A;#t=new Map;#r=new Map;#a=new Map;constructor({label:t="IM",logger:o=console}={}){this.#e=t,this.#A=o}hasPending(t){return this.#r.get(t)?.items.some(o=>!o.inactive)===!0}claimReply({key:t,actor:o,text:i,addressed:e=!0,hasPendingQuestion:a=!1,questionCompletion:A,isQuestionPending:r,send:s}){let c=this.#r.get(t)?.items[0],I=wce(i),d=(f,Q=!1)=>({...Q?{resolved:!0}:{},process:async y=>{typeof y=="function"&&await y()===!1||await s(f)}}),B=a&&c&&A&&typeof A.then=="function";return a&&!B?null:!c||c.inactive?(this.#a.get(t)??0)<=Date.now()?(this.#a.delete(t),null):I?d(D(Hl),!0):null:c.actor!==o||c.requiresMention&&e!==!0?I?d(D("\u53EA\u6709\u53D1\u8D77\u5F53\u524D\u4EFB\u52A1\u7684\u7528\u6237\u53EF\u4EE5\u5904\u7406\u8FD9\u6761\u5BA1\u6279\u3002")):null:{process:async f=>{let Q=c.presented,m=(c.replyTail??Promise.resolve()).catch(()=>{}).then(async()=>{if(!(typeof f=="function"&&await f()===!1)){if(B){if(await A.catch(()=>{}),c.inactive||c.resolving)return;if(typeof r=="function"&&r()){await s(D(mce));return}}if(await c.activationTask?.catch(()=>{}),await c.presentationTask?.catch(()=>{}),c.inactive||c.resolving){await s(D(Hl));return}if(c.send=s,!Q||!c.presented){if(c.presented||await this.#i(c),c.inactive||c.resolving)return;await s(D(Ub));return}if(c.submitting){await s(D("\u5BA1\u6279\u51B3\u5B9A\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7A0D\u5019\u3002"));return}if(!I){await s(D(Ub));return}await this.#c(c,I)}});c.replyTail=m;try{await m}finally{c.replyTail===m&&(c.replyTail=null)}}}}async handleRequested(t,o){if(t?.kind!=="approval")return!1;let i=t.payload,e=Oa(i?.approvalId);if(!Oa(t.rpcId)||!Oa(t.sessionId)||!e||!qH(i)||i.sessionId!==t.sessionId||typeof t.respond!="function")return this.#A.warn?.(`[dsh-im:${this.#e}] ignored an invalid Harness approval`),!0;if(t.recovered===!0)return await this.#g(t,i),!0;let a=this.#t.get(e);if(a)return a.interaction=t,a.toolCall=t.toolCall,a.presented||await this.#i(a),!0;let A=o?.send,r=Oa(o?.key),s=Oa(o?.actor);if(!r||!s||typeof A!="function")return this.#A.warn?.(`[dsh-im:${this.#e}] ignored an approval without a reply route`),await this.#g(t,i),!0;let g=Kb(i,{toolCall:t.toolCall,requiresMention:o.requiresMention===!0});if(!g){let d=await this.#g(t,i);return await A(d?D("\u65E0\u6CD5\u5B8C\u6574\u5C55\u793A\u8FD9\u6B21\u64CD\u4F5C\uFF0C\u5DF2\u5B89\u5168\u62D2\u7EDD\u6B64\u6B21\u5BA1\u6279\u3002"):D(Hl)),!0}let c={approvalId:e,sessionId:t.sessionId,interaction:t,toolCall:t.toolCall,key:r,actor:s,requiresMention:o.requiresMention===!0,send:A,text:g,presented:!1,presentationTask:null,deliveryCompleted:!1,replyTail:null,submitting:!1,inactive:!1,resolving:!1,closedOutcome:null,resolutionNotified:!1,activationTask:null};this.#t.set(e,c);let I=this.#r.get(r)??{items:[]};return I.items.push(c),this.#r.set(r,I),I.items[0]===c&&await this.#i(c),!0}async handleResolved(t){if(t?.kind!=="approval")return!1;let o=this.#t.get(Oa(t.interactionId));if(!o||(o.resolving=!0,o.activationTask&&await o.activationTask.catch(()=>{}),o.inactive||this.#t.get(o.approvalId)!==o))return!0;let i=o.presentationTask,e=o.presented||i,a=o.send,A=this.#n(o);return await this.#s(A,async()=>{let r=o.presented;i&&(r=await i.then(()=>!0,()=>!1)),e&&r&&(o.resolutionNotified=!0,await a(Bf(t.outcome)).catch(()=>{}))}),!0}async closeRoute(t){let o=this.#r.get(t);if(!o)return;let i=[...o.items];for(let e of i)this.#n(e);await Promise.all(i.map(async e=>{try{await e.interaction.respond(JH(e,"rejected"),{signal:AbortSignal.timeout(5e3)}),e.closedOutcome="rejected",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(Bf("rejected")).catch(()=>{}))}catch(a){a?.code==="interaction-not-pending"?(e.closedOutcome="resolved",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(D(Hl)).catch(()=>{}))):this.#A.warn?.(`[dsh-im:${this.#e}] failed to reject a closing approval:`,a)}}))}async#i(t){if(this.#r.get(t.key)?.items[0]!==t||t.inactive||t.resolving||t.presented||(await t.activationTask?.catch(()=>{}),this.#r.get(t.key)?.items[0]!==t||t.inactive||t.resolving||t.presented))return;if(t.presentationTask)return t.presentationTask;let o=Promise.resolve().then(()=>t.send(t.text));t.presentationTask=o;try{await o,t.deliveryCompleted=!0,t.inactive?t.closedOutcome&&!t.resolutionNotified&&(t.resolutionNotified=!0,await t.send(Bf(t.closedOutcome)).catch(()=>{})):t.presented=!0}finally{t.presentationTask===o&&(t.presentationTask=null)}}async#c(t,o){t.submitting=!0;try{await t.interaction.respond(JH(t,o))}catch(a){if(a?.code==="interaction-not-pending"){let A=t.send,r=this.#n(t);await this.#s(r,async()=>{t.resolutionNotified||await A(D(Hl)).catch(()=>{})});return}if(t.inactive)return;t.submitting=!1,this.#A.error?.(`[dsh-im:${this.#e}] failed to submit an approval:`,a),await t.send(D("\u5BA1\u6279\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002")).catch(()=>{});return}let i=t.send,e=this.#n(t);await this.#s(e,async()=>{t.resolutionNotified||await i(Bf(o)).catch(()=>{})})}async#s(t,o){let i,e=new Promise(a=>{i=a});t&&(t.activationTask=e);try{await o()}finally{i(),t?.activationTask===e&&(t.activationTask=null)}await this.#I(t)}async#I(t){if(t)try{await this.#i(t)}catch(o){this.#A.error?.(`[dsh-im:${this.#e}] failed to present the next approval:`,o);try{t.interaction.reconnect?.()}catch{}}}#n(t){if(t.inactive)return null;t.inactive=!0,this.#o(t.key),this.#t.delete(t.approvalId);let o=this.#r.get(t.key);if(!o)return null;let i=o.items[0]===t,e=o.items.indexOf(t);return e!==-1&&o.items.splice(e,1),o.items.length===0?(this.#r.delete(t.key),null):i?o.items[0]:null}#o(t){let o=Date.now();for(let[i,e]of this.#a)e<=o&&this.#a.delete(i);for(this.#a.delete(t),this.#a.set(t,o+Sce);this.#a.size>Dce;)this.#a.delete(this.#a.keys().next().value)}async#g(t,o){try{return await t.respond({ok:!0,value:{sessionId:t.sessionId,approvalId:o.approvalId,outcome:"rejected"}},{signal:AbortSignal.timeout(5e3)}),!0}catch(i){if(i?.code==="interaction-not-pending")return!1;throw i}}};var xb=new WeakMap;function bce(n){let t=xb.get(n);return t||(t=new Map,xb.set(n,t)),t}async function eI(n,t,o){let i=typeof n;if(i!=="object"&&i!=="function"||n===null)throw new TypeError("state is required");if(typeof t!="string"||!t)throw new TypeError("conversation key is required");if(typeof o!="function")throw new TypeError("operation is required");let e=bce(n),a=e.get(t)??Promise.resolve(),A,r=new Promise(s=>{A=s});e.set(t,r),await a;try{return await o()}finally{A(),e.get(t)===r&&(e.delete(t),e.size===0&&xb.delete(n))}}var ba="workspace-session-stale";function zH(n,t){return typeof n.workspaceSession=="function"?n.workspaceSession(t):Object.freeze({sessionId:t,sessionExists:(...o)=>n.sessionExists(t,...o),models:(...o)=>n.getSessionModels(t,...o),selectModel:(...o)=>n.selectSessionModel(t,...o),isRunning:(...o)=>n.isSessionRunning(t,...o),hasActiveTurn:(...o)=>n.hasActiveTurn(t,...o),stopActiveTurn:(...o)=>n.stopActiveTurn(t,...o),steerActiveTurn:(...o)=>n.steerActiveTurn(t,...o),ask:(...o)=>n.ask(t,...o)})}async function Mce(n,t){return t===void 0?n.sessionExists():n.sessionExists(t)}async function _ce(n,t){return t===void 0?n.createSession():n.createSession(t)}async function si({harness:n,state:t,key:o,text:i,content:e,createOptions:a,existsOptions:A,askOptions:r}){for(;;)try{let s=await eI(t,o,async()=>{let B=t.sessionFor(o),f=B?zH(n,B):null;if(!f||!await Mce(f,A)){if(B=await _ce(n,a),await t.setSession(o,B)===!1)return null;f=zH(n,B)}return{sessionId:B,session:f}});if(!s)continue;let g=[],c=typeof r=="object"&&typeof r?.onArtifact=="function"?r.onArtifact:null,I=typeof r=="number"?{timeoutMs:r}:{...r};I.onArtifact=async B=>{g.push(B),await c?.(B)};let d=await s.session.ask(e??i,I);return{sessionId:s.sessionId,answer:d,...g.length>0?{artifacts:g}:{}}}catch(s){if(s?.code!==ba)throw s}}var Tce=/^\/compact(?=$|\s)([\s\S]*)$/i,Nce="\u7528\u6CD5\uFF1A/compact\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",VH=new Map([["No compactable history yet.","\u6682\u65E0\u53EF\u538B\u7F29\u7684\u5386\u53F2\u8BB0\u5F55\u3002"],["Compaction is unavailable because this process has an active compaction, or the agent is not idle.","\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\u6216\u6267\u884C\u538B\u7F29\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"],["Compaction cancelled.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"],["The history selected for compaction changed before it could be replaced. The conversation is unchanged; the attempt is recorded in the session log.","\u538B\u7F29\u671F\u95F4\u4F1A\u8BDD\u5386\u53F2\u53D1\u751F\u53D8\u5316\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u8BD5\u3002"],["Compaction could not produce a useful summary. The conversation is unchanged; the attempt is recorded in the session log.","\u672A\u80FD\u751F\u6210\u6709\u6548\u7684\u538B\u7F29\u6458\u8981\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\u3002"],["Compaction did not finish cleanly; some session history may have changed. Inspect the current session state before retrying.","\u4E0A\u4E0B\u6587\u538B\u7F29\u672A\u6B63\u5E38\u5B8C\u6210\uFF0C\u90E8\u5206\u4F1A\u8BDD\u5386\u53F2\u53EF\u80FD\u5DF2\u53D8\u5316\uFF0C\u8BF7\u68C0\u67E5\u4F1A\u8BDD\u540E\u518D\u91CD\u8BD5\u3002"],["Compaction finished, but the session could not be saved.","\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29\uFF0C\u4F46\u4F1A\u8BDD\u4FDD\u5B58\u5931\u8D25\u3002"]]);function AI(n){return{handled:!0,message:n,messages:[n]}}function Rce(n){if(!n||typeof n!="object"||!["success","error"].includes(n.kind)||n.text!==void 0&&typeof n.text!="string")throw new TypeError("Harness returned an invalid /compact result");let t=n.text?.trim()??"",o=/^Compacted (\d+) history items \(~(\d+) tokens\)\.$/u.exec(t);return o?D("\u5DF2\u538B\u7F29 {count} \u6761\u5386\u53F2\u8BB0\u5F55\uFF08\u7EA6 {tokens} \u4E2A token\uFF09\u3002",{count:o[1],tokens:o[2]}):VH.has(t)?D(VH.get(t)):t||(n.kind==="success"?D("\u4E0A\u4E0B\u6587\u538B\u7F29\u5B8C\u6210\u3002"):D("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\u3002"))}function kce(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?D("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u53D1\u9001\u65B0\u6D88\u606F\u5F00\u542F\u4F1A\u8BDD\u3002"):t==="agent-busy"?D("\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="cancelled"||n?.name==="AbortError"?D("\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"):t===ba||t==="workspace-bot-not-found"?D("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):t==="commands-unavailable"?D("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u4ECE\u673A\u5668\u4EBA\u6267\u884C\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"):D("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function gi(n,t,o,i,e={}){if(typeof n!="string")return null;let a=Tce.exec(n.trim());if(!a)return null;if(a[1].trim())return AI(D(Nce));if(typeof o?.sessionFor!="function")return AI(D("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u4F1A\u8BDD\u72B6\u6001\u3002"));let A=o.sessionFor(i);if(typeof A!="string"||!A)return AI(D("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u53EF\u538B\u7F29\u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u6D88\u606F\u3002"));if(typeof t?.executeCommand!="function")return AI(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"));try{let r=await t.executeCommand(A,"/compact",e);return AI(r===void 0?D("\u5F53\u524D Harness \u672A\u6CE8\u518C /compact \u547D\u4EE4\uFF0C\u8BF7\u786E\u8BA4\u4E0A\u4E0B\u6587\u538B\u7F29\u7EC4\u4EF6\u5DF2\u542F\u7528\u3002"):Rce(r?.result))}catch(r){return AI(kce(r))}}import{isDeepStrictEqual as Zce}from"node:util";import{realpath as XH,stat as $H}from"node:fs/promises";import{isAbsolute as eK,resolve as vce}from"node:path";var Pce=/^\/workspace(?:\s+([\s\S]+))?$/i,Gce=/^\/workspacelist(?:\s+([\s\S]+))?$/i,Fce=/^\/sessionlist(?:\s+([\s\S]+))?$/i,Lce=/^\/session(?=$|\s)/i,Uce=/^\/session[ \t]+([^\s]+)$/i,Hce=4096,Kce=1800,xce=256,AK=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,Yce=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,tK="\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09",Kl=["\u7528\u6CD5\uFF1A","/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD","/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7 \u6309 /workspacelist \u5E8F\u53F7\u5217\u51FA\u4F1A\u8BDD","/sessionlist \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5217\u51FA\u6307\u5B9A\u5DE5\u4F5C\u533A\u4F1A\u8BDD"].join(` -`);function Pt(n,t=[n]){return{handled:!0,message:n,messages:t}}function xl(n){return typeof n!="string"||n.length>Hce||!eK(n)||AK.test(n)?null:vce(n)}function ff(n){return typeof n!="string"?"":n.replace(Yce," ").replace(/\s+/gu," ").trim()}function WH(n){return typeof n=="string"&&n.length>0&&n.length<=xce&&!new RegExp("\\p{White_Space}","u").test(n)&&!AK.test(n)}async function Yb(n){let t=await Promise.all(n.map(async o=>{let i=xl(o);if(!i)return null;try{return(await $H(i)).isDirectory()?xl(await XH(i)):null}catch{return null}}));return[...new Set(t.filter(Boolean))]}async function jb(n){if(typeof n!="string"||!eK(n.trim()))return{error:D(`\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002 -{usage}`,{usage:D(Kl)})};let t=xl(n.trim());if(!t)return{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 -{usage}`,{usage:D(Kl)})};let o;try{o=await $H(t)}catch{return{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 -{usage}`,{usage:D(Kl)})}}if(!o.isDirectory())return{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002 -{usage}`,{usage:D(Kl)})};try{let i=xl(await XH(t));return i?{workspace:i}:{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 -{usage}`,{usage:D(Kl)})}}catch{return{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 -{usage}`,{usage:D(Kl)})}}}async function Xh(n,t={}){let o=await n.listWorkspaces(t),i=typeof n?.currentWorkspace=="function"?n.currentWorkspace():null,[e]=i?await Yb([i]):[],a=await Yb(Array.isArray(o)?o:[]),A=[...new Set([...e?[e]:[],...a])];return n.assertWorkspaceScope?.(),{current:e??null,paths:A}}function Gs(n){let t=[],o=0;for(;o=o)i=e+1;else{let a=n.charCodeAt(i-1),A=n.charCodeAt(i);a>=55296&&a<=56319&&A>=56320&&A<=57343&&(i-=1)}}t.push(n.slice(o,i)),o=i}return t}async function jce(n,t){if(n[1]?.trim())return Pt(D("\u7528\u6CD5\uFF1A/workspacelist"));if(typeof t?.listWorkspaces!="function")return Pt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u3002"));try{let{current:o,paths:i}=await Xh(t);if(i.length===0)return Pt(D("\u5F53\u524D Harness Host \u4E0A\u6CA1\u6709\u4ECD\u7136\u5B58\u5728\u7684\u5DF2\u767B\u8BB0\u5DE5\u4F5C\u533A\u3002"));let a=[D("\u5F53\u524D Harness Host \u4E0A\u5B58\u5728\u7684\u5DE5\u4F5C\u533A\uFF08{count}\uFF09\uFF1A",{count:i.length}),...i.map((A,r)=>`${r+1}. ${A}${A===o?D("\uFF08\u5F53\u524D\uFF09"):""}`),"",D("\u5207\u6362\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"),D("\u67E5\u770B\u4F1A\u8BDD\uFF1A/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84")].join(` -`);return Pt(a,Gs(a))}catch(o){return o?.code==="workspace-bot-not-found"?Pt(D("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5217\u51FA\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002")):Pt(D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}async function Jb(n,t,o={}){if(!n){if(typeof t?.currentWorkspace!="function")return{error:D("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u4F5C\u533A\u3002")};let e=await jb(t.currentWorkspace());return t.assertWorkspaceScope?.(),e}if(/^\d+$/u.test(n)){if(typeof t?.listWorkspaces!="function")return{error:D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002")};let{paths:e}=await Xh(t,o),a=Number(n);return!Number.isSafeInteger(a)||a<1||a>e.length?{error:D("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002")}:{workspace:e[a-1]}}let i=await jb(n);return t.assertWorkspaceScope?.(),i}function Jce(n){let t=typeof n=="number"&&Number.isFinite(n)?n:null;if(t===null)return"";let o=new Date(t);if(Number.isNaN(o.getTime()))return"";let i=s=>String(s).padStart(2,"0"),e=`${i(o.getHours())}:${i(o.getMinutes())}`,a=s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime(),A=new Date,r=Math.round((a(A)-a(o))/864e5);return r===0?D("\u4ECA\u5929 {time}",{time:e}):r===1?D("\u6628\u5929 {time}",{time:e}):r===2?D("\u524D\u5929 {time}",{time:e}):o.getFullYear()===A.getFullYear()?D("{month}\u6708{day}\u65E5 {time}",{month:o.getMonth()+1,day:o.getDate(),time:e}):D("{year}\u5E74{month}\u6708{day}\u65E5",{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()})}function qce(n,t,{currentWorkspace:o=!1}={}){let i=t.map(e=>{let a=ff(e?.sessionId);if(!a)throw new TypeError("Harness returned an invalid session id");let A=e?.summaryAvailable===!1?D("\u6807\u9898\u6682\u4E0D\u53EF\u7528"):ff(e?.title)||D("\u6682\u65E0\u6807\u9898"),r=Jce(e?.time),s=`${r?` \xB7 ${r}`:""}${e?.archived===!0?D("\uFF08\u5DF2\u5F52\u6863\uFF09"):""}`;return`${A}${s} +`:`${e}
`}).join("")}function Xb(n,t){if(!n||typeof n!="object"||n.errcode!==0)throw new gt("registration-rejected",`\u9489\u9489\u626B\u7801${t}\u5931\u8D25\u3002`);return n}function $b(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function IK({fetchImpl:n=fetch,registrationBaseUrl:t=process.env.DINGTALK_REGISTRATION_BASE_URL||iK,registrationSource:o=process.env.DINGTALK_REGISTRATION_SOURCE||Fce,now:i=()=>Date.now(),cardMinIntervalMs:e=50,cardBackoffMs:a=1e3,delay:A=zce}={}){if(typeof n!="function")throw new TypeError("fetchImpl must be a function");if(typeof i!="function")throw new TypeError("now must be a function");if(!Number.isFinite(e)||e<0)throw new TypeError("cardMinIntervalMs must be a non-negative number");if(!Number.isFinite(a)||a<0)throw new TypeError("cardBackoffMs must be a non-negative number");if(typeof A!="function")throw new TypeError("delay must be a function");let r=eM(t,{label:"\u9489\u9489\u6CE8\u518C\u670D\u52A1",requireSubdomain:!1}),s=new URL(Gce),g=WA(o);if(!g)throw new TypeError("registrationSource is required");let c=new Map,I=new Map,d=new Map,B=Promise.resolve(),f=0,Q=(F,q)=>new URL(q.replace(/^\//,""),F);async function y({clientId:F,clientSecret:q,signal:J,requestKind:x="normal"}){let P=WA(F),z=WA(q);if(!P||!z)throw new TypeError("clientId and clientSecret are required");let U=c.get(P);if(U&&U.expiresAt>i())return U.token;let N=x==="reaction"?d:I;if(N.has(P))return N.get(P);let V=(async()=>{let ee=await kn(n,Q(s,"v1.0/oauth2/accessToken"),{body:{appKey:P,appSecret:z},signal:J,action:"\u9274\u6743"}),ie=WA(ee?.accessToken);if(!ie)throw new gt("invalid-access-token","\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u8BBF\u95EE\u4EE4\u724C\u3002");let Te=$b(ee?.expireIn??ee?.expiresIn,7200),se=Math.max(1e3,(Te-60)*1e3);return c.set(P,{token:ie,expiresAt:i()+se}),ie})().finally(()=>N.delete(P));return N.set(P,V),V}async function m({clientId:F,clientSecret:q,robotCode:J,messageId:x,conversationId:P,reactionName:z=oI,signal:U},N){let k=WA(F),V=WA(q),ee=WA(J)??k,ie=WA(x),Te=WA(P),se=WA(z);if(!k||!V)throw new TypeError("clientId and clientSecret are required");if(!ee)throw new TypeError("robotCode is required");if(!ie||!Te)throw new TypeError("messageId and conversationId are required");if(!se)throw new TypeError("reactionName is required");let Ne=await y({clientId:k,clientSecret:V,signal:U,requestKind:"reaction"}),fe=await kn(n,Q(s,`v1.0/robot/emotion/${N}`),{body:{robotCode:ee,openMsgId:ie,openConversationId:Te,emotionType:2,emotionName:se,textEmotion:{emotionId:Kce,emotionName:se,text:se,backgroundId:xce}},headers:{"x-acs-dingtalk-access-token":Ne},signal:U,timeoutMs:Hce,action:N==="reply"?"\u6D88\u606F\u72B6\u6001\u6DFB\u52A0":"\u6D88\u606F\u72B6\u6001\u64A4\u56DE"}),De=fe?.success===!1?rE(fe?.code??fe?.errcode)??"rejected":Wb(fe);if(De)throw new gt("reaction-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6D88\u606F\u72B6\u6001\u8BF7\u6C42\u3002",{providerCode:De});return!0}async function _({clientId:F,clientSecret:q,robotCode:J,downloadCode:x,signal:P,kind:z}){let U=WA(J),N=WA(x);if(!U||!N)throw new TypeError("robotCode and downloadCode are required");let k=await y({clientId:F,clientSecret:q,signal:P}),V;try{V=await kn(n,Q(s,"v1.0/robot/messageFiles/download"),{body:{downloadCode:N,robotCode:U},headers:{"x-acs-dingtalk-access-token":k},signal:P,action:`${z==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740`})}catch(ie){throw P?.aborted?ie:new gt(`${z}-download-address-failed`,`\u9489\u9489${z==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u83B7\u53D6\u5931\u8D25\u3002`,{cause:ie,status:ie?.status,providerCode:ie?.providerCode})}let ee=WA(V?.downloadUrl??V?.download_url);if(!ee)throw new gt(`invalid-${z}-download`,`\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE${z==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u3002`);return qce(ee)}function T(F){let q=async()=>{let x=Math.max(0,f-i());x>0&&await A(x,F),f=Math.max(f,i())+e},J=B.then(q,q);return B=J.catch(()=>{}),J}async function R(F,q){await T(q.signal);try{return await kn(n,Q(s,F),q)}catch(J){if(!(J instanceof gt)||J.status!==403)throw J;return await A(a,q.signal),await T(q.signal),kn(n,Q(s,F),q)}}async function H({clientId:F,clientSecret:q,cardInstanceId:J,text:x,signal:P}){let z=WA(J),U=WA(x);if(!z)throw new TypeError("cardInstanceId is required");if(!U)throw new TypeError("text is required");let k={"x-acs-dingtalk-access-token":await y({clientId:F,clientSecret:q,signal:P})},V=[R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:z,guid:eE(),key:"msgContent",content:tE(U),isFull:!0,isFinalize:!1,isError:!0},headers:k,signal:P,action:"AI Card \u5931\u8D25\u6536\u53E3"}),R("v1.0/card/instances",{method:"PUT",body:{outTrackId:z,cardData:Zb(U,"5"),cardUpdateOptions:{updateCardDataByKey:!0}},headers:k,signal:P,action:"AI Card \u5931\u8D25\u72B6\u6001"})],ee=await Promise.allSettled(V);if(ee.every(({status:ie})=>ie==="rejected"))throw ee[0].reason;return!0}async function j({clientId:F,clientSecret:q,target:J,file:x,signal:P},{uploadType:z,messageKey:U,createMessageParams:N}){if(!x||typeof x!="object"||typeof x.fileName!="string"||!x.fileName||!Buffer.isBuffer(x.bytes))throw new TypeError("A DingTalk file is required");let k=Wce(J),V;try{V=await y({clientId:F,clientSecret:q,signal:P})}catch(ve){if(P?.aborted)throw vn(P);let iA=Number(ve?.status),Ce=ve?.code==="http-error"&&iA>=400&&iA<500?"artifact-provider-rejected":"artifact-provider-failed";throw AE(ve,{fallback:Ce})}let ee=new URL("media/upload",iK);ee.searchParams.set("access_token",V),ee.searchParams.set("type",z);let ie=new FormData;ie.append("media",new Blob([x.bytes],{type:x.mediaType??"application/octet-stream"}),x.fileName);let Te;try{Te=await Vce(n,ee,{body:ie,signal:P})}catch(ve){if(P?.aborted)throw vn(P);let iA=Number(ve?.status),Ce=ve?.code==="http-error"&&iA>=400&&iA<500?"artifact-provider-rejected":"artifact-provider-failed";throw AE(ve,{fallback:Ce})}let se=Wb(Te),Ne=WA(Te?.media_id);if(se||!Ne)throw AE(new gt("upload-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u3002",{providerCode:se??"missing-media-id"}));P?.throwIfAborted();let fe={robotCode:k.robotCode,msgKey:U,msgParam:JSON.stringify(N(Ne,x)),...k.type==="group"?{openConversationId:k.openConversationId}:{userIds:[k.userId]}},De=k.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",Ke;try{Ke=await kn(n,Q(s,De),{body:fe,headers:{"x-acs-dingtalk-access-token":V},signal:P,action:"\u6587\u4EF6\u6D88\u606F\u53D1\u9001"})}catch(ve){throw Jce(ve,P)}let rA=Wb(Ke);if(rA)throw AE(new gt("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002",{providerCode:rA}));return Ke}return Object.freeze({async beginRegistration({signal:F}={}){let q=Xb(await kn(n,Q(r,"app/registration/init"),{body:{source:g},signal:F,action:"\u521D\u59CB\u5316"}),"\u521D\u59CB\u5316"),J=WA(q.nonce);if(!J)throw new gt("invalid-registration","\u9489\u9489\u626B\u7801\u521D\u59CB\u5316\u7F3A\u5C11 nonce\u3002");let x=Xb(await kn(n,Q(r,"app/registration/begin"),{body:{nonce:J},signal:F,action:"\u521B\u5EFA"}),"\u521B\u5EFA"),P=WA(x.device_code),z=WA(x.verification_uri_complete);if(!P||!z)throw new gt("invalid-registration","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u7684\u4FE1\u606F\u4E0D\u5B8C\u6574\u3002");let U=eM(z,{label:"\u9489\u9489\u626B\u7801",requireSubdomain:!1}).toString();return{deviceCode:P,userCode:WA(x.user_code)??void 0,verificationUri:WA(x.verification_uri)??void 0,verificationUriComplete:U,expiresInSeconds:$b(x.expires_in,7200),intervalSeconds:$b(x.interval,5)}},async pollRegistration({deviceCode:F,signal:q}={}){let J=WA(F);if(!J)throw new TypeError("deviceCode is required");let x=Xb(await kn(n,Q(r,"app/registration/poll"),{body:{device_code:J},signal:q,action:"\u72B6\u6001\u67E5\u8BE2"}),"\u72B6\u6001\u67E5\u8BE2"),P=WA(x.status)?.toUpperCase();if(!P||!Yce.has(P))throw new gt("invalid-registration-status","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u72B6\u6001\u3002");let z={status:P,failReason:WA(x.fail_reason)??void 0};if(P==="SUCCESS"&&(z.clientId=WA(x.client_id)??void 0,z.clientSecret=WA(x.client_secret)??void 0,!z.clientId||!z.clientSecret))throw new gt("missing-credentials","\u9489\u9489\u626B\u7801\u5DF2\u786E\u8BA4\uFF0C\u4F46\u6CA1\u6709\u8FD4\u56DE\u673A\u5668\u4EBA\u51ED\u636E\u3002");return z},accessToken:y,async addReaction(F){return m(F,"reply")},async recallReaction(F){return m(F,"recall")},async addThinkingReaction(F){return m({...F,reactionName:oI},"reply")},async recallThinkingReaction(F){return m({...F,reactionName:oI},"recall")},async downloadImage({clientId:F,clientSecret:q,robotCode:J,downloadCode:x,signal:P,maxBytes:z}){let U=await _({clientId:F,clientSecret:q,robotCode:J,downloadCode:x,signal:P,kind:"image"});try{return await Io(U,{fetchImpl:n,signal:P,maxBytes:z})}catch(N){throw P?.aborted||N instanceof ut?N:new gt("image-content-download-failed","\u9489\u9489\u56FE\u7247\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:N})}},async downloadFile({clientId:F,clientSecret:q,robotCode:J,downloadCode:x,signal:P}){let z=await _({clientId:F,clientSecret:q,robotCode:J,downloadCode:x,signal:P,kind:"file"});if(z.protocol!=="https:")throw new gt("invalid-file-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u3002");try{let U=await n(z,{method:"GET",redirect:"follow",signal:P});if(!U?.ok)throw await U?.body?.cancel?.().catch?.(()=>{}),new gt("file-content-download-failed",`\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP ${U?.status??"unknown"}\uFF09\u3002`,{status:U?.status});return Buffer.from(await U.arrayBuffer())}catch(U){throw P?.aborted?vn(P):U instanceof gt?U:new gt("file-content-download-failed","\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:U})}},async createAiCard({clientId:F,clientSecret:q,target:J,initialText:x,signal:P}){let z=WA(F),U=WA(q),N=WA(x);if(!z||!U)throw new TypeError("clientId and clientSecret are required");if(!N)throw new TypeError("initialText is required");let k=Xce(J),V=await y({clientId:z,clientSecret:U,signal:P}),ee=`dsh_${eE()}`,ie={"x-acs-dingtalk-access-token":V},Te=!1;try{await R("v1.0/card/instances",{body:{cardTemplateId:Lce,outTrackId:ee,cardData:{cardParamMap:{config:JSON.stringify({autoLayout:!0})}},callbackType:"STREAM",imGroupOpenSpaceModel:{supportForward:!0},imRobotOpenSpaceModel:{supportForward:!0}},headers:ie,signal:P,action:"AI Card \u521B\u5EFA"}),await R("v1.0/card/instances/deliver",{body:$ce(ee,k,z),headers:ie,signal:P,action:"AI Card \u6295\u653E"}),Te=!0,await R("v1.0/card/instances",{method:"PUT",body:{outTrackId:ee,cardData:Zb(N,"2")},headers:ie,signal:P,action:"AI Card \u542F\u52A8"}),await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:ee,guid:eE(),key:"msgContent",content:tE(N).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:ie,signal:P,action:"AI Card \u542F\u52A8"})}catch(se){if(Te){let Ne=AbortSignal.timeout(5e3);await H({clientId:z,clientSecret:U,cardInstanceId:ee,text:D("\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002"),signal:Ne}).catch(()=>{})}throw se}return{cardInstanceId:ee}},async updateAiCard({clientId:F,clientSecret:q,cardInstanceId:J,text:x,signal:P}){let z=WA(J),U=WA(x);if(!z)throw new TypeError("cardInstanceId is required");if(!U)throw new TypeError("text is required");let N=await y({clientId:F,clientSecret:q,signal:P});return await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:z,guid:eE(),key:"msgContent",content:tE(U).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:{"x-acs-dingtalk-access-token":N},signal:P,action:"AI Card \u66F4\u65B0"}),!0},async finishAiCard({clientId:F,clientSecret:q,cardInstanceId:J,text:x,signal:P}){let z=WA(J),U=WA(x);if(!z)throw new TypeError("cardInstanceId is required");if(!U)throw new TypeError("text is required");let k={"x-acs-dingtalk-access-token":await y({clientId:F,clientSecret:q,signal:P})},V=tE(U);await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:z,guid:eE(),key:"msgContent",content:V,isFull:!0,isFinalize:!0,isError:!1},headers:k,signal:P,action:"AI Card \u5B8C\u6210"});let ee=!0,ie={method:"PUT",body:{outTrackId:z,cardData:Zb(U,"3"),cardUpdateOptions:{updateCardDataByKey:!0}},headers:k,signal:P,action:"AI Card \u6536\u53E3"};try{await R("v1.0/card/instances",ie)}catch{try{await R("v1.0/card/instances",ie)}catch{ee=!1}}return{delivered:!0,completed:ee}},failAiCard:H,async sendText({clientId:F,clientSecret:q,sessionWebhook:J,text:x,signal:P}){let z=WA(x);if(!z)throw new TypeError("text is required");let U=xg(J),N=await y({clientId:F,clientSecret:q,signal:P}),k=await kn(n,U,{body:{msgtype:"text",text:{content:z}},headers:{"x-acs-dingtalk-access-token":N},signal:P,action:"\u6D88\u606F\u56DE\u590D"});if(k?.errcode!==void 0&&k.errcode!==0||k?.code!==void 0&&k.code!==0)throw new gt("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002");return!0},async sendFile(F){return j(F,{uploadType:"file",messageKey:"sampleFile",createMessageParams:(q,J)=>({mediaId:q,fileName:J.fileName,fileType:Zce(J.fileName)})})},async sendImage(F){return j(F,{uploadType:"image",messageKey:"sampleImageMsg",createMessageParams:q=>({photoURL:q})})},clearAccessToken(F){let q=WA(F);q&&c.delete(q)}})}var eIe=500,AIe="\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002";function AM(n,t){if(typeof n!="string")throw new TypeError(`${t} must be a string`);return n}function lK(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} is required`);return n.trim()}function pK({api:n,clientId:t,clientSecret:o,target:i,signal:e,logger:a=console,updateIntervalMs:A=eIe,clock:r=()=>Date.now(),timer:s={setTimeout:(g,c)=>globalThis.setTimeout(g,c),clearTimeout:g=>globalThis.clearTimeout(g)}}={}){if(!n||typeof n.createAiCard!="function"||typeof n.updateAiCard!="function"||typeof n.finishAiCard!="function")throw new TypeError("DingTalk AI Card API is required");let g=lK(t,"clientId"),c=lK(o,"clientSecret");if(i==null)throw new TypeError("target is required");if(!Number.isFinite(A)||A<0)throw new TypeError("updateIntervalMs must be a non-negative number");if(typeof r!="function")throw new TypeError("clock must be a function");if(typeof s?.setTimeout!="function"||typeof s?.clearTimeout!="function")throw new TypeError("timer must provide setTimeout and clearTimeout");let I=()=>{let N=r();if(!Number.isFinite(N))throw new TypeError("clock must return a finite timestamp");return N};I();let d=e?.aborted?"aborted":"idle",B=null,f=null,Q=null,y=null,m=null,_=null,T=0,R=()=>{Q!==null&&(s.clearTimeout(Q),Q=null)},H=()=>e?.removeEventListener("abort",J),j=N=>{d=N,f=null,R(),H()},F=()=>!B||typeof n.failAiCard!="function"?Promise.resolve(!1):(_||(_=n.failAiCard({...B,text:D(AIe),signal:AbortSignal.timeout(5e3)}).then(()=>!0,()=>!1)),_),q=N=>{d==="failed"||d==="finished"||d==="aborted"||(F(),j("failed"),a?.error?.(`[dsh-dingtalk] AI Card ${N} failed`))};function J(){d==="finished"||d==="failed"||d==="aborted"||(F(),j("aborted"))}d!=="aborted"&&e?.addEventListener("abort",J,{once:!0});let x=()=>{if(d!=="active"||y||f===null)return;let N=Math.max(0,T+A-I());if(N>0){Q=s.setTimeout(()=>{Q=null,x()},N);return}let k=f;f=null,y=(async()=>{try{await n.updateAiCard({...B,text:k,finished:!1}),T=I()}catch{if(e?.aborted||d==="aborted")return;q("update")}})().finally(()=>{y=null,d==="active"&&f!==null&&x()})};return Object.freeze({start:async N=>{if(AM(N,"initialText"),d!=="idle")return!1;d="starting";try{let k=await n.createAiCard({clientId:g,clientSecret:c,target:i,initialText:N,signal:e}),V=typeof k?.cardInstanceId=="string"?k.cardInstanceId.trim():"";if(!V)throw new TypeError("DingTalk did not return a card instance id");return B=Object.freeze({clientId:g,clientSecret:c,target:i,cardInstanceId:V,signal:e}),d!=="starting"?(F(),!1):(T=I(),d="active",!0)}catch{return e?.aborted||d==="aborted"?(j("aborted"),!1):(q("creation"),!1)}},push:N=>{AM(N,"progressText"),d==="active"&&(f=N,!Q&&!y&&x())},finish:N=>{if(AM(N,"finalText"),d==="finished")return Promise.resolve(!0);if(d==="finishing")return m;if(d!=="active")return Promise.resolve(!1);d="finishing",f=null,R();let k=y;return m=(async()=>{if(k&&await k,d!=="finishing")return!1;try{return await n.finishAiCard({...B,text:N}),d!=="finishing"?!1:(j("finished"),!0)}catch{return e?.aborted||d==="aborted"?(j("aborted"),!1):(q("finish"),!1)}})(),m}})}function Mf(n){return typeof n=="string"&&n.trim()?n.trim():null}function ii(n){return n&&typeof n.id=="string"&&typeof n.question=="string"&&(n.header===void 0||typeof n.header=="string")&&(n.detail===void 0||typeof n.detail=="string")&&(n.multiSelect===void 0||typeof n.multiSelect=="boolean")&&(n.options===void 0||Array.isArray(n.options)&&n.options.every(t=>t&&typeof t.label=="string"&&(t.description===void 0||typeof t.description=="string")))}function oi(n,t,o,{requiresMention:i=!1}={}){let e=[],a=o>1?`\uFF08${t+1}/${o}\uFF09`:"";e.push(D("DeepSeek Harness \u9700\u8981\u4F60\u8865\u5145\u4FE1\u606F{progress}\uFF1A",{progress:a})),Mf(n.header)&&e.push("",n.header.trim()),e.push("",Mf(n.question)??D("\u8BF7\u8F93\u5165\u4F60\u7684\u56DE\u7B54\u3002")),Mf(n.detail)&&e.push("",n.detail.trim());let A=Array.isArray(n.options)?n.options:[];return A.length>0?(e.push(""),A.forEach((r,s)=>{let g=typeof r?.label=="string"?r.label:"",c=Mf(r?.description);e.push(`${s+1}. ${g}${c?` \u2014 ${c}`:""}`)}),e.push("",n.multiSelect===!0?D("\u8BF7\u56DE\u590D\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF1B\u591A\u9009\u7528\u9017\u53F7\u5206\u9694\uFF0C\u4E5F\u53EF\u8865\u5145\u5176\u4ED6\u5185\u5BB9\u3002"):D("\u8BF7\u56DE\u590D\u4E00\u4E2A\u9009\u9879\u5E8F\u53F7\u6216\u6587\u5B57\uFF0C\u4E5F\u53EF\u76F4\u63A5\u8F93\u5165\u5176\u4ED6\u7B54\u6848\u3002"))):e.push("",D("\u8BF7\u76F4\u63A5\u56DE\u590D\u4F60\u7684\u7B54\u6848\u3002")),i&&e.push("",D("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u7B54\u6848\u3002")),e.join(` +`)}function dK(n,t){let o=n.trim();if(!o)return null;if(/^\d+$/.test(o)){let e=t[Number(o)-1];return typeof e?.label=="string"?e.label:null}let i=t.find(e=>e?.label===o);return typeof i?.label=="string"?i.label:null}function ni(n,t){let o=Array.isArray(n.options)?n.options:[];if(o.length===0)return{id:n.id,selected:[],custom:t};let i=dK(t,o);if(n.multiSelect!==!0)return i?{id:n.id,selected:[i]}:{id:n.id,selected:[],custom:t};if(i)return{id:n.id,selected:[i]};let e=[],a=[];for(let A of t.split(/[,,、;;\n]+/)){let r=A.trim();if(!r)continue;let s=dK(r,o);s?e.includes(s)||e.push(s):a.push(r)}return{id:n.id,selected:e,...a.length>0?{custom:a.join("\u3001")}:{}}}var tIe=new Map([["\u6279\u51C6","allowed-once"],["\u540C\u610F","allowed-once"],["yes","allowed-once"],["\u62D2\u7EDD","rejected"],["\u4E0D\u540C\u610F","rejected"],["no","rejected"]]),tM="\u8BF7\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\uFF08\u4E5F\u652F\u6301\uFF1A\u540C\u610F / \u4E0D\u540C\u610F / yes / no\uFF09\u3002",rIe="\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u95EE\u9898\uFF0C\u518D\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002",ql="\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u590D\u3002",aIe=5*6e4,iIe=2048;function ba(n){return typeof n=="string"?n.trim():""}function rM(n){return ba(n).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g,"")}function oIe(n){return tIe.get(ba(n).toLowerCase())??null}function EK(n){return n?.type==="approval/requested"&&!!ba(n.sessionId)&&!!ba(n.approvalId)&&!!ba(n.toolName)&&(n.callId===void 0||!!ba(n.callId))&&(n.reason===void 0||typeof n.reason=="string")}function nIe(n){let t=n?.arguments;if(t!==null&&typeof t=="object")try{return JSON.stringify(t,null,2)}catch{return null}if(typeof t!="string")return null;let o=rM(t);if(!o)return t===""?"{}":null;try{return JSON.stringify(JSON.parse(o),null,2)}catch{return o}}function aM(n,{toolCall:t,requiresMention:o=!1,maxArgumentsLength:i=6e3}={}){if(!EK(n))return null;let e=ba(n.callId);if(!e||ba(t?.callId)!==e||ba(t?.name)!==ba(n.toolName))return null;let a=nIe(t);if(!a||a.length>i)return null;let A=[D("DeepSeek Harness \u9700\u8981\u4F60\u7684\u5BA1\u6279\uFF1A"),"",D("\u5DE5\u5177\uFF1A{tool}",{tool:rM(n.toolName)}),D("\u64CD\u4F5C\u53C2\u6570\uFF1A"),a],r=rM(n.reason);return r&&A.push(D("\u539F\u56E0\uFF1A{reason}",{reason:r})),A.push("",D(tM)),o&&A.push("",D("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u5BA1\u6279\u51B3\u5B9A\u3002")),A.join(` +`)}function hK(n,t){return{ok:!0,value:{sessionId:n.sessionId,approvalId:n.approvalId,outcome:t}}}function _f(n){return n==="allowed-once"?D("\u5DF2\u6279\u51C6\uFF0C\u4EC5\u5BF9\u672C\u6B21\u64CD\u4F5C\u6709\u6548\u3002"):n==="rejected"?D("\u5DF2\u62D2\u7EDD\u6B64\u6B21\u64CD\u4F5C\u3002"):D(ql)}var si=class{#e;#A;#t=new Map;#r=new Map;#a=new Map;constructor({label:t="IM",logger:o=console}={}){this.#e=t,this.#A=o}hasPending(t){return this.#r.get(t)?.items.some(o=>!o.inactive)===!0}claimReply({key:t,actor:o,text:i,addressed:e=!0,hasPendingQuestion:a=!1,questionCompletion:A,isQuestionPending:r,send:s}){let c=this.#r.get(t)?.items[0],I=oIe(i),d=(f,Q=!1)=>({...Q?{resolved:!0}:{},process:async y=>{typeof y=="function"&&await y()===!1||await s(f)}}),B=a&&c&&A&&typeof A.then=="function";return a&&!B?null:!c||c.inactive?(this.#a.get(t)??0)<=Date.now()?(this.#a.delete(t),null):I?d(D(ql),!0):null:c.actor!==o||c.requiresMention&&e!==!0?I?d(D("\u53EA\u6709\u53D1\u8D77\u5F53\u524D\u4EFB\u52A1\u7684\u7528\u6237\u53EF\u4EE5\u5904\u7406\u8FD9\u6761\u5BA1\u6279\u3002")):null:{process:async f=>{let Q=c.presented,m=(c.replyTail??Promise.resolve()).catch(()=>{}).then(async()=>{if(!(typeof f=="function"&&await f()===!1)){if(B){if(await A.catch(()=>{}),c.inactive||c.resolving)return;if(typeof r=="function"&&r()){await s(D(rIe));return}}if(await c.activationTask?.catch(()=>{}),await c.presentationTask?.catch(()=>{}),c.inactive||c.resolving){await s(D(ql));return}if(c.send=s,!Q||!c.presented){if(c.presented||await this.#i(c),c.inactive||c.resolving)return;await s(D(tM));return}if(c.submitting){await s(D("\u5BA1\u6279\u51B3\u5B9A\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7A0D\u5019\u3002"));return}if(!I){await s(D(tM));return}await this.#c(c,I)}});c.replyTail=m;try{await m}finally{c.replyTail===m&&(c.replyTail=null)}}}}async handleRequested(t,o){if(t?.kind!=="approval")return!1;let i=t.payload,e=ba(i?.approvalId);if(!ba(t.rpcId)||!ba(t.sessionId)||!e||!EK(i)||i.sessionId!==t.sessionId||typeof t.respond!="function")return this.#A.warn?.(`[dsh-im:${this.#e}] ignored an invalid Harness approval`),!0;if(t.recovered===!0)return await this.#g(t,i),!0;let a=this.#t.get(e);if(a)return a.interaction=t,a.toolCall=t.toolCall,a.presented||await this.#i(a),!0;let A=o?.send,r=ba(o?.key),s=ba(o?.actor);if(!r||!s||typeof A!="function")return this.#A.warn?.(`[dsh-im:${this.#e}] ignored an approval without a reply route`),await this.#g(t,i),!0;let g=aM(i,{toolCall:t.toolCall,requiresMention:o.requiresMention===!0});if(!g){let d=await this.#g(t,i);return await A(d?D("\u65E0\u6CD5\u5B8C\u6574\u5C55\u793A\u8FD9\u6B21\u64CD\u4F5C\uFF0C\u5DF2\u5B89\u5168\u62D2\u7EDD\u6B64\u6B21\u5BA1\u6279\u3002"):D(ql)),!0}let c={approvalId:e,sessionId:t.sessionId,interaction:t,toolCall:t.toolCall,key:r,actor:s,requiresMention:o.requiresMention===!0,send:A,text:g,presented:!1,presentationTask:null,deliveryCompleted:!1,replyTail:null,submitting:!1,inactive:!1,resolving:!1,closedOutcome:null,resolutionNotified:!1,activationTask:null};this.#t.set(e,c);let I=this.#r.get(r)??{items:[]};return I.items.push(c),this.#r.set(r,I),I.items[0]===c&&await this.#i(c),!0}async handleResolved(t){if(t?.kind!=="approval")return!1;let o=this.#t.get(ba(t.interactionId));if(!o||(o.resolving=!0,o.activationTask&&await o.activationTask.catch(()=>{}),o.inactive||this.#t.get(o.approvalId)!==o))return!0;let i=o.presentationTask,e=o.presented||i,a=o.send,A=this.#n(o);return await this.#s(A,async()=>{let r=o.presented;i&&(r=await i.then(()=>!0,()=>!1)),e&&r&&(o.resolutionNotified=!0,await a(_f(t.outcome)).catch(()=>{}))}),!0}async closeRoute(t){let o=this.#r.get(t);if(!o)return;let i=[...o.items];for(let e of i)this.#n(e);await Promise.all(i.map(async e=>{try{await e.interaction.respond(hK(e,"rejected"),{signal:AbortSignal.timeout(5e3)}),e.closedOutcome="rejected",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(_f("rejected")).catch(()=>{}))}catch(a){a?.code==="interaction-not-pending"?(e.closedOutcome="resolved",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(D(ql)).catch(()=>{}))):this.#A.warn?.(`[dsh-im:${this.#e}] failed to reject a closing approval:`,a)}}))}async#i(t){if(this.#r.get(t.key)?.items[0]!==t||t.inactive||t.resolving||t.presented||(await t.activationTask?.catch(()=>{}),this.#r.get(t.key)?.items[0]!==t||t.inactive||t.resolving||t.presented))return;if(t.presentationTask)return t.presentationTask;let o=Promise.resolve().then(()=>t.send(t.text));t.presentationTask=o;try{await o,t.deliveryCompleted=!0,t.inactive?t.closedOutcome&&!t.resolutionNotified&&(t.resolutionNotified=!0,await t.send(_f(t.closedOutcome)).catch(()=>{})):t.presented=!0}finally{t.presentationTask===o&&(t.presentationTask=null)}}async#c(t,o){t.submitting=!0;try{await t.interaction.respond(hK(t,o))}catch(a){if(a?.code==="interaction-not-pending"){let A=t.send,r=this.#n(t);await this.#s(r,async()=>{t.resolutionNotified||await A(D(ql)).catch(()=>{})});return}if(t.inactive)return;t.submitting=!1,this.#A.error?.(`[dsh-im:${this.#e}] failed to submit an approval:`,a),await t.send(D("\u5BA1\u6279\u63D0\u4EA4\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002")).catch(()=>{});return}let i=t.send,e=this.#n(t);await this.#s(e,async()=>{t.resolutionNotified||await i(_f(o)).catch(()=>{})})}async#s(t,o){let i,e=new Promise(a=>{i=a});t&&(t.activationTask=e);try{await o()}finally{i(),t?.activationTask===e&&(t.activationTask=null)}await this.#I(t)}async#I(t){if(t)try{await this.#i(t)}catch(o){this.#A.error?.(`[dsh-im:${this.#e}] failed to present the next approval:`,o);try{t.interaction.reconnect?.()}catch{}}}#n(t){if(t.inactive)return null;t.inactive=!0,this.#o(t.key),this.#t.delete(t.approvalId);let o=this.#r.get(t.key);if(!o)return null;let i=o.items[0]===t,e=o.items.indexOf(t);return e!==-1&&o.items.splice(e,1),o.items.length===0?(this.#r.delete(t.key),null):i?o.items[0]:null}#o(t){let o=Date.now();for(let[i,e]of this.#a)e<=o&&this.#a.delete(i);for(this.#a.delete(t),this.#a.set(t,o+aIe);this.#a.size>iIe;)this.#a.delete(this.#a.keys().next().value)}async#g(t,o){try{return await t.respond({ok:!0,value:{sessionId:t.sessionId,approvalId:o.approvalId,outcome:"rejected"}},{signal:AbortSignal.timeout(5e3)}),!0}catch(i){if(i?.code==="interaction-not-pending")return!1;throw i}}};var iM=new WeakMap;function sIe(n){let t=iM.get(n);return t||(t=new Map,iM.set(n,t)),t}async function Us(n,t,o){let i=typeof n;if(i!=="object"&&i!=="function"||n===null)throw new TypeError("state is required");if(typeof t!="string"||!t)throw new TypeError("conversation key is required");if(typeof o!="function")throw new TypeError("operation is required");let e=sIe(n),a=e.get(t)??Promise.resolve(),A,r=new Promise(s=>{A=s});e.set(t,r),await a;try{return await o()}finally{A(),e.get(t)===r&&(e.delete(t),e.size===0&&iM.delete(n))}}var Ma="workspace-session-stale";function CK(n,t){return typeof n.workspaceSession=="function"?n.workspaceSession(t):Object.freeze({sessionId:t,sessionExists:(...o)=>n.sessionExists(t,...o),models:(...o)=>n.getSessionModels(t,...o),selectModel:(...o)=>n.selectSessionModel(t,...o),isRunning:(...o)=>n.isSessionRunning(t,...o),hasActiveTurn:(...o)=>n.hasActiveTurn(t,...o),stopActiveTurn:(...o)=>n.stopActiveTurn(t,...o),steerActiveTurn:(...o)=>n.steerActiveTurn(t,...o),ask:(...o)=>n.ask(t,...o)})}async function gIe(n,t){return t===void 0?n.sessionExists():n.sessionExists(t)}async function cIe(n,t){return t===void 0?n.createSession():n.createSession(t)}async function gi({harness:n,state:t,key:o,text:i,content:e,createOptions:a,existsOptions:A,askOptions:r}){for(;;)try{let s=await Us(t,o,async()=>{let B=t.sessionFor(o),f=B?CK(n,B):null;if(!f||!await gIe(f,A)){if(B=await cIe(n,a),await t.setSession(o,B)===!1)return null;f=CK(n,B)}return{sessionId:B,session:f}});if(!s)continue;let g=[],c=typeof r=="object"&&typeof r?.onArtifact=="function"?r.onArtifact:null,I=typeof r=="number"?{timeoutMs:r}:{...r};I.onArtifact=async B=>{g.push(B),await c?.(B)};let d=await s.session.ask(e??i,I);return{sessionId:s.sessionId,answer:d,...g.length>0?{artifacts:g}:{}}}catch(s){if(s?.code!==Ma)throw s}}var IIe=/^\/compact(?=$|\s)([\s\S]*)$/i,lIe="\u7528\u6CD5\uFF1A/compact\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",uK=new Map([["No compactable history yet.","\u6682\u65E0\u53EF\u538B\u7F29\u7684\u5386\u53F2\u8BB0\u5F55\u3002"],["Compaction is unavailable because this process has an active compaction, or the agent is not idle.","\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\u6216\u6267\u884C\u538B\u7F29\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"],["Compaction cancelled.","\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"],["The history selected for compaction changed before it could be replaced. The conversation is unchanged; the attempt is recorded in the session log.","\u538B\u7F29\u671F\u95F4\u4F1A\u8BDD\u5386\u53F2\u53D1\u751F\u53D8\u5316\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u8BD5\u3002"],["Compaction could not produce a useful summary. The conversation is unchanged; the attempt is recorded in the session log.","\u672A\u80FD\u751F\u6210\u6709\u6548\u7684\u538B\u7F29\u6458\u8981\uFF0C\u672C\u6B21\u672A\u4FEE\u6539\u4F1A\u8BDD\u3002"],["Compaction did not finish cleanly; some session history may have changed. Inspect the current session state before retrying.","\u4E0A\u4E0B\u6587\u538B\u7F29\u672A\u6B63\u5E38\u5B8C\u6210\uFF0C\u90E8\u5206\u4F1A\u8BDD\u5386\u53F2\u53EF\u80FD\u5DF2\u53D8\u5316\uFF0C\u8BF7\u68C0\u67E5\u4F1A\u8BDD\u540E\u518D\u91CD\u8BD5\u3002"],["Compaction finished, but the session could not be saved.","\u4E0A\u4E0B\u6587\u5DF2\u538B\u7F29\uFF0C\u4F46\u4F1A\u8BDD\u4FDD\u5B58\u5931\u8D25\u3002"]]);function nI(n){return{handled:!0,message:n,messages:[n]}}function pIe(n){if(!n||typeof n!="object"||!["success","error"].includes(n.kind)||n.text!==void 0&&typeof n.text!="string")throw new TypeError("Harness returned an invalid /compact result");let t=n.text?.trim()??"",o=/^Compacted (\d+) history items \(~(\d+) tokens\)\.$/u.exec(t);return o?D("\u5DF2\u538B\u7F29 {count} \u6761\u5386\u53F2\u8BB0\u5F55\uFF08\u7EA6 {tokens} \u4E2A token\uFF09\u3002",{count:o[1],tokens:o[2]}):uK.has(t)?D(uK.get(t)):t||(n.kind==="success"?D("\u4E0A\u4E0B\u6587\u538B\u7F29\u5B8C\u6210\u3002"):D("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\u3002"))}function dIe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?D("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u53D1\u9001\u65B0\u6D88\u606F\u5F00\u542F\u4F1A\u8BDD\u3002"):t==="agent-busy"?D("\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="cancelled"||n?.name==="AbortError"?D("\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"):t===Ma||t==="workspace-bot-not-found"?D("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):t==="commands-unavailable"?D("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u4ECE\u673A\u5668\u4EBA\u6267\u884C\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"):D("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function ci(n,t,o,i,e={}){if(typeof n!="string")return null;let a=IIe.exec(n.trim());if(!a)return null;if(a[1].trim())return nI(D(lIe));if(typeof o?.sessionFor!="function")return nI(D("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u4F1A\u8BDD\u72B6\u6001\u3002"));let A=o.sessionFor(i);if(typeof A!="string"||!A)return nI(D("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u53EF\u538B\u7F29\u7684\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u6D88\u606F\u3002"));if(typeof t?.executeCommand!="function")return nI(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"));try{let r=await t.executeCommand(A,"/compact",e);return nI(r===void 0?D("\u5F53\u524D Harness \u672A\u6CE8\u518C /compact \u547D\u4EE4\uFF0C\u8BF7\u786E\u8BA4\u4E0A\u4E0B\u6587\u538B\u7F29\u7EC4\u4EF6\u5DF2\u542F\u7528\u3002"):pIe(r?.result))}catch(r){return nI(dIe(r))}}import{isDeepStrictEqual as TIe}from"node:util";import{realpath as QK,stat as yK}from"node:fs/promises";import{isAbsolute as mK,resolve as hIe}from"node:path";var EIe=/^\/workspace(?:\s+([\s\S]+))?$/i,CIe=/^\/workspacelist(?:\s+([\s\S]+))?$/i,uIe=/^\/sessionlist(?:\s+([\s\S]+))?$/i,BIe=/^\/session(?=$|\s)/i,fIe=/^\/session[ \t]+([^\s]+)$/i,QIe=4096,yIe=1800,mIe=256,SK=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,SIe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,DK="\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09",zl=["\u7528\u6CD5\uFF1A","/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD","/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7 \u6309 /workspacelist \u5E8F\u53F7\u5217\u51FA\u4F1A\u8BDD","/sessionlist \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5217\u51FA\u6307\u5B9A\u5DE5\u4F5C\u533A\u4F1A\u8BDD"].join(` +`);function Gt(n,t=[n]){return{handled:!0,message:n,messages:t}}function Vl(n){return typeof n!="string"||n.length>QIe||!mK(n)||SK.test(n)?null:hIe(n)}function Tf(n){return typeof n!="string"?"":n.replace(SIe," ").replace(/\s+/gu," ").trim()}function BK(n){return typeof n=="string"&&n.length>0&&n.length<=mIe&&!new RegExp("\\p{White_Space}","u").test(n)&&!SK.test(n)}async function oM(n){let t=await Promise.all(n.map(async o=>{let i=Vl(o);if(!i)return null;try{return(await yK(i)).isDirectory()?Vl(await QK(i)):null}catch{return null}}));return[...new Set(t.filter(Boolean))]}async function nM(n){if(typeof n!="string"||!mK(n.trim()))return{error:D(`\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002 +{usage}`,{usage:D(zl)})};let t=Vl(n.trim());if(!t)return{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 +{usage}`,{usage:D(zl)})};let o;try{o=await yK(t)}catch{return{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 +{usage}`,{usage:D(zl)})}}if(!o.isDirectory())return{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002 +{usage}`,{usage:D(zl)})};try{let i=Vl(await QK(t));return i?{workspace:i}:{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 +{usage}`,{usage:D(zl)})}}catch{return{error:D(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 +{usage}`,{usage:D(zl)})}}}async function aE(n,t={}){let o=await n.listWorkspaces(t),i=typeof n?.currentWorkspace=="function"?n.currentWorkspace():null,[e]=i?await oM([i]):[],a=await oM(Array.isArray(o)?o:[]),A=[...new Set([...e?[e]:[],...a])];return n.assertWorkspaceScope?.(),{current:e??null,paths:A}}function Hs(n){let t=[],o=0;for(;o=o)i=e+1;else{let a=n.charCodeAt(i-1),A=n.charCodeAt(i);a>=55296&&a<=56319&&A>=56320&&A<=57343&&(i-=1)}}t.push(n.slice(o,i)),o=i}return t}async function DIe(n,t){if(n[1]?.trim())return Gt(D("\u7528\u6CD5\uFF1A/workspacelist"));if(typeof t?.listWorkspaces!="function")return Gt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u3002"));try{let{current:o,paths:i}=await aE(t);if(i.length===0)return Gt(D("\u5F53\u524D Harness Host \u4E0A\u6CA1\u6709\u4ECD\u7136\u5B58\u5728\u7684\u5DF2\u767B\u8BB0\u5DE5\u4F5C\u533A\u3002"));let a=[D("\u5F53\u524D Harness Host \u4E0A\u5B58\u5728\u7684\u5DE5\u4F5C\u533A\uFF08{count}\uFF09\uFF1A",{count:i.length}),...i.map((A,r)=>`${r+1}. ${A}${A===o?D("\uFF08\u5F53\u524D\uFF09"):""}`),"",D("\u5207\u6362\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"),D("\u67E5\u770B\u4F1A\u8BDD\uFF1A/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84")].join(` +`);return Gt(a,Hs(a))}catch(o){return o?.code==="workspace-bot-not-found"?Gt(D("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5217\u51FA\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002")):Gt(D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}async function sM(n,t,o={}){if(!n){if(typeof t?.currentWorkspace!="function")return{error:D("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u4F5C\u533A\u3002")};let e=await nM(t.currentWorkspace());return t.assertWorkspaceScope?.(),e}if(/^\d+$/u.test(n)){if(typeof t?.listWorkspaces!="function")return{error:D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002")};let{paths:e}=await aE(t,o),a=Number(n);return!Number.isSafeInteger(a)||a<1||a>e.length?{error:D("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002")}:{workspace:e[a-1]}}let i=await nM(n);return t.assertWorkspaceScope?.(),i}function wIe(n){let t=typeof n=="number"&&Number.isFinite(n)?n:null;if(t===null)return"";let o=new Date(t);if(Number.isNaN(o.getTime()))return"";let i=s=>String(s).padStart(2,"0"),e=`${i(o.getHours())}:${i(o.getMinutes())}`,a=s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime(),A=new Date,r=Math.round((a(A)-a(o))/864e5);return r===0?D("\u4ECA\u5929 {time}",{time:e}):r===1?D("\u6628\u5929 {time}",{time:e}):r===2?D("\u524D\u5929 {time}",{time:e}):o.getFullYear()===A.getFullYear()?D("{month}\u6708{day}\u65E5 {time}",{month:o.getMonth()+1,day:o.getDate(),time:e}):D("{year}\u5E74{month}\u6708{day}\u65E5",{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()})}function OIe(n,t,{currentWorkspace:o=!1}={}){let i=t.map(e=>{let a=Tf(e?.sessionId);if(!a)throw new TypeError("Harness returned an invalid session id");let A=e?.summaryAvailable===!1?D("\u6807\u9898\u6682\u4E0D\u53EF\u7528"):Tf(e?.title)||D("\u6682\u65E0\u6807\u9898"),r=wIe(e?.time),s=`${r?` \xB7 ${r}`:""}${e?.archived===!0?D("\uFF08\u5DF2\u5F52\u6863\uFF09"):""}`;return`${A}${s} ID: ${a}`});return i.length===0?D(`\u5DE5\u4F5C\u533A\uFF1A{workspace} \u8BE5\u5DE5\u4F5C\u533A\u6682\u65E0\u4F1A\u8BDD\u3002`,{workspace:n}):[D("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:n}),D("\u4F1A\u8BDD\uFF08{count}\uFF09\uFF1A",{count:i.length}),"",...i.map((e,a)=>`${a+1}. ${e}`),"",o?D("\u7ED1\u5B9A\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09"):D(`\u7ED1\u5B9A\u7528\u6CD5\uFF1A/session Session ID \u63D0\u793A\uFF1A/session N \u53EA\u6309\u673A\u5668\u4EBA\u5F53\u524D\u5DE5\u4F5C\u533A\u7684\u5E8F\u53F7\u7ED1\u5B9A\u3002`)].join(` -`)}async function zce(n){if(typeof n?.currentWorkspace!="function")return null;let[t]=await Yb([n.currentWorkspace()]);return n.assertWorkspaceScope?.(),t??null}async function Vce(n,t){if(typeof t?.listWorkspaceSessions!="function")return Pt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002"));let o=n[1]?.trim()??"";try{let i=await Jb(o,t);if(i.error)return Pt(i.error);let e=await t.listWorkspaceSessions(i.workspace);if(!e||!Array.isArray(e.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let a=xl(e.workspace)??i.workspace,A=await zce(t),r=qce(a,e.sessions,{currentWorkspace:a===A});return Pt(r,Gs(r))}catch(i){return i?.code==="workspace-bot-not-found"?Pt(D("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5217\u51FA\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002")):Pt(D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}function ZH(n){return n?.code==="session-id-invalid"?D(`Session ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:D(tK)}):["session-not-registered","session-not-found"].includes(n?.code)?D("\u672A\u627E\u5230\u8BE5\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u786E\u8BA4 Session ID\u3002"):n?.code==="session-subagent-unsupported"?D("\u5B50\u4EE3\u7406\u4F1A\u8BDD\u4E0D\u80FD\u7ED1\u5B9A\u5230\u673A\u5668\u4EBA\u5BF9\u8BDD\uFF0C\u8BF7\u9009\u62E9\u666E\u901A\u4F1A\u8BDD\u3002"):n?.code==="session-workspace-ambiguous"?D("\u8BE5\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u5F52\u5C5E\u4E0D\u660E\u786E\uFF0C\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u3002"):n?.code==="session-summary-unavailable"?D("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u8BE5\u4F1A\u8BDD\u7684\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):n?.code==="workspace-bot-not-found"?D("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u7ED1\u5B9A\u539F\u5BF9\u8BDD\u7684\u4F1A\u8BDD\u3002"):[ba,"agent-busy","session-conflict","workspace-conflict"].includes(n?.code)?D("\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):D("\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function Wce(n,t,o){let e=Uce.exec(n)?.[1];if(typeof e=="string"&&/^\d+$/u.test(e)){if(typeof t?.listWorkspaceSessions!="function"||typeof t?.currentWorkspace!="function")return Pt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u7ED1\u5B9A\uFF0C\u8BF7\u4F7F\u7528 /session Session ID\u3002"));try{let a=await jb(t.currentWorkspace());if(a.error)return Pt(a.error);let A=await t.listWorkspaceSessions(a.workspace);if(!A||!Array.isArray(A.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let r=Number(e);if(!Number.isSafeInteger(r)||r<1||r>A.sessions.length)return Pt(D("\u4F1A\u8BDD\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u67E5\u770B\u5E8F\u53F7\u3002"));let s=A.sessions[r-1]?.sessionId;if(!WH(s))throw new TypeError("Harness returned an invalid session id");e=s}catch(a){return a?.code==="workspace-bot-not-found"?Pt(ZH(a)):Pt(D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}if(!WH(e))return Pt(D(tK));if(typeof t?.bindWorkspaceSession!="function")return Pt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD\u3002"));if(typeof o!="string"||!o)return Pt(D("\u5F53\u524D\u6D88\u606F\u7F3A\u5C11\u53EF\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u3002"));try{let a=await t.bindWorkspaceSession(o,e);t.assertWorkspaceScope?.();let A=xl(a?.workspace),r=ff(a?.sessionId);if(!A||!r)throw new TypeError("Harness returned an invalid bound session");let s=ff(a?.title)||D("\u6682\u65E0\u6807\u9898"),g=[D("\u5F53\u524D\u804A\u5929\u5DF2\u7ED1\u5B9A\u4F1A\u8BDD\uFF1A"),D("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:A}),D("\u6807\u9898\uFF1A{title}",{title:s}),`ID\uFF1A${r}`,D("\u5F52\u6863\uFF1A{archived}",{archived:a?.archived===!0?D("\u662F"):D("\u5426")}),D("\u53D1\u9001 /history \u67E5\u770B\u6700\u8FD1\u5BF9\u8BDD\u3002")].join(` -`);return Pt(g,Gs(g))}catch(a){return Pt(ZH(a))}}async function po(n,t,o){if(typeof n!="string")return null;let i=n.trim();if(Lce.test(i))return Wce(i,t,o);let e=Fce.exec(i);if(e)return Vce(e,t);let a=Gce.exec(i);if(a)return jce(a,t);let A=Pce.exec(i);if(!A)return null;let r=A[1]?.trim();if(!r)return Pt(D("\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"));if(typeof t?.switchWorkspace!="function")return Pt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5207\u6362\u5DE5\u4F5C\u533A\u3002"));try{let s=await t.switchWorkspace(r);return Pt(D("\u5DE5\u4F5C\u533A\u5DF2\u5207\u6362\u4E3A\uFF1A{workspace}",{workspace:s}))}catch(s){if(["workspace-not-absolute","workspace-not-found","workspace-not-directory"].includes(s?.code))return Pt(D(`{message} -\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84`,{message:s.message}));if(s?.code==="workspace-bot-not-found")return Pt(D("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5207\u6362\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002"));throw s}}var aK=/^\/history(?=$|\s)([\s\S]*)$/iu,Xce="\u7528\u6CD5\uFF1A/history [\u6570\u91CF]\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09",$ce=5,eIe=50,AIe=3,rK=1e4;function Lg(n){return{handled:!0,message:n,messages:Gs(n)}}function iK(n){if(!Array.isArray(n))throw new TypeError("Invalid history message content");return n.flatMap(t=>t?.type==="text"&&typeof t.text=="string"?[t.text]:t?.type==="image"?[D("[\u56FE\u7247]")]:t?.type==="file"?[D("[\u6587\u4EF6]")]:[]).join(` -`).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu,"").trim()||D("\u672C\u6761\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6587\u5B57\u3002")}function tIe(n){let t=[],o=new Map;for(let i of n){let e=i.data;if(i.type==="user/message"&&i.surfaceOp==="append"&&e?.source?.kind==="user"){if(ci(iK(e.content)))continue;t.push({seq:i.seq,role:"user",content:e.content})}else if(i.type==="assistant/message"&&i.surfaceOp==="append"&&Number.isSafeInteger(e?.turn)&&e.turn>=0)o.set(e.turn,i);else if(i.type==="turn/end"){let a=o.get(e?.turn);if(o.delete(e?.turn),(e?.reason?.kind??e?.reason)!=="completed"||!a||a.data.interrupted===!0)continue;t.push({seq:a.seq,role:"assistant",content:a.data.message?.content})}}return t.sort((i,e)=>i.seq-e.seq)}function rIe(n,t){if(n.length<=t)return n;let o=D("\uFF08\u5DF2\u622A\u65AD\uFF09"),i=Math.max(0,t-o.length),e=n.charCodeAt(i-1);return e>=55296&&e<=56319&&(i-=1),`${n.slice(0,Math.max(0,i))}${o}`}function aIe(n,t,o,i){let e=n.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,"").slice(0,12),a=D("\u4F1A\u8BDD\u5386\u53F2\uFF5C{session}\uFF5C\u6700\u8FD1 {count} \u6761",{session:e,count:t.length}),A=[D("\u4EE5\u4E0A\u4E3A\u5386\u53F2\u8BB0\u5F55\uFF0C\u4E0D\u662F\u672C\u6B21\u65B0\u56DE\u590D\u3002")];t.length({...c,text:iK(c.content)})),s=500,g;do{let c=r.map((I,d)=>`${d+1}. ${I.role==="user"?D("\u7528\u6237"):D("\u52A9\u624B")} -${rIe(I.text,s)}`);g=Lg([a,...c,A.join(` +`)}async function bIe(n){if(typeof n?.currentWorkspace!="function")return null;let[t]=await oM([n.currentWorkspace()]);return n.assertWorkspaceScope?.(),t??null}async function MIe(n,t){if(typeof t?.listWorkspaceSessions!="function")return Gt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002"));let o=n[1]?.trim()??"";try{let i=await sM(o,t);if(i.error)return Gt(i.error);let e=await t.listWorkspaceSessions(i.workspace);if(!e||!Array.isArray(e.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let a=Vl(e.workspace)??i.workspace,A=await bIe(t),r=OIe(a,e.sessions,{currentWorkspace:a===A});return Gt(r,Hs(r))}catch(i){return i?.code==="workspace-bot-not-found"?Gt(D("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5217\u51FA\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002")):Gt(D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}function fK(n){return n?.code==="session-id-invalid"?D(`Session ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:D(DK)}):["session-not-registered","session-not-found"].includes(n?.code)?D("\u672A\u627E\u5230\u8BE5\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u786E\u8BA4 Session ID\u3002"):n?.code==="session-subagent-unsupported"?D("\u5B50\u4EE3\u7406\u4F1A\u8BDD\u4E0D\u80FD\u7ED1\u5B9A\u5230\u673A\u5668\u4EBA\u5BF9\u8BDD\uFF0C\u8BF7\u9009\u62E9\u666E\u901A\u4F1A\u8BDD\u3002"):n?.code==="session-workspace-ambiguous"?D("\u8BE5\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u5F52\u5C5E\u4E0D\u660E\u786E\uFF0C\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u3002"):n?.code==="session-summary-unavailable"?D("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u8BE5\u4F1A\u8BDD\u7684\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):n?.code==="workspace-bot-not-found"?D("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u7ED1\u5B9A\u539F\u5BF9\u8BDD\u7684\u4F1A\u8BDD\u3002"):[Ma,"agent-busy","session-conflict","workspace-conflict"].includes(n?.code)?D("\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):D("\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function _Ie(n,t,o){let e=fIe.exec(n)?.[1];if(typeof e=="string"&&/^\d+$/u.test(e)){if(typeof t?.listWorkspaceSessions!="function"||typeof t?.currentWorkspace!="function")return Gt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u7ED1\u5B9A\uFF0C\u8BF7\u4F7F\u7528 /session Session ID\u3002"));try{let a=await nM(t.currentWorkspace());if(a.error)return Gt(a.error);let A=await t.listWorkspaceSessions(a.workspace);if(!A||!Array.isArray(A.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let r=Number(e);if(!Number.isSafeInteger(r)||r<1||r>A.sessions.length)return Gt(D("\u4F1A\u8BDD\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u67E5\u770B\u5E8F\u53F7\u3002"));let s=A.sessions[r-1]?.sessionId;if(!BK(s))throw new TypeError("Harness returned an invalid session id");e=s}catch(a){return a?.code==="workspace-bot-not-found"?Gt(fK(a)):Gt(D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}if(!BK(e))return Gt(D(DK));if(typeof t?.bindWorkspaceSession!="function")return Gt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD\u3002"));if(typeof o!="string"||!o)return Gt(D("\u5F53\u524D\u6D88\u606F\u7F3A\u5C11\u53EF\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u3002"));try{let a=await t.bindWorkspaceSession(o,e);t.assertWorkspaceScope?.();let A=Vl(a?.workspace),r=Tf(a?.sessionId);if(!A||!r)throw new TypeError("Harness returned an invalid bound session");let s=Tf(a?.title)||D("\u6682\u65E0\u6807\u9898"),g=[D("\u5F53\u524D\u804A\u5929\u5DF2\u7ED1\u5B9A\u4F1A\u8BDD\uFF1A"),D("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:A}),D("\u6807\u9898\uFF1A{title}",{title:s}),`ID\uFF1A${r}`,D("\u5F52\u6863\uFF1A{archived}",{archived:a?.archived===!0?D("\u662F"):D("\u5426")}),D("\u53D1\u9001 /history \u67E5\u770B\u6700\u8FD1\u5BF9\u8BDD\u3002")].join(` +`);return Gt(g,Hs(g))}catch(a){return Gt(fK(a))}}async function ho(n,t,o){if(typeof n!="string")return null;let i=n.trim();if(BIe.test(i))return _Ie(i,t,o);let e=uIe.exec(i);if(e)return MIe(e,t);let a=CIe.exec(i);if(a)return DIe(a,t);let A=EIe.exec(i);if(!A)return null;let r=A[1]?.trim();if(!r)return Gt(D("\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"));if(typeof t?.switchWorkspace!="function")return Gt(D("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5207\u6362\u5DE5\u4F5C\u533A\u3002"));try{let s=await t.switchWorkspace(r);return Gt(D("\u5DE5\u4F5C\u533A\u5DF2\u5207\u6362\u4E3A\uFF1A{workspace}",{workspace:s}))}catch(s){if(["workspace-not-absolute","workspace-not-found","workspace-not-directory"].includes(s?.code))return Gt(D(`{message} +\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84`,{message:s.message}));if(s?.code==="workspace-bot-not-found")return Gt(D("\u673A\u5668\u4EBA\u6B63\u5728\u79FB\u9664\u6216\u5DF2\u91CD\u65B0\u63A5\u5165\uFF0C\u65E0\u6CD5\u5207\u6362\u539F\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u3002"));throw s}}var OK=/^\/history(?=$|\s)([\s\S]*)$/iu,NIe="\u7528\u6CD5\uFF1A/history [\u6570\u91CF]\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09",RIe=5,kIe=50,vIe=3,wK=1e4;function Yg(n){return{handled:!0,message:n,messages:Hs(n)}}function bK(n){if(!Array.isArray(n))throw new TypeError("Invalid history message content");return n.flatMap(t=>t?.type==="text"&&typeof t.text=="string"?[t.text]:t?.type==="image"?[D("[\u56FE\u7247]")]:t?.type==="file"?[D("[\u6587\u4EF6]")]:[]).join(` +`).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu,"").trim()||D("\u672C\u6761\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6587\u5B57\u3002")}function PIe(n){let t=[],o=new Map;for(let i of n){let e=i.data;if(i.type==="user/message"&&i.surfaceOp==="append"&&e?.source?.kind==="user"){if(Ii(bK(e.content)))continue;t.push({seq:i.seq,role:"user",content:e.content})}else if(i.type==="assistant/message"&&i.surfaceOp==="append"&&Number.isSafeInteger(e?.turn)&&e.turn>=0)o.set(e.turn,i);else if(i.type==="turn/end"){let a=o.get(e?.turn);if(o.delete(e?.turn),(e?.reason?.kind??e?.reason)!=="completed"||!a||a.data.interrupted===!0)continue;t.push({seq:a.seq,role:"assistant",content:a.data.message?.content})}}return t.sort((i,e)=>i.seq-e.seq)}function GIe(n,t){if(n.length<=t)return n;let o=D("\uFF08\u5DF2\u622A\u65AD\uFF09"),i=Math.max(0,t-o.length),e=n.charCodeAt(i-1);return e>=55296&&e<=56319&&(i-=1),`${n.slice(0,Math.max(0,i))}${o}`}function FIe(n,t,o,i){let e=n.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,"").slice(0,12),a=D("\u4F1A\u8BDD\u5386\u53F2\uFF5C{session}\uFF5C\u6700\u8FD1 {count} \u6761",{session:e,count:t.length}),A=[D("\u4EE5\u4E0A\u4E3A\u5386\u53F2\u8BB0\u5F55\uFF0C\u4E0D\u662F\u672C\u6B21\u65B0\u56DE\u590D\u3002")];t.length({...c,text:bK(c.content)})),s=500,g;do{let c=r.map((I,d)=>`${d+1}. ${I.role==="user"?D("\u7528\u6237"):D("\u52A9\u624B")} +${GIe(I.text,s)}`);g=Yg([a,...c,A.join(` `)].join(` -`)),s=Math.floor(s/2)}while(s>0&&(g.message.length>3e3||g.messages.length>3));return g}function iIe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?D("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u4F1A\u8BDD\u3002"):t===ba||t==="workspace-bot-not-found"||t==="session-binding-changed"?D("\u4F1A\u8BDD\u3001\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /history\u3002"):t==="harness-api-not-found"?D("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"):n?.name==="AbortError"?D("\u5386\u53F2\u8BFB\u53D6\u5DF2\u53D6\u6D88\u3002"):n?.name==="TimeoutError"||t==="harness-timeout"?D("\u8BFB\u53D6\u5386\u53F2\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):D("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}function ci(n){return typeof n=="string"&&aK.test(n.trim())}async function Fi(n,t,o,i,{signal:e,isDirect:a=!1,hasImages:A=!1,hasFiles:r=!1}={}){if(!ci(n))return null;let s=aK.exec(n.trim())[1].trim();if(s&&(!/^\d+$/u.test(s)||/^0+$/u.test(s)))return Lg(D(Xce));let g=s?Math.min(Number(s),$ce):3;if(!a)return Lg(D("\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528 /history\u3002"));if(A||r)return Lg(D("/history \u4EC5\u652F\u6301\u6587\u5B57\u547D\u4EE4\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002"));let c=o?.sessionFor?.(i);if(typeof c!="string"||!c)return Lg(D("\u5F53\u524D\u804A\u5929\u5C1A\u672A\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u6D88\u606F\u6216\u4F7F\u7528 /session \u7ED1\u5B9A\u4F1A\u8BDD\u3002"));try{let I=t?.workspaceSession?.(c);if(typeof I?.readHistory!="function")return Lg(D("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"));let d=AbortSignal.timeout(rK),B=e?AbortSignal.any([e,d]):d,f=Date.now()+rK,Q=new Map,y,m,_=[],T=!1;for(let G=0;G=f)throw new DOMException("History read timed out","TimeoutError");let x=await I.readHistory({maxMessages:eIe,...y===void 0?{}:{beforeSeq:y},timeoutMs:Math.max(1,f-Date.now()),signal:B});if(B.throwIfAborted(),Date.now()>=f)throw new DOMException("History read timed out","TimeoutError");if(o.sessionFor(i)!==c){let q=new Error("Session binding changed during history read");throw q.code="session-binding-changed",q}if(!x||!Array.isArray(x.events)||typeof x.hasMore!="boolean")throw new TypeError("Invalid history page");let J=y??1/0;for(let q of x.events){let j=q?.event;if(!j||!Number.isSafeInteger(j.seq)||j.seq<0||typeof j.type!="string"||!j.type)throw new TypeError("Invalid history event");if(m!==void 0&&j.seq>m)continue;let K=Q.get(j.seq);if(K){if(!Zce(K,j))throw new TypeError("Conflicting history events")}else{if(y!==void 0&&j.seq>=y)throw new TypeError("Invalid history cursor");Q.set(j.seq,j)}J=Math.min(J,j.seq)}let L=[...Q.values()].sort((q,j)=>q.seq-j.seq);if(m??=L.at(-1)?.seq,T=x.hasMore,T&&(!Number.isFinite(J)||J===y))throw new TypeError("History cursor did not advance");if(_=tIe(L).slice(-g),_.length>=g||!T)break;y=J}return _.length===0?Lg(T?D("\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u672A\u627E\u5230\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002"):D("\u5F53\u524D\u4F1A\u8BDD\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002")):aIe(c,_,g,T)}catch(I){return Lg(iIe(I))}}var oK={name:"@xmanrui/dsh-im",version:"3.0.8",description:"\u628A\u4E5D\u79CD IM \u673A\u5668\u4EBA\u548C\u516C\u7F51 AI Office \u63A5\u5165\u672C\u673A DeepSeek Harness\u3002 Connect nine IM channels and a public AI Office to a local DeepSeek Harness.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","ai-office"],author:{name:"xmanrui",url:"https://github.com/xmanrui"},contributors:[{name:"C3H3-AI",url:"https://github.com/C3H3-AI"}],license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/xmanrui/dsh-im.git"},homepage:"https://github.com/xmanrui/dsh-im#readme",bugs:"https://github.com/xmanrui/dsh-im/issues",publishConfig:{access:"public"},bin:{"dsh-im":"bin/dsh-im.mjs"},main:"./lib/index.js",exports:{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},files:["assets","bin","cordis.patch.yml","lib","plugin-src","scripts","src","LICENSE","README.md","README.en.md","THIRD_PARTY_NOTICES.md"],dsh:{bundle:{patch:"./cordis.patch.yml"},client:{inject:["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"],platform:"web"}},scripts:{build:"node plugin-src/client/build.mjs && node plugin-src/host/build.mjs",test:"node --test test/*.test.mjs test/channels/*/*.test.mjs",check:"npm run build && npm test && node scripts/verify-package.mjs"},engines:{node:">=22.19"},dependencies:{"@tencent-connect/qqbot-connector":"1.2.0","@tencent-connect/qqbot-nodejs":"1.0.4","@wecom/aibot-node-sdk":"1.0.7","dingtalk-stream":"2.1.4",qrcode:"1.5.4"},devDependencies:{"@larksuiteoapi/node-sdk":"1.73.0","@whiskeysockets/baileys":"7.0.0-rc14",esbuild:"0.25.9","https-proxy-agent":"5.0.1",react:"18.3.1","react-dom":"18.3.1","react-test-renderer":"18.3.1"}};var nIe=/^\/(?:stop|steer|version)(?=$|\s)/iu,sIe=/^\/stop(?=$|\s)/iu,gIe=/^\/version(?=$|\s)/iu,cIe="\u7528\u6CD5\uFF1A/stop\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",IIe="\u7528\u6CD5\uFF1A/version\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",lIe="\u7528\u6CD5\uFF1A/steer <\u8865\u5145\u6307\u4EE4>",pIe="\u63A7\u5236\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002";function ho(n,t={}){return{message:n,...t}}function nK(n){return n?{signal:n}:{}}function sK(n,t,o){if(typeof t?.sessionFor!="function")return null;let i=t.sessionFor(o);if(typeof i!="string"||!i)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let e=n.workspaceSession(i);if(!e||typeof e!="object")throw new TypeError("Harness returned an invalid workspace session");return e}function Li(n){return typeof n=="string"&&nIe.test(n.trim())}async function Ii(n,t,o,i,{signal:e,hasImages:a=!1,pendingInteraction:A=!1,control:r}={}){if(!Li(n))return null;let s=n.trim(),g=sIe.test(s),c=gIe.test(s);if(a)return ho(D(pIe));if(c)return/^\/version$/iu.test(s)?ho(`dsh-im v${oK.version}`):ho(D(IIe));if(g){if(!/^\/stop$/iu.test(s))return ho(D(cIe));let Q=sK(t,o,i);if(!Q)return ho(D("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"));if(typeof Q.stopActiveTurn!="function")throw new TypeError("Harness session does not support stopping active turns");return await Q.stopActiveTurn(r,nK(e))?ho(D("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\u3002"),{stopped:!0}):ho(D("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"))}let d=/^\/steer(?:\s+([\s\S]*))?$/iu.exec(s)?.[1]?.trim()??"";if(!d)return ho(D(lIe));if(A)return ho([D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",D("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));let B=sK(t,o,i);if(!B)return ho(D("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u3002"));if(typeof B.steerActiveTurn!="function")throw new TypeError("Harness session does not support steering active turns");let f=await B.steerActiveTurn(d,r,nK(e));return ho(f?D("\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\uFF0CAgent \u4F1A\u5728\u4E0B\u4E00\u6B65\u8BFB\u53D6\u3002"):D("\u4EFB\u52A1\u5DF2\u7ED3\u675F\uFF0C\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u76F4\u63A5\u53D1\u9001\u6D88\u606F\u5F00\u59CB\u65B0\u4EFB\u52A1\u3002"))}var dIe=/^\/model(?=$|\s)/i,CK=/^\/models(?=$|\s)/i,uK=/^\/reasoning(?=$|\s)/i,BK=/^\/reasonings(?=$|\s)/i,fK=/^\/reasoninglist(?=$|\s)/i,gK="\u7528\u6CD5\uFF1A/model <\u5E8F\u53F7\u6216 provider/model> [\u63A8\u7406\u7B49\u7EA7ID]",hIe="\u7528\u6CD5\uFF1A/models\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",EIe="\u7528\u6CD5\uFF1A/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default]",CIe="\u7528\u6CD5\uFF1A/reasoninglist \u6216 /reasonings\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",QK="session-binding-changed",yK="model-selection-mismatch",uIe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu;function ht(n){return{handled:!0,message:n,messages:Gs(n)}}function Vr(n){return typeof n!="string"?"":n.replace(uIe," ").replace(/\s+/gu," ").trim()}function BIe(n){return n?{signal:n}:{}}function fIe(n){if(n===void 0)return;if(!n||typeof n!="object"||!Array.isArray(n.efforts)||n.efforts.length===0)throw new TypeError("Harness returned invalid model reasoning metadata");let t=n.efforts.map(o=>{if(!o||typeof o!="object"||typeof o.id!="string"||!o.id||typeof o.name!="string"||!o.name||o.description!==void 0&&typeof o.description!="string")throw new TypeError("Harness returned an invalid reasoning effort");return{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description}}});if(n.defaultEffort!==void 0&&(typeof n.defaultEffort!="string"||!n.defaultEffort))throw new TypeError("Harness returned an invalid default reasoning effort");return{efforts:t,...n.defaultEffort===void 0?{}:{defaultEffort:n.defaultEffort}}}function mK(n,{requireCurrent:t=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new TypeError("Harness returned an invalid model catalog");let o=n.groups.map(a=>{if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name||!Array.isArray(a.models))throw new TypeError("Harness returned an invalid model provider group");return{id:a.id,name:a.name,models:a.models.map(A=>{if(!A||typeof A!="object"||typeof A.id!="string"||!A.id||typeof A.name!="string"||!A.name||A.description!==void 0&&typeof A.description!="string")throw new TypeError("Harness returned an invalid model");return{id:A.id,name:A.name,...A.description===void 0?{}:{description:A.description},...A.reasoning===void 0?{}:{reasoning:fIe(A.reasoning)}}})}}),i=n.failures.map(a=>{if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name)throw new TypeError("Harness returned an invalid model provider failure");return{id:a.id,name:a.name}}),e=null;if(n.current!==void 0){if(!n.current||typeof n.current!="object"||typeof n.current.provider!="string"||!n.current.provider||typeof n.current.model!="string"||!n.current.model||n.current.reasoningEffort!==void 0&&(typeof n.current.reasoningEffort!="string"||!n.current.reasoningEffort))throw new TypeError("Harness returned an invalid current model");e={provider:n.current.provider,model:n.current.model,...n.current.reasoningEffort===void 0?{}:{reasoningEffort:n.current.reasoningEffort}}}else if(t)throw new TypeError("Harness returned no current model");return{groups:o,failures:i,current:e}}function Fs(n,t){return`${n}/${t}`}function SK(n,t){return n?.provider===t?.provider&&n?.model===t?.model}function QIe(n,t){return SK(n,t)&&n?.reasoningEffort===t?.reasoningEffort}function yIe(n,t){return SK(n,t)&&(t.reasoningEffort===void 0||n?.reasoningEffort===t.reasoningEffort)}function Wb(n){if(!n?.provider||!n?.model)return"";let t=Fs(n.provider,n.model);return n.reasoningEffort===void 0?t:`${t} \xB7 reasoningEffort=${Vr(n.reasoningEffort)}`}function cK(n,t,o){let i=new Error(`Harness ${o} did not confirm the selected model`);return i.code=yK,i.expected=n,i.actual=t,i.source=o,i}function DK(){let n=new Error("Conversation binding changed during model selection");return n.code=QK,n}function IK(n,t,o){if((typeof n?.sessionFor=="function"?n.sessionFor(t):null)!==o)throw DK()}function mIe(n,t){for(let o of n.groups)for(let i of o.models)if(Fs(o.id,i.id)===t)return{provider:o.id,model:i.id};return null}function SIe(n,t){let o=0;for(let i of n.groups)for(let e of i.models)if(o+=1,o===t)return{provider:i.id,model:e.id};return null}function lK(n){if(!/^\d+$/u.test(n))return null;let t=Number(n);return{index:Number.isSafeInteger(t)&&t>0?t:null}}function Qf(n,t){return t?n.groups.find(({id:i})=>i===t.provider)?.models.find(({id:i})=>i===t.model)??null:null}function DIe(n,t){return n?.reasoning?.efforts?.[t-1]??null}function Zb(n,t){return n?.reasoning?.efforts?.find(({id:o})=>o===t)??null}function yf(n,t){return n?.reasoningEffort??t?.reasoning?.defaultEffort}function $h(n,t){if(t===void 0)return D("Default\uFF08\u7531\u6A21\u578B\u6216 Provider \u51B3\u5B9A\uFF09");let o=Zb(n,t);if(!o)return Vr(t);let i=Vr(o.name),e=Vr(o.id);return i===e?e:`${i} (${e})`}function wK(n){let t=Qf(n,n.current);return $h(t,yf(n.current,t))}function wIe(n,t,o){return n===t&&n===o?D("\uFF08\u5F53\u524D\u3001\u9ED8\u8BA4\uFF09"):n===t?D("\uFF08\u5F53\u524D\uFF09"):n===o?D("\uFF08\u9ED8\u8BA4\uFF09"):""}function pK(n){return[D("\u6A21\u578B\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:Vr(n)}),"",D("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` -`)}function dK(n){return[D("\u63A8\u7406\u7B49\u7EA7\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:Vr(n)}),"",D("\u8BF7\u53D1\u9001 /reasoninglist \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` -`)}function qb(n,t,o){let i=[D("\u6A21\u578B\u4E0D\u652F\u6301\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:Vr(t)}),"",Vr(Wb(n))],e=o?.reasoning?.efforts?.map(({id:a})=>Vr(a))??[];return e.length>0?i.push(D("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A{efforts}",{efforts:e.join(", ")})):i.push(D("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002")),i.join(` -`)}function OIe(n){let t=n.current?Fs(n.current.provider,n.current.model):null,o=[D("\u53EF\u7528\u6A21\u578B\uFF1A")],i=0;n.groups.length===0&&o.push("",D("\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u3002"));for(let e of n.groups){o.push("",Vr(e.name)||Vr(e.id));for(let a of e.models){i+=1;let A=Fs(e.id,a.id);o.push(`${i}. ${Vr(A)}${A===t?D("\uFF08\u5F53\u524D\uFF09"):""}`)}}if(n.failures.length>0){o.push("",D("\u4EE5\u4E0B\u6A21\u578B\u63D0\u4F9B\u65B9\u6682\u65F6\u4E0D\u53EF\u7528\uFF1A"));for(let e of n.failures)o.push(`- ${Vr(e.name)||Vr(e.id)}`)}return i>0&&o.push("",D("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")),o.join(` -`)}function bIe(n){return[D("\u5F53\u524D\u6A21\u578B\uFF1A"),Fs(n.current.provider,n.current.model),D("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:wK(n)}),"",D("\u67E5\u770B\u5168\u90E8\u6A21\u578B\uFF1A/models"),D("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),D("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")].join(` -`)}function MIe(n){return[D("\u5F53\u524D\u6A21\u578B\uFF1A"),Fs(n.current.provider,n.current.model),D("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:wK(n)}),"",D("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),D("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),D("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")].join(` -`)}function _Ie(n){let t=n.current,o=Qf(n,t),i=yf(t,o),e=[D("\u5F53\u524D\u6A21\u578B\uFF1A"),Fs(t.provider,t.model),D("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:$h(o,i)}),"",D("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A")];if(!o?.reasoning)return e.push(D("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002"),"",D("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` -`);for(let[a,A]of o.reasoning.efforts.entries()){let r=$h(o,A.id),s=wIe(A.id,i,o.reasoning.defaultEffort);e.push(`${a+1}. ${r}${s}`);let g=Vr(A.description);g&&e.push(` ${g}`)}return e.push("",D("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),D("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` -`)}function TIe(){return[D("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",D("\u67E5\u770B\u6A21\u578B\uFF1A/models"),D("\u9009\u62E9\u6A21\u578B\uFF1A/model <\u5E8F\u53F7>")].join(` -`)}function zb(){return[D("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",D("\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u666E\u901A\u6D88\u606F\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` -`)}function NIe(n){return n?.code??n?.failure?.code}function Yl(n,t){let o=NIe(n);if(o==="agent-busy")return D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002");if(o==="session-not-found")return D("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o==="model-unavailable")return t==="reasoning-select"?D("\u65E0\u6CD5\u5207\u6362\u63A8\u7406\u7B49\u7EA7\u3002\u5F53\u524D\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u4E0D\u53EF\u7528\u3002"):D("\u65E0\u6CD5\u5207\u6362\u5230\u8BE5\u6A21\u578B\u3002\u6A21\u578B\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u6216\u4E0D\u652F\u6301\u5F53\u524D\u4F1A\u8BDD\u4E2D\u7684\u56FE\u7247\u3002");if(o===ba||o==="workspace-bot-not-found")return D("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===QK)return D("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===yK){let i=n?.expected,e=n?.actual,a=[t==="reasoning-select"?D("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):D("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")];if(i?.provider&&i?.model&&a.push("",`requested: ${Vr(Wb(i))}`),e?.provider&&e?.model){let A=n?.source==="models.current"?D("\u5F53\u524D\u6A21\u578B\uFF1A"):"selectModel.selected:";a.push(`${A} ${Vr(Wb(e))}`)}else a.push(`${n?.source??"Harness"}: unconfirmed`);return a.join(` -`)}return o==="cancelled"||n?.name==="AbortError"?t==="list"?D("\u83B7\u53D6\u6A21\u578B\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-list"?D("\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-select"?D("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):D("\u6A21\u578B\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):t==="list"?D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u6A21\u578B\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-list"?D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-select"?D("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):D("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function jl(n,t,o,i){if(typeof t?.sessionFor!="function")return null;let e=t.sessionFor(o);if(typeof e!="string"||!e)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let a=n.workspaceSession(e);if(!a||typeof a.sessionExists!="function")throw new TypeError("Harness returned an invalid workspace session");return await a.sessionExists(i)?{sessionId:e,session:a}:(typeof t.clearSession=="function"&&t.sessionFor(o)===e&&await t.clearSession(o),null)}async function hK(n,t,o){if(typeof n?.isRunning!="function"||typeof n?.hasActiveTurn!="function")throw new TypeError("Harness session does not expose run state");return await n.isRunning(o)?!0:!!await n.hasActiveTurn(t,o)}async function EK(n,t){if(typeof n?.listModels!="function")throw new TypeError("Harness does not support listing models");return mK(await n.listModels(t))}async function tI(n,t){if(typeof n?.models!="function")throw new TypeError("Harness session does not support listing models");return mK(await n.models(t),{requireCurrent:!0})}async function Vb(n,t,o){if(typeof n?.selectModel!="function")throw new TypeError("Harness session does not support model selection");let i=(await n.selectModel(t,o))?.selected;if(!yIe(i,t))throw cK(t,i,"selectModel.selected");let e=(await tI(n,o)).current;if(!QIe(e,i))throw cK(i,e,"models.current");return e}function RIe(n){return CK.test(n)}function kIe(n){return fK.test(n)||BK.test(n)}function vIe(n){return uK.test(n)}function Ui(n){if(typeof n!="string")return!1;let t=n.trim();return CK.test(t)||dIe.test(t)||fK.test(t)||BK.test(t)||uK.test(t)}async function Hi(n,t,o,i,e={}){if(!Ui(n))return null;let a=n.trim();if(e.hasImages)return ht(D("\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=BIe(e.signal);if(RIe(a)){if(!/^\/models[ \t]*$/iu.test(a))return ht(D(hIe));try{let I=await jl(t,o,i,A),d=I?await tI(I.session,A):await EK(t,A);return ht(OIe(d))}catch(I){return ht(Yl(I,"list"))}}if(kIe(a)){if(!/^\/(?:reasoninglist|reasonings)[ \t]*$/iu.test(a))return ht(D(CIe));try{let I=await jl(t,o,i,A);return ht(I?_Ie(await tI(I.session,A)):zb())}catch(I){return ht(Yl(I,"reasoning-list"))}}if(vIe(a)){let I=/^\/reasoning(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(a);if(!I)return ht(D(EIe));let d=I[1];if(!d)try{let B=await jl(t,o,i,A);return ht(B?MIe(await tI(B.session,A)):zb())}catch(B){return ht(Yl(B,"reasoning-list"))}if(e.pendingInteraction)return ht([D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",D("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));try{return await eI(o,i,async()=>{let B=await jl(t,o,i,A);if(!B)return ht(zb());if(await hK(B.session,e.control,A))return ht(D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let f=await tI(B.session,A),Q=f.current,y=Qf(f,Q),m;if(d.toLowerCase()==="--default")m=void 0;else{if(!y?.reasoning)return ht(qb(Q,d,y));if(m=Zb(y,d),!m){let G=lK(d);if(G?.index===null)return ht(dK(d));if(!G)return ht(qb(Q,d,y));if(m=DIe(y,G.index),!m)return ht(dK(d))}m=m.id}let _={provider:Q.provider,model:Q.model,...m===void 0?{}:{reasoningEffort:m}},T=await Vb(B.session,_,A);return IK(o,i,B.sessionId),ht(D(`\u63A8\u7406\u7B49\u7EA7\u5DF2\u5207\u6362\u4E3A\uFF1A +`)),s=Math.floor(s/2)}while(s>0&&(g.message.length>3e3||g.messages.length>3));return g}function LIe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?D("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u4F1A\u8BDD\u3002"):t===Ma||t==="workspace-bot-not-found"||t==="session-binding-changed"?D("\u4F1A\u8BDD\u3001\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /history\u3002"):t==="harness-api-not-found"?D("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"):n?.name==="AbortError"?D("\u5386\u53F2\u8BFB\u53D6\u5DF2\u53D6\u6D88\u3002"):n?.name==="TimeoutError"||t==="harness-timeout"?D("\u8BFB\u53D6\u5386\u53F2\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):D("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}function Ii(n){return typeof n=="string"&&OK.test(n.trim())}async function Li(n,t,o,i,{signal:e,isDirect:a=!1,hasImages:A=!1,hasFiles:r=!1}={}){if(!Ii(n))return null;let s=OK.exec(n.trim())[1].trim();if(s&&(!/^\d+$/u.test(s)||/^0+$/u.test(s)))return Yg(D(NIe));let g=s?Math.min(Number(s),RIe):3;if(!a)return Yg(D("\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528 /history\u3002"));if(A||r)return Yg(D("/history \u4EC5\u652F\u6301\u6587\u5B57\u547D\u4EE4\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002"));let c=o?.sessionFor?.(i);if(typeof c!="string"||!c)return Yg(D("\u5F53\u524D\u804A\u5929\u5C1A\u672A\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001\u6D88\u606F\u6216\u4F7F\u7528 /session \u7ED1\u5B9A\u4F1A\u8BDD\u3002"));try{let I=t?.workspaceSession?.(c);if(typeof I?.readHistory!="function")return Yg(D("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"));let d=AbortSignal.timeout(wK),B=e?AbortSignal.any([e,d]):d,f=Date.now()+wK,Q=new Map,y,m,_=[],T=!1;for(let R=0;R=f)throw new DOMException("History read timed out","TimeoutError");let H=await I.readHistory({maxMessages:kIe,...y===void 0?{}:{beforeSeq:y},timeoutMs:Math.max(1,f-Date.now()),signal:B});if(B.throwIfAborted(),Date.now()>=f)throw new DOMException("History read timed out","TimeoutError");if(o.sessionFor(i)!==c){let q=new Error("Session binding changed during history read");throw q.code="session-binding-changed",q}if(!H||!Array.isArray(H.events)||typeof H.hasMore!="boolean")throw new TypeError("Invalid history page");let j=y??1/0;for(let q of H.events){let J=q?.event;if(!J||!Number.isSafeInteger(J.seq)||J.seq<0||typeof J.type!="string"||!J.type)throw new TypeError("Invalid history event");if(m!==void 0&&J.seq>m)continue;let x=Q.get(J.seq);if(x){if(!TIe(x,J))throw new TypeError("Conflicting history events")}else{if(y!==void 0&&J.seq>=y)throw new TypeError("Invalid history cursor");Q.set(J.seq,J)}j=Math.min(j,J.seq)}let F=[...Q.values()].sort((q,J)=>q.seq-J.seq);if(m??=F.at(-1)?.seq,T=H.hasMore,T&&(!Number.isFinite(j)||j===y))throw new TypeError("History cursor did not advance");if(_=PIe(F).slice(-g),_.length>=g||!T)break;y=j}return _.length===0?Yg(T?D("\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u672A\u627E\u5230\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002"):D("\u5F53\u524D\u4F1A\u8BDD\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002")):FIe(c,_,g,T)}catch(I){return Yg(LIe(I))}}var Nf={name:"@xmanrui/dsh-im",version:"3.0.8",description:"\u628A\u4E5D\u79CD IM \u673A\u5668\u4EBA\u548C\u516C\u7F51 AI Office \u63A5\u5165\u672C\u673A DeepSeek Harness\u3002 Connect nine IM channels and a public AI Office to a local DeepSeek Harness.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","ai-office"],author:{name:"xmanrui",url:"https://github.com/xmanrui"},contributors:[{name:"C3H3-AI",url:"https://github.com/C3H3-AI"}],license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/xmanrui/dsh-im.git"},homepage:"https://github.com/xmanrui/dsh-im#readme",bugs:"https://github.com/xmanrui/dsh-im/issues",publishConfig:{access:"public"},bin:{"dsh-im":"bin/dsh-im.mjs"},main:"./lib/index.js",exports:{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},files:["assets","bin","cordis.patch.yml","lib","plugin-src","scripts","src","LICENSE","README.md","README.en.md","THIRD_PARTY_NOTICES.md"],dsh:{bundle:{patch:"./cordis.patch.yml"},client:{inject:["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"],platform:"web"}},scripts:{build:"node plugin-src/client/build.mjs && node plugin-src/host/build.mjs",test:"node --test test/*.test.mjs test/channels/*/*.test.mjs",check:"npm run build && npm test && node scripts/verify-package.mjs"},engines:{node:">=22.19"},dependencies:{"@tencent-connect/qqbot-connector":"1.2.0","@tencent-connect/qqbot-nodejs":"1.0.4","@wecom/aibot-node-sdk":"1.0.7","dingtalk-stream":"2.1.4",qrcode:"1.5.4"},devDependencies:{"@larksuiteoapi/node-sdk":"1.73.0","@whiskeysockets/baileys":"7.0.0-rc14",esbuild:"0.25.9","https-proxy-agent":"5.0.1",react:"18.3.1","react-dom":"18.3.1","react-test-renderer":"18.3.1",semver:"7.8.5"}};var HIe=/^\/(?:stop|steer|version)(?=$|\s)/iu,KIe=/^\/stop(?=$|\s)/iu,xIe=/^\/version(?=$|\s)/iu,YIe="\u7528\u6CD5\uFF1A/stop\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",jIe="\u7528\u6CD5\uFF1A/version\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",JIe="\u7528\u6CD5\uFF1A/steer <\u8865\u5145\u6307\u4EE4>",qIe="\u63A7\u5236\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002";function Eo(n,t={}){return{message:n,...t}}function MK(n){return n?{signal:n}:{}}function _K(n,t,o){if(typeof t?.sessionFor!="function")return null;let i=t.sessionFor(o);if(typeof i!="string"||!i)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let e=n.workspaceSession(i);if(!e||typeof e!="object")throw new TypeError("Harness returned an invalid workspace session");return e}function Ui(n){return typeof n=="string"&&HIe.test(n.trim())}async function li(n,t,o,i,{signal:e,hasImages:a=!1,pendingInteraction:A=!1,control:r}={}){if(!Ui(n))return null;let s=n.trim(),g=KIe.test(s),c=xIe.test(s);if(a)return Eo(D(qIe));if(c)return/^\/version$/iu.test(s)?Eo(`dsh-im v${Nf.version}`):Eo(D(jIe));if(g){if(!/^\/stop$/iu.test(s))return Eo(D(YIe));let Q=_K(t,o,i);if(!Q)return Eo(D("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"));if(typeof Q.stopActiveTurn!="function")throw new TypeError("Harness session does not support stopping active turns");return await Q.stopActiveTurn(r,MK(e))?Eo(D("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\u3002"),{stopped:!0}):Eo(D("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"))}let d=/^\/steer(?:\s+([\s\S]*))?$/iu.exec(s)?.[1]?.trim()??"";if(!d)return Eo(D(JIe));if(A)return Eo([D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",D("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));let B=_K(t,o,i);if(!B)return Eo(D("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u5148\u7ED1\u5B9A\u4F1A\u8BDD\u3002"));if(typeof B.steerActiveTurn!="function")throw new TypeError("Harness session does not support steering active turns");let f=await B.steerActiveTurn(d,r,MK(e));return Eo(f?D("\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\uFF0CAgent \u4F1A\u5728\u4E0B\u4E00\u6B65\u8BFB\u53D6\u3002"):D("\u4EFB\u52A1\u5DF2\u7ED3\u675F\uFF0C\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\uFF0C\u65E0\u6CD5\u8865\u5145\u6307\u4EE4\u3002\u8BF7\u76F4\u63A5\u53D1\u9001\u6D88\u606F\u5F00\u59CB\u65B0\u4EFB\u52A1\u3002"))}var zIe=/^\/model(?=$|\s)/i,LK=/^\/models(?=$|\s)/i,UK=/^\/reasoning(?=$|\s)/i,HK=/^\/reasonings(?=$|\s)/i,KK=/^\/reasoninglist(?=$|\s)/i,TK="\u7528\u6CD5\uFF1A/model <\u5E8F\u53F7\u6216 provider/model> [\u63A8\u7406\u7B49\u7EA7ID]",VIe="\u7528\u6CD5\uFF1A/models\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",WIe="\u7528\u6CD5\uFF1A/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default]",ZIe="\u7528\u6CD5\uFF1A/reasoninglist \u6216 /reasonings\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",xK="session-binding-changed",YK="model-selection-mismatch",XIe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu;function ht(n){return{handled:!0,message:n,messages:Hs(n)}}function Wr(n){return typeof n!="string"?"":n.replace(XIe," ").replace(/\s+/gu," ").trim()}function $Ie(n){return n?{signal:n}:{}}function ele(n){if(n===void 0)return;if(!n||typeof n!="object"||!Array.isArray(n.efforts)||n.efforts.length===0)throw new TypeError("Harness returned invalid model reasoning metadata");let t=n.efforts.map(o=>{if(!o||typeof o!="object"||typeof o.id!="string"||!o.id||typeof o.name!="string"||!o.name||o.description!==void 0&&typeof o.description!="string")throw new TypeError("Harness returned an invalid reasoning effort");return{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description}}});if(n.defaultEffort!==void 0&&(typeof n.defaultEffort!="string"||!n.defaultEffort))throw new TypeError("Harness returned an invalid default reasoning effort");return{efforts:t,...n.defaultEffort===void 0?{}:{defaultEffort:n.defaultEffort}}}function jK(n,{requireCurrent:t=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new TypeError("Harness returned an invalid model catalog");let o=n.groups.map(a=>{if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name||!Array.isArray(a.models))throw new TypeError("Harness returned an invalid model provider group");return{id:a.id,name:a.name,models:a.models.map(A=>{if(!A||typeof A!="object"||typeof A.id!="string"||!A.id||typeof A.name!="string"||!A.name||A.description!==void 0&&typeof A.description!="string")throw new TypeError("Harness returned an invalid model");return{id:A.id,name:A.name,...A.description===void 0?{}:{description:A.description},...A.reasoning===void 0?{}:{reasoning:ele(A.reasoning)}}})}}),i=n.failures.map(a=>{if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name)throw new TypeError("Harness returned an invalid model provider failure");return{id:a.id,name:a.name}}),e=null;if(n.current!==void 0){if(!n.current||typeof n.current!="object"||typeof n.current.provider!="string"||!n.current.provider||typeof n.current.model!="string"||!n.current.model||n.current.reasoningEffort!==void 0&&(typeof n.current.reasoningEffort!="string"||!n.current.reasoningEffort))throw new TypeError("Harness returned an invalid current model");e={provider:n.current.provider,model:n.current.model,...n.current.reasoningEffort===void 0?{}:{reasoningEffort:n.current.reasoningEffort}}}else if(t)throw new TypeError("Harness returned no current model");return{groups:o,failures:i,current:e}}function Ks(n,t){return`${n}/${t}`}function JK(n,t){return n?.provider===t?.provider&&n?.model===t?.model}function Ale(n,t){return JK(n,t)&&n?.reasoningEffort===t?.reasoningEffort}function tle(n,t){return JK(n,t)&&(t.reasoningEffort===void 0||n?.reasoningEffort===t.reasoningEffort)}function lM(n){if(!n?.provider||!n?.model)return"";let t=Ks(n.provider,n.model);return n.reasoningEffort===void 0?t:`${t} \xB7 reasoningEffort=${Wr(n.reasoningEffort)}`}function NK(n,t,o){let i=new Error(`Harness ${o} did not confirm the selected model`);return i.code=YK,i.expected=n,i.actual=t,i.source=o,i}function qK(){let n=new Error("Conversation binding changed during model selection");return n.code=xK,n}function RK(n,t,o){if((typeof n?.sessionFor=="function"?n.sessionFor(t):null)!==o)throw qK()}function rle(n,t){for(let o of n.groups)for(let i of o.models)if(Ks(o.id,i.id)===t)return{provider:o.id,model:i.id};return null}function ale(n,t){let o=0;for(let i of n.groups)for(let e of i.models)if(o+=1,o===t)return{provider:i.id,model:e.id};return null}function kK(n){if(!/^\d+$/u.test(n))return null;let t=Number(n);return{index:Number.isSafeInteger(t)&&t>0?t:null}}function Rf(n,t){return t?n.groups.find(({id:i})=>i===t.provider)?.models.find(({id:i})=>i===t.model)??null:null}function ile(n,t){return n?.reasoning?.efforts?.[t-1]??null}function pM(n,t){return n?.reasoning?.efforts?.find(({id:o})=>o===t)??null}function kf(n,t){return n?.reasoningEffort??t?.reasoning?.defaultEffort}function iE(n,t){if(t===void 0)return D("Default\uFF08\u7531\u6A21\u578B\u6216 Provider \u51B3\u5B9A\uFF09");let o=pM(n,t);if(!o)return Wr(t);let i=Wr(o.name),e=Wr(o.id);return i===e?e:`${i} (${e})`}function zK(n){let t=Rf(n,n.current);return iE(t,kf(n.current,t))}function ole(n,t,o){return n===t&&n===o?D("\uFF08\u5F53\u524D\u3001\u9ED8\u8BA4\uFF09"):n===t?D("\uFF08\u5F53\u524D\uFF09"):n===o?D("\uFF08\u9ED8\u8BA4\uFF09"):""}function vK(n){return[D("\u6A21\u578B\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:Wr(n)}),"",D("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` +`)}function PK(n){return[D("\u63A8\u7406\u7B49\u7EA7\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:Wr(n)}),"",D("\u8BF7\u53D1\u9001 /reasoninglist \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` +`)}function gM(n,t,o){let i=[D("\u6A21\u578B\u4E0D\u652F\u6301\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:Wr(t)}),"",Wr(lM(n))],e=o?.reasoning?.efforts?.map(({id:a})=>Wr(a))??[];return e.length>0?i.push(D("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A{efforts}",{efforts:e.join(", ")})):i.push(D("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002")),i.join(` +`)}function nle(n){let t=n.current?Ks(n.current.provider,n.current.model):null,o=[D("\u53EF\u7528\u6A21\u578B\uFF1A")],i=0;n.groups.length===0&&o.push("",D("\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u3002"));for(let e of n.groups){o.push("",Wr(e.name)||Wr(e.id));for(let a of e.models){i+=1;let A=Ks(e.id,a.id);o.push(`${i}. ${Wr(A)}${A===t?D("\uFF08\u5F53\u524D\uFF09"):""}`)}}if(n.failures.length>0){o.push("",D("\u4EE5\u4E0B\u6A21\u578B\u63D0\u4F9B\u65B9\u6682\u65F6\u4E0D\u53EF\u7528\uFF1A"));for(let e of n.failures)o.push(`- ${Wr(e.name)||Wr(e.id)}`)}return i>0&&o.push("",D("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")),o.join(` +`)}function sle(n){return[D("\u5F53\u524D\u6A21\u578B\uFF1A"),Ks(n.current.provider,n.current.model),D("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:zK(n)}),"",D("\u67E5\u770B\u5168\u90E8\u6A21\u578B\uFF1A/models"),D("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),D("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")].join(` +`)}function gle(n){return[D("\u5F53\u524D\u6A21\u578B\uFF1A"),Ks(n.current.provider,n.current.model),D("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:zK(n)}),"",D("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),D("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),D("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")].join(` +`)}function cle(n){let t=n.current,o=Rf(n,t),i=kf(t,o),e=[D("\u5F53\u524D\u6A21\u578B\uFF1A"),Ks(t.provider,t.model),D("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:iE(o,i)}),"",D("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A")];if(!o?.reasoning)return e.push(D("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002"),"",D("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` +`);for(let[a,A]of o.reasoning.efforts.entries()){let r=iE(o,A.id),s=ole(A.id,i,o.reasoning.defaultEffort);e.push(`${a+1}. ${r}${s}`);let g=Wr(A.description);g&&e.push(` ${g}`)}return e.push("",D("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),D("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` +`)}function Ile(){return[D("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",D("\u67E5\u770B\u6A21\u578B\uFF1A/models"),D("\u9009\u62E9\u6A21\u578B\uFF1A/model <\u5E8F\u53F7>")].join(` +`)}function cM(){return[D("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",D("\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u666E\u901A\u6D88\u606F\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` +`)}function lle(n){return n?.code??n?.failure?.code}function Wl(n,t){let o=lle(n);if(o==="agent-busy")return D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002");if(o==="session-not-found")return D("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o==="model-unavailable")return t==="reasoning-select"?D("\u65E0\u6CD5\u5207\u6362\u63A8\u7406\u7B49\u7EA7\u3002\u5F53\u524D\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u4E0D\u53EF\u7528\u3002"):D("\u65E0\u6CD5\u5207\u6362\u5230\u8BE5\u6A21\u578B\u3002\u6A21\u578B\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u6216\u4E0D\u652F\u6301\u5F53\u524D\u4F1A\u8BDD\u4E2D\u7684\u56FE\u7247\u3002");if(o===Ma||o==="workspace-bot-not-found")return D("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===xK)return D("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===YK){let i=n?.expected,e=n?.actual,a=[t==="reasoning-select"?D("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):D("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")];if(i?.provider&&i?.model&&a.push("",`requested: ${Wr(lM(i))}`),e?.provider&&e?.model){let A=n?.source==="models.current"?D("\u5F53\u524D\u6A21\u578B\uFF1A"):"selectModel.selected:";a.push(`${A} ${Wr(lM(e))}`)}else a.push(`${n?.source??"Harness"}: unconfirmed`);return a.join(` +`)}return o==="cancelled"||n?.name==="AbortError"?t==="list"?D("\u83B7\u53D6\u6A21\u578B\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-list"?D("\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-select"?D("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):D("\u6A21\u578B\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):t==="list"?D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u6A21\u578B\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-list"?D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-select"?D("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):D("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function Zl(n,t,o,i){if(typeof t?.sessionFor!="function")return null;let e=t.sessionFor(o);if(typeof e!="string"||!e)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let a=n.workspaceSession(e);if(!a||typeof a.sessionExists!="function")throw new TypeError("Harness returned an invalid workspace session");return await a.sessionExists(i)?{sessionId:e,session:a}:(typeof t.clearSession=="function"&&t.sessionFor(o)===e&&await t.clearSession(o),null)}async function GK(n,t,o){if(typeof n?.isRunning!="function"||typeof n?.hasActiveTurn!="function")throw new TypeError("Harness session does not expose run state");return await n.isRunning(o)?!0:!!await n.hasActiveTurn(t,o)}async function FK(n,t){if(typeof n?.listModels!="function")throw new TypeError("Harness does not support listing models");return jK(await n.listModels(t))}async function sI(n,t){if(typeof n?.models!="function")throw new TypeError("Harness session does not support listing models");return jK(await n.models(t),{requireCurrent:!0})}async function IM(n,t,o){if(typeof n?.selectModel!="function")throw new TypeError("Harness session does not support model selection");let i=(await n.selectModel(t,o))?.selected;if(!tle(i,t))throw NK(t,i,"selectModel.selected");let e=(await sI(n,o)).current;if(!Ale(e,i))throw NK(i,e,"models.current");return e}function ple(n){return LK.test(n)}function dle(n){return KK.test(n)||HK.test(n)}function hle(n){return UK.test(n)}function Hi(n){if(typeof n!="string")return!1;let t=n.trim();return LK.test(t)||zIe.test(t)||KK.test(t)||HK.test(t)||UK.test(t)}async function Ki(n,t,o,i,e={}){if(!Hi(n))return null;let a=n.trim();if(e.hasImages)return ht(D("\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=$Ie(e.signal);if(ple(a)){if(!/^\/models[ \t]*$/iu.test(a))return ht(D(VIe));try{let I=await Zl(t,o,i,A),d=I?await sI(I.session,A):await FK(t,A);return ht(nle(d))}catch(I){return ht(Wl(I,"list"))}}if(dle(a)){if(!/^\/(?:reasoninglist|reasonings)[ \t]*$/iu.test(a))return ht(D(ZIe));try{let I=await Zl(t,o,i,A);return ht(I?cle(await sI(I.session,A)):cM())}catch(I){return ht(Wl(I,"reasoning-list"))}}if(hle(a)){let I=/^\/reasoning(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(a);if(!I)return ht(D(WIe));let d=I[1];if(!d)try{let B=await Zl(t,o,i,A);return ht(B?gle(await sI(B.session,A)):cM())}catch(B){return ht(Wl(B,"reasoning-list"))}if(e.pendingInteraction)return ht([D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",D("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));try{return await Us(o,i,async()=>{let B=await Zl(t,o,i,A);if(!B)return ht(cM());if(await GK(B.session,e.control,A))return ht(D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let f=await sI(B.session,A),Q=f.current,y=Rf(f,Q),m;if(d.toLowerCase()==="--default")m=void 0;else{if(!y?.reasoning)return ht(gM(Q,d,y));if(m=pM(y,d),!m){let R=kK(d);if(R?.index===null)return ht(PK(d));if(!R)return ht(gM(Q,d,y));if(m=ile(y,R.index),!m)return ht(PK(d))}m=m.id}let _={provider:Q.provider,model:Q.model,...m===void 0?{}:{reasoningEffort:m}},T=await IM(B.session,_,A);return RK(o,i,B.sessionId),ht(D(`\u63A8\u7406\u7B49\u7EA7\u5DF2\u5207\u6362\u4E3A\uFF1A {effort} \u5F53\u524D\u6A21\u578B\uFF1A{model} -\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u63A8\u7406\u7B49\u7EA7\u3002`,{model:Fs(T.provider,T.model),effort:$h(y,yf(T,y))}))})}catch(B){return ht(Yl(B,"reasoning-select"))}}let r=/^\/model(?:[ \t]+([^\s]+)(?:[ \t]+([^\s]+))?)?[ \t]*$/iu.exec(a);if(!r)return ht(D(gK));let s=r[1],g=r[2];if(!s)try{let I=await jl(t,o,i,A);if(!I)return ht(TIe());let d=await tI(I.session,A);return ht(bIe(d))}catch(I){return ht(Yl(I,"select"))}let c=lK(s);if(c?.index===null)return ht(pK(s));if(!c&&(!s.includes("/")||s.startsWith("/")||s.endsWith("/")))return ht(D(gK));if(e.pendingInteraction)return ht([D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",D("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));try{return await eI(o,i,async()=>{let I=await jl(t,o,i,A);if(I&&await hK(I.session,e.control,A))return ht(D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let d=I?await tI(I.session,A):await EK(t,A),B=c?SIe(d,c.index):mIe(d,s);if(!B)return ht(c?pK(s):[D("\u6CA1\u6709\u627E\u5230\u6A21\u578B\uFF1A{model}",{model:Vr(s)}),"",D("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\u3002")].join(` -`));let f=Qf(d,B);if(g!==void 0){let y=Zb(f,g);if(!y)return ht(qb(B,g,f));B.reasoningEffort=y.id}let Q;if(I)Q=await Vb(I.session,B,A),IK(o,i,I.sessionId);else{if(typeof t?.createSession!="function"||typeof t?.workspaceSession!="function"||typeof o?.sessionFor!="function"||typeof o?.setSession!="function")throw new TypeError("Harness cannot create a conversation session");let y=await t.createSession(A);if(typeof y!="string"||!y)throw new TypeError("Harness returned an invalid session id");let m=t.workspaceSession(y);Q=await Vb(m,B,A);let _=o.sessionFor(i);if(typeof _=="string"&&_)throw DK();if(await o.setSession(i,y)===!1){let T=new Error("Workspace changed while binding the new session");throw T.code=ba,T}}return ht(D(`\u6A21\u578B\u5DF2\u5207\u6362\u4E3A\uFF1A +\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u63A8\u7406\u7B49\u7EA7\u3002`,{model:Ks(T.provider,T.model),effort:iE(y,kf(T,y))}))})}catch(B){return ht(Wl(B,"reasoning-select"))}}let r=/^\/model(?:[ \t]+([^\s]+)(?:[ \t]+([^\s]+))?)?[ \t]*$/iu.exec(a);if(!r)return ht(D(TK));let s=r[1],g=r[2];if(!s)try{let I=await Zl(t,o,i,A);if(!I)return ht(Ile());let d=await sI(I.session,A);return ht(sle(d))}catch(I){return ht(Wl(I,"select"))}let c=kK(s);if(c?.index===null)return ht(vK(s));if(!c&&(!s.includes("/")||s.startsWith("/")||s.endsWith("/")))return ht(D(TK));if(e.pendingInteraction)return ht([D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",D("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));try{return await Us(o,i,async()=>{let I=await Zl(t,o,i,A);if(I&&await GK(I.session,e.control,A))return ht(D("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let d=I?await sI(I.session,A):await FK(t,A),B=c?ale(d,c.index):rle(d,s);if(!B)return ht(c?vK(s):[D("\u6CA1\u6709\u627E\u5230\u6A21\u578B\uFF1A{model}",{model:Wr(s)}),"",D("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\u3002")].join(` +`));let f=Rf(d,B);if(g!==void 0){let y=pM(f,g);if(!y)return ht(gM(B,g,f));B.reasoningEffort=y.id}let Q;if(I)Q=await IM(I.session,B,A),RK(o,i,I.sessionId);else{if(typeof t?.createSession!="function"||typeof t?.workspaceSession!="function"||typeof o?.sessionFor!="function"||typeof o?.setSession!="function")throw new TypeError("Harness cannot create a conversation session");let y=await t.createSession(A);if(typeof y!="string"||!y)throw new TypeError("Harness returned an invalid session id");let m=t.workspaceSession(y);Q=await IM(m,B,A);let _=o.sessionFor(i);if(typeof _=="string"&&_)throw qK();if(await o.setSession(i,y)===!1){let T=new Error("Workspace changed while binding the new session");throw T.code=Ma,T}}return ht(D(`\u6A21\u578B\u5DF2\u5207\u6362\u4E3A\uFF1A {model} \u63A8\u7406\u7B49\u7EA7\uFF1A{effort} -\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u3002`,{model:Fs(Q.provider,Q.model),effort:$h(f,yf(Q,f))}))})}catch(I){return ht(Yl(I,"select"))}}var Xb=/^[a-z0-9][a-z0-9-]*$/,M6e=Object.freeze({defaultId:"",items:Object.freeze([])});function Ls(n){if(n==null||typeof n!="string")return null;let t=n.trim();return Xb.test(t)?t:null}function Jl(n){if(n==null||n==="")return null;let t=Ls(n);if(!t){let o=new Error(D("Agent Preset \u65E0\u6548\u3002"));throw o.code="agent-preset-invalid",o}return t}function PIe(n){if(typeof n=="string"){let i=Ls(n);return i?{id:i,label:i}:null}if(!n||typeof n!="object"||n.broken!==void 0)return null;let t=Ls(n.id);if(!t)return null;let o=typeof n.name=="string"&&n.name.trim()?n.name.trim().slice(0,128):typeof n.label=="string"&&n.label.trim()?n.label.trim().slice(0,128):t;return{id:t,label:o}}function Rn(n){if(!n||typeof n!="object"||Array.isArray(n))return{defaultId:"",items:[]};let t=[],o=new Set;for(let i of Array.isArray(n.items)?n.items:[]){let e=PIe(i);!e||o.has(e.id)||(o.add(e.id),t.push(e))}return{defaultId:Ls(n.defaultId)??"",items:t}}async function Ma(n){try{let t=typeof n?.get=="function"?n.get("agentPresets"):n?.agentPresets;if(!t||typeof t.list!="function")return{defaultId:"",items:[]};let o=await t.list();return Rn({defaultId:typeof t.defaultId=="string"?t.defaultId:"",items:Array.isArray(o)?o:[]})}catch{return{defaultId:"",items:[]}}}var GIe=/^\/preset(?=$|\s)/iu,MK=/^\/presetlist(?=$|\s)/iu,FIe="\u7528\u6CD5\uFF1A/presetlist\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",eM=["\u7528\u6CD5\uFF1A","/preset \u67E5\u770B\u5F53\u524D\u8BBE\u7F6E","/preset <\u5E8F\u53F7> \u6309\u6700\u8FD1\u4E00\u6B21 /presetlist \u7684\u5E8F\u53F7\u9009\u62E9","/preset \u6309 Agent Preset ID \u9009\u62E9","/preset id:<\u7EAF\u6570\u5B57 ID> \u9009\u62E9\u7EAF\u6570\u5B57 ID","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"].join(` -`),LIe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,OK=new WeakMap,UIe=15*6e4,HIe=256;function $o(n){return{handled:!0,message:n,messages:Gs(n)}}function KIe(n){return typeof n!="string"?"":n.replace(LIe," ").replace(/\s+/gu," ").trim()}function xIe(n){return n?{signal:n}:{}}function _K(n){if(!n||typeof n!="object"||Array.isArray(n)||!n.agentPresetCatalog||typeof n.agentPresetCatalog!="object"||!Array.isArray(n.agentPresetCatalog.items))throw new TypeError("Harness returned invalid Agent Preset settings");let t=n.agentPreset===null?null:Ls(n.agentPreset);if(n.agentPreset!==null&&t===null)throw new TypeError("Harness returned an invalid current Agent Preset");return{agentPreset:t,agentPresetCatalog:Rn(n.agentPresetCatalog)}}function mf(n){let t=KIe(n.label)||n.id;return D("{label}\uFF08{id}\uFF09",{label:t,id:n.id})}function AM(n,t){return n.items.find(o=>o.id===t)??null}function YIe(n){if(!n.defaultId)return D("\u672A\u8BBE\u7F6E\u6216\u5F53\u524D\u4E0D\u53EF\u7528");let t=AM(n,n.defaultId);return t?mf(t):D("{id}\uFF08\u5F53\u524D\u4E0D\u53EF\u7528\uFF09",{id:n.defaultId})}function tM(n){let{agentPreset:t,agentPresetCatalog:o}=n;if(t===null){let e=AM(o,o.defaultId);return e?D("\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A{preset}",{preset:mf(e)}):D("\u8DDF\u968F Host \u9ED8\u8BA4\uFF08Host \u9ED8\u8BA4\u5F53\u524D\u4E0D\u53EF\u7528\uFF09")}let i=AM(o,t);return i?mf(i):D("{id}\uFF08\u5DF2\u4E0D\u53EF\u7528\uFF09",{id:t})}function jIe(n){return[D("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),tM(n),"",D("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u4F1A\u53D7\u6B64\u8BBE\u7F6E\u5F71\u54CD\u3002"),D("\u67E5\u770B\u53EF\u7528\u9879\uFF1A/presetlist"),D("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")].join(` -`)}function JIe(n){let{agentPreset:t,agentPresetCatalog:o}=n,i=[D("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),tM(n),"",D("Host \u9ED8\u8BA4\uFF1A{preset}",{preset:YIe(o)}),"",D("\u53EF\u7528 Agent Preset\uFF08{count}\uFF09\uFF1A",{count:o.items.length})];return o.items.length===0?i.push(D("\u5F53\u524D\u6CA1\u6709\u53EF\u7528 Agent Preset\u3002")):o.items.forEach((e,a)=>{let A=[];e.id===o.defaultId&&A.push(D("Host \u9ED8\u8BA4")),e.id===t&&A.push(D("\u5F53\u524D\u9009\u62E9")),t===null&&e.id===o.defaultId&&A.push(D("\u5F53\u524D\u751F\u6548"));let r=A.length>0?`\uFF08${A.join("\uFF0C")}\uFF09`:"";i.push(`${a+1}. ${mf(e)}${r}`)}),i.push("",D("\u9009\u62E9\uFF1A/preset <\u5E8F\u53F7\u6216 ID>"),D("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),D("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")),i.join(` -`)}function qIe(n){return[D("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset \u5DF2\u8BBE\u7F6E\u4E3A\uFF1A"),tM(n),"",D("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u53D8\u3002\u82E5\u5F53\u524D\u804A\u5929\u5DF2\u6709\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001 /new\uFF0C\u518D\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u624D\u4F1A\u4F7F\u7528\u65B0\u8BBE\u7F6E\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` -`)}function TK(n,{create:t=!1}={}){if((typeof n!="object"||n===null)&&typeof n!="function")return null;let o=OK.get(n);return!o&&t&&(o=new Map,OK.set(n,o)),o??null}function zIe(n,t){for(let[o,i]of n)i.expiresAt<=t&&n.delete(o)}function VIe(n,t,o){let i=TK(n,{create:!0});if(!i)return;let e=Date.now();for(zIe(i,e),i.delete(t),i.set(t,{expiresAt:e+UIe,ids:o.map(a=>a.id)});i.size>HIe;){let a=i.keys().next();if(a.done)break;i.delete(a.value)}}function WIe(n,t){let o=TK(n),i=o?.get(t);return!o||!i?null:i.expiresAt<=Date.now()?(o.delete(t),null):(o.delete(t),o.set(t,i),i.ids)}function ZIe(n,t,o){if(!/^\d+$/u.test(o))return{numeric:!1,id:null};let i=Number(o);if(!Number.isSafeInteger(i)||i<1)return{numeric:!0,error:D("Agent Preset \u5E8F\u53F7\u65E0\u6548\uFF0C\u8BF7\u5148\u6267\u884C /presetlist\u3002")};let e=WIe(n,t);if(!e)return{numeric:!0,error:D("\u8BF7\u5148\u6267\u884C /presetlist\uFF0C\u518D\u6309\u5217\u8868\u5E8F\u53F7\u9009\u62E9 Agent Preset\u3002")};let a=e[i-1];return a?{numeric:!0,id:a}:{numeric:!0,error:D("Agent Preset \u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002")}}function XIe(n){return n?.code??n?.failure?.code}function $b(n,t){let o=XIe(n);return o==="agent-preset-invalid"?D(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:D(eM)}):o==="agent-preset-unavailable"?D("Agent Preset \u4E0D\u5B58\u5728\u6216\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002"):o===ba||o==="workspace-bot-not-found"?D("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):o==="cancelled"||n?.name==="AbortError"?t==="list"?D("\u83B7\u53D6 Agent Preset \u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="current"?D("\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\u5DF2\u53D6\u6D88\u3002"):D("Agent Preset \u4FEE\u6539\u5DF2\u53D6\u6D88\u3002"):t==="list"?D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="current"?D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):D("Agent Preset \u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function bK(n,t){if(typeof n?.agentPresetSettings!="function")throw new TypeError("Harness does not support Agent Preset settings");return _K(await n.agentPresetSettings(t))}async function $Ie(n,t,o){if(typeof n?.updateAgentPreset!="function")throw new TypeError("Harness does not support updating Agent Preset settings");return _K(await n.updateAgentPreset(t,o))}function Ki(n){if(typeof n!="string")return!1;let t=n.trim();return MK.test(t)||GIe.test(t)}async function li(n,t,o,i,e={}){if(!Ki(n))return null;let a=n.trim();if(e.hasImages)return $o(D("Agent Preset \u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=xIe(e.signal);if(MK.test(a)){if(!/^\/presetlist[ \t]*$/iu.test(a))return $o(D(FIe));try{let c=await bK(t,A);return VIe(o,i,c.agentPresetCatalog.items),$o(JIe(c))}catch(c){return $o($b(c,"list"))}}let r=/^\/preset(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(a);if(!r)return $o(D(eM));let s=r[1];if(!s)try{return $o(jIe(await bK(t,A)))}catch(c){return $o($b(c,"current"))}let g;if(s.toLowerCase()==="--default")g=null;else{let c=/^id:(\d+)$/iu.exec(s);if(c)g=c[1];else{let I=ZIe(o,i,s);if(I.numeric){if(I.error)return $o(I.error);g=I.id}else if(g=Ls(s),!g)return $o(D(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:D(eM)}))}}try{return await eI(o,i,async()=>$o(qIe(await $Ie(t,g,A))))}catch(c){return $o($b(c,"update"))}}var Wr=10,ele=/^\/(batch|send|cancel)(?=$|\s)/iu,Ale=/^\/(batch|send|cancel)$/iu;function NK(n){return typeof n!="string"?null:ele.exec(n.trim())?.[1]?.toLowerCase()??null}function la(n,t,o={}){return{handled:!0,kind:n,...t?{message:t}:{},...o}}function tle(n){return n===Wr?D(`\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002 -\u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002`,{count:n,limit:Wr}):D(`\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002 -\u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002`,{count:n,limit:Wr})}function rle(n){let t=n.map((o,i)=>`${D("[\u6D88\u606F {index}]",{index:i+1})} +\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u3002`,{model:Ks(Q.provider,Q.model),effort:iE(f,kf(Q,f))}))})}catch(I){return ht(Wl(I,"select"))}}var dM=/^[a-z0-9][a-z0-9-]*$/,L5e=Object.freeze({defaultId:"",items:Object.freeze([])});function xs(n){if(n==null||typeof n!="string")return null;let t=n.trim();return dM.test(t)?t:null}function Xl(n){if(n==null||n==="")return null;let t=xs(n);if(!t){let o=new Error(D("Agent Preset \u65E0\u6548\u3002"));throw o.code="agent-preset-invalid",o}return t}function Ele(n){if(typeof n=="string"){let i=xs(n);return i?{id:i,label:i}:null}if(!n||typeof n!="object"||n.broken!==void 0)return null;let t=xs(n.id);if(!t)return null;let o=typeof n.name=="string"&&n.name.trim()?n.name.trim().slice(0,128):typeof n.label=="string"&&n.label.trim()?n.label.trim().slice(0,128):t;return{id:t,label:o}}function Pn(n){if(!n||typeof n!="object"||Array.isArray(n))return{defaultId:"",items:[]};let t=[],o=new Set;for(let i of Array.isArray(n.items)?n.items:[]){let e=Ele(i);!e||o.has(e.id)||(o.add(e.id),t.push(e))}return{defaultId:xs(n.defaultId)??"",items:t}}async function _a(n){try{let t=typeof n?.get=="function"?n.get("agentPresets"):n?.agentPresets;if(!t||typeof t.list!="function")return{defaultId:"",items:[]};let o=await t.list();return Pn({defaultId:typeof t.defaultId=="string"?t.defaultId:"",items:Array.isArray(o)?o:[]})}catch{return{defaultId:"",items:[]}}}var Cle=/^\/preset(?=$|\s)/iu,ZK=/^\/presetlist(?=$|\s)/iu,ule="\u7528\u6CD5\uFF1A/presetlist\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",EM=["\u7528\u6CD5\uFF1A","/preset \u67E5\u770B\u5F53\u524D\u8BBE\u7F6E","/preset <\u5E8F\u53F7> \u6309\u6700\u8FD1\u4E00\u6B21 /presetlist \u7684\u5E8F\u53F7\u9009\u62E9","/preset \u6309 Agent Preset ID \u9009\u62E9","/preset id:<\u7EAF\u6570\u5B57 ID> \u9009\u62E9\u7EAF\u6570\u5B57 ID","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"].join(` +`),Ble=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,VK=new WeakMap,fle=15*6e4,Qle=256;function en(n){return{handled:!0,message:n,messages:Hs(n)}}function yle(n){return typeof n!="string"?"":n.replace(Ble," ").replace(/\s+/gu," ").trim()}function mle(n){return n?{signal:n}:{}}function XK(n){if(!n||typeof n!="object"||Array.isArray(n)||!n.agentPresetCatalog||typeof n.agentPresetCatalog!="object"||!Array.isArray(n.agentPresetCatalog.items))throw new TypeError("Harness returned invalid Agent Preset settings");let t=n.agentPreset===null?null:xs(n.agentPreset);if(n.agentPreset!==null&&t===null)throw new TypeError("Harness returned an invalid current Agent Preset");return{agentPreset:t,agentPresetCatalog:Pn(n.agentPresetCatalog)}}function vf(n){let t=yle(n.label)||n.id;return D("{label}\uFF08{id}\uFF09",{label:t,id:n.id})}function CM(n,t){return n.items.find(o=>o.id===t)??null}function Sle(n){if(!n.defaultId)return D("\u672A\u8BBE\u7F6E\u6216\u5F53\u524D\u4E0D\u53EF\u7528");let t=CM(n,n.defaultId);return t?vf(t):D("{id}\uFF08\u5F53\u524D\u4E0D\u53EF\u7528\uFF09",{id:n.defaultId})}function uM(n){let{agentPreset:t,agentPresetCatalog:o}=n;if(t===null){let e=CM(o,o.defaultId);return e?D("\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A{preset}",{preset:vf(e)}):D("\u8DDF\u968F Host \u9ED8\u8BA4\uFF08Host \u9ED8\u8BA4\u5F53\u524D\u4E0D\u53EF\u7528\uFF09")}let i=CM(o,t);return i?vf(i):D("{id}\uFF08\u5DF2\u4E0D\u53EF\u7528\uFF09",{id:t})}function Dle(n){return[D("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),uM(n),"",D("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u4F1A\u53D7\u6B64\u8BBE\u7F6E\u5F71\u54CD\u3002"),D("\u67E5\u770B\u53EF\u7528\u9879\uFF1A/presetlist"),D("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")].join(` +`)}function wle(n){let{agentPreset:t,agentPresetCatalog:o}=n,i=[D("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),uM(n),"",D("Host \u9ED8\u8BA4\uFF1A{preset}",{preset:Sle(o)}),"",D("\u53EF\u7528 Agent Preset\uFF08{count}\uFF09\uFF1A",{count:o.items.length})];return o.items.length===0?i.push(D("\u5F53\u524D\u6CA1\u6709\u53EF\u7528 Agent Preset\u3002")):o.items.forEach((e,a)=>{let A=[];e.id===o.defaultId&&A.push(D("Host \u9ED8\u8BA4")),e.id===t&&A.push(D("\u5F53\u524D\u9009\u62E9")),t===null&&e.id===o.defaultId&&A.push(D("\u5F53\u524D\u751F\u6548"));let r=A.length>0?`\uFF08${A.join("\uFF0C")}\uFF09`:"";i.push(`${a+1}. ${vf(e)}${r}`)}),i.push("",D("\u9009\u62E9\uFF1A/preset <\u5E8F\u53F7\u6216 ID>"),D("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),D("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")),i.join(` +`)}function Ole(n){return[D("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset \u5DF2\u8BBE\u7F6E\u4E3A\uFF1A"),uM(n),"",D("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u53D8\u3002\u82E5\u5F53\u524D\u804A\u5929\u5DF2\u6709\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u53D1\u9001 /new\uFF0C\u518D\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u624D\u4F1A\u4F7F\u7528\u65B0\u8BBE\u7F6E\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` +`)}function $K(n,{create:t=!1}={}){if((typeof n!="object"||n===null)&&typeof n!="function")return null;let o=VK.get(n);return!o&&t&&(o=new Map,VK.set(n,o)),o??null}function ble(n,t){for(let[o,i]of n)i.expiresAt<=t&&n.delete(o)}function Mle(n,t,o){let i=$K(n,{create:!0});if(!i)return;let e=Date.now();for(ble(i,e),i.delete(t),i.set(t,{expiresAt:e+fle,ids:o.map(a=>a.id)});i.size>Qle;){let a=i.keys().next();if(a.done)break;i.delete(a.value)}}function _le(n,t){let o=$K(n),i=o?.get(t);return!o||!i?null:i.expiresAt<=Date.now()?(o.delete(t),null):(o.delete(t),o.set(t,i),i.ids)}function Tle(n,t,o){if(!/^\d+$/u.test(o))return{numeric:!1,id:null};let i=Number(o);if(!Number.isSafeInteger(i)||i<1)return{numeric:!0,error:D("Agent Preset \u5E8F\u53F7\u65E0\u6548\uFF0C\u8BF7\u5148\u6267\u884C /presetlist\u3002")};let e=_le(n,t);if(!e)return{numeric:!0,error:D("\u8BF7\u5148\u6267\u884C /presetlist\uFF0C\u518D\u6309\u5217\u8868\u5E8F\u53F7\u9009\u62E9 Agent Preset\u3002")};let a=e[i-1];return a?{numeric:!0,id:a}:{numeric:!0,error:D("Agent Preset \u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002")}}function Nle(n){return n?.code??n?.failure?.code}function hM(n,t){let o=Nle(n);return o==="agent-preset-invalid"?D(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:D(EM)}):o==="agent-preset-unavailable"?D("Agent Preset \u4E0D\u5B58\u5728\u6216\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002"):o===Ma||o==="workspace-bot-not-found"?D("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):o==="cancelled"||n?.name==="AbortError"?t==="list"?D("\u83B7\u53D6 Agent Preset \u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="current"?D("\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\u5DF2\u53D6\u6D88\u3002"):D("Agent Preset \u4FEE\u6539\u5DF2\u53D6\u6D88\u3002"):t==="list"?D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="current"?D("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):D("Agent Preset \u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function WK(n,t){if(typeof n?.agentPresetSettings!="function")throw new TypeError("Harness does not support Agent Preset settings");return XK(await n.agentPresetSettings(t))}async function Rle(n,t,o){if(typeof n?.updateAgentPreset!="function")throw new TypeError("Harness does not support updating Agent Preset settings");return XK(await n.updateAgentPreset(t,o))}function xi(n){if(typeof n!="string")return!1;let t=n.trim();return ZK.test(t)||Cle.test(t)}async function pi(n,t,o,i,e={}){if(!xi(n))return null;let a=n.trim();if(e.hasImages)return en(D("Agent Preset \u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=mle(e.signal);if(ZK.test(a)){if(!/^\/presetlist[ \t]*$/iu.test(a))return en(D(ule));try{let c=await WK(t,A);return Mle(o,i,c.agentPresetCatalog.items),en(wle(c))}catch(c){return en(hM(c,"list"))}}let r=/^\/preset(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(a);if(!r)return en(D(EM));let s=r[1];if(!s)try{return en(Dle(await WK(t,A)))}catch(c){return en(hM(c,"current"))}let g;if(s.toLowerCase()==="--default")g=null;else{let c=/^id:(\d+)$/iu.exec(s);if(c)g=c[1];else{let I=Tle(o,i,s);if(I.numeric){if(I.error)return en(I.error);g=I.id}else if(g=xs(s),!g)return en(D(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:D(EM)}))}}try{return await Us(o,i,async()=>en(Ole(await Rle(t,g,A))))}catch(c){return en(hM(c,"update"))}}var Zr=10,kle=/^\/(batch|send|cancel)(?=$|\s)/iu,vle=/^\/(batch|send|cancel)$/iu;function ex(n){return typeof n!="string"?null:kle.exec(n.trim())?.[1]?.toLowerCase()??null}function pa(n,t,o={}){return{handled:!0,kind:n,...t?{message:t}:{},...o}}function Ple(n){return n===Zr?D(`\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002 +\u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002`,{count:n,limit:Zr}):D(`\u5F53\u524D\u5DF2\u5904\u4E8E\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u5DF2\u6536\u96C6 {count}/{limit} \u6761\u3002 +\u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002`,{count:n,limit:Zr})}function Gle(n){let t=n.map((o,i)=>`${D("[\u6D88\u606F {index}]",{index:i+1})} ${o}`);return[D("\u4EE5\u4E0B\u662F\u7528\u6237\u901A\u8FC7\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u53D1\u9001\u7684\u591A\u6761\u5185\u5BB9\uFF0C\u8BF7\u6309\u987A\u5E8F\u4F5C\u4E3A\u540C\u4E00\u6B21\u8F93\u5165\u7EDF\u4E00\u5904\u7406\u3002"),...t].join(` -`)}function Eo(n){return NK(n)!==null}function kn(){return D("\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u4EC5\u652F\u6301\u79C1\u804A\uFF0C\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528\u3002")}function Co(){return D(`\u5F53\u524D\u804A\u5929\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3001\u5F85\u56DE\u7B54\u95EE\u9898\u6216\u5F85\u5BA1\u6279\u8BF7\u6C42\u3002 -\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u4EA4\u4E92\u6216\u53D1\u9001 /stop\uFF0C\u518D\u4F7F\u7528 /batch\u3002`)}var pi=class{#e=new Map;status(t){let o=this.#e.get(t);return Object.freeze(o?{phase:o.phase,count:o.messages.length,limit:Wr,full:o.messages.length===Wr}:{phase:"idle",count:0,limit:Wr,full:!1})}handle(t,o,{plainText:i=!0}={}){let e=this.#e.get(t),a=NK(o),A=typeof o=="string"?Ale.exec(o.trim()):null;if(a&&!A)return la("invalid-command",D("\u7528\u6CD5\uFF1A/{command}\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",{command:a}));if(!e)return a?i?a==="send"?la("no-batch",D("\u5F53\u524D\u6CA1\u6709\u5F85\u63D0\u4EA4\u7684\u6279\u91CF\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001 /batch\u3002")):a==="cancel"?la("no-batch",D("\u5F53\u524D\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u6279\u91CF\u8F93\u5165\u3002")):(this.#e.set(t,{phase:"collecting",messages:[],token:null}),la("started",D(`\u5DF2\u8FDB\u5165\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u6700\u591A\u53EF\u53D1\u9001 {limit} \u6761\u6587\u5B57\u3002 -\u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002`,{limit:Wr}),{count:0,limit:Wr})):la("unsupported-content",D("\u6279\u91CF\u8F93\u5165\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002")):{handled:!1};if(!i&&(e.phase==="collecting"||a))return la("unsupported-content",D(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 -\u8BF7\u7EE7\u7EED\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /send\u3001/cancel\u3002`),{count:e.messages.length,limit:Wr});if(e.phase==="submitting")return a==="send"?la("submitting",D("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u52FF\u91CD\u590D\u53D1\u9001 /send\u3002")):a==="cancel"?la("submitting",D(`\u6279\u91CF\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF0C\u65E0\u6CD5\u53D6\u6D88\u3002 -\u5982\u9700\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\uFF0C\u8BF7\u53D1\u9001 /stop\u3002`)):a==="batch"?la("submitting",D("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5904\u7406\u5B8C\u6210\u540E\u518D\u5F00\u542F\u65B0\u6279\u6B21\u3002")):{handled:!1};if(a==="batch")return la("status",tle(e.messages.length),{count:e.messages.length,limit:Wr});if(a==="cancel"){let s=e.messages.length;return this.#e.delete(t),la("cancelled",s===0?D("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\u3002"):D("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\uFF0C\u5171\u4E22\u5F03 {count} \u6761\u6D88\u606F\u3002",{count:s}),{count:s})}if(a==="send"){if(e.messages.length===0)return la("empty",D("\u5F53\u524D\u6279\u6B21\u8FD8\u6CA1\u6709\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /cancel \u53D6\u6D88\u3002"),{count:0});let s=Object.freeze([...e.messages]),g=Object.freeze({});return e.phase="submitting",e.token=g,la("submit",null,{token:g,messages:s,prompt:rle(s),count:s.length})}if(typeof o!="string")return la("unsupported-content",D(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 -\u8BF7\u7EE7\u7EED\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /send\u3001/cancel\u3002`),{count:e.messages.length,limit:Wr});if(o.trim().startsWith("/"))return la("blocked-command",D("\u5F53\u524D\u6B63\u5728\u6279\u91CF\u8F93\u5165\uFF0C\u8BF7\u5148\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002"),{count:e.messages.length,limit:Wr});if(e.messages.length===Wr)return la("full",D(`\u5F53\u524D\u6279\u6B21\u5DF2\u6EE1\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 -\u8BF7\u5148\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\uFF0C\u7136\u540E\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002`),{count:Wr,limit:Wr});e.messages.push(o);let r=e.messages.length;return la("collected",r===Wr?D("\u5DF2\u6536\u96C6 {count}/{limit} \u6761\uFF0C\u5F53\u524D\u6279\u6B21\u5DF2\u6EE1\uFF0C\u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002",{count:r,limit:Wr}):null,{count:r,limit:Wr})}complete(t,o){let i=this.#e.get(t);if(!i||i.phase!=="submitting"||i.token!==o)return Object.freeze({completed:!1});let e=i.messages.length;return this.#e.delete(t),Object.freeze({completed:!0,count:e})}fail(t,o){let i=this.#e.get(t);if(!i||i.phase!=="submitting"||i.token!==o)return Object.freeze({retained:!1});i.phase="collecting",i.token=null;let e=i.messages.length;return Object.freeze({retained:!0,count:e,message:D(`\u6279\u91CF\u5185\u5BB9\u63D0\u4EA4\u5931\u8D25\uFF0C\u5DF2\u4FDD\u7559 {count} \u6761\u6D88\u606F\u3002 -\u8BF7\u518D\u6B21\u53D1\u9001 /send \u91CD\u8BD5\u6216 /cancel \u53D6\u6D88\u3002`,{count:e})})}};import{createWriteStream as ale}from"node:fs";import{mkdir as ile,mkdtemp as ole,rm as RK,writeFile as nle}from"node:fs/promises";import{isAbsolute as kK,join as rM,relative as sle,resolve as vK}from"node:path";import{pipeline as gle}from"node:stream/promises";var cle=rM(".dsh-im","inbound"),uo=class extends Error{constructor(t,o,i=D("\u6587\u4EF6\u63A5\u6536\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),e={}){super(o,e),this.name="InboundFileError",this.code=t,this.userMessage=i}};function aM(n){return Array.isArray(n?.files)?n.files.filter(Boolean):[]}function PK(n,t){return typeof n!="string"?t:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim()||t}function Ile(n,t){let o=PK(n,"file").replace(/[^\p{L}\p{N}._ -]/gu,"_").replace(/^\.+/,"").slice(0,160)||"file";return`${String(t+1).padStart(2,"0")}-${o}`}function lle(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let t=n?.data??n?.buffer;if(Buffer.isBuffer(t)||t instanceof Uint8Array)return{data:Buffer.from(t),name:n?.name??n?.filename,mediaType:n?.mediaType??n?.mimetype};let o=n?.stream??n;return o&&typeof o[Symbol.asyncIterator]=="function"?{stream:o,name:n?.name??n?.filename,mediaType:n?.mediaType??n?.mimetype}:null}function Gt(n){return aM(n).length>0}function ql(n,{signal:t}={}){let o=aM(n);return o.length===0?n:{...n,files:o.map(i=>{if(i?.data!==void 0||typeof i?.load!="function")return i;let e;try{e=Promise.resolve(i.load({signal:t}))}catch(a){e=Promise.reject(a)}return e.catch(()=>{}),{...i,async load({signal:a}={}){a?.throwIfAborted();let A=await e;return a?.throwIfAborted(),A}}})}}async function GK(n,{workspace:t,signal:o}={}){let i=aM(n);if(i.length===0)return null;if(typeof t!="string"||!kK(t))throw new uo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");o?.throwIfAborted();let e=vK(t,cle);await ile(e,{recursive:!0,mode:448});let a=await ole(rM(e,"turn-")),A=[];try{for(let[r,s]of i.entries()){o?.throwIfAborted();let g;try{g=s?.data===void 0?await s?.load?.({signal:o}):s.data}catch(f){throw o?.aborted?f:new uo("inbound-file-download-failed",`Unable to download inbound file ${r+1}: ${f?.message??String(f)}`,D("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let c=lle(g);if(!c)throw new uo("inbound-file-data-invalid",`Inbound file ${r+1} returned no readable data.`);let I=PK(c.name??s?.name,`file-${r+1}`),d=rM(a,Ile(I,r));if(c.data)await nle(d,c.data,{mode:384,signal:o});else try{await gle(c.stream,ale(d,{flags:"wx",mode:384}),{signal:o})}catch(f){throw o?.aborted?f:new uo("inbound-file-download-failed",`Unable to stream inbound file ${r+1}: ${f?.message??String(f)}`,D("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let B=sle(vK(t),d);if(!B||B.startsWith("..")||kK(B))throw new uo("inbound-file-path-invalid","The staged inbound file escaped the Harness Session workspace.");A.push(Object.freeze({name:I,path:B,...typeof(c.mediaType??s?.mediaType)=="string"&&(c.mediaType??s.mediaType).trim()?{mediaType:(c.mediaType??s.mediaType).trim()}:{}}))}return Object.freeze({files:Object.freeze(A),async cleanup(){await RK(a,{recursive:!0,force:!0})}})}catch(r){throw await RK(a,{recursive:!0,force:!0}).catch(()=>{}),r}}function FK(n,t){if(!t?.files?.length)return n;let o=["",JSON.stringify({description:"Files uploaded with this user message. Paths are relative to the current Harness workspace.",files:t.files}),""].join(` +`)}function Co(n){return ex(n)!==null}function Gn(){return D("\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u4EC5\u652F\u6301\u79C1\u804A\uFF0C\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528\u3002")}function uo(){return D(`\u5F53\u524D\u804A\u5929\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3001\u5F85\u56DE\u7B54\u95EE\u9898\u6216\u5F85\u5BA1\u6279\u8BF7\u6C42\u3002 +\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u4EA4\u4E92\u6216\u53D1\u9001 /stop\uFF0C\u518D\u4F7F\u7528 /batch\u3002`)}var di=class{#e=new Map;status(t){let o=this.#e.get(t);return Object.freeze(o?{phase:o.phase,count:o.messages.length,limit:Zr,full:o.messages.length===Zr}:{phase:"idle",count:0,limit:Zr,full:!1})}handle(t,o,{plainText:i=!0}={}){let e=this.#e.get(t),a=ex(o),A=typeof o=="string"?vle.exec(o.trim()):null;if(a&&!A)return pa("invalid-command",D("\u7528\u6CD5\uFF1A/{command}\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",{command:a}));if(!e)return a?i?a==="send"?pa("no-batch",D("\u5F53\u524D\u6CA1\u6709\u5F85\u63D0\u4EA4\u7684\u6279\u91CF\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001 /batch\u3002")):a==="cancel"?pa("no-batch",D("\u5F53\u524D\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u6279\u91CF\u8F93\u5165\u3002")):(this.#e.set(t,{phase:"collecting",messages:[],token:null}),pa("started",D(`\u5DF2\u8FDB\u5165\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\uFF0C\u6700\u591A\u53EF\u53D1\u9001 {limit} \u6761\u6587\u5B57\u3002 +\u5B8C\u6210\u540E\u53D1\u9001 /send\uFF0C\u53D6\u6D88\u8BF7\u53D1\u9001 /cancel\u3002`,{limit:Zr}),{count:0,limit:Zr})):pa("unsupported-content",D("\u6279\u91CF\u8F93\u5165\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u6216\u6587\u4EF6\u540E\u91CD\u8BD5\u3002")):{handled:!1};if(!i&&(e.phase==="collecting"||a))return pa("unsupported-content",D(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 +\u8BF7\u7EE7\u7EED\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /send\u3001/cancel\u3002`),{count:e.messages.length,limit:Zr});if(e.phase==="submitting")return a==="send"?pa("submitting",D("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u52FF\u91CD\u590D\u53D1\u9001 /send\u3002")):a==="cancel"?pa("submitting",D(`\u6279\u91CF\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF0C\u65E0\u6CD5\u53D6\u6D88\u3002 +\u5982\u9700\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\uFF0C\u8BF7\u53D1\u9001 /stop\u3002`)):a==="batch"?pa("submitting",D("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5904\u7406\u5B8C\u6210\u540E\u518D\u5F00\u542F\u65B0\u6279\u6B21\u3002")):{handled:!1};if(a==="batch")return pa("status",Ple(e.messages.length),{count:e.messages.length,limit:Zr});if(a==="cancel"){let s=e.messages.length;return this.#e.delete(t),pa("cancelled",s===0?D("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\u3002"):D("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\uFF0C\u5171\u4E22\u5F03 {count} \u6761\u6D88\u606F\u3002",{count:s}),{count:s})}if(a==="send"){if(e.messages.length===0)return pa("empty",D("\u5F53\u524D\u6279\u6B21\u8FD8\u6CA1\u6709\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /cancel \u53D6\u6D88\u3002"),{count:0});let s=Object.freeze([...e.messages]),g=Object.freeze({});return e.phase="submitting",e.token=g,pa("submit",null,{token:g,messages:s,prompt:Gle(s),count:s.length})}if(typeof o!="string")return pa("unsupported-content",D(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 +\u8BF7\u7EE7\u7EED\u53D1\u9001\u6587\u5B57\uFF0C\u6216\u4F7F\u7528 /send\u3001/cancel\u3002`),{count:e.messages.length,limit:Zr});if(o.trim().startsWith("/"))return pa("blocked-command",D("\u5F53\u524D\u6B63\u5728\u6279\u91CF\u8F93\u5165\uFF0C\u8BF7\u5148\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002"),{count:e.messages.length,limit:Zr});if(e.messages.length===Zr)return pa("full",D(`\u5F53\u524D\u6279\u6B21\u5DF2\u6EE1\uFF0C\u8FD9\u6761\u6D88\u606F\u672A\u6536\u5F55\u3002 +\u8BF7\u5148\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\uFF0C\u7136\u540E\u91CD\u65B0\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002`),{count:Zr,limit:Zr});e.messages.push(o);let r=e.messages.length;return pa("collected",r===Zr?D("\u5DF2\u6536\u96C6 {count}/{limit} \u6761\uFF0C\u5F53\u524D\u6279\u6B21\u5DF2\u6EE1\uFF0C\u8BF7\u53D1\u9001 /send \u63D0\u4EA4\u6216 /cancel \u53D6\u6D88\u3002",{count:r,limit:Zr}):null,{count:r,limit:Zr})}complete(t,o){let i=this.#e.get(t);if(!i||i.phase!=="submitting"||i.token!==o)return Object.freeze({completed:!1});let e=i.messages.length;return this.#e.delete(t),Object.freeze({completed:!0,count:e})}fail(t,o){let i=this.#e.get(t);if(!i||i.phase!=="submitting"||i.token!==o)return Object.freeze({retained:!1});i.phase="collecting",i.token=null;let e=i.messages.length;return Object.freeze({retained:!0,count:e,message:D(`\u6279\u91CF\u5185\u5BB9\u63D0\u4EA4\u5931\u8D25\uFF0C\u5DF2\u4FDD\u7559 {count} \u6761\u6D88\u606F\u3002 +\u8BF7\u518D\u6B21\u53D1\u9001 /send \u91CD\u8BD5\u6216 /cancel \u53D6\u6D88\u3002`,{count:e})})}};import{createWriteStream as Fle}from"node:fs";import{mkdir as Lle,mkdtemp as Ule,rm as Ax,writeFile as Hle}from"node:fs/promises";import{isAbsolute as tx,join as BM,relative as Kle,resolve as rx}from"node:path";import{pipeline as xle}from"node:stream/promises";var Yle=BM(".dsh-im","inbound"),Bo=class extends Error{constructor(t,o,i=D("\u6587\u4EF6\u63A5\u6536\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),e={}){super(o,e),this.name="InboundFileError",this.code=t,this.userMessage=i}};function fM(n){return Array.isArray(n?.files)?n.files.filter(Boolean):[]}function ax(n,t){return typeof n!="string"?t:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim()||t}function jle(n,t){let o=ax(n,"file").replace(/[^\p{L}\p{N}._ -]/gu,"_").replace(/^\.+/,"").slice(0,160)||"file";return`${String(t+1).padStart(2,"0")}-${o}`}function Jle(n){if(Buffer.isBuffer(n)||n instanceof Uint8Array)return{data:Buffer.from(n)};let t=n?.data??n?.buffer;if(Buffer.isBuffer(t)||t instanceof Uint8Array)return{data:Buffer.from(t),name:n?.name??n?.filename,mediaType:n?.mediaType??n?.mimetype};let o=n?.stream??n;return o&&typeof o[Symbol.asyncIterator]=="function"?{stream:o,name:n?.name??n?.filename,mediaType:n?.mediaType??n?.mimetype}:null}function Ft(n){return fM(n).length>0}function $l(n,{signal:t}={}){let o=fM(n);return o.length===0?n:{...n,files:o.map(i=>{if(i?.data!==void 0||typeof i?.load!="function")return i;let e;try{e=Promise.resolve(i.load({signal:t}))}catch(a){e=Promise.reject(a)}return e.catch(()=>{}),{...i,async load({signal:a}={}){a?.throwIfAborted();let A=await e;return a?.throwIfAborted(),A}}})}}async function ix(n,{workspace:t,signal:o}={}){let i=fM(n);if(i.length===0)return null;if(typeof t!="string"||!tx(t))throw new Bo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");o?.throwIfAborted();let e=rx(t,Yle);await Lle(e,{recursive:!0,mode:448});let a=await Ule(BM(e,"turn-")),A=[];try{for(let[r,s]of i.entries()){o?.throwIfAborted();let g;try{g=s?.data===void 0?await s?.load?.({signal:o}):s.data}catch(f){throw o?.aborted?f:new Bo("inbound-file-download-failed",`Unable to download inbound file ${r+1}: ${f?.message??String(f)}`,D("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let c=Jle(g);if(!c)throw new Bo("inbound-file-data-invalid",`Inbound file ${r+1} returned no readable data.`);let I=ax(c.name??s?.name,`file-${r+1}`),d=BM(a,jle(I,r));if(c.data)await Hle(d,c.data,{mode:384,signal:o});else try{await xle(c.stream,Fle(d,{flags:"wx",mode:384}),{signal:o})}catch(f){throw o?.aborted?f:new Bo("inbound-file-download-failed",`Unable to stream inbound file ${r+1}: ${f?.message??String(f)}`,D("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let B=Kle(rx(t),d);if(!B||B.startsWith("..")||tx(B))throw new Bo("inbound-file-path-invalid","The staged inbound file escaped the Harness Session workspace.");A.push(Object.freeze({name:I,path:B,...typeof(c.mediaType??s?.mediaType)=="string"&&(c.mediaType??s.mediaType).trim()?{mediaType:(c.mediaType??s.mediaType).trim()}:{}}))}return Object.freeze({files:Object.freeze(A),async cleanup(){await Ax(a,{recursive:!0,force:!0})}})}catch(r){throw await Ax(a,{recursive:!0,force:!0}).catch(()=>{}),r}}function ox(n,t){if(!t?.files?.length)return n;let o=["",JSON.stringify({description:"Files uploaded with this user message. Paths are relative to the current Harness workspace.",files:t.files}),""].join(` `);if(Array.isArray(n))return[...n,{type:"text",text:o}];let i=typeof n=="string"?n.trim():"";return i?`${i} -${o}`:o}function Bo(n){return n instanceof uo?n.userMessage:null}import{createHash as YK,randomUUID as jK}from"node:crypto";import{constants as eE}from"node:fs";import{copyFile as ple,lstat as LK,mkdtemp as dle,open as JK,realpath as hle,unlink as qK}from"node:fs/promises";import{tmpdir as Ele}from"node:os";import{basename as Cle,extname as ule,isAbsolute as Ble,join as zK,resolve as fle}from"node:path";var wf="dsh_im_return_file",Df="dsh-im-outbound-artifact",iM=64*1024,Qle=new Map([[".csv","text/csv"],[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".html","text/html"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".json","application/json"],[".md","text/markdown"],[".pdf","application/pdf"],[".png","image/png"],[".rar","application/vnd.rar"],[".txt","text/plain"],[".webp","image/webp"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".xml","application/xml"],[".zip","application/zip"]]),Ks=new WeakMap,VK=new WeakMap,AE=new WeakMap,UK;function yle(){return UK??=dle(zK(Ele(),"dsh-im-outbound-")),UK}function Hs(n,t){let o=new Error(t);return o.code=n,o}function HK(n){let t=n?.session?.events;if(!Array.isArray(t))return null;let o=null;for(let i of t)i?.type==="turn/start"?o=Number.isInteger(i.data?.turn)?i.data.turn:null:i?.type==="turn/end"&&i.data?.turn===o&&(o=null);return Number.isInteger(o)&&o>=0?o:null}function KK(n){let t=n?.id??n?.header?.id;return typeof t=="string"&&t?t:null}function Us(n,t){return`${n}\0${t}`}function xK(n,t){return`${n}\0${t}`}function mle(n){let t=String(n??"").replace(/[\u0000-\u001f\u007f]/g," ").replace(new RegExp("\\p{Cf}","gu"),"").replace(/\s+/g," ").trim();return t?[...t].slice(0,255).join(""):"result.bin"}function Sle(n){return Qle.get(ule(n).toLowerCase())??"application/octet-stream"}function Dle(n){return YK("sha256").update(n).digest("hex")}function wle(n,t){return typeof n?.dev=="bigint"&&typeof n?.ino=="bigint"&&typeof n?.size=="bigint"&&typeof n?.mtimeNs=="bigint"&&typeof n?.ctimeNs=="bigint"&&n.dev===t?.dev&&n.ino===t?.ino&&n.size===t?.size&&n.mtimeNs===t?.mtimeNs&&n.ctimeNs===t?.ctimeNs}async function Ole(n,t){let o;try{o=await JK(n,eE.O_RDONLY);let i=YK("sha256"),e=o.createReadStream({autoClose:!1,highWaterMark:iM,...t?{signal:t}:{}});for await(let a of e)t?.throwIfAborted(),i.update(a);return i.digest("hex")}finally{await o?.close().catch(()=>{})}}async function ble(n,t,{signal:o,errorCode:i="artifact-changed",errorMessage:e="The result file changed while it was being read."}={}){let a=()=>Hs(i,e);if(!Number.isSafeInteger(t)||t<0)throw a();o?.throwIfAborted();let A;try{A=Buffer.allocUnsafe(t)}catch{throw a()}if(typeof n?.createReadStream=="function"){let g=n.createReadStream({autoClose:!1,start:0,end:t,highWaterMark:iM,...o?{signal:o}:{}}),c=0;for await(let I of g){o?.throwIfAborted();let d=Buffer.isBuffer(I)?I:Buffer.from(I);if(c+d.length>t)throw a();d.copy(A,c),c+=d.length}if(c!==t)throw a();return A}let r=0;for(;rg)throw a();r+=I}o?.throwIfAborted();let s=Buffer.allocUnsafe(1);if((await n.read(s,0,1,t))?.bytesRead!==0)throw a();return A}async function Mle(n,t,o){o?.throwIfAborted();let i;try{let e=Ble(t)?t:fle(n,t),a=await hle(e);if(!(await LK(a,{bigint:!0})).isFile())throw Hs("artifact-not-file","The requested path is not a file.");let r=await yle();i=zK(r,`${jK()}.artifact`),await ple(a,i,eE.COPYFILE_EXCL),o?.throwIfAborted();let s=await LK(i,{bigint:!0}),g=Number(s.size);if(!s.isFile()||!Number.isSafeInteger(g)||g<0)throw Hs("artifact-unavailable","The file could not be prepared for delivery.");let c=mle(Cle(e));return Object.freeze({fileName:c,mediaType:Sle(c),size:g,digest:await Ole(i,o),storagePath:i})}catch(e){throw i&&await qK(i).catch(()=>{}),e?.code?.startsWith?.("artifact-")?e:o?.aborted?o.reason??e:Hs("artifact-unavailable","The requested file is unavailable.")}}function WK(n){return Object.freeze({artifactId:n.artifactId,fileName:n.fileName,size:n.size})}function Sf(n){return n.artifactId}function vn(n){let t=Ks.get(n);if(!t)return;if(t.releaseRequested=!0,t.materializing>0){t.cleanupRequested=!0;return}let o=[...AE.get(n)??[]];if(o.length>0){t.cleanupDeferred||(t.cleanupDeferred=!0,Promise.allSettled(o).finally(()=>{t.cleanupDeferred=!1,vn(n)}));return}Ks.delete(n),AE.delete(n),t.onCleanup?.(),qK(t.path).catch(()=>{})}var oM=class{#e=new Map;#A=new Map;#t=new Map;#r=new Map;#a=new Map;#i=new Map;#c=new Map;#s=new Map;#I;constructor({uuid:t=jK}={}){if(typeof t!="function")throw new TypeError("uuid must be a function");this.#I=t}openConsumer(t,o){if(typeof t!="string"||!t||typeof o!="string"||!o)throw new TypeError("sessionId and promptRpcId are required");let i=xK(t,o),e={sessionId:t,promptRpcId:o,turn:null,released:!1};return this.#i.set(i,e),()=>{if(!e.released&&(e.released=!0,this.#i.get(i)===e&&this.#i.delete(i),e.turn!==null)){let a=Us(t,e.turn);this.#c.get(a)===e&&this.#c.delete(a),this.discard(t,e.turn)}}}observeSessionEvent(t,o){let i=KK(t);if(!i||!o||typeof o!="object")return;if(o.type==="turn/start"){let A=o.data?.turn;Number.isInteger(A)&&A>=0&&this.#s.set(i,A);return}if(o.type==="user/message"){let A=o.data?.source?.rpcId,r=this.#s.get(i)??HK({session:t});if(typeof A!="string"||!A||!Number.isInteger(r))return;this.#s.set(i,r);let s=this.#i.get(xK(i,A));if(!s||s.released)return;s.turn=r,this.#c.set(Us(i,r),s);return}if(o.type!=="turn/end")return;let e=o.data?.turn;if(!Number.isInteger(e)||e<0)return;this.#s.get(i)===e&&this.#s.delete(i);let a=this.#c.get(Us(i,e));(!a||a.released)&&this.discard(i,e)}disposeSession(t){let o=KK(t);if(!o)return;let i=`${o}\0`,e=new Set;for(let a of[this.#e,this.#A])for(let[A,r]of a)if(A.startsWith(i)){for(let s of r.values())e.add(s);a.delete(A)}for(let[a,A]of this.#i)a.startsWith(i)&&(A.released=!0,this.#i.delete(a));for(let a of this.#c.keys())a.startsWith(i)&&this.#c.delete(a);this.#s.delete(o);for(let a of e)vn(a)}async stage(t,o){let i=t?.path;if(typeof i!="string"||!i.trim())throw new TypeError("A file path is required.");let e=o?.agent,a=e?.session?.header?.id,A=e?.session?.header?.cwd,r=HK(e);if(typeof a!="string"||!a||typeof A!="string"||!A||r===null)throw Hs("artifact-context-required","A live Harness Session is required to return a file.");let s=await Mle(A,i,o?.signal),{storagePath:g,...c}=s,I=Object.freeze({kind:Df,schemaVersion:1,artifactId:this.#I(),deliveryKey:this.#I(),...c,source:"managed-temp",registeredBy:Object.freeze({kind:"tool-result",eventId:typeof o?.callId=="string"?o.callId:"unknown",toolName:wf}),origin:Object.freeze({sessionId:a,turn:r,callId:typeof o?.callId=="string"?o.callId:null}),createdAt:Date.now()});Ks.set(I,{path:g,materializing:0,materialized:!1,releaseRequested:!1,cleanupRequested:!1,cleanupDeferred:!1,onCleanup:()=>this.#g(I)});let d=Us(a,r),B=this.#A.get(d);return B||(B=new Map,this.#A.set(d,B)),B.set(Sf(I),I),I}commit(t){if(t?.kind!==Df||!Ks.has(t))return null;let o=Us(t.origin.sessionId,t.origin.turn),i=Sf(t),e=this.#A.get(o);if(e?.get(i)!==t)return null;e.delete(i),e.size===0&&this.#A.delete(o);let a=this.#e.get(o);return a||(a=new Map,this.#e.set(o,a)),a.set(i,t),WK(t)}release(t){if(t?.kind!==Df)return;let o=Us(t.origin.sessionId,t.origin.turn),i=Sf(t),e=this.#A.get(o);e?.get(i)===t&&e.delete(i),e?.size===0&&this.#A.delete(o),vn(t)}take(t,o,{signal:i}={}){let e=Us(t,o),a=this.#e.get(e);if(this.#e.delete(e),!a)return[];if(i?.aborted){for(let s of a.values())vn(s);return[]}let A=this.#t.get(e)??new Map;this.#t.set(e,A);let r=[];for(let[s,g]of a)Ks.has(g)&&(A.set(s,g),r.push(g));if(A.size===0)this.#t.delete(e);else if(!this.#n(e,i))return[];return r}discard(t,o){if(typeof t!="string"||!Number.isInteger(o))return;let i=Us(t,o),e=new Set([...this.#e.get(i)?.values()??[],...this.#A.get(i)?.values()??[]]);this.#e.delete(i),this.#A.delete(i);for(let a of e)vn(a)}clear(){let t=new Set;for(let o of this.#e.values())for(let i of o.values())t.add(i);for(let o of this.#A.values())for(let i of o.values())t.add(i);for(let o of this.#t.values())for(let i of o.values())t.add(i);for(let o of t)vn(o);this.#e.clear(),this.#A.clear(),this.#t.clear();for(let o of this.#r.keys())this.#o(o);for(let o of this.#i.values())o.released=!0;this.#i.clear(),this.#c.clear(),this.#s.clear()}#n(t,o){if(!o)return!0;this.#o(t);let i=this.#a.get(o);return i||(i={turnKeys:new Set,onAbort:null},i.onAbort=()=>{for(let e of[...i.turnKeys])for(let a of this.#t.get(e)?.values()??[])vn(a)},this.#a.set(o,i),o.addEventListener("abort",i.onAbort,{once:!0})),i.turnKeys.add(t),this.#r.set(t,o),o.aborted?(i.onAbort(),!1):!0}#o(t){let o=this.#r.get(t);if(!o)return;this.#r.delete(t);let i=this.#a.get(o);i?.turnKeys.delete(t),i?.turnKeys.size===0&&(o.removeEventListener("abort",i.onAbort),this.#a.delete(o))}#g(t){let o=Us(t.origin.sessionId,t.origin.turn),i=Sf(t),e=this.#e.get(o);e?.get(i)===t&&e.delete(i),e?.size===0&&this.#e.delete(o);let a=this.#A.get(o);a?.get(i)===t&&a.delete(i),a?.size===0&&this.#A.delete(o);let A=this.#t.get(o);A?.get(i)===t&&A.delete(i),A?.size===0&&(this.#t.delete(o),this.#o(o))}},rI=new oM;function _le({registry:n=rI}={}){let t=new WeakMap,o=new Map,i=(A,r)=>{let s=o.get(A);s||(s={artifacts:[]},o.set(A,s)),s.artifacts.push(r)},e=Object.freeze({name:wf,description:"Send a readable file or generated image to the user through the current conversation. Existing and newly created files are both valid.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",description:"Absolute path, or a path relative to the current workspace."}},required:["path"]},output:{schema:{type:"object",additionalProperties:!1,properties:{artifactId:{type:"string"},fileName:{type:"string"},size:{type:"number"}},required:["artifactId","fileName","size"]},render:(A,r)=>[{type:"text",text:`Registered ${r.fileName} (${r.size} bytes) for IM delivery.`}]},async execute(A,r){let s=await n.stage(A,r);return t.set(r,s),WK(s)}});return Object.freeze({definition:e,onResult:(A,r)=>{if(A?.name===wf){let g=t.get(A);if(!g)return;if(t.delete(A),r?.isError){n.release(g);return}A.parent===void 0?n.commit(g):i(A.parent,g);return}let s=o.get(A?.token);if(s){if(o.delete(A.token),r?.isError){for(let g of s.artifacts)n.release(g);return}if(A.parent!==void 0){for(let g of s.artifacts)i(A.parent,g);return}for(let g of s.artifacts)n.commit(g)}}})}function nM(n,{registry:t=rI}={}){if(typeof n?.tools?.register!="function"||typeof n?.systemPrompt?.section!="function"||typeof n?.on!="function")return!1;let o=_le({registry:t});return n.tools.register(o.definition),n.on("tools/result",o.onResult),n.on("session/event",(i,e)=>t.observeSessionEvent(i,e)),n.on("session/disposed",i=>t.disposeSession(i)),n.systemPrompt.section({name:"dsh-im:return-file",order:115,text:`When the user asks to receive a file or generated image, call ${wf} with its path. Existing files can be sent directly; do not recreate or rename a file solely for delivery.`}),!0}async function ZK(n,{signal:t}={}){if(t?.aborted&&(vn(n),t.throwIfAborted()),n?.kind!==Df||n.schemaVersion!==1||!Ks.has(n)||typeof n.digest!="string"||!Number.isSafeInteger(n.size)||n.size<0)throw Hs("artifact-invalid","The file registration is invalid.");let o=Ks.get(n);o.materializing+=1;let i,e=!1;try{let a=Number.isInteger(eE.O_NOFOLLOW)?eE.O_NOFOLLOW:0;i=await JK(o.path,eE.O_RDONLY|a);let A=await i.stat({bigint:!0});if(!A.isFile()||A.size!==BigInt(n.size))throw Hs("artifact-invalid","The file registration is invalid.");let r=await ble(i,n.size,{signal:t,errorCode:"artifact-invalid",errorMessage:"The file registration is invalid."}),s=await i.stat({bigint:!0});if(!wle(A,s)||r.byteLength!==n.size||Dle(r)!==n.digest)throw Hs("artifact-invalid","The file registration is invalid.");t?.throwIfAborted(),e=!0;let g=Object.freeze({artifactId:n.artifactId,deliveryKey:n.deliveryKey,fileName:n.fileName,mediaType:n.mediaType,size:n.size,bytes:r});return VK.set(g,n),o.materialized=!0,g}catch(a){throw a?.code?.startsWith?.("artifact-")?a:t?.aborted?t.reason??a:Hs("artifact-invalid","The file registration is invalid.")}finally{await i?.close().catch(()=>{}),o.materializing-=1,(!e||o.cleanupRequested)&&vn(n)}}function en(n,t){let o=VK.get(n);if(!o||!Ks.has(o)||!t||typeof t.then!="function")return t;let i=AE.get(o)??new Set,e=Promise.resolve(t).then(()=>{},()=>{});return i.add(e),AE.set(o,i),e.finally(()=>{i.delete(e),i.size===0&&AE.delete(o)}),t}function sM(n){let t=Ks.get(n);t&&(t.releaseRequested=!0),vn(n)}var Tle=new Set(["sent","rejected","failed","unknown"]),Nle=new Set(["sent","failed","unknown"]),Rle=new Set(["plain","markdown"]),kle=new Set(["artifact-changed","artifact-context-required","artifact-empty","artifact-invalid","artifact-not-file","artifact-permission-required","artifact-provider-rejected","artifact-too-large","artifact-unavailable"]);function di(n){if(!n||typeof n!="object")return[];let t=Array.isArray(n.providerMessageIds)?n.providerMessageIds.filter(e=>typeof e=="string"&&e.trim()||Number.isSafeInteger(e)).map(String):[],i=[n.message_id,n.messageId,n.id,n.ts,n.message?.message_id,n.message?.messageId,n.message?.id,n.message?.ts,n.key?.id,n.data?.message_id,n.body?.msgid,n.body?.message_id].find(e=>typeof e=="string"&&e.trim()||Number.isSafeInteger(e));return i!==void 0&&t.push(String(i)),[...new Set(t)]}function zl(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} must be a non-empty string`);return n}function Pn(n,t="plain"){let o=typeof n=="string"?{kind:"text",text:n,format:t}:n;if(!o||typeof o!="object"||Array.isArray(o)||o.kind!=="text"||typeof o.text!="string"||!o.text.trim())throw new TypeError("text delivery block must contain non-empty text");if(!Rle.has(o.format))throw new TypeError("text delivery format must be plain or markdown");return Object.freeze({kind:"text",text:o.text,format:o.format})}function vle(n){if(!Array.isArray(n))throw new TypeError("providerMessageIds must be an array");let t=[],o=new Set;for(let i of n){let e=zl(i,"providerMessageId");o.has(e)||(o.add(e),t.push(e))}return Object.freeze(t)}function Ple(n){if(!Array.isArray(n))throw new TypeError("artifacts must be an array");return Object.freeze(n.map(t=>{if(!t||typeof t!="object")throw new TypeError("artifact result must be an object");let o=zl(t.artifactId,"artifactId");if(!Tle.has(t.outcome))throw new TypeError("artifact outcome must be sent, rejected, failed, or unknown");let i=t.reason===void 0?void 0:zl(t.reason,"artifact reason");return Object.freeze({artifactId:o,outcome:t.outcome,...i===void 0?{}:{reason:i}})}))}function Gle(n){let t=typeof n=="string"?n:n?.code;return t==="artifact-delivery-uncertain"?"unknown":kle.has(t)?"rejected":"failed"}function zt({deliveryId:n,presentation:t,providerMessageIds:o=[],artifacts:i=[],deliveryOutcome:e,reason:a}){if(e!==void 0&&!Nle.has(e))throw new TypeError("deliveryOutcome must be sent, failed, or unknown");let A=a===void 0?void 0:zl(a,"delivery reason");return Object.freeze({schemaVersion:1,deliveryId:zl(n,"deliveryId"),presentation:zl(t,"presentation"),providerMessageIds:vle(o),...e===void 0?{}:{deliveryOutcome:e},...A===void 0?{}:{reason:A},artifacts:Ple(i)})}function XK({artifactId:n,deliveryId:t,error:o,presentation:i="text-fallback",providerMessageIds:e=[]}){let a=typeof o=="string"?o:o?.code,A=typeof a=="string"&&a?a:"artifact-provider-failed";return zt({deliveryId:t,presentation:i,providerMessageIds:e,artifacts:[{artifactId:n,outcome:Gle(o),reason:A}]})}function $K({deliveryId:n,presentation:t,receipts:o}){if(!Array.isArray(o)||o.length===0)throw new TypeError("receipts must contain at least one delivery receipt");let i=[],e=new Map,a,A;for(let r of o){if(!r||r.schemaVersion!==1)throw new TypeError("receipt must use DeliveryReceipt schema version 1");i.push(...r.providerMessageIds??[]),a===void 0&&r.deliveryOutcome!==void 0&&(a=r.deliveryOutcome,A=r.reason);for(let s of r.artifacts??[])e.set(s.artifactId,s)}return zt({deliveryId:n,presentation:t,providerMessageIds:i,deliveryOutcome:a,reason:A,artifacts:[...e.values()]})}function Fle(){let n=new Error("Native file delivery is unavailable");return n.code="artifact-provider-unavailable",n}function gM(n,t){return t?.aborted||n?.name==="AbortError"||n?.code==="ABORT_ERR"}function ex(n){return Array.isArray(n)?[...new Set(n.filter(t=>typeof t=="string"&&t.trim()||Number.isSafeInteger(t)).map(String))]:di(n)}async function Lle(n,{sendFile:t,sendImage:o,signal:i}){if(n.mediaType?.startsWith("image/")&&typeof o=="function")try{return{presentation:"image",result:await o(n)}}catch(e){if(gM(e,i)||e?.code==="artifact-delivery-uncertain")throw e}if(i?.throwIfAborted(),typeof t!="function")throw Fle();return{presentation:"file",result:await t(n)}}async function fo({artifacts:n=[],baseReceipt:t=null,deliveryId:o,aggregatePresentation:i,alwaysMerge:e=!1,channelKey:a,signal:A,sendFile:r,sendImage:s,sendFailureNotice:g,onFailure:c,logger:I}){let d=t?[t]:[],B=!!t&&t.deliveryOutcome!=="failed",f=!1,Q=0,y=0,m=0;try{for(;m0&&(_=$K({deliveryId:o??t?.deliveryId??n[0]?.deliveryKey,presentation:i??`${a}-${t?"text-and-files":"files"}`,receipts:d})),{receipt:_,userVisible:B,failureNoticeVisible:f,artifactsSent:Q,artifactSendErrors:y}}var Ule="\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026",cM="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",Hle=["\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002","","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587","/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09","/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B","/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7","/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1","/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09","/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21","/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001","/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C","/help \u663E\u793A\u672C\u5E2E\u52A9"];function Kle(){return Hle.map(n=>D(n)).join(` -`)}function St(n){return typeof n=="string"&&n.trim()?n.trim():null}function xle(n){let t=di(n),o=St(n?.processQueryKey);return o&&!t.includes(o)&&t.push(o),t}function Of(n){let t=[],o=new Set,i=n;for(;i&&typeof i=="object"&&t.length<3&&!o.has(i);){o.add(i);let e=St(i.name)?.slice(0,80),a=St(i.code)?.slice(0,80),A=St(i.providerCode)?.slice(0,160),r=Number.isInteger(i.status)?i.status:void 0;t.push({...e?{name:e}:{},...a?{code:a}:{},...A?{providerCode:A}:{},...r?{status:r}:{}}),i=i.cause}return t}function Yle(n){let t=n,o=new Set;for(;t&&typeof t=="object"&&!o.has(t);){if(o.add(t),t.code==="image-download-address-failed")return D("\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002");if(t.code==="invalid-image-download")return D("\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");if(t.code==="image-content-download-failed")return D("\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");t=t.cause}return lo(n)}function jle(n){return St(n?.senderStaffId)??St(n?.senderId)}function Jle(n){if(n?.content&&typeof n.content=="object")return n.content;if(typeof n?.content!="string")return null;try{let t=JSON.parse(n.content);return t&&typeof t=="object"?t:null}catch{return null}}function qle(n){let t=n?.richText??n?.rich_text;return Array.isArray(t)?t:[]}function zle(n){return typeof n?.text=="string"?St(n.text):typeof n?.text?.content=="string"?St(n.text.content):String(n?.type).toLowerCase()==="text"&&typeof n?.content=="string"?St(n.content):null}function IM(n){return St(n?.downloadCode)??St(n?.pictureDownloadCode)}function lM(n,{api:t,clientId:o,clientSecret:i}={}){let e=String(n?.msgtype??"").toLowerCase(),a=Jle(n),A=e==="richtext"?qle(a):[],r=e==="text"?St(n?.text?.content)??"":A.map(zle).filter(Boolean).join(` -`),s=[];if(e==="picture"){let c=IM(a);c&&s.push(c)}else if(e==="richtext")for(let c of A){if(String(c?.type??"").toLowerCase()!=="picture")continue;let I=IM(c);I&&s.push(I)}let g=e==="file"?IM(a):null;return{content:r,images:s.map((c,I)=>({name:I===0?"image":`image-${I+1}`,load:({signal:d,maxBytes:B})=>{if(typeof t?.downloadImage!="function")throw new Error("DingTalk API does not support image downloads");return t.downloadImage({clientId:o,clientSecret:i,robotCode:n?.robotCode,downloadCode:c,signal:d,maxBytes:B})}})),files:g?[{name:St(a?.fileName??a?.file_name)??"file",load:({signal:c}={})=>{if(typeof t?.downloadFile!="function")throw new Error("DingTalk API does not support file downloads");return t.downloadFile({clientId:o,clientSecret:i,robotCode:n?.robotCode,downloadCode:g,signal:c})}}]:[]}}function Vle(n,t){if(String(n?.conversationType)==="2"){let o=St(n?.conversationId);if(!o)throw new Error("DingTalk group message has no conversation id");return`group:${o}`}return`p2p:${t}`}function Wle(n,t){return String(n?.conversationType)==="2"?{type:"group",openConversationId:St(n?.conversationId)}:{type:"user",userId:t}}function Zle(n,t,o){let i=St(n?.robotCode)??o;return String(n?.conversationType)==="2"?{type:"group",openConversationId:St(n?.conversationId),robotCode:i}:{type:"user",userId:t,robotCode:i}}function Xle(n,t){let o=String(n??D("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim()||D("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002",{name:o});case"artifact-permission-required":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002",{name:o});case"artifact-too-large":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002",{name:o});case"artifact-rate-limited":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:o});case"artifact-provider-rejected":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002",{name:o});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002",{name:o});default:return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:o})}}function $le(n){return n?.type==="text"&&St(n.text)?n.text:n?.type==="tool"?n.name==="web_search"?D("_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_"):D("_\u6B63\u5728\u4F7F\u7528 {name}\u2026_",{name:St(n.name)??D("\u5DE5\u5177")}):D("_{text}_",{text:St(n?.text)??D("\u6B63\u5728\u5904\u7406\u2026")})}function epe(n,t,o){if(t.needsPresentation||!t.questions[t.index]||t.actor!==o||String(n?.conversationType)==="2"&&n?.isInAtList!==!0||n?.msgtype!=="text"||!St(n?.text?.content))return!1;try{return Fg(n.sessionWebhook),!0}catch{return!1}}function Ape(n){n.stats??={};for(let t of["messagesReceived","messagesReplied","messagesRejected","messagesIgnored","reactionsAdded","reactionsRemoved","reactionErrors"])n[t]??=0,n.stats[t]=n[t];n.pendingSenders??=[]}function _a(n,t){n[t]=(n[t]??0)+1,n.stats??={},n.stats[t]=n[t]}function pM({pendingSenders:n=[]}={}){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,pendingSenders:structuredClone(n),stats:{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}}var bf=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n;#o;#g=new Map;#l=new Map;#p=new Map;#d=new Set;#h=new Set;#E=new Set;#B;#u=new pi;constructor({api:t,clientId:o,clientSecret:i,harness:e,state:a,status:A=pM(),logger:r=console,replyTimeoutMs:s=6e5,reactionTimeoutMs:g=5e3,maxMessageChars:c=4e3,signal:I}){if(!t||typeof t.sendText!="function")throw new TypeError("DingTalk API is required");if(!St(o)||!St(i))throw new TypeError("DingTalk app credentials are required");if(!e||!a)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o.trim(),this.#t=i.trim(),this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#B=new ni({label:"DingTalk",logger:r}),this.#s=s,this.#I=Number.isFinite(g)&&g>0?Math.floor(g):5e3,this.#n=c,this.#o=I,Ape(this.#i),this.#F()}get status(){return this.#F(),structuredClone(this.#i)}accept(t){if(this.#o?.aborted)return Promise.resolve();let o=St(t?.msgId),i=jle(t);if(!o||!i||this.#a.hasSeen(o)||this.#E.has(o))return Promise.resolve();this.#E.add(o);let e;try{e=Vle(t,i)}catch{return this.#E.delete(o),_a(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),Promise.resolve()}let a=null;try{a=Fg(t.sessionWebhook)}catch{}a&&String(t.conversationType)!=="2"&&so(this.#a,{sessionWebhook:a});let A=this.#l.get(e),r=lM(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t}),s=St(r.content)??"",g=String(t.conversationType)!=="2"||t?.isInAtList===!0,c=String(t.conversationType)!=="2",I=a&&g?this.#m(t):null,d=m=>Promise.resolve(m).then(_=>(this.#y(I,this.#o?.aborted?"clear":"success"),_),_=>{throw this.#y(I,this.#o?.aborted||_?.name==="AbortError"||_?.code==="turn-stopped"?"clear":"error"),_}),B=String(t?.msgtype).toLowerCase()==="text"&&Eo(s),f=this.#u.status(e);if(B&&!c&&a&&g)return d(this.#M(o,a,{message:kn()},I));if(c&&a&&(B||f.phase==="collecting")){let _=/^\/batch$/iu.test(s)&&f.phase==="idle"&&(this.#g.has(e)||A||this.#B.hasPending(e))?{handled:!0,kind:"busy",message:Co()}:this.#u.handle(e,s,{plainText:!!s&&String(t?.msgtype).toLowerCase()==="text"&&!Gt(r)&&!qt(r)});if(_.handled)return _.kind==="submit"?d(this.#Q({...t,msgtype:"text",text:{content:_.prompt}},o,i,e,{batchSubmission:_,statusReaction:I})):d(this.#M(o,a,_,I))}let Q=ci(s)?Fi:Gt(r)?null:Li(s)?Ii:Ui(s)?Hi:Ki(s)?li:null;if(Q&&a&&g){let m;return m=this.#C(t,o,e,a,r,Q).catch(_=>{if(_?.code==="turn-stopped"||this.#o?.aborted){this.#y(I,"clear");return}this.#y(I,"error"),this.#i.lastError=_?.message??String(_);let T=At(this.#i,_);return this.#c.error?.(`[dsh-dingtalk] failed to process a command [${T.referenceId}]`,Of(_)),this.#O(a,dt(T)).catch(()=>{})}).finally(()=>{this.#E.delete(o),this.#h.delete(m)}),this.#h.add(m),d(m)}let y=this.#B.claimReply({key:e,actor:i,messageId:o,text:a&&t?.msgtype==="text"?St(t?.text?.content)??"":"",addressed:String(t?.conversationType)!=="2"||t?.isInAtList===!0,hasPendingQuestion:!!A,questionCompletion:A?.submitting||A?.claimedReplyMessageId?A.queue:null,isQuestionPending:()=>this.#l.has(e),send:a?m=>this.#O(a,m):async()=>{}});if(y){let m;return m=y.process(async()=>this.#a.hasSeen(o)?!1:(await this.#a.markSeen(o),_a(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),a||(_a(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=D("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002")),!0)).catch(_=>{if(this.#o?.aborted){this.#y(I,"clear");return}this.#y(I,"error"),this.#i.lastError=D("\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002"),this.#c.error?.("[dsh-dingtalk] failed to process an approval reply",_)}).finally(()=>{this.#E.delete(o),this.#d.delete(m)}),this.#d.add(m),d(m)}if(A&&A.actor!==i)return d(this.#Q(t,o,i,e,{statusReaction:I}));if(A?.submitting||A?.claimedReplyMessageId)return d(this.#Q(t,o,i,e,{statusReaction:I}));if(A){epe(t,A,i)&&(A.claimedReplyMessageId=o);let _=(A.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#w(t,o,i,e,A,I)).finally(()=>{this.#E.delete(o),A.claimedReplyMessageId===o&&(A.claimedReplyMessageId=null),A.queue===_&&(A.queue=null)});return A.queue=_,d(_)}return d(this.#Q(t,o,i,e,{statusReaction:I}))}#f(t,o,i,e){let a=new AbortController,A=Promise.resolve().then(()=>this.#e[t]({clientId:this.#A,clientSecret:this.#t,...o,reactionName:i,signal:a.signal})),r,s=new Promise((g,c)=>{r=setTimeout(()=>{let I=new DOMException("DingTalk reaction timed out","TimeoutError");a.abort(I),c(I)},this.#I),r.unref?.()});return Promise.race([A,s]).then(()=>(_a(this.#i,e==="add"?"reactionsAdded":"reactionsRemoved"),!0)).catch(g=>(_a(this.#i,"reactionErrors"),this.#c.debug?.(`[dsh-dingtalk] ${t} failed`,Of(g)),!1)).finally(()=>clearTimeout(r))}#m(t){if(typeof this.#e.addReaction!="function"||typeof this.#e.recallReaction!="function")return null;let o=St(t?.msgId),i=St(t?.conversationId);if(!o||!i)return null;let e={messageId:o,conversationId:i,robotCode:St(t?.robotCode)??this.#A};return{target:e,attached:this.#f("addReaction",e,$c,"add"),terminal:!1}}#y(t,o){if(!t||t.terminal)return;t.terminal=!0;let i=o==="success"?FH:o==="error"?LH:null;t.attached.then(async e=>{let a=await this.#f("recallReaction",t.target,$c,"remove");(!e||!a)&&(await new Promise(A=>{setTimeout(A,Math.min(1e3,this.#I)).unref?.()}),a=await this.#f("recallReaction",t.target,$c,"remove")||a),!(!a||!i||this.#o?.aborted)&&await this.#f("addReaction",t.target,i,"add")}).catch(()=>{})}#Q(t,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1,batchSubmission:r=null,statusReaction:s=null}={}){let g=!1;try{Fg(t.sessionWebhook),g=!0}catch{}let c=String(t.conversationType)!=="2"||t.isInAtList===!0,I=g&&c?ql(lM(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t}),{signal:this.#o}):void 0,B=(this.#g.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#b(t,o,i,e,{alreadyRecorded:A,preparedMessage:I,batchSubmission:r,statusReaction:s})).finally(()=>{a&&this.#E.delete(o),this.#g.get(e)===B&&this.#g.delete(e)});return this.#g.set(e,B),B}async waitForIdle(){await Promise.allSettled([...this.#g.values(),...[...this.#l.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#d,...this.#h])}async#C(t,o,i,e,a,A){if(this.#o?.throwIfAborted(),this.#a.hasSeen(o))return;await this.#a.markSeen(o),_a(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let r=await A(St(a.content)??"",this.#r,this.#a,i,{signal:this.#o,isDirect:String(t.conversationType)==="1",hasImages:qt(a),hasFiles:Gt(a),pendingInteraction:this.#l.has(i)||this.#B.hasPending(i),control:{owner:this,key:i}});r?.stopped&&await Promise.allSettled([this.#N(i),this.#B.closeRoute(i)]);for(let s of r?.messages??[r?.message])s&&await this.#O(e,s);this.#i.lastError=null}#M(t,o,i,e){let a;return a=Promise.resolve().then(async()=>{this.#a.hasSeen(t)||(await this.#a.markSeen(t),_a(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),i.message&&await this.#O(o,i.message),this.#i.lastError=null)}).catch(async A=>{if(this.#o?.aborted){this.#y(e,"clear");return}this.#y(e,"error"),this.#i.lastError=A?.message??String(A);let r=At(this.#i,A);this.#c.error?.(`[dsh-dingtalk] failed to process a batch input message [${r.referenceId}]`,Of(A)),await this.#O(o,dt(r)).catch(()=>{})}).finally(()=>{this.#E.delete(t),this.#h.delete(a)}),this.#h.add(a),a}async#b(t,o,i,e,{alreadyRecorded:a=!1,preparedMessage:A,batchSubmission:r=null,statusReaction:s=null}={}){if(this.#o?.throwIfAborted(),!a){if(this.#a.hasSeen(o))return;await this.#a.markSeen(o),_a(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString()}if(String(t.conversationType)==="2"&&t.isInAtList!==!0){_a(this.#i,"messagesIgnored");return}let g;try{g=Fg(t.sessionWebhook)}catch{_a(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=D("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=A??lM(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t}),I=c.content,d=qt(c),B=Gt(c),f=String(t?.msgtype).toLowerCase()==="text",Q=null,y=!1,m=r===null;try{if(!I&&!d&&!B){await this.#O(g,D("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"));return}let _=I.toLowerCase();if(f&&!d&&!B&&_==="/help"){await this.#O(g,Kle());return}if(f&&!d&&!B&&_==="/status"){await this.#r.ensureRunning({signal:this.#o}),await this.#O(g,D("\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002"));return}if(f&&!d&&!B&&_==="/new"){await this.#a.clearSession(e),await this.#O(g,D("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"));return}let T=f&&!d&&!B?await po(I,this.#r,e):null;if(T){for(let Y of T.messages??[T.message])await this.#O(g,Y);return}let G=f&&!d&&!B?await gi(I,this.#r,this.#a,e,{signal:this.#o}):null;if(G){await this.#O(g,G.message);return}let x=d?await Io(c,{signal:this.#o}):void 0;typeof this.#e.createAiCard=="function"&&typeof this.#e.updateAiCard=="function"&&typeof this.#e.finishAiCard=="function"&&(Q=YH({api:this.#e,clientId:this.#A,clientSecret:this.#t,target:Wle(t,i),signal:this.#o,logger:this.#c}),y=await Q.start(D(Ule)));let{answer:J,artifacts:L=[]}=await si({harness:this.#r,state:this.#a,key:e,...d?{content:x}:{text:I},createOptions:{signal:this.#o},existsOptions:{signal:this.#o},askOptions:{timeoutMs:this.#s,signal:this.#o,control:{owner:this,key:e},onUpdate:y?Y=>Q.push($le(Y)):void 0,onInteraction:Y=>this.#S(Y,{key:e,actor:i,sessionWebhook:g,requiresMention:String(t.conversationType)==="2"}),onInteractionResolved:Y=>this.#_(Y),files:c.files}});r&&(this.#u.complete(e,r.token),m=!0);let q=typeof J=="string"&&J.trim()?J:L.length>0?D("\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002"):J,j=null,K=null,v=!1;try{v=y&&await Q.finish(q),v?K=zt({deliveryId:o,presentation:"dingtalk-card"}):K=zt({deliveryId:o,presentation:"dingtalk-text",providerMessageIds:await this.#O(g,q)})}catch(Y){j=Da(Y)}let W=await this.#U(Zle(t,i,this.#A),g,o,L,K);if(j&&!W.userVisible)throw j;return j&&W.artifactSendErrors===0&&At(this.#i,j),_a(this.#i,"messagesReplied"),this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!j&&W.artifactSendErrors===0&&go(this.#i),W.receipt}catch(_){let T=null;if(!m&&r&&(_?.code==="turn-stopped"?this.#u.complete(e,r.token):T=this.#u.fail(e,r.token).message??null,m=!0),_?.code==="turn-stopped"){this.#y(s,"clear"),y&&await Q.finish(D("\u5DF2\u505C\u6B62\u3002")).catch(()=>{});return}if(this.#o?.aborted){this.#y(s,"clear");return}this.#y(s,"error"),this.#i.lastError=_?.message??String(_);let G=Bo(_)??Yle(_),x=At(this.#i,_,{userMessage:G,reason:Gi(_)?.reason});this.#c.error?.(`[dsh-dingtalk] failed to process an inbound message [${x.referenceId}]`,Of(_));try{let J=dt(x),L=T?`${J} +${o}`:o}function fo(n){return n instanceof Bo?n.userMessage:null}import{createHash as lx,randomUUID as px}from"node:crypto";import{constants as oE}from"node:fs";import{copyFile as qle,lstat as nx,mkdtemp as zle,open as dx,realpath as Vle,unlink as hx}from"node:fs/promises";import{tmpdir as Wle}from"node:os";import{basename as Zle,extname as Xle,isAbsolute as $le,join as Ex,resolve as epe}from"node:path";var Ff="dsh_im_return_file",Gf="dsh-im-outbound-artifact",QM=64*1024,Ape=new Map([[".csv","text/csv"],[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".html","text/html"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".json","application/json"],[".md","text/markdown"],[".pdf","application/pdf"],[".png","image/png"],[".rar","application/vnd.rar"],[".txt","text/plain"],[".webp","image/webp"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".xml","application/xml"],[".zip","application/zip"]]),Js=new WeakMap,Cx=new WeakMap,nE=new WeakMap,sx;function tpe(){return sx??=zle(Ex(Wle(),"dsh-im-outbound-")),sx}function js(n,t){let o=new Error(t);return o.code=n,o}function gx(n){let t=n?.session?.events;if(!Array.isArray(t))return null;let o=null;for(let i of t)i?.type==="turn/start"?o=Number.isInteger(i.data?.turn)?i.data.turn:null:i?.type==="turn/end"&&i.data?.turn===o&&(o=null);return Number.isInteger(o)&&o>=0?o:null}function cx(n){let t=n?.id??n?.header?.id;return typeof t=="string"&&t?t:null}function Ys(n,t){return`${n}\0${t}`}function Ix(n,t){return`${n}\0${t}`}function rpe(n){let t=String(n??"").replace(/[\u0000-\u001f\u007f]/g," ").replace(new RegExp("\\p{Cf}","gu"),"").replace(/\s+/g," ").trim();return t?[...t].slice(0,255).join(""):"result.bin"}function ape(n){return Ape.get(Xle(n).toLowerCase())??"application/octet-stream"}function ipe(n){return lx("sha256").update(n).digest("hex")}function ope(n,t){return typeof n?.dev=="bigint"&&typeof n?.ino=="bigint"&&typeof n?.size=="bigint"&&typeof n?.mtimeNs=="bigint"&&typeof n?.ctimeNs=="bigint"&&n.dev===t?.dev&&n.ino===t?.ino&&n.size===t?.size&&n.mtimeNs===t?.mtimeNs&&n.ctimeNs===t?.ctimeNs}async function npe(n,t){let o;try{o=await dx(n,oE.O_RDONLY);let i=lx("sha256"),e=o.createReadStream({autoClose:!1,highWaterMark:QM,...t?{signal:t}:{}});for await(let a of e)t?.throwIfAborted(),i.update(a);return i.digest("hex")}finally{await o?.close().catch(()=>{})}}async function spe(n,t,{signal:o,errorCode:i="artifact-changed",errorMessage:e="The result file changed while it was being read."}={}){let a=()=>js(i,e);if(!Number.isSafeInteger(t)||t<0)throw a();o?.throwIfAborted();let A;try{A=Buffer.allocUnsafe(t)}catch{throw a()}if(typeof n?.createReadStream=="function"){let g=n.createReadStream({autoClose:!1,start:0,end:t,highWaterMark:QM,...o?{signal:o}:{}}),c=0;for await(let I of g){o?.throwIfAborted();let d=Buffer.isBuffer(I)?I:Buffer.from(I);if(c+d.length>t)throw a();d.copy(A,c),c+=d.length}if(c!==t)throw a();return A}let r=0;for(;rg)throw a();r+=I}o?.throwIfAborted();let s=Buffer.allocUnsafe(1);if((await n.read(s,0,1,t))?.bytesRead!==0)throw a();return A}async function gpe(n,t,o){o?.throwIfAborted();let i;try{let e=$le(t)?t:epe(n,t),a=await Vle(e);if(!(await nx(a,{bigint:!0})).isFile())throw js("artifact-not-file","The requested path is not a file.");let r=await tpe();i=Ex(r,`${px()}.artifact`),await qle(a,i,oE.COPYFILE_EXCL),o?.throwIfAborted();let s=await nx(i,{bigint:!0}),g=Number(s.size);if(!s.isFile()||!Number.isSafeInteger(g)||g<0)throw js("artifact-unavailable","The file could not be prepared for delivery.");let c=rpe(Zle(e));return Object.freeze({fileName:c,mediaType:ape(c),size:g,digest:await npe(i,o),storagePath:i})}catch(e){throw i&&await hx(i).catch(()=>{}),e?.code?.startsWith?.("artifact-")?e:o?.aborted?o.reason??e:js("artifact-unavailable","The requested file is unavailable.")}}function ux(n){return Object.freeze({artifactId:n.artifactId,fileName:n.fileName,size:n.size})}function Pf(n){return n.artifactId}function Fn(n){let t=Js.get(n);if(!t)return;if(t.releaseRequested=!0,t.materializing>0){t.cleanupRequested=!0;return}let o=[...nE.get(n)??[]];if(o.length>0){t.cleanupDeferred||(t.cleanupDeferred=!0,Promise.allSettled(o).finally(()=>{t.cleanupDeferred=!1,Fn(n)}));return}Js.delete(n),nE.delete(n),t.onCleanup?.(),hx(t.path).catch(()=>{})}var yM=class{#e=new Map;#A=new Map;#t=new Map;#r=new Map;#a=new Map;#i=new Map;#c=new Map;#s=new Map;#I;constructor({uuid:t=px}={}){if(typeof t!="function")throw new TypeError("uuid must be a function");this.#I=t}openConsumer(t,o){if(typeof t!="string"||!t||typeof o!="string"||!o)throw new TypeError("sessionId and promptRpcId are required");let i=Ix(t,o),e={sessionId:t,promptRpcId:o,turn:null,released:!1};return this.#i.set(i,e),()=>{if(!e.released&&(e.released=!0,this.#i.get(i)===e&&this.#i.delete(i),e.turn!==null)){let a=Ys(t,e.turn);this.#c.get(a)===e&&this.#c.delete(a),this.discard(t,e.turn)}}}observeSessionEvent(t,o){let i=cx(t);if(!i||!o||typeof o!="object")return;if(o.type==="turn/start"){let A=o.data?.turn;Number.isInteger(A)&&A>=0&&this.#s.set(i,A);return}if(o.type==="user/message"){let A=o.data?.source?.rpcId,r=this.#s.get(i)??gx({session:t});if(typeof A!="string"||!A||!Number.isInteger(r))return;this.#s.set(i,r);let s=this.#i.get(Ix(i,A));if(!s||s.released)return;s.turn=r,this.#c.set(Ys(i,r),s);return}if(o.type!=="turn/end")return;let e=o.data?.turn;if(!Number.isInteger(e)||e<0)return;this.#s.get(i)===e&&this.#s.delete(i);let a=this.#c.get(Ys(i,e));(!a||a.released)&&this.discard(i,e)}disposeSession(t){let o=cx(t);if(!o)return;let i=`${o}\0`,e=new Set;for(let a of[this.#e,this.#A])for(let[A,r]of a)if(A.startsWith(i)){for(let s of r.values())e.add(s);a.delete(A)}for(let[a,A]of this.#i)a.startsWith(i)&&(A.released=!0,this.#i.delete(a));for(let a of this.#c.keys())a.startsWith(i)&&this.#c.delete(a);this.#s.delete(o);for(let a of e)Fn(a)}async stage(t,o){let i=t?.path;if(typeof i!="string"||!i.trim())throw new TypeError("A file path is required.");let e=o?.agent,a=e?.session?.header?.id,A=e?.session?.header?.cwd,r=gx(e);if(typeof a!="string"||!a||typeof A!="string"||!A||r===null)throw js("artifact-context-required","A live Harness Session is required to return a file.");let s=await gpe(A,i,o?.signal),{storagePath:g,...c}=s,I=Object.freeze({kind:Gf,schemaVersion:1,artifactId:this.#I(),deliveryKey:this.#I(),...c,source:"managed-temp",registeredBy:Object.freeze({kind:"tool-result",eventId:typeof o?.callId=="string"?o.callId:"unknown",toolName:Ff}),origin:Object.freeze({sessionId:a,turn:r,callId:typeof o?.callId=="string"?o.callId:null}),createdAt:Date.now()});Js.set(I,{path:g,materializing:0,materialized:!1,releaseRequested:!1,cleanupRequested:!1,cleanupDeferred:!1,onCleanup:()=>this.#g(I)});let d=Ys(a,r),B=this.#A.get(d);return B||(B=new Map,this.#A.set(d,B)),B.set(Pf(I),I),I}commit(t){if(t?.kind!==Gf||!Js.has(t))return null;let o=Ys(t.origin.sessionId,t.origin.turn),i=Pf(t),e=this.#A.get(o);if(e?.get(i)!==t)return null;e.delete(i),e.size===0&&this.#A.delete(o);let a=this.#e.get(o);return a||(a=new Map,this.#e.set(o,a)),a.set(i,t),ux(t)}release(t){if(t?.kind!==Gf)return;let o=Ys(t.origin.sessionId,t.origin.turn),i=Pf(t),e=this.#A.get(o);e?.get(i)===t&&e.delete(i),e?.size===0&&this.#A.delete(o),Fn(t)}take(t,o,{signal:i}={}){let e=Ys(t,o),a=this.#e.get(e);if(this.#e.delete(e),!a)return[];if(i?.aborted){for(let s of a.values())Fn(s);return[]}let A=this.#t.get(e)??new Map;this.#t.set(e,A);let r=[];for(let[s,g]of a)Js.has(g)&&(A.set(s,g),r.push(g));if(A.size===0)this.#t.delete(e);else if(!this.#n(e,i))return[];return r}discard(t,o){if(typeof t!="string"||!Number.isInteger(o))return;let i=Ys(t,o),e=new Set([...this.#e.get(i)?.values()??[],...this.#A.get(i)?.values()??[]]);this.#e.delete(i),this.#A.delete(i);for(let a of e)Fn(a)}clear(){let t=new Set;for(let o of this.#e.values())for(let i of o.values())t.add(i);for(let o of this.#A.values())for(let i of o.values())t.add(i);for(let o of this.#t.values())for(let i of o.values())t.add(i);for(let o of t)Fn(o);this.#e.clear(),this.#A.clear(),this.#t.clear();for(let o of this.#r.keys())this.#o(o);for(let o of this.#i.values())o.released=!0;this.#i.clear(),this.#c.clear(),this.#s.clear()}#n(t,o){if(!o)return!0;this.#o(t);let i=this.#a.get(o);return i||(i={turnKeys:new Set,onAbort:null},i.onAbort=()=>{for(let e of[...i.turnKeys])for(let a of this.#t.get(e)?.values()??[])Fn(a)},this.#a.set(o,i),o.addEventListener("abort",i.onAbort,{once:!0})),i.turnKeys.add(t),this.#r.set(t,o),o.aborted?(i.onAbort(),!1):!0}#o(t){let o=this.#r.get(t);if(!o)return;this.#r.delete(t);let i=this.#a.get(o);i?.turnKeys.delete(t),i?.turnKeys.size===0&&(o.removeEventListener("abort",i.onAbort),this.#a.delete(o))}#g(t){let o=Ys(t.origin.sessionId,t.origin.turn),i=Pf(t),e=this.#e.get(o);e?.get(i)===t&&e.delete(i),e?.size===0&&this.#e.delete(o);let a=this.#A.get(o);a?.get(i)===t&&a.delete(i),a?.size===0&&this.#A.delete(o);let A=this.#t.get(o);A?.get(i)===t&&A.delete(i),A?.size===0&&(this.#t.delete(o),this.#o(o))}},gI=new yM;function cpe({registry:n=gI}={}){let t=new WeakMap,o=new Map,i=(A,r)=>{let s=o.get(A);s||(s={artifacts:[]},o.set(A,s)),s.artifacts.push(r)},e=Object.freeze({name:Ff,description:"Send a readable file or generated image to the user through the current conversation. Existing and newly created files are both valid.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",description:"Absolute path, or a path relative to the current workspace."}},required:["path"]},output:{schema:{type:"object",additionalProperties:!1,properties:{artifactId:{type:"string"},fileName:{type:"string"},size:{type:"number"}},required:["artifactId","fileName","size"]},render:(A,r)=>[{type:"text",text:`Registered ${r.fileName} (${r.size} bytes) for IM delivery.`}]},async execute(A,r){let s=await n.stage(A,r);return t.set(r,s),ux(s)}});return Object.freeze({definition:e,onResult:(A,r)=>{if(A?.name===Ff){let g=t.get(A);if(!g)return;if(t.delete(A),r?.isError){n.release(g);return}A.parent===void 0?n.commit(g):i(A.parent,g);return}let s=o.get(A?.token);if(s){if(o.delete(A.token),r?.isError){for(let g of s.artifacts)n.release(g);return}if(A.parent!==void 0){for(let g of s.artifacts)i(A.parent,g);return}for(let g of s.artifacts)n.commit(g)}}})}function mM(n,{registry:t=gI}={}){if(typeof n?.tools?.register!="function"||typeof n?.systemPrompt?.section!="function"||typeof n?.on!="function")return!1;let o=cpe({registry:t});return n.tools.register(o.definition),n.on("tools/result",o.onResult),n.on("session/event",(i,e)=>t.observeSessionEvent(i,e)),n.on("session/disposed",i=>t.disposeSession(i)),n.systemPrompt.section({name:"dsh-im:return-file",order:115,text:`When the user asks to receive a file or generated image, call ${Ff} with its path. Existing files can be sent directly; do not recreate or rename a file solely for delivery.`}),!0}async function Bx(n,{signal:t}={}){if(t?.aborted&&(Fn(n),t.throwIfAborted()),n?.kind!==Gf||n.schemaVersion!==1||!Js.has(n)||typeof n.digest!="string"||!Number.isSafeInteger(n.size)||n.size<0)throw js("artifact-invalid","The file registration is invalid.");let o=Js.get(n);o.materializing+=1;let i,e=!1;try{let a=Number.isInteger(oE.O_NOFOLLOW)?oE.O_NOFOLLOW:0;i=await dx(o.path,oE.O_RDONLY|a);let A=await i.stat({bigint:!0});if(!A.isFile()||A.size!==BigInt(n.size))throw js("artifact-invalid","The file registration is invalid.");let r=await spe(i,n.size,{signal:t,errorCode:"artifact-invalid",errorMessage:"The file registration is invalid."}),s=await i.stat({bigint:!0});if(!ope(A,s)||r.byteLength!==n.size||ipe(r)!==n.digest)throw js("artifact-invalid","The file registration is invalid.");t?.throwIfAborted(),e=!0;let g=Object.freeze({artifactId:n.artifactId,deliveryKey:n.deliveryKey,fileName:n.fileName,mediaType:n.mediaType,size:n.size,bytes:r});return Cx.set(g,n),o.materialized=!0,g}catch(a){throw a?.code?.startsWith?.("artifact-")?a:t?.aborted?t.reason??a:js("artifact-invalid","The file registration is invalid.")}finally{await i?.close().catch(()=>{}),o.materializing-=1,(!e||o.cleanupRequested)&&Fn(n)}}function An(n,t){let o=Cx.get(n);if(!o||!Js.has(o)||!t||typeof t.then!="function")return t;let i=nE.get(o)??new Set,e=Promise.resolve(t).then(()=>{},()=>{});return i.add(e),nE.set(o,i),e.finally(()=>{i.delete(e),i.size===0&&nE.delete(o)}),t}function SM(n){let t=Js.get(n);t&&(t.releaseRequested=!0),Fn(n)}var Ipe=new Set(["sent","rejected","failed","unknown"]),lpe=new Set(["sent","failed","unknown"]),ppe=new Set(["plain","markdown"]),dpe=new Set(["artifact-changed","artifact-context-required","artifact-empty","artifact-invalid","artifact-not-file","artifact-permission-required","artifact-provider-rejected","artifact-too-large","artifact-unavailable"]);function hi(n){if(!n||typeof n!="object")return[];let t=Array.isArray(n.providerMessageIds)?n.providerMessageIds.filter(e=>typeof e=="string"&&e.trim()||Number.isSafeInteger(e)).map(String):[],i=[n.message_id,n.messageId,n.id,n.ts,n.message?.message_id,n.message?.messageId,n.message?.id,n.message?.ts,n.key?.id,n.data?.message_id,n.body?.msgid,n.body?.message_id].find(e=>typeof e=="string"&&e.trim()||Number.isSafeInteger(e));return i!==void 0&&t.push(String(i)),[...new Set(t)]}function ep(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} must be a non-empty string`);return n}function Ln(n,t="plain"){let o=typeof n=="string"?{kind:"text",text:n,format:t}:n;if(!o||typeof o!="object"||Array.isArray(o)||o.kind!=="text"||typeof o.text!="string"||!o.text.trim())throw new TypeError("text delivery block must contain non-empty text");if(!ppe.has(o.format))throw new TypeError("text delivery format must be plain or markdown");return Object.freeze({kind:"text",text:o.text,format:o.format})}function hpe(n){if(!Array.isArray(n))throw new TypeError("providerMessageIds must be an array");let t=[],o=new Set;for(let i of n){let e=ep(i,"providerMessageId");o.has(e)||(o.add(e),t.push(e))}return Object.freeze(t)}function Epe(n){if(!Array.isArray(n))throw new TypeError("artifacts must be an array");return Object.freeze(n.map(t=>{if(!t||typeof t!="object")throw new TypeError("artifact result must be an object");let o=ep(t.artifactId,"artifactId");if(!Ipe.has(t.outcome))throw new TypeError("artifact outcome must be sent, rejected, failed, or unknown");let i=t.reason===void 0?void 0:ep(t.reason,"artifact reason");return Object.freeze({artifactId:o,outcome:t.outcome,...i===void 0?{}:{reason:i}})}))}function Cpe(n){let t=typeof n=="string"?n:n?.code;return t==="artifact-delivery-uncertain"?"unknown":dpe.has(t)?"rejected":"failed"}function Vt({deliveryId:n,presentation:t,providerMessageIds:o=[],artifacts:i=[],deliveryOutcome:e,reason:a}){if(e!==void 0&&!lpe.has(e))throw new TypeError("deliveryOutcome must be sent, failed, or unknown");let A=a===void 0?void 0:ep(a,"delivery reason");return Object.freeze({schemaVersion:1,deliveryId:ep(n,"deliveryId"),presentation:ep(t,"presentation"),providerMessageIds:hpe(o),...e===void 0?{}:{deliveryOutcome:e},...A===void 0?{}:{reason:A},artifacts:Epe(i)})}function fx({artifactId:n,deliveryId:t,error:o,presentation:i="text-fallback",providerMessageIds:e=[]}){let a=typeof o=="string"?o:o?.code,A=typeof a=="string"&&a?a:"artifact-provider-failed";return Vt({deliveryId:t,presentation:i,providerMessageIds:e,artifacts:[{artifactId:n,outcome:Cpe(o),reason:A}]})}function Qx({deliveryId:n,presentation:t,receipts:o}){if(!Array.isArray(o)||o.length===0)throw new TypeError("receipts must contain at least one delivery receipt");let i=[],e=new Map,a,A;for(let r of o){if(!r||r.schemaVersion!==1)throw new TypeError("receipt must use DeliveryReceipt schema version 1");i.push(...r.providerMessageIds??[]),a===void 0&&r.deliveryOutcome!==void 0&&(a=r.deliveryOutcome,A=r.reason);for(let s of r.artifacts??[])e.set(s.artifactId,s)}return Vt({deliveryId:n,presentation:t,providerMessageIds:i,deliveryOutcome:a,reason:A,artifacts:[...e.values()]})}function upe(){let n=new Error("Native file delivery is unavailable");return n.code="artifact-provider-unavailable",n}function DM(n,t){return t?.aborted||n?.name==="AbortError"||n?.code==="ABORT_ERR"}function yx(n){return Array.isArray(n)?[...new Set(n.filter(t=>typeof t=="string"&&t.trim()||Number.isSafeInteger(t)).map(String))]:hi(n)}async function Bpe(n,{sendFile:t,sendImage:o,signal:i}){if(n.mediaType?.startsWith("image/")&&typeof o=="function")try{return{presentation:"image",result:await o(n)}}catch(e){if(DM(e,i)||e?.code==="artifact-delivery-uncertain")throw e}if(i?.throwIfAborted(),typeof t!="function")throw upe();return{presentation:"file",result:await t(n)}}async function Qo({artifacts:n=[],baseReceipt:t=null,deliveryId:o,aggregatePresentation:i,alwaysMerge:e=!1,channelKey:a,signal:A,sendFile:r,sendImage:s,sendFailureNotice:g,onFailure:c,logger:I}){let d=t?[t]:[],B=!!t&&t.deliveryOutcome!=="failed",f=!1,Q=0,y=0,m=0;try{for(;m0&&(_=Qx({deliveryId:o??t?.deliveryId??n[0]?.deliveryKey,presentation:i??`${a}-${t?"text-and-files":"files"}`,receipts:d})),{receipt:_,userVisible:B,failureNoticeVisible:f,artifactsSent:Q,artifactSendErrors:y}}var fpe="\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026",wM="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",Qpe=["\u9489\u9489\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002","","\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002","/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD","/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587","/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09","/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD","/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B","/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7","/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7","/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B","\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]","/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset","/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset","\u7EAF\u6570\u5B57 ID\uFF1A/preset id:","/preset --default \u8DDF\u968F Host \u9ED8\u8BA4","/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1","/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1","/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09","/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21","/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21","/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001","/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C","/help \u663E\u793A\u672C\u5E2E\u52A9"];function ype(){return Qpe.map(n=>D(n)).join(` +`)}function St(n){return typeof n=="string"&&n.trim()?n.trim():null}function mpe(n){let t=hi(n),o=St(n?.processQueryKey);return o&&!t.includes(o)&&t.push(o),t}function Lf(n){let t=[],o=new Set,i=n;for(;i&&typeof i=="object"&&t.length<3&&!o.has(i);){o.add(i);let e=St(i.name)?.slice(0,80),a=St(i.code)?.slice(0,80),A=St(i.providerCode)?.slice(0,160),r=Number.isInteger(i.status)?i.status:void 0;t.push({...e?{name:e}:{},...a?{code:a}:{},...A?{providerCode:A}:{},...r?{status:r}:{}}),i=i.cause}return t}function Spe(n){let t=n,o=new Set;for(;t&&typeof t=="object"&&!o.has(t);){if(o.add(t),t.code==="image-download-address-failed")return D("\u9489\u9489\u672A\u80FD\u6362\u53D6\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u673A\u5668\u4EBA\u7684\u201C\u4F01\u4E1A\u5185\u673A\u5668\u4EBA\u53D1\u9001\u6D88\u606F\u6743\u9650\u201D\u3002");if(t.code==="invalid-image-download")return D("\u9489\u9489\u6CA1\u6709\u8FD4\u56DE\u56FE\u7247\u4E0B\u8F7D\u5730\u5740\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");if(t.code==="image-content-download-failed")return D("\u9489\u9489\u8FD4\u56DE\u7684\u56FE\u7247\u4E34\u65F6\u5730\u5740\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002");t=t.cause}return po(n)}function Dpe(n){return St(n?.senderStaffId)??St(n?.senderId)}function wpe(n){if(n?.content&&typeof n.content=="object")return n.content;if(typeof n?.content!="string")return null;try{let t=JSON.parse(n.content);return t&&typeof t=="object"?t:null}catch{return null}}function Ope(n){let t=n?.richText??n?.rich_text;return Array.isArray(t)?t:[]}function bpe(n){return typeof n?.text=="string"?St(n.text):typeof n?.text?.content=="string"?St(n.text.content):String(n?.type).toLowerCase()==="text"&&typeof n?.content=="string"?St(n.content):null}function OM(n){return St(n?.downloadCode)??St(n?.pictureDownloadCode)}function bM(n,{api:t,clientId:o,clientSecret:i}={}){let e=String(n?.msgtype??"").toLowerCase(),a=wpe(n),A=e==="richtext"?Ope(a):[],r=e==="text"?St(n?.text?.content)??"":A.map(bpe).filter(Boolean).join(` +`),s=[];if(e==="picture"){let c=OM(a);c&&s.push(c)}else if(e==="richtext")for(let c of A){if(String(c?.type??"").toLowerCase()!=="picture")continue;let I=OM(c);I&&s.push(I)}let g=e==="file"?OM(a):null;return{content:r,images:s.map((c,I)=>({name:I===0?"image":`image-${I+1}`,load:({signal:d,maxBytes:B})=>{if(typeof t?.downloadImage!="function")throw new Error("DingTalk API does not support image downloads");return t.downloadImage({clientId:o,clientSecret:i,robotCode:n?.robotCode,downloadCode:c,signal:d,maxBytes:B})}})),files:g?[{name:St(a?.fileName??a?.file_name)??"file",load:({signal:c}={})=>{if(typeof t?.downloadFile!="function")throw new Error("DingTalk API does not support file downloads");return t.downloadFile({clientId:o,clientSecret:i,robotCode:n?.robotCode,downloadCode:g,signal:c})}}]:[]}}function Mpe(n,t){if(String(n?.conversationType)==="2"){let o=St(n?.conversationId);if(!o)throw new Error("DingTalk group message has no conversation id");return`group:${o}`}return`p2p:${t}`}function _pe(n,t){return String(n?.conversationType)==="2"?{type:"group",openConversationId:St(n?.conversationId)}:{type:"user",userId:t}}function Tpe(n,t,o){let i=St(n?.robotCode)??o;return String(n?.conversationType)==="2"?{type:"group",openConversationId:St(n?.conversationId),robotCode:i}:{type:"user",userId:t,robotCode:i}}function Npe(n,t){let o=String(n??D("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim()||D("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002",{name:o});case"artifact-permission-required":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u5E94\u7528\u6216\u673A\u5668\u4EBA\u7F3A\u5C11\u6587\u4EF6\u6D88\u606F\u6743\u9650\u3002\u8BF7\u5F00\u901A\u5E94\u7528 qyapi_base \u6743\u9650\uFF0C\u5E76\u786E\u8BA4\u673A\u5668\u4EBA\u5177\u5907\u6587\u4EF6\u6D88\u606F\u53D1\u9001\u80FD\u529B\u3002",{name:o});case"artifact-too-large":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u9489\u9489\u673A\u5668\u4EBA\u53EF\u53D1\u9001\u7684\u6587\u4EF6\u5927\u5C0F\uFF0C\u672A\u53D1\u9001\u3002",{name:o});case"artifact-rate-limited":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u9489\u9489\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:o});case"artifact-provider-rejected":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u9489\u9489\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6D88\u606F\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u7C7B\u578B\u548C\u673A\u5668\u4EBA\u6587\u4EF6\u6D88\u606F\u914D\u7F6E\u3002",{name:o});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002",{name:o});default:return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u6682\u65F6\u672A\u80FD\u901A\u8FC7\u9489\u9489\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:o})}}function Rpe(n){return n?.type==="text"&&St(n.text)?n.text:n?.type==="tool"?n.name==="web_search"?D("_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_"):D("_\u6B63\u5728\u4F7F\u7528 {name}\u2026_",{name:St(n.name)??D("\u5DE5\u5177")}):D("_{text}_",{text:St(n?.text)??D("\u6B63\u5728\u5904\u7406\u2026")})}function kpe(n,t,o){if(t.needsPresentation||!t.questions[t.index]||t.actor!==o||String(n?.conversationType)==="2"&&n?.isInAtList!==!0||n?.msgtype!=="text"||!St(n?.text?.content))return!1;try{return xg(n.sessionWebhook),!0}catch{return!1}}function vpe(n){n.stats??={};for(let t of["messagesReceived","messagesReplied","messagesRejected","messagesIgnored","reactionsAdded","reactionsRemoved","reactionErrors"])n[t]??=0,n.stats[t]=n[t];n.pendingSenders??=[]}function Ta(n,t){n[t]=(n[t]??0)+1,n.stats??={},n.stats[t]=n[t]}function MM({pendingSenders:n=[]}={}){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,pendingSenders:structuredClone(n),stats:{messagesReceived:0,messagesReplied:0,messagesRejected:0,messagesIgnored:0,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}}var Uf=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n;#o;#g=new Map;#l=new Map;#p=new Map;#d=new Set;#h=new Set;#E=new Set;#B;#u=new di;constructor({api:t,clientId:o,clientSecret:i,harness:e,state:a,status:A=MM(),logger:r=console,replyTimeoutMs:s=6e5,reactionTimeoutMs:g=5e3,maxMessageChars:c=4e3,signal:I}){if(!t||typeof t.sendText!="function")throw new TypeError("DingTalk API is required");if(!St(o)||!St(i))throw new TypeError("DingTalk app credentials are required");if(!e||!a)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o.trim(),this.#t=i.trim(),this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#B=new si({label:"DingTalk",logger:r}),this.#s=s,this.#I=Number.isFinite(g)&&g>0?Math.floor(g):5e3,this.#n=c,this.#o=I,vpe(this.#i),this.#F()}get status(){return this.#F(),structuredClone(this.#i)}accept(t){if(this.#o?.aborted)return Promise.resolve();let o=St(t?.msgId),i=Dpe(t);if(!o||!i||this.#a.hasSeen(o)||this.#E.has(o))return Promise.resolve();this.#E.add(o);let e;try{e=Mpe(t,i)}catch{return this.#E.delete(o),Ta(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),Promise.resolve()}let a=null;try{a=xg(t.sessionWebhook)}catch{}a&&String(t.conversationType)!=="2"&&go(this.#a,{sessionWebhook:a});let A=this.#l.get(e),r=bM(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t}),s=St(r.content)??"",g=String(t.conversationType)!=="2"||t?.isInAtList===!0,c=String(t.conversationType)!=="2",I=a&&g?this.#m(t):null,d=m=>Promise.resolve(m).then(_=>(this.#y(I,this.#o?.aborted?"clear":"success"),_),_=>{throw this.#y(I,this.#o?.aborted||_?.name==="AbortError"||_?.code==="turn-stopped"?"clear":"error"),_}),B=String(t?.msgtype).toLowerCase()==="text"&&Co(s),f=this.#u.status(e);if(B&&!c&&a&&g)return d(this.#M(o,a,{message:Gn()},I));if(c&&a&&(B||f.phase==="collecting")){let _=/^\/batch$/iu.test(s)&&f.phase==="idle"&&(this.#g.has(e)||A||this.#B.hasPending(e))?{handled:!0,kind:"busy",message:uo()}:this.#u.handle(e,s,{plainText:!!s&&String(t?.msgtype).toLowerCase()==="text"&&!Ft(r)&&!zt(r)});if(_.handled)return _.kind==="submit"?d(this.#Q({...t,msgtype:"text",text:{content:_.prompt}},o,i,e,{batchSubmission:_,statusReaction:I})):d(this.#M(o,a,_,I))}let Q=Ii(s)?Li:Ft(r)?null:Ui(s)?li:Hi(s)?Ki:xi(s)?pi:null;if(Q&&a&&g){let m;return m=this.#C(t,o,e,a,r,Q).catch(_=>{if(_?.code==="turn-stopped"||this.#o?.aborted){this.#y(I,"clear");return}this.#y(I,"error"),this.#i.lastError=_?.message??String(_);let T=At(this.#i,_);return this.#c.error?.(`[dsh-dingtalk] failed to process a command [${T.referenceId}]`,Lf(_)),this.#O(a,dt(T)).catch(()=>{})}).finally(()=>{this.#E.delete(o),this.#h.delete(m)}),this.#h.add(m),d(m)}let y=this.#B.claimReply({key:e,actor:i,messageId:o,text:a&&t?.msgtype==="text"?St(t?.text?.content)??"":"",addressed:String(t?.conversationType)!=="2"||t?.isInAtList===!0,hasPendingQuestion:!!A,questionCompletion:A?.submitting||A?.claimedReplyMessageId?A.queue:null,isQuestionPending:()=>this.#l.has(e),send:a?m=>this.#O(a,m):async()=>{}});if(y){let m;return m=y.process(async()=>this.#a.hasSeen(o)?!1:(await this.#a.markSeen(o),Ta(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),a||(Ta(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=D("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002")),!0)).catch(_=>{if(this.#o?.aborted){this.#y(I,"clear");return}this.#y(I,"error"),this.#i.lastError=D("\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002"),this.#c.error?.("[dsh-dingtalk] failed to process an approval reply",_)}).finally(()=>{this.#E.delete(o),this.#d.delete(m)}),this.#d.add(m),d(m)}if(A&&A.actor!==i)return d(this.#Q(t,o,i,e,{statusReaction:I}));if(A?.submitting||A?.claimedReplyMessageId)return d(this.#Q(t,o,i,e,{statusReaction:I}));if(A){kpe(t,A,i)&&(A.claimedReplyMessageId=o);let _=(A.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#w(t,o,i,e,A,I)).finally(()=>{this.#E.delete(o),A.claimedReplyMessageId===o&&(A.claimedReplyMessageId=null),A.queue===_&&(A.queue=null)});return A.queue=_,d(_)}return d(this.#Q(t,o,i,e,{statusReaction:I}))}#f(t,o,i,e){let a=new AbortController,A=Promise.resolve().then(()=>this.#e[t]({clientId:this.#A,clientSecret:this.#t,...o,reactionName:i,signal:a.signal})),r,s=new Promise((g,c)=>{r=setTimeout(()=>{let I=new DOMException("DingTalk reaction timed out","TimeoutError");a.abort(I),c(I)},this.#I),r.unref?.()});return Promise.race([A,s]).then(()=>(Ta(this.#i,e==="add"?"reactionsAdded":"reactionsRemoved"),!0)).catch(g=>(Ta(this.#i,"reactionErrors"),this.#c.debug?.(`[dsh-dingtalk] ${t} failed`,Lf(g)),!1)).finally(()=>clearTimeout(r))}#m(t){if(typeof this.#e.addReaction!="function"||typeof this.#e.recallReaction!="function")return null;let o=St(t?.msgId),i=St(t?.conversationId);if(!o||!i)return null;let e={messageId:o,conversationId:i,robotCode:St(t?.robotCode)??this.#A};return{target:e,attached:this.#f("addReaction",e,oI,"add"),terminal:!1}}#y(t,o){if(!t||t.terminal)return;t.terminal=!0;let i=o==="success"?nK:o==="error"?sK:null;t.attached.then(async e=>{let a=await this.#f("recallReaction",t.target,oI,"remove");(!e||!a)&&(await new Promise(A=>{setTimeout(A,Math.min(1e3,this.#I)).unref?.()}),a=await this.#f("recallReaction",t.target,oI,"remove")||a),!(!a||!i||this.#o?.aborted)&&await this.#f("addReaction",t.target,i,"add")}).catch(()=>{})}#Q(t,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1,batchSubmission:r=null,statusReaction:s=null}={}){let g=!1;try{xg(t.sessionWebhook),g=!0}catch{}let c=String(t.conversationType)!=="2"||t.isInAtList===!0,I=g&&c?$l(bM(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t}),{signal:this.#o}):void 0,B=(this.#g.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#b(t,o,i,e,{alreadyRecorded:A,preparedMessage:I,batchSubmission:r,statusReaction:s})).finally(()=>{a&&this.#E.delete(o),this.#g.get(e)===B&&this.#g.delete(e)});return this.#g.set(e,B),B}async waitForIdle(){await Promise.allSettled([...this.#g.values(),...[...this.#l.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#d,...this.#h])}async#C(t,o,i,e,a,A){if(this.#o?.throwIfAborted(),this.#a.hasSeen(o))return;await this.#a.markSeen(o),Ta(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let r=await A(St(a.content)??"",this.#r,this.#a,i,{signal:this.#o,isDirect:String(t.conversationType)==="1",hasImages:zt(a),hasFiles:Ft(a),pendingInteraction:this.#l.has(i)||this.#B.hasPending(i),control:{owner:this,key:i}});r?.stopped&&await Promise.allSettled([this.#N(i),this.#B.closeRoute(i)]);for(let s of r?.messages??[r?.message])s&&await this.#O(e,s);this.#i.lastError=null}#M(t,o,i,e){let a;return a=Promise.resolve().then(async()=>{this.#a.hasSeen(t)||(await this.#a.markSeen(t),Ta(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),i.message&&await this.#O(o,i.message),this.#i.lastError=null)}).catch(async A=>{if(this.#o?.aborted){this.#y(e,"clear");return}this.#y(e,"error"),this.#i.lastError=A?.message??String(A);let r=At(this.#i,A);this.#c.error?.(`[dsh-dingtalk] failed to process a batch input message [${r.referenceId}]`,Lf(A)),await this.#O(o,dt(r)).catch(()=>{})}).finally(()=>{this.#E.delete(t),this.#h.delete(a)}),this.#h.add(a),a}async#b(t,o,i,e,{alreadyRecorded:a=!1,preparedMessage:A,batchSubmission:r=null,statusReaction:s=null}={}){if(this.#o?.throwIfAborted(),!a){if(this.#a.hasSeen(o))return;await this.#a.markSeen(o),Ta(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString()}if(String(t.conversationType)==="2"&&t.isInAtList!==!0){Ta(this.#i,"messagesIgnored");return}let g;try{g=xg(t.sessionWebhook)}catch{Ta(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=D("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=A??bM(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t}),I=c.content,d=zt(c),B=Ft(c),f=String(t?.msgtype).toLowerCase()==="text",Q=null,y=!1,m=r===null;try{if(!I&&!d&&!B){await this.#O(g,D("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"));return}let _=I.toLowerCase();if(f&&!d&&!B&&_==="/help"){await this.#O(g,ype());return}if(f&&!d&&!B&&_==="/status"){await this.#r.ensureRunning({signal:this.#o}),await this.#O(g,D("\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002"));return}if(f&&!d&&!B&&_==="/new"){await this.#a.clearSession(e),await this.#O(g,D("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"));return}let T=f&&!d&&!B?await ho(I,this.#r,e):null;if(T){for(let U of T.messages??[T.message])await this.#O(g,U);return}let R=f&&!d&&!B?await ci(I,this.#r,this.#a,e,{signal:this.#o}):null;if(R){await this.#O(g,R.message);return}let H=d?await lo(c,{signal:this.#o}):void 0;typeof this.#e.createAiCard=="function"&&typeof this.#e.updateAiCard=="function"&&typeof this.#e.finishAiCard=="function"&&(Q=pK({api:this.#e,clientId:this.#A,clientSecret:this.#t,target:_pe(t,i),signal:this.#o,logger:this.#c}),y=await Q.start(D(fpe)));let{answer:j,artifacts:F=[]}=await gi({harness:this.#r,state:this.#a,key:e,...d?{content:H}:{text:I},createOptions:{signal:this.#o},existsOptions:{signal:this.#o},askOptions:{timeoutMs:this.#s,signal:this.#o,control:{owner:this,key:e},onUpdate:y?U=>Q.push(Rpe(U)):void 0,onInteraction:U=>this.#S(U,{key:e,actor:i,sessionWebhook:g,requiresMention:String(t.conversationType)==="2"}),onInteractionResolved:U=>this.#_(U),files:c.files}});r&&(this.#u.complete(e,r.token),m=!0);let q=typeof j=="string"&&j.trim()?j:F.length>0?D("\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002"):j,J=null,x=null,P=!1;try{P=y&&await Q.finish(q),P?x=Vt({deliveryId:o,presentation:"dingtalk-card"}):x=Vt({deliveryId:o,presentation:"dingtalk-text",providerMessageIds:await this.#O(g,q)})}catch(U){J=wa(U)}let z=await this.#U(Tpe(t,i,this.#A),g,o,F,x);if(J&&!z.userVisible)throw J;return J&&z.artifactSendErrors===0&&At(this.#i,J),Ta(this.#i,"messagesReplied"),this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!J&&z.artifactSendErrors===0&&co(this.#i),z.receipt}catch(_){let T=null;if(!m&&r&&(_?.code==="turn-stopped"?this.#u.complete(e,r.token):T=this.#u.fail(e,r.token).message??null,m=!0),_?.code==="turn-stopped"){this.#y(s,"clear"),y&&await Q.finish(D("\u5DF2\u505C\u6B62\u3002")).catch(()=>{});return}if(this.#o?.aborted){this.#y(s,"clear");return}this.#y(s,"error"),this.#i.lastError=_?.message??String(_);let R=fo(_)??Spe(_),H=At(this.#i,_,{userMessage:R,reason:Fi(_)?.reason});this.#c.error?.(`[dsh-dingtalk] failed to process an inbound message [${H.referenceId}]`,Lf(_));try{let j=dt(H),F=T?`${j} -${T}`:J;y&&await Q.finish(L)||await this.#O(g,L)}catch{this.#c.error?.("[dsh-dingtalk] failed to send the safe error reply")}}finally{await this.#N(e),await this.#B.closeRoute(e)}}async#w(t,o,i,e,a,A){this.#o?.throwIfAborted();let r=this.#l.get(e),s=a.claimedReplyMessageId===o;if(!r||r!==a||r.submitting)return s&&(!r||r!==a)?this.#k(t,o):this.#Q(t,o,i,e,{releaseMessageId:!1,statusReaction:A});if(this.#a.hasSeen(o))return;if(await this.#a.markSeen(o),_a(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),String(t.conversationType)==="2"&&t.isInAtList!==!0){_a(this.#i,"messagesIgnored");return}let g;try{g=Fg(t.sessionWebhook)}catch{_a(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=D("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=t?.msgtype==="text"?St(t?.text?.content):null;if(!c){try{await this.#O(g,D("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"))}catch{this.#c.error?.("[dsh-dingtalk] failed to reject a non-text interaction reply")}return}let I=this.#l.get(e);if(!I||I!==a||I.submitting){if(s&&(!I||I!==a)){try{await this.#O(g,D(cM))}catch{this.#c.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}return}return this.#Q(t,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0,statusReaction:A})}if(I.sessionWebhook=g,I.needsPresentation){try{await this.#R(I)}catch{this.#y(A,"error"),this.#i.lastError=D("\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002"),this.#c.error?.("[dsh-dingtalk] failed to retry an interaction question"),I.interaction.reconnect?.()}return}let d=I.questions[I.index];if(d){if(I.answers.push(oi(d,c)),I.index+=1,I.indexthis.#O(e,c)})||t?.kind!=="question")return;let A=t?.payload?.questions,r=typeof t?.interactionId=="string"?t.interactionId:t?.rpcId;if(typeof t.rpcId!="string"||typeof r!="string"||typeof t.sessionId!="string"||!Array.isArray(A)||A.length===0||A.some(c=>!ai(c))){this.#c.warn?.("[dsh-dingtalk] ignored an invalid Harness question interaction");return}if(t.recovered===!0){await t.respond({ok:!1,error:{code:"cancelled",message:"DingTalk safely cancelled an interaction left by an earlier client.",details:{}}});try{await this.#O(e,D("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"))}catch{this.#c.error?.("[dsh-dingtalk] failed to send an interaction recovery notice")}return}let s=this.#l.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#R(s);return}if(this.#p.has(r))return;if(s){this.#c.warn?.("[dsh-dingtalk] cancelled a second pending Harness question"),await t.respond({ok:!1,error:{code:"cancelled",message:"DingTalk is already handling another user interaction.",details:{}}});return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:i,requiresMention:a,questions:A,answers:[],index:0,sessionWebhook:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0};this.#l.set(o,g),this.#p.set(g.interactionId,o),await this.#R(g)}async#_(t){if(await this.#B.handleResolved(t))return;let o=t?.interactionId;if(t?.kind!=="question"||typeof o!="string")return;let i=this.#p.get(o);i&&this.#v(i,o)}async#R(t){let o=t.questions[t.index];o&&(await this.#O(t.sessionWebhook,ii(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1)}async#k(t,o){if(this.#a.hasSeen(o))return;await this.#a.markSeen(o),_a(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let i;try{i=Fg(t.sessionWebhook)}catch{_a(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString();return}try{await this.#O(i,D(cM))}catch{this.#c.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}}#T(t,o){let i=this.#l.get(t);return!i||o!==void 0&&i.interactionId!==o?null:(this.#l.delete(t),this.#p.delete(i.interactionId),i)}#v(t,o){return this.#T(t,o)!==null}async#N(t){let o=this.#T(t);if(!(!o||o.kind!=="question"))try{await o.interaction.respond({ok:!1,error:{code:"cancelled",message:"The DingTalk interaction ended before the user answered.",details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(i){i?.code!=="interaction-not-pending"&&this.#c.warn?.("[dsh-dingtalk] failed to cancel a pending Harness interaction")}}#F(){typeof this.#a.pendingSenders=="function"&&(this.#i.pendingSenders=this.#a.pendingSenders())}async#O(t,o){let i=[];for(let e of HH(o,this.#n)){this.#o?.throwIfAborted();let a=await this.#e.sendText({clientId:this.#A,clientSecret:this.#t,sessionWebhook:t,text:e,signal:this.#o});i.push(...di(a))}return i}async#U(t,o,i,e,a){let A=async(s,g)=>xle(await this.#e[s]({clientId:this.#A,clientSecret:this.#t,target:t,file:g,signal:this.#o})),r=await fo({artifacts:e,baseReceipt:a,deliveryId:i,aggregatePresentation:a?"dingtalk-text-and-files":"dingtalk-files",channelKey:"dingtalk",signal:this.#o,sendImage:typeof this.#e.sendImage=="function"?s=>A("sendImage",s):void 0,sendFile:typeof this.#e.sendFile=="function"?s=>A("sendFile",s):void 0,onFailure:(s,g)=>At(this.#i,g,{userMessage:Xle(s?.fileName,g),reason:g?.code}),sendFailureNotice:(s,g,c)=>this.#O(o,dt(c)),logger:this.#c});return this.#i.artifactsSent=(this.#i.artifactsSent??0)+r.artifactsSent,this.#i.artifactSendErrors=(this.#i.artifactSendErrors??0)+r.artifactSendErrors,{receipt:r.receipt,userVisible:r.userVisible,artifactSendErrors:r.artifactSendErrors}}};function Mf(n){return typeof n=="string"&&n.trim()?n.trim():null}function Ax(n){let t=Array.isArray(n?.approvedSenders)?n.approvedSenders:n?.approvedSenders instanceof Set?[...n.approvedSenders]:[];return new Set(t.map(o=>Mf(typeof o=="string"?o:o?.staffId)).filter(Boolean))}function tpe(n){return Ax(n).size}function tx(n){return n?.connected===!0||n?.socket?.readyState===1}function rpe(n,t){return new Promise((o,i)=>{if(t.aborted){i(t.reason);return}let e=()=>i(t.reason);t.addEventListener("abort",e,{once:!0}),Promise.resolve(n).then(a=>{t.removeEventListener("abort",e),o(a)},a=>{t.removeEventListener("abort",e),i(a)})})}async function ape(n,t,o){for(;;){if(o?.throwIfAborted(),tx(n))return;await new Promise((i,e)=>{let a=setTimeout(()=>{o?.removeEventListener("abort",A),i()},t),A=()=>{clearTimeout(a),e(o.reason??new DOMException("Aborted","AbortError"))};o?.addEventListener("abort",A,{once:!0})})}}async function ipe(n,t,o,i){let e=AbortSignal.timeout(t),a=AbortSignal.any([i,e]),A=!1,r=Promise.resolve().then(()=>n.connect()).finally(()=>{A=!0});try{await rpe(r,a),await ape(n,o,a)}catch(s){throw a.aborted?(A||r.then(()=>n.disconnect()).catch(()=>{}),i.aborted?i.reason:new Error(`DingTalk Stream handshake timed out after ${t}ms`)):s}}async function ope({clientId:n,clientSecret:t}){let{DWClient:o,TOPIC_ROBOT:i}=await import("dingtalk-stream");return{client:new o({clientId:n,clientSecret:t,endpoint:"https://api.dingtalk.com",autoReconnect:!1,keepAlive:!0,debug:!1}),topic:i}}function npe({pendingSenders:n=[],approvedSenders:t=0}={}){return{startedAt:null,ready:!1,dingtalkStreamState:"idle",harnessReachable:!1,lastConnectedAt:null,lastCheckedAt:null,lastCallbackAt:null,authorizationMode:"sender-staff-id-approval",approvedSenderCount:t,...pM({pendingSenders:n})}}var tE=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n;#o;#g;#l=null;#p=null;#d=null;#h=null;#E=null;#B=null;#u=new Set;constructor({config:t,clientSecret:o,harness:i,state:e,logger:a=console,replyTimeoutMs:A=6e5,maxMessageChars:r=4e3,connectTimeoutMs:s=15e3,connectPollIntervalMs:g=25,api:c=KH(),streamFactory:I=ope}){if(!t||!Mf(t.clientId)||!Mf(o))throw new TypeError("DingtalkRuntime requires app credentials");if(!i||!e)throw new TypeError("DingtalkRuntime requires Harness and state");if(typeof I!="function")throw new TypeError("streamFactory must be a function");this.#e=t,this.#A=o.trim(),this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#s=s,this.#I=g,this.#n=c,this.#o=I,this.#g=npe({pendingSenders:this.#m(),approvedSenders:tpe(t)})}get status(){if(this.#p){let t=this.#p.status;Object.assign(this.#g,t)}else this.#g.pendingSenders=this.#m();return structuredClone(this.#g)}pendingSender(t){return typeof this.#r.pendingSender=="function"?this.#r.pendingSender(t):null}pendingSenders(){return this.#m()}async start(){return this.#l&&this.#g.ready?this.status:this.#h?this.#h:(this.#h=this.#f().finally(()=>{this.#h=null}),this.#h)}async#f(){await this.stop();let t=new AbortController;this.#B=t;let{signal:o}=t;this.#g.startedAt=new Date().toISOString(),this.#g.dingtalkStreamState="connecting",this.#g.lastError=null;try{if(await this.#t.ensureRunning({signal:o}),this.#g.harnessReachable=!0,typeof this.#r.removePendingSenderByStaffId=="function"){for(let A of Ax(this.#e))await this.#r.removePendingSenderByStaffId(A);this.#g.pendingSenders=this.#m()}this.#p=new bf({api:this.#n,clientId:this.#e.clientId,clientSecret:this.#A,approvedSenders:this.#e.approvedSenders,harness:this.#t,state:this.#r,status:this.#g,logger:this.#a,replyTimeoutMs:this.#i,maxMessageChars:this.#c,signal:o});let i=await this.#o({clientId:this.#e.clientId,clientSecret:this.#A});if(o.throwIfAborted(),this.#l=i?.client??i,this.#d=i?.topic??i?.TOPIC_ROBOT??"/v1.0/im/bot/messages/get",!this.#l||typeof this.#l.registerCallbackListener!="function"||typeof this.#l.connect!="function"||typeof this.#l.disconnect!="function"||typeof this.#l.socketCallBackResponse!="function")throw new TypeError("streamFactory returned an invalid DingTalk Stream client");let e=this.#l,a=this.#p;return e.registerCallbackListener(this.#d,A=>{if(this.#l!==e||this.#p!==a)return;let r=Mf(A?.headers?.messageId);if(r)try{e.socketCallBackResponse(r,{success:!0})}catch{this.#a.warn?.("[dsh-dingtalk] unable to acknowledge an inbound callback")}let s=Promise.resolve().then(async()=>{if(this.#p!==a)return;let g;try{g=typeof A?.data=="string"?JSON.parse(A.data):A?.data}catch{this.#g.lastError=D("\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002"),this.#a.warn?.("[dsh-dingtalk] ignored an invalid callback payload");return}!g||typeof g!="object"||(this.#g.lastCallbackAt=Date.now(),await a.accept(g))}).catch(()=>{o.aborted||this.#p!==a||(this.#g.lastError=D("\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002"),this.#a.error?.("[dsh-dingtalk] callback processing failed"))}).finally(()=>this.#u.delete(s));this.#u.add(s)}),await ipe(e,this.#s,this.#I,o),this.#g.ready=!0,this.#g.dingtalkStreamState="connected",this.#g.lastConnectedAt=Date.now(),this.#g.lastCheckedAt=Date.now(),this.#g.lastError=null,this.#E=setInterval(()=>{let A=tx(e);this.#g.ready=A,this.#g.dingtalkStreamState=A?"connected":"reconnecting",this.#g.lastCheckedAt=Date.now(),A&&(this.#g.lastError=null)},1e3),this.#E.unref?.(),this.status}catch(i){let e=o.aborted;throw this.#g.ready=!1,this.#g.dingtalkStreamState=e?"idle":"failed",this.#g.lastError=e?null:i?.message??String(i),await this.stop({preserveError:!e}),i}}async stop({preserveError:t=!1}={}){let o=t?this.#g.lastError:null,i=this.#B;this.#B=null,i?.abort(new DOMException("DingTalk runtime stopped","AbortError")),this.#E&&clearInterval(this.#E),this.#E=null,this.#g.ready=!1;let e=this.#l;if(this.#l=null,this.#d=null,e)try{await e.disconnect()}catch{this.#a.warn?.("[dsh-dingtalk] DingTalk Stream disconnect failed")}return await Promise.allSettled([...this.#u]),this.#u.clear(),this.#p&&await this.#p.waitForIdle(),this.#p=null,this.#g.dingtalkStreamState=t?"failed":"idle",this.#g.lastError=o,this.status}async sendConnectionTest(t){return Pg({state:this.#r,text:t,channelLabel:D("\u9489\u9489\u673A\u5668\u4EBA"),send:async({sessionWebhook:o},i)=>{if(!this.#g.ready||!this.#B)throw new Error("DingTalk runtime is not connected");await this.#n.sendText({clientId:this.#e.clientId,clientSecret:this.#A,sessionWebhook:o,text:i,signal:this.#B.signal})}})}#m(){return typeof this.#r.pendingSenders=="function"?this.#r.pendingSenders():[]}};import{spawn as Cpe}from"node:child_process";import{randomUUID as dM}from"node:crypto";import{isAbsolute as upe}from"node:path";import{isAbsolute as spe}from"node:path";var gpe=256,cpe=/[\p{White_Space}\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,Ipe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;function rE(n,t){let o=new Error(t);return o.code=n,o}function lpe(n){if(typeof n!="string"||!n||n.length>gpe||cpe.test(n))throw rE("session-id-invalid","A non-empty, safe session id is required");return n}function ppe(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds)||t.archivedSessionIds.some(i=>typeof i!="string"||!i))throw new Error("Harness returned an invalid response for workspace.list");let o=[];for(let i of t.items){if(typeof i?.workspaceId!="string"||!i.workspaceId||typeof i.path!="string"||!spe(i.path)||!Array.isArray(i.sessionIds)||i.sessionIds.some(e=>typeof e!="string"||!e))throw new Error("Harness returned an invalid response for workspace.list");for(let e of i.sessionIds)e===n&&o.push(i)}if(o.length===0)throw rE("session-not-registered","The session is not registered to a Harness workspace");if(o.length!==1)throw rE("session-workspace-ambiguous","The session is registered to more than one Harness workspace");if(Ipe.test(o[0].path))throw new Error("Harness returned an unsafe workspace path for the session");return{workspace:o[0],archived:t.archivedSessionIds.includes(n)}}function dpe(n,t){if(!Array.isArray(t?.items)||t.items.some(a=>typeof a?.sessionId!="string"||!a.sessionId))throw new Error("Harness returned an invalid response for session.list");let o=t.items.filter(a=>a.sessionId===n);if(o.length===0)throw rE("session-summary-unavailable","The session is no longer available from Harness");if(o.length!==1)throw new Error("Harness returned duplicate session summaries for session.list");let[i]=o;if(i.origin==="subagent")throw rE("session-subagent-unsupported","Subagent sessions cannot be adopted as a bot conversation");if(i.origin!==void 0)throw new Error("Harness returned an invalid session origin for session.list");let e=i.projections?.values?.title;if(e!=null&&typeof e!="string")throw new Error("Harness returned an invalid session title for session.list");return{title:typeof e=="string"?e:null}}async function rx(n,t,o={},i=3e4){let e=lpe(t);await n.ensureRunning(o);let a=await n.rpc("workspace.list",{},i,o),{workspace:A,archived:r}=ppe(e,a),s=dpe(e,await n.rpc("session.list",{},i,o)),g=await n.rpc("session.create",{workspaceId:A.workspaceId,sessionId:e},i,o);if(!g||g.sessionId!==e)throw new Error("Harness returned an invalid response for session.create");return{sessionId:e,workspace:A.path,title:s.title,archived:r}}function aE(n,t,o){try{let i=n?.(t);i&&typeof i.then=="function"&&Promise.resolve(i).catch(o)}catch(i){o(i)}}async function hpe({apiProxy:n,rpcId:t,signal:o,onOpen:i,onEnvelope:e}){let a=new AbortController,A=()=>a.abort(o.reason),r,s,g,c=I=>{a.signal.aborted||(g=I,A())};o.addEventListener("abort",A,{once:!0});try{for(r=n.events.mux({rpcId:t,payload:{}},a.signal)[Symbol.asyncIterator](),s=Promise.resolve(r.next()),a.signal.aborted||aE(i,A,c);!a.signal.aborted;){let{value:I,done:d}=await s;if(d||a.signal.aborted)break;aE(e,{type:"server-request",rpcId:I?.rpcId,method:I?.payload?.type,payload:I?.payload},c),a.signal.aborted||(s=Promise.resolve(r.next()))}}catch(I){c(I)}finally{let I=a.signal.aborted;o.removeEventListener("abort",A),A(),await s?.catch(()=>{});try{await r?.return?.()}catch(d){I||(g??=d)}}if(g)throw g}function Epe({baseUrl:n,createWebSocket:t,signal:o,onOpen:i,onEnvelope:e,onMalformed:a}){let A=new URL("/api/events.mux",n);return A.protocol=A.protocol==="https:"?"wss:":"ws:",new Promise((r,s)=>{let g=t(A.toString()),c=!1,I=!1,d=T=>{if(!I){I=!0,g.removeEventListener("open",f),g.removeEventListener("message",Q),g.removeEventListener("close",y),g.removeEventListener("error",m),o.removeEventListener("abort",_);try{(g.readyState===0||g.readyState===1)&&g.close()}catch{}T&&!o.aborted?s(T):r()}},B=()=>d(),f=()=>{I||c||(c=!0,aE(i,B,d))},Q=T=>{if(I)return;let G;try{if(typeof T.data!="string")throw new Error("binary WebSocket frame");G=JSON.parse(T.data)}catch(x){aE(a,x,()=>{});return}aE(e,G,d)},y=()=>d(c?void 0:new Error("Harness event mux WebSocket closed before opening")),m=()=>d(new Error(c?"Harness event mux WebSocket failed":"Harness event mux WebSocket failed before opening")),_=()=>d();g.addEventListener("open",f),g.addEventListener("message",Q),g.addEventListener("close",y,{once:!0}),g.addEventListener("error",m,{once:!0}),o.addEventListener("abort",_,{once:!0}),o.aborted&&_()})}async function ax(n){if(!n.signal.aborted)return n.baseUrl!==void 0&&n.baseUrl!==null?Epe(n):hpe(n)}var Bpe=new Map,fpe=new WeakMap,Qpe=64;async function ype(n){let t=n?.body;if(!t||typeof t.getReader!="function")return null;let o=t.getReader(),i=[],e=0;try{for(;;){let{done:r,value:s}=await o.read();if(r)break;if(!(s instanceof Uint8Array)||e+s.byteLength>Qpe)return null;i.push(s),e+=s.byteLength}}catch{return null}finally{try{await o.cancel()}catch{}}let a=new Uint8Array(e),A=0;for(let r of i)a.set(r,A),A+=r.byteLength;return new TextDecoder().decode(a)}function mpe(n){if(n==="localhost"||n==="[::1]")return!0;let t=n.split(".");return t.length===4&&t[0]==="127"&&t.every(o=>/^\d{1,3}$/.test(o)&&Number(o)<=255)}async function Spe(n,t){return n.status===401?"harness-auth-required":n.status===407?"harness-proxy-auth-required":n.status===403?(await ype(n))?.trim()!=="forbidden"?"harness-request-forbidden":mpe(t)?"harness-loopback-forbidden":"harness-host-untrusted":n.status===404?"harness-api-not-found":"harness-http-failed"}function Dpe(n){let t=typeof n=="string"?Bpe:fpe,o=t.get(n);return o||(o={ownerships:new Map,claims:new Map,controls:new WeakMap,nextOrder:0},t.set(n,o)),o}function ix(n,t){return new Promise((o,i)=>{let e=()=>t.removeEventListener("abort",a),a=()=>{e(),i(t.reason)};if(t.aborted){a();return}t.addEventListener("abort",a,{once:!0}),Promise.resolve().then(()=>(t.throwIfAborted(),n())).then(A=>{e(),o(A)},A=>{e(),i(A)})})}function ox(n){let t=typeof n?.owner;return t!=="object"&&t!=="function"||n.owner===null||typeof n.key!="string"||!n.key?null:{owner:n.owner,key:n.key}}function hM(n){return n!==null&&typeof n=="object"&&typeof n.provider=="string"&&!!n.provider&&typeof n.model=="string"&&!!n.model&&(n.reasoningEffort===void 0||typeof n.reasoningEffort=="string"&&!!n.reasoningEffort)}function wpe(n){return n!==null&&typeof n=="object"&&Array.isArray(n.efforts)&&n.efforts.length>0&&n.efforts.every(t=>t!==null&&typeof t=="object"&&typeof t.id=="string"&&!!t.id&&typeof t.name=="string"&&!!t.name&&(t.description===void 0||typeof t.description=="string"))&&(n.defaultEffort===void 0||typeof n.defaultEffort=="string"&&!!n.defaultEffort)}function nx(n,t,{session:o=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new Error(`Harness returned an invalid response for ${t}`);for(let i of n.groups){if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||!Array.isArray(i.models))throw new Error(`Harness returned an invalid response for ${t}`);for(let e of i.models)if(!e||typeof e!="object"||typeof e.id!="string"||!e.id||typeof e.name!="string"||!e.name||e.description!==void 0&&typeof e.description!="string"||e.reasoning!==void 0&&!wpe(e.reasoning))throw new Error(`Harness returned an invalid response for ${t}`)}for(let i of n.failures)if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||i.message!==void 0&&typeof i.message!="string")throw new Error(`Harness returned an invalid response for ${t}`);if(o&&(!hM(n.current)||typeof n.routable!="boolean"))throw new Error(`Harness returned an invalid response for ${t}`);return n}function sx(){let n=new Error("Harness turn was stopped before producing a text reply");return n.code="turn-stopped",n}function Ope(n){return Array.isArray(n?.items)?n.items.flatMap(t=>typeof t?.path=="string"&&upe(t.path)?[t.path]:[]):[]}function bpe(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds))throw new Error("Harness returned an invalid response for workspace.list");let o=t.items.find(i=>i?.path===n);if(!o)return null;if(!Array.isArray(o.sessionIds)||o.sessionIds.some(i=>typeof i!="string"))throw new Error("Harness returned invalid session IDs for workspace.list");return o}function Mpe(n){if(typeof n=="number"&&Number.isFinite(n))return n<1e12?n*1e3:n;if(typeof n=="string"&&n){let t=Date.parse(n);if(!Number.isNaN(t))return t}return null}function _pe(n){if(!n||typeof n!="object")return null;let t=[n?.header?.lastActivityAt,n?.header?.updatedAt,n?.header?.createdAt,n?.projections?.values?.lastActivityAt,n?.projections?.values?.updatedAt,n?.projections?.values?.createdAt,n?.lastActivityAt,n?.updatedAt,n?.createdAt];for(let o of t){let i=Mpe(o);if(i!==null)return i}return null}function Tpe(n,t,o){if(!Array.isArray(o?.items))throw new Error("Harness returned an invalid response for session.list");let i=new Set(t),e=new Map(o.items.flatMap(a=>typeof a?.sessionId=="string"?[[a.sessionId,a]]:[]));return{workspace:n.path,sessions:n.sessionIds.map(a=>{let A=e.get(a),r=A?.projections?.values?.title,s={sessionId:a,title:typeof r=="string"?r:null,archived:i.has(a),blank:A?.blank===!0,origin:A?.origin==="subagent"?"subagent":null,summaryAvailable:A!==void 0},g=A?.projections?.asOfSeq;Number.isSafeInteger(g)&&g>=-1&&(s.lastSeq=g);let c=_pe(A);return c!==null&&(s.time=c),s})}}function iE(n,t){return new Promise((o,i)=>{if(t?.aborted){i(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(()=>{t?.removeEventListener("abort",a),o()},n),a=()=>{clearTimeout(e),i(t.reason??new DOMException("Aborted","AbortError"))};t?.addEventListener("abort",a,{once:!0})})}function Npe(n){return(n?.data?.message?.content??[]).filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` -`).trim()}function hi(n){return typeof n=="string"&&n.trim()?n.trim():null}function Rpe(n){if(!n||typeof n!="object")return null;let t=hi(n.message);if(t)return t;let o=hi(n.name),i=hi(n.code);return o||i?[o??"Error",i].filter(Boolean).join(": "):null}function kpe(n,t){let o=[...t].map(i=>i?.event??i).filter(Boolean).sort((i,e)=>(i.seq??-1)-(e.seq??-1));for(let i of o){let e=i.seq??-1;if(e<=n.lastSeq)continue;if(n.lastSeq=e,i.type==="turn/start"){let A=i.data?.turn??null;n.active&&A!==n.turn&&(n.active=!1),n.turn!==null&&A!==n.turn&&(n.completed=!0),n.openTurn=A;continue}if(i.type==="user/message"&&i.data?.source?.rpcId===n.promptRpcId){n.active=!0,n.started=!0,n.completed=!1,n.turn=i.data?.turn??n.openTurn;continue}if(i.type==="turn/end"&&i.data?.turn===n.turn){n.active=!1,n.completed=!0;continue}let a=null;if(i.type==="tool/call"&&n.active&&i.data?.turn===n.turn&&typeof i.data?.callId=="string"&&i.data.callId)a={callId:i.data.callId,name:i.data?.name,arguments:i.data?.arguments};else if(i.type==="tool/code-dispatch-start"&&n.active&&typeof i.data?.subCallId=="string"&&i.data.subCallId){let A;try{A=JSON.stringify(i.data?.arguments)}catch{A=void 0}a={callId:i.data.subCallId,name:i.data?.name,arguments:A}}a&&n.toolCalls.set(a.callId,Object.freeze(a))}}var Vl=class{#e;#A;#t=null;#r=null;#a=new Map;#i="";#c=!1;#s=null;#I=new Map;#n=null;constructor({promptRpcId:t,afterSeq:o=-1}){this.#e=t,this.#A=o}get finished(){return this.#c}get answer(){return this.#i.trim()}get reason(){return this.#s}get tracking(){return this.#r!==null&&!this.#c}get turn(){return this.#r}consumeAll(t){let o=[],i=a=>{if(a.type==="text"&&o.length>0&&o[o.length-1].type==="text"){o[o.length-1]=a;return}o.push(a)},e=[...t].map(a=>a?.event??a).filter(Boolean).sort((a,A)=>(a.seq??-1)-(A.seq??-1));for(let a of e){let A=a.seq??-1;if(!(A<=this.#A)){if(this.#A=A,a.type==="turn/start"&&(this.#t=a.data?.turn??null),a.type==="user/message"&&a.data?.source?.rpcId===this.#e){this.#r=this.#t;continue}if(this.#r!==null){if(a.type==="turn/end"){if(a.data?.turn!==this.#r)continue;this.#c=!0,this.#s=a.data?.reason??null,this.#t=null;continue}if(a.data?.turn===this.#r){if(a.type==="assistant/chunk"&&a.data?.chunk?.type==="text-delta"){let r=a.data?.step??0,s=a.data.chunk.index??0,g=`${r}:${s}`;this.#a.set(g,(this.#a.get(g)??"")+a.data.chunk.text);let c=`${r}:`,I=[...this.#a.entries()].filter(([d])=>d.startsWith(c)).sort(([d],[B])=>Number(d.split(":")[1])-Number(B.split(":")[1])).map(([,d])=>d).join(` -`).trim();I&&I!==this.#i&&(this.#i=I,i({type:"text",text:I}));continue}if(a.type==="assistant/message"){let r=Npe(a);r&&r!==this.#i&&(this.#i=r,i({type:"text",text:r}));continue}if(a.type==="tool/call"){let r=hi(a.data?.name)??D("\u5DE5\u5177"),s=hi(a.data?.callId)??hi(a.data?.subCallId);s&&this.#I.set(s,r),this.#n=r,i({type:"tool",name:r,...s?{callId:s}:{}})}else if(a.type==="tool/result"){let r=hi(a.data?.message?.source?.callId)??hi(a.data?.callId)??hi(a.data?.subCallId),s=(r?this.#I.get(r):null)??this.#n,g=Rpe(a.data?.error);i({type:"status",text:D("\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026"),...s?{toolName:s}:{},...g?{error:g}:{}})}}}}}return o}consume(t){return this.consumeAll(t).at(-1)??null}},An=class extends Error{constructor(t,o){super(`${t}: ${o?.message??"unknown Harness RPC error"}`),this.name="HarnessRpcError",this.method=t,this.code=o?.code??"internal",this.details=o?.details??{}}},Gn=class extends Error{constructor(t,o,{cause:i,status:e}={}){let a=Number.isInteger(e)?`, HTTP ${e}`:"";super(`Harness ${o} transport failed (${t}${a})`,{cause:i}),this.name="HarnessTransportError",this.code=t,this.method=o,Number.isInteger(e)&&(this.status=e)}},EM=class extends Error{constructor(t){super("Harness health RPC was rejected",{cause:t}),this.name="HarnessHealthError",this.code="harness-rpc-rejected",this.method="host.describe"}},Wl=class extends Error{constructor(t,o){super(o),this.name="HarnessInteractionError",this.code=t}},Fn=class extends Error{constructor(t,{reason:o,providerCode:i}={}){super(`Harness turn failed (${t})`),this.name="HarnessTurnError",this.code=t,this.promptAccepted=!0,o&&typeof o=="object"&&(this.reason=o),typeof i=="string"&&i&&(this.providerCode=i)}};function gx(n){let t=hi(n?.kind)??hi(n);if(t==="error"){let o=n?.error??n?.failure;return new Fn("harness-turn-failed",{reason:n,providerCode:hi(o?.code)??void 0})}return t==="max-tokens"?new Fn("model-max-tokens",{reason:n}):t==="blocked"?new Fn("turn-blocked",{reason:n}):["interrupted","stopped","cancelled","canceled"].includes(t)?new Fn("turn-interrupted",{reason:n}):t==="aborted"?new Fn("turn-aborted",{reason:n}):t==="completed"?new Fn("model-empty-response",{reason:n}):new Fn("harness-turn-failed",{reason:n})}function vpe(n){return n==null?!0:(hi(n?.kind)??hi(n))==="completed"}var lr=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n;#o;#g;#l;#p;#d;#h=null;#E;#B;#u;#f;constructor({baseUrl:t,apiProxy:o,interactionScope:i=o,workspace:e,agentPreset:a,autostart:A=!1,dshBin:r="dsh",fetchImpl:s=fetch,createWebSocket:g=m=>new WebSocket(m),interactionReconnectDelayMs:c=500,rpcIdPrefix:I="im",logPrefix:d="dsh-im",commandExecutor:B,controlExecutor:f,sessionMaintenanceExecutor:Q,fileIngressExecutor:y}){if(typeof g!="function")throw new TypeError("createWebSocket must be a function");if(!Number.isFinite(c)||c<0)throw new TypeError("interactionReconnectDelayMs must be a non-negative number");if(typeof I!="string"||!I.trim())throw new TypeError("rpcIdPrefix must be a non-empty string");if(typeof d!="string"||!d.trim())throw new TypeError("logPrefix must be a non-empty string");if(B!==void 0&&typeof B!="function")throw new TypeError("commandExecutor must be a function");if(f!==void 0&&typeof f!="function")throw new TypeError("controlExecutor must be a function");if(Q!==void 0&&typeof Q!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");if(y!==void 0&&typeof y!="function")throw new TypeError("fileIngressExecutor must be a function");if(this.#e=t===void 0?null:new URL(t),this.#A=this.#e?null:o,!this.#e&&(!this.#A||typeof this.#A!="object"))throw new TypeError("HarnessClient requires the current Host apiProxy or an explicit baseUrl");if(this.#A&&(!i||!["object","function"].includes(typeof i)))throw new TypeError("interactionScope must identify the current Host");this.#t=e,this.#r=a??void 0,this.#a=!!(this.#e&&A),this.#i=r,this.#c=s,this.#s=g,this.#I=c,this.#n=I.trim(),this.#o=d.trim(),this.#g=B,this.#l=f,this.#p=Q,this.#d=y,this.#E=Dpe(this.#e?.origin??i),this.#B=this.#E.ownerships,this.#u=this.#E.claims,this.#f=this.#E.controls}async rpc(t,o={},i=3e4,e={}){let a=e.rpcId??`${this.#n}-${dM()}`,A=AbortSignal.timeout(i),r=e.signal?AbortSignal.any([e.signal,A]):A,s;try{if(this.#A){let[g,c,I]=t.split("."),d={host:"host",workspace:"workspace",session:"sessions",llm:"llm"}[g],B=d&&this.#A[d];if(I!==void 0||!Object.hasOwn(B??{},c)||typeof B[c]!="function")throw new Gn("harness-api-not-found",t);s={type:"server-response",...await ix(()=>B[c]({rpcId:a,payload:o},r),r)}}else{let g=await this.#c(new URL(`/api/${t}`,this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({type:"client-request",rpcId:a,method:t,payload:o}),signal:r});if(!g.ok){let c=await Spe(g,this.#e.hostname);throw new Gn(c,t,{status:g.status})}try{s=await g.json()}catch(c){throw new Gn("harness-response-invalid",t,{cause:c})}}}catch(g){throw e.signal?.aborted||g instanceof Gn?g:new Gn(A.aborted?"harness-timeout":"harness-connect-failed",t,{cause:g})}if(s?.type!=="server-response"||s?.rpcId!==a)throw new Gn("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid response for ${t}`)});if(!s.result||typeof s.result!="object"||typeof s.result.ok!="boolean")throw new Gn("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid result for ${t}`)});if(!s.result?.ok)throw new An(t,s.result?.error);return s.result.value}async health(t={}){try{return await this.rpc("host.describe",{},5e3,t),!0}catch(o){throw o instanceof An?new EM(o):o}}async ensureRunning(t={}){try{return await this.health(t)}catch(e){if(!this.#a)throw e}if(!this.#h||this.#h.exitCode!==null){let e=this.#e.port||(this.#e.protocol==="https:"?"443":"80");this.#h=Cpe(this.#i,["web","--host",this.#e.hostname,"--port",e],{cwd:this.#t,env:process.env,stdio:["ignore","inherit","inherit"]}),this.#h.on("error",a=>{console.error(`[${this.#o}] failed to start Harness:`,a.message)})}let o=Date.now()+6e4,i;for(;Date.now(){let r=A&&i.signal?AbortSignal.any([A,i.signal]):A??i.signal;return this.rpc("session.selectModel",{sessionId:t,provider:o.provider,model:o.model,...o.reasoningEffort===void 0?{}:{reasoningEffort:o.reasoningEffort}},3e4,r?{...i,signal:r}:i)},a=this.#p?await this.#p({sessionId:t,operation:e}):await e();if(!a||typeof a!="object"||!hM(a.selected))throw new Error("Harness returned an invalid response for session.selectModel");return a}async isSessionRunning(t,o={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");await this.ensureRunning(o);let i=await this.rpc("session.list",{},3e4,o);if(!i||typeof i!="object"||!Array.isArray(i.items))throw new Error("Harness returned an invalid response for session.list");for(let e of i.items)if(!e||typeof e!="object"||typeof e.sessionId!="string"||!e.sessionId||typeof e.running!="boolean")throw new Error("Harness returned an invalid response for session.list");return i.items.find(e=>e.sessionId===t)?.running??!1}async adoptWorkspaceSession(t,o={}){return rx(this,t,o)}async workspaceId(t={}){let{workspace:o=this.#t,...i}=t,{items:e}=await this.rpc("workspace.list",{},3e4,i),a=e.find(r=>r.path===o);return a?a.workspaceId:(await this.rpc("workspace.create",{path:o},3e4,i)).workspace.workspaceId}async createSession(t={}){let{agentPreset:o,...i}=t;await this.ensureRunning(i);let a={workspaceId:await this.workspaceId(i)},A=o!==void 0?o:this.#r;return A!=null&&(a.agentPreset=A),(await this.rpc("session.create",a,3e4,i)).sessionId}async executeCommand(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o)throw new TypeError("command line is required");if(!this.#g){let e=new Error("Harness command execution is unavailable");throw e.code="commands-unavailable",e}try{return await this.#g(t,o,i)}catch(e){throw e?.failure&&typeof e.failure=="object"?new An("commands.execute",e.failure):e}}async readSessionHistory(t,{maxMessages:o=50,beforeSeq:i,timeoutMs:e=1e4,...a}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!Number.isSafeInteger(o)||o<1||i!==void 0&&(!Number.isSafeInteger(i)||i<0))throw new TypeError("Invalid history pagination");return this.rpc("session.history",{sessionId:t,maxMessages:o,...i===void 0?{}:{beforeSeq:i}},e,a)}async sessionExists(t,o={}){try{return await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,o),!0}catch(i){if(i instanceof An&&i.code==="session-not-found")return!1;throw i}}async respondInteraction(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("rpcId is required");if(!o||typeof o!="object"||typeof o.ok!="boolean")throw new TypeError("A Harness RPC result is required");let e=AbortSignal.timeout(i.timeoutMs??3e4),a=i.signal?AbortSignal.any([i.signal,e]):e,A={type:"client-response",rpcId:t,result:o},r;if(this.#A)r=await ix(()=>this.#A.respond(A),a);else{let g=await this.#c(new URL("/api/respond",this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(A),signal:a});if(!g.ok)throw new Error(`Harness transport respond failed: HTTP ${g.status}`);r=await g.json()}if(r?.accepted===!0)return r;if(r?.accepted!==!1||r.reason!=="bad-response"&&r.reason!=="not-pending")throw new Error("Harness returned an invalid interaction response receipt");let s=r.reason;throw new Wl(`interaction-${s}`,`Harness interaction response was rejected (${s})`)}async watchInteractions(t,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!o||typeof o.addEventListener!="function")throw new TypeError("watchInteractions requires an AbortSignal");if(i!==void 0&&typeof i!="function")throw new TypeError("onInteraction must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("onResolved must be a function");if(a!==void 0&&typeof a!="function")throw new TypeError("onOpen must be a function");for(;!o.aborted;){try{await this.#k(t,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A})}catch(r){if(o.aborted)return;console.warn(`[${this.#o}] Harness interaction stream disconnected:`,r.message)}if(o.aborted)return;try{await iE(this.#I,o)}catch{if(o.aborted)return;throw new Error("Harness interaction reconnect wait failed")}}}#m(t,o){let i=this.#B.get(t)??new Set;o.order=this.#E.nextOrder,this.#E.nextOrder+=1,i.add(o),this.#B.set(t,i)}#y(t,o){let i=this.#B.get(t);i?.delete(o),i?.size===0&&this.#B.delete(t);for(let[e,a]of this.#u)a.ownership===o&&this.#u.delete(e)}#Q(t){if(!t.control)return;let o=this.#f.get(t.control.owner);o||(o=new Map,this.#f.set(t.control.owner,o));let i=o.get(t.control.key)??new Set;i.add(t),o.set(t.control.key,i)}#C(t){if(!t.control)return;let o=this.#f.get(t.control.owner),i=o?.get(t.control.key);i?.delete(t),i?.size===0&&o.delete(t.control.key),o?.size===0&&this.#f.delete(t.control.owner)}#M(t,o){let i=ox(o);return i?[...this.#f.get(i.owner)?.get(i.key)??[]].filter(a=>a.sessionId===t).sort((a,A)=>a.order-A.order):[]}#b(t,o){return this.#M(t,o).find(i=>i.started&&i.active&&!i.completed&&i.turn!==null)??null}async#w(t,o,i){let e=this.#M(t,o);if(e.length===0)return null;try{let a=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,i);this.#S(t,a.events??[])}catch(a){if(!(a instanceof An)||a.code!=="session-not-found")throw a;for(let A of e)A.active=!1,A.completed=!0;return null}return this.#b(t,o)}async hasActiveTurn(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");return!!await this.#w(t,o,i)}async stopActiveTurn(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");let e=await this.#w(t,o,i);if(!e)return!1;if(e.stopRequested)return!0;if(this.#b(t,o)!==e)return!1;e.stopRequested=!0;try{if(this.#l){let a=this.#l({sessionId:t,expectedTurn:e.turn,promptRpcId:e.promptRpcId,action:"stop"});if(a&&typeof a.then=="function")throw new TypeError("controlExecutor must return synchronously");if(a!==void 0){if(typeof a!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return a||(e.stopRequested=!1),a}}return await this.rpc("session.cancel",{sessionId:t,keepInbox:!0},3e4,i),!0}catch(a){if(this.#b(t,o)===e&&(e.stopRequested=!1),a instanceof An&&a.code==="session-not-found")return!1;throw a}}async steerActiveTurn(t,o,i,e={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("Steering text is required");let a=await this.#w(t,i,e);if(!a||a.stopRequested||this.#b(t,i)!==a)return!1;if(this.#l){let A=this.#l({sessionId:t,expectedTurn:a.turn,promptRpcId:a.promptRpcId,action:"steer",text:o});if(A&&typeof A.then=="function")throw new TypeError("controlExecutor must return synchronously");if(A!==void 0){if(typeof A!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return A}}return await this.rpc("session.prompt",{sessionId:t,mode:"steer",content:[{type:"text",text:o}],clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,e),!0}#S(t,o){for(let i of this.#B.get(t)??[])kpe(i,o)}async#_(t,o){let i=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:o});this.#S(t,i.events??[])}#R(t,o,i){let e=this.#u.get(o);if(e&&this.#B.get(t)?.has(e.ownership))return e;let a=[...this.#B.get(t)??[]],A=a.filter(s=>s.active).sort((s,g)=>s.order-g.order);if(A.length>0)return{ownership:A[0],recovered:!1};let r=a.filter(s=>!s.started&&!s.completed).sort((s,g)=>s.order-g.order)[0]??null;return r?{ownership:r,recovered:!0}:null}async ask(t,o,i={}){typeof i=="number"&&(i={timeoutMs:i});let e=i.timeoutMs??6e5,a=i.signal,A=typeof i.onUpdate=="function"?i.onUpdate:null,r=i.progressMode==="all"?"all":"latest",s=typeof i.onArtifact=="function"?i.onArtifact:null,g=typeof i.onInteraction=="function"?i.onInteraction:void 0,c=typeof i.onInteractionResolved=="function"?i.onInteractionResolved:void 0,I=ox(i.control),d=Array.isArray(i.files)?i.files.filter(Boolean):[];await this.ensureRunning({signal:a});let B=await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,{signal:a}),f=Math.max(-1,...(B.events??[]).map(({event:W})=>W.seq??-1)),Q=`${this.#n}-${dM()}`,y=new Vl({promptRpcId:Q,afterSeq:f}),m=g||c?new AbortController:null,_=m?a?AbortSignal.any([a,m.signal]):m.signal:null,T=m||I?{sessionId:t,promptRpcId:Q,active:!1,started:!1,completed:!1,stopRequested:!1,turn:null,openTurn:null,lastSeq:f,reconnect:null,order:-1,toolCalls:new Map,control:I}:null,G=null,x=!1,J=0,L=null,q=!1,j=!1,K=async()=>{if(!s||x||y.turn===null)return J;x=!0;let W=rI.take(t,y.turn,{signal:a});for(let Y of W)try{await s(Y),J+=1}catch(N){rI.release(Y),console.warn(`[${this.#o}] ignored an artifact handoff failure:`,N.message)}return J};T&&(this.#m(t,T),this.#Q(T));let v=rI.openConsumer(t,Q);try{if(d.length>0){if(!this.#d)throw new uo("inbound-file-ingress-unavailable","Harness file ingress is unavailable in this Host process.");let N=(await this.rpc("session.list",{},3e4,{signal:a}))?.items?.find(P=>P?.sessionId===t)?.cwd;L=await this.#d({sessionId:t,workspace:N,files:d,signal:a}),o=FK(o,L)}if(_){let Y,N=new Promise(P=>{Y=P});G=this.watchInteractions(t,{signal:_,onInteraction:g,onResolved:c,onOpen:Y,ownership:T}),G.catch(()=>{}),await Promise.race([N,iE(3e4,_).then(()=>{throw new Error("Harness interaction stream did not open within 30 seconds")})])}let W=typeof o=="string"?[{type:"text",text:o}]:o;if(!Array.isArray(W)||W.length===0)throw new TypeError("Harness prompt content is required");await this.rpc("session.prompt",{sessionId:t,mode:"queue",content:W,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,{rpcId:Q,signal:a}),q=!0;try{let Y=Date.now()+e;for(;Date.now()0)return"";throw T?.stopRequested?sx():gx(y.reason)}throw new Fn("harness-reply-timeout")}catch(Y){if(!T?.stopRequested)throw Y;if(y.answer)return y.answer;throw Y?.code==="turn-stopped"?Y:sx()}}finally{L&&(!q||j)&&await L.cleanup().catch(W=>{console.warn(`[${this.#o}] unable to clean inbound files:`,W.message)}),v(),T&&(this.#C(T),this.#y(t,T)),y.turn!==null&&rI.discard(t,y.turn),m?.abort(new DOMException("Harness turn finished","AbortError")),G&&await G.catch(()=>{})}}async#k(t,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A}){let r=!1,s=null,g=Promise.resolve(),c=A==null,I=[],d=()=>{},B=m=>{d=m,A&&(A.reconnect=d);try{a?.()}catch(_){console.warn(`[${this.#o}] ignored an interaction open callback failure:`,_.message)}A&&this.#_(t,o).then(()=>{if(!r){c=!0;for(let _ of I.splice(0))Q(_)}}).catch(_=>{s??=_,d()})},f=(m,_)=>{m&&(g=g.then(()=>m(_)).catch(T=>{s??=T,d()}))},Q=m=>{let _=m.payload;if(A&&_.type==="session/event"){this.#S(t,[_.event]);return}if(_.type==="question/requested"||_.type==="approval/requested"){let T=_.type==="question/requested"?"question":"approval",G=T==="question"?m.rpcId:_.approvalId,x=`${T}:${G}`;if(A){let L=this.#R(t,x,T);if(L?.ownership!==A)return;this.#u.set(x,L)}let J=T==="approval"&&A&&typeof _.callId=="string"?this.#u.get(x)?.ownership.toolCalls.get(_.callId):void 0;f(i,Object.freeze({kind:T,interactionId:G,rpcId:m.rpcId,sessionId:t,payload:_,recovered:A?this.#u.get(x)?.recovered===!0:!1,...J?{toolCall:J}:{},reconnect:d,respond:(L,q={})=>this.respondInteraction(m.rpcId,L,{...q,signal:q.signal??o})}));return}if(_.type==="question/resolved"||_.type==="approval/resolved"){let T=_.type==="question/resolved"?"question":"approval",G=T==="question"?_.questionRpcId:_.approvalId,x=`${T}:${G}`;if(A){if(this.#u.get(x)?.ownership!==A)return;this.#u.delete(x)}f(e,Object.freeze({kind:T,interactionId:G,sessionId:t,outcome:_.outcome,payload:_}))}},y=m=>{try{let _=m?.payload;if(m?.type!=="server-request"||typeof m.rpcId!="string"||!_||typeof _!="object"||m.method!==_.type)throw new Error("invalid server-request envelope");if(_.sessionId!==t)return;c?Q(m):I.push(m)}catch(_){console.warn(`[${this.#o}] ignored a malformed Harness interaction frame:`,_.message)}};try{await this.#T({signal:o,onOpen:B,onEnvelope:y})}finally{r=!0,A?.reconnect===d&&(A.reconnect=null),o.aborted||await g}if(!o.aborted&&s)throw s}async watchHarnessEvents({signal:t,onSessionEvent:o,onReconnect:i}={}){if(typeof o!="function")throw new TypeError("watchHarnessEvents requires onSessionEvent");if(!t||typeof t.addEventListener!="function")throw new TypeError("watchHarnessEvents requires an AbortSignal");if(i!==void 0&&typeof i!="function")throw new TypeError("onReconnect must be a function");for(;!t.aborted;){try{await this.#T({signal:t,onOpen:()=>{try{i?.()}catch(e){console.warn(`[${this.#o}] mux reconnect hook failed:`,e.message)}},onEnvelope:e=>{try{let a=e?.payload;if(e?.type!=="server-request"||!a||typeof a!="object"||e.method!==a.type||a.type!=="session/event"||typeof a.sessionId!="string"||!a.event||typeof a.event!="object")return;o({sessionId:a.sessionId,event:a.event})}catch(a){console.warn(`[${this.#o}] ignored a malformed global mux frame:`,a.message)}}})}catch(e){if(t.aborted)return;console.warn(`[${this.#o}] Harness event mux disconnected:`,e.message)}if(t.aborted)return;try{await iE(this.#I,t)}catch{if(t.aborted)return;throw new Error("Harness event mux reconnect wait failed")}}}#T(t){return ax({apiProxy:this.#A,baseUrl:this.#e,createWebSocket:this.#s,rpcId:`${this.#n}-${dM()}`,...t,onMalformed:o=>{console.warn(`[${this.#o}] ignored a malformed Harness mux frame:`,o.message)}})}stopManagedProcess(){this.#h?.exitCode===null&&this.#h.kill("SIGTERM")}};var _f=class extends lr{constructor(t){super({...t,rpcIdPrefix:"dingtalk",logPrefix:"dsh-dingtalk"})}};import{randomUUID as Ppe}from"node:crypto";import{mkdir as Gpe,readFile as Fpe,rename as Lpe,unlink as Upe,writeFile as Hpe}from"node:fs/promises";import{dirname as Kpe}from"node:path";var Tf=Object.freeze({version:1,sessions:{},seenMessageIds:[],pendingSenders:{}});function pr(n){return typeof n=="string"&&n.trim()?n.trim():null}function cx(n){return(pr(n)??D("\u9489\u9489\u7528\u6237")).slice(0,100)}function xpe(n,t){if(!n||typeof n!="object")return null;let o=pr(n.requestId)??pr(t),i=pr(n.staffId),e=pr(n.requestedAt)??pr(n.lastSeenAt),a=pr(n.lastSeenAt)??e;return!o||!i||!e||!a?null:{requestId:o,staffId:i,displayName:cx(n.displayName??n.nick),requestedAt:e,lastSeenAt:a}}function Ype(n){if(!n||typeof n!="object")return structuredClone(Tf);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[e,a]of Object.entries(n.sessions)){let A=pr(e),r=pr(a);A&&r&&(t[A]=r)}let o={},i=Array.isArray(n.pendingSenders)?n.pendingSenders.map(e=>[e?.requestId,e]):Object.entries(n.pendingSenders&&typeof n.pendingSenders=="object"?n.pendingSenders:{});for(let[e,a]of i){let A=xpe(a,e);if(!A)continue;let r=Object.values(o).find(s=>s.staffId===A.staffId);(!r||r.lastSeenAtnew Date().toISOString()}={}){if(!pr(t))throw new TypeError("state path is required");if(typeof o!="function"||typeof i!="function")throw new TypeError("idFactory and now must be functions");this.#e=t,this.#r=o,this.#a=i}async load(){try{this.#A=Ype(JSON.parse(await Fpe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(Tf),await this.#i()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){let i=pr(t),e=pr(o);if(!i||!e)throw new TypeError("key and sessionId are required");this.#A.sessions[i]=e,await this.#i()}async clearSession(t){let o=pr(t);!o||!(o in this.#A.sessions)||(delete this.#A.sessions[o],await this.#i())}async clearSessions(){this.#A.sessions={},await this.#i()}hasSeen(t){let o=pr(t);return!!(o&&this.#A.seenMessageIds.includes(o))}async markSeen(t){let o=pr(t);if(!o)throw new TypeError("messageId is required");this.hasSeen(o)||(this.#A.seenMessageIds.push(o),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#i())}pendingSenders(){return Object.values(this.#A.pendingSenders).sort((t,o)=>t.requestedAt.localeCompare(o.requestedAt)).map(t=>structuredClone(t))}pendingSender(t){let o=pr(t),i=o?this.#A.pendingSenders[o]:null;return i?structuredClone(i):null}async recordPendingSender(t,o,i){let e=t&&typeof t=="object"?t:{staffId:t,displayName:o,lastSeenAt:i},a=pr(e.staffId);if(!a)throw new TypeError("staffId is required");let A=pr(e.lastSeenAt)??pr(e.requestedAt)??this.#a(),r=Object.values(this.#A.pendingSenders).find(g=>g.staffId===a),s={requestId:r?.requestId??`ding_sender_${this.#r()}`,staffId:a,displayName:cx(e.displayName??e.nick??o),requestedAt:r?.requestedAt??A,lastSeenAt:A};return this.#A.pendingSenders[s.requestId]=s,await this.#i(),structuredClone(s)}async removePendingSender(t){let o=pr(t);return!o||!this.#A.pendingSenders[o]?!1:(delete this.#A.pendingSenders[o],await this.#i(),!0)}async removePendingSenderByStaffId(t){let o=pr(t),i=o?Object.values(this.#A.pendingSenders).find(e=>e.staffId===o):null;return i?this.removePendingSender(i.requestId):!1}snapshot(){return structuredClone(this.#A)}async remove(){await this.#t;try{await Upe(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(Tf)}async#i(){let t=`${JSON.stringify(this.#A,null,2)} -`,o=this.#t.then(async()=>{await Gpe(Kpe(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await Hpe(i,t,{encoding:"utf8",mode:384}),await Lpe(i,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};import{mkdir as jpe,readFile as Jpe,realpath as qpe,rename as zpe,stat as Vpe,unlink as Wpe,writeFile as Zpe}from"node:fs/promises";import{dirname as Xpe,isAbsolute as px,resolve as oE}from"node:path";var Z5e=Object.freeze({version:1,workspaces:Object.freeze({})});function aI(n){let t=new Error(n);return t.code=ba,t}async function CM(n){return oE(await qpe(n))}async function $pe(n,t){if(n===t)return!0;try{return await CM(n)===await CM(t)}catch{return!1}}function Ei(n){if(typeof n!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n))throw new TypeError("Invalid bot id");return n}function ede(n){if(!n||n.version!==1||!n.workspaces||typeof n.workspaces!="object"||Array.isArray(n.workspaces))return null;let t={};for(let[i,e]of Object.entries(n.workspaces)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(i)||typeof e!="string"||!px(e))return null;t[i]=oE(e)}let o={};if(n.agentPresets!==void 0){if(!n.agentPresets||typeof n.agentPresets!="object"||Array.isArray(n.agentPresets))return null;for(let[i,e]of Object.entries(n.agentPresets)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(i))return null;try{let a=Jl(e);if(!a)return null;o[i]=a}catch{return null}}}return{version:1,workspaces:t,agentPresets:o}}async function Ix(n){if(typeof n!="string"||!n.trim()||!px(n.trim())){let i=new Error("\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002");throw i.code="workspace-not-absolute",i}let t=oE(n.trim()),o;try{o=await Vpe(t)}catch(i){let e=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002",{cause:i});throw e.code="workspace-not-found",e}if(!o.isDirectory()){let i=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002");throw i.code="workspace-not-directory",i}return t}var Zr=class{#e;#A;#t={};#r={};#a=new Map;#i=1;#c=new Map;#s=1;#I=new Map;#n=new WeakMap;#o=new Set;#g=Promise.resolve();#l=new Map;constructor(t,{defaultWorkspace:o=process.cwd()}={}){if(typeof t!="string"||!t)throw new TypeError("workspace store path is required");this.#e=t,this.#A=oE(o)}async load(){try{let t=ede(JSON.parse(await Jpe(this.#e,"utf8")));if(!t)throw new Error("dsh-im workspace config is invalid");this.#t=t.workspaces,this.#r=t.agentPresets}catch(t){if(t?.code!=="ENOENT")throw t;this.#t={},this.#r={}}this.#a.clear(),this.#i=1,this.#c.clear(),this.#s=1,this.#I.clear(),this.#o.clear();for(let t of Object.keys(this.#t))this.#a.set(t,this.#p()),this.#c.set(t,this.#d());return this}has(t){let o=Ei(t);return Object.hasOwn(this.#t,o)&&!this.#I.has(o)}incarnationFor(t){return this.#c.get(Ei(t))??null}workspaceFor(t){return this.#t[Ei(t)]??this.#A}agentPresetFor(t){return this.#r[Ei(t)]??null}generationFor(t){return this.#a.get(Ei(t))??null}async whenIdle(){await this.#g}async whenBotIdle(t){let o=Ei(t);for(;;){let i=this.#l.get(o);if(!i||(await i,this.#l.get(o)===i))return}}async ensure(t,{workspace:o=this.#A,defaultAgentPreset:i}={}){let e=Ei(t),a=oE(o);return this.#B(e,async()=>{if(this.#t[e])this.#a.has(e)||this.#a.set(e,this.#p());else{let A=Jl(i),r=Object.hasOwn(this.#r,e),s=this.#r[e];this.#t[e]=a,A&&(this.#r[e]=A),this.#a.set(e,this.#p()),this.#c.set(e,this.#d());try{await this.#u()}catch(g){throw delete this.#t[e],r?this.#r[e]=s:delete this.#r[e],this.#a.delete(e),this.#c.delete(e),g}}return this.#t[e]})}async setWorkspace(t,o,{clearSessions:i,incarnation:e}={}){let a=Ei(t);if(!this.has(a)||e!==void 0&&e!==this.incarnationFor(a)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=await Ix(o);return this.#B(a,async()=>{if(!this.has(a)||e!==void 0&&e!==this.incarnationFor(a)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}if(A===this.workspaceFor(a))return A;let r=this.#t[a];this.#a.set(a,this.#p()),await i?.(),this.#t[a]=A;try{await this.#u()}catch(s){throw this.#t[a]=r,s}return A})}async setAgentPreset(t,o,{incarnation:i}={}){let e=Ei(t);if(!this.has(e)||i!==void 0&&i!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let a=Jl(o);return this.#B(e,async()=>{if(!this.has(e)||i!==void 0&&i!==this.incarnationFor(e)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=this.#r[e]??null;if(A===a)return a;a?this.#r[e]=a:delete this.#r[e];try{await this.#u()}catch(r){throw A?this.#r[e]=A:delete this.#r[e],r}return a})}async bindWorkspaceSession(t,o,{conversationKey:i,sessionId:e,clearSessions:a,setSession:A,incarnation:r,expectedGeneration:s}={}){let g=Ei(t);if(typeof i!="string"||!i||typeof e!="string"||!e)throw new TypeError("conversationKey and sessionId are required");if(typeof a!="function"||typeof A!="function")throw new TypeError("session state callbacks are required");if(!this.has(g)||r!==void 0&&r!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}let c=await CM(await Ix(o));return this.#B(g,async()=>{if(!this.has(g)||r!==void 0&&r!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}if(s!==void 0&&s!==this.generationFor(g))throw aI("The bot workspace changed before the session binding could be committed.");if(!await $pe(c,this.workspaceFor(g))){let I=this.#t[g];this.#a.set(g,this.#p()),await a(),this.#t[g]=c;try{await this.#u()}catch(d){throw this.#t[g]=I,d}}return await A(i,e),{workspace:c,sessionId:e,generation:this.#a.get(g)}})}async invalidateSessions(t,{clearSessions:o}={}){let i=Ei(t);return this.#B(i,async()=>{this.#a.set(i,this.#p()),await o?.()})}async beginRemoval(t,{clearSessions:o}={}){let i=Ei(t);return this.#B(i,async()=>{let e=this.#I.get(i);if(e)return e;let a=Object.freeze({});this.#I.set(i,a),this.#n.set(a,{botId:i,incarnation:this.incarnationFor(i)}),this.#a.set(i,this.#p());try{await o?.()}catch(A){throw this.#I.get(i)===a&&this.#I.delete(i),A}return a})}async abortRemoval(t){let{botId:o}=this.#h(t);return this.#B(o,async()=>this.#I.get(o)!==t?!1:(this.#I.delete(o),Object.hasOwn(this.#t,o)&&(this.#a.set(o,this.#p()),this.#c.has(o)||this.#c.set(o,this.#d())),!0))}async finishRemoval(t){let{botId:o,incarnation:i}=this.#h(t);return this.#B(o,async()=>this.#I.get(o)!==t?{removed:!1,persisted:!0,error:null,stale:!0}:this.incarnationFor(o)!==i?(this.#I.delete(o),{removed:!1,persisted:!0,error:null,stale:!0}):(this.#I.delete(o),this.#E(o)))}async retireAfterConfigCommit(t){let o=Ei(t);return this.#B(o,async()=>(this.#I.delete(o),this.#E(o)))}async remove(t){let o=await this.retireAfterConfigCommit(t);if(o.error)throw o.error;return o.removed}async reconcile(t){let o=new Set([...t].map(Ei)),i=new Set([...Object.keys(this.#t),...Object.keys(this.#r),...this.#o]);for(let e of i)o.has(e)||await this.remove(e)}decorateStatus(t){return!t||typeof t!="object"||!Array.isArray(t.bots)?t:{...t,bots:t.bots.map(o=>o?.botId?{...o,workspace:this.workspaceFor(o.botId),agentPreset:this.agentPresetFor(o.botId)}:o)}}#p(){let t=this.#i;return this.#i+=1,t}#d(){let t=this.#s;return this.#s+=1,t}#h(t){if(!t||typeof t!="object")throw new TypeError("Invalid workspace removal transaction");let o=this.#n.get(t);if(!o)throw new TypeError("Invalid workspace removal transaction");return o}async#E(t){let o=Object.hasOwn(this.#t,t),i=Object.hasOwn(this.#r,t),e=o||i||this.#o.has(t);if(delete this.#t[t],delete this.#r[t],this.#a.delete(t),this.#c.delete(t),!e)return{removed:!1,persisted:!0,error:null,stale:!1};try{return await this.#f(),{removed:o,persisted:!0,error:null,stale:!1}}catch(a){return this.#o.add(t),{removed:o,persisted:!1,error:a,stale:!1}}}async#B(t,o){let i=this.#g.then(o,o),e=i.then(()=>{},()=>{});return this.#g=e,this.#l.set(t,e),e.finally(()=>{this.#l.get(t)===e&&this.#l.delete(t)}),i}async#u(){let t={version:1,workspaces:this.#t};Object.keys(this.#r).length>0&&(t.agentPresets=this.#r),await jpe(Xpe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await Zpe(o,`${JSON.stringify(t,null,2)} -`,{encoding:"utf8",mode:384}),await zpe(o,this.#e),this.#o.clear()}async#f(){if(Object.keys(this.#t).length>0||Object.keys(this.#r).length>0){await this.#u();return}try{await Wpe(this.#e),this.#o.clear()}catch(t){if(t?.code!=="ENOENT")throw t;this.#o.clear()}}};function uM(n){if(!n)return null;let t=typeof n=="function"?n():n;return t&&typeof t.then=="function"?t.then(Rn):Rn(t)}function dx(){let n=new Error("Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002");return n.code="agent-preset-unavailable",n}function Zl(n){if(n())return;let t=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw t.code="workspace-bot-not-found",t}function lx(n,t,o){let i=e=>{let a=n.decorateStatus(e);if(!o||!a||typeof a!="object")return a;let A=s=>s?{...a,agentPresetCatalog:s}:a,r=uM(o);return r&&typeof r.then=="function"?r.then(A):A(r)};return t&&typeof t.then=="function"?t.then(i):i(t)}function Ade(n){return Promise.resolve(n.status())}function Ta(n,{workspaces:t,method:o="remove",botIdFromRemoved:i=e=>e?.botId}){if(!n||!t||typeof n[o]!="function")throw new TypeError("configStore removal observer dependencies are required");return new Proxy(n,{get(e,a){let A=Reflect.get(e,a,e);return a===o?async(...r)=>{let s=await A.apply(e,r),g=s?i(s,r):null;return g&&await t.retireAfterConfigCommit(g),s}:typeof A=="function"?A.bind(e):A}})}function Na(n,{botId:t,workspaces:o,state:i,agentPresetCatalog:e}={}){if(!n||!o||!i)throw new TypeError("harness, workspaces, and state are required");let a=o.incarnationFor(t),A=()=>o.has(t)&&o.incarnationFor(t)===a,r=async(I=e)=>{let d;try{d=await uM(I)??Rn(null)}catch(B){throw Zl(A),B}return Zl(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:d}},s=new Map,g=new Proxy(n,{get(I,d){if(d==="agentPresetSettings")return async(f={})=>{f?.signal?.throwIfAborted(),Zl(A);let Q=await r();return f?.signal?.throwIfAborted(),Q};if(d==="updateAgentPreset")return async(f,Q={})=>{Q?.signal?.throwIfAborted(),Zl(A);let y=f==="--default"?null:Jl(f),m=null;if(y&&({agentPresetCatalog:m}=await r(),Q?.signal?.throwIfAborted(),!m.items.some(_=>_.id===y)))throw dx();if(await o.setAgentPreset(t,y,{incarnation:a}),Zl(A),m)return{agentPreset:o.agentPresetFor(t),agentPresetCatalog:m};try{return await r()}catch(_){if(_?.code==="workspace-bot-not-found")throw _;return Zl(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:Rn(null)}}};if(d==="currentWorkspace")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}return o.workspaceFor(t)};if(d==="assertWorkspaceScope")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}};if((d==="listWorkspaces"||d==="listWorkspaceSessions"||d==="listModels")&&typeof I[d]=="function")return async(...f)=>{if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=await I[d](...f);if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}return Q};if(d==="switchWorkspace")return f=>{if(!A()){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");return Q.code="workspace-bot-not-found",Promise.reject(Q)}return o.setWorkspace(t,f,{clearSessions:()=>i.clearSessions(),incarnation:a})};if(d==="bindWorkspaceSession")return async(f,Q)=>{if(typeof f!="string"||!f||typeof Q!="string"||!Q)throw new TypeError("conversationKey and sessionId are required");if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(typeof I.adoptWorkspaceSession!="function")throw new TypeError("Harness does not support adopting workspace sessions");let y=o.generationFor(t),m=await I.adoptWorkspaceSession(Q);if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(y!==o.generationFor(t))throw aI("The bot workspace changed while the session was being adopted.");if(!m||typeof m!="object"||m.sessionId!==Q||typeof m.workspace!="string")throw new TypeError("Harness returned an invalid adopted workspace session");let _=await o.bindWorkspaceSession(t,m.workspace,{conversationKey:f,sessionId:Q,clearSessions:()=>i.clearSessions(),setSession:(T,G)=>i.setSession(T,G),incarnation:a,expectedGeneration:y});if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(_.generation!==o.generationFor(t))throw aI("The bot workspace changed before the session binding completed.");return s.set(Q,_.generation),{...m,workspace:_.workspace,sessionId:_.sessionId}};if(d==="createSession")return async(f={})=>{if(await o.whenBotIdle(t),!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}let Q=o.generationFor(t),y=o.agentPresetFor(t),m=await I.createSession({...f,workspace:o.workspaceFor(t),...y==null?{}:{agentPreset:y}});return s.set(m,Q),m};if(d==="workspaceSession")return f=>{if(typeof f!="string"||!f)throw new TypeError("sessionId is required");let Q=s.get(f)??o.generationFor(t);s.delete(f);let y=()=>A()&&Q===o.generationFor(t),m=async(T,G,x)=>{if(!y())throw aI(`The bot workspace changed before this ${x} started.`);let J=await I[T](f,...G);if(!y())throw aI(`The bot workspace changed while this ${x} was running.`);return J},_=async(T,G,x)=>{if(!y())throw aI(`The bot workspace changed before this ${x} started.`);return I[T](f,...G)};return Object.freeze({sessionId:f,async sessionExists(...T){if(!y())return!1;let G=await I.sessionExists(f,...T);return y()&&G},models(...T){return m("getSessionModels",T,"model listing")},readHistory(...T){return m("readSessionHistory",T,"history read")},selectModel(...T){return m("selectSessionModel",T,"model selection")},isRunning(...T){return m("isSessionRunning",T,"run-state check")},hasActiveTurn(...T){return m("hasActiveTurn",T,"turn ownership check")},stopActiveTurn(...T){return _("stopActiveTurn",T,"turn stop")},steerActiveTurn(...T){return _("steerActiveTurn",T,"turn steering")},ask(...T){if(!y())throw aI("The bot workspace changed before this prompt started.");return I.ask(f,...T)}})};if(d==="sessionExists")return(f,...Q)=>{if(!A())return!1;let y=s.get(f);return y!==void 0&&y!==o.generationFor(t)?(s.delete(f),!1):I.sessionExists(f,...Q)};if(d==="ask")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(t)){let m=new Error("The bot workspace changed before this prompt started.");throw m.code=ba,m}return I.ask(f,...Q)};if(d==="executeCommand"&&typeof I.executeCommand=="function")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(t)){let m=new Error("The bot workspace changed before this command started.");throw m.code=ba,m}return I.executeCommand(f,...Q)};let B=Reflect.get(I,d,I);return typeof B=="function"?B.bind(I):B}}),c=new Proxy(i,{get(I,d){if(d===Tb)return I;if(d==="sessionFor")return(f,...Q)=>{if(!A())return null;let y=I.sessionFor(f,...Q);return y&&!s.has(y)&&s.set(y,o.generationFor(t)),y};if(d==="setSession")return(f,Q,...y)=>{let m=s.get(Q);return!A()||m!==void 0&&m!==o.generationFor(t)?(s.delete(Q),!1):I.setSession(f,Q,...y)};let B=Reflect.get(I,d,I);return typeof B=="function"?B.bind(I):B}});return Object.freeze({harness:g,state:c})}function Ra(n,{workspaces:t,stateFor:o,agentPresetCatalog:i}={}){if(!n||!t||typeof o!="function")throw new TypeError("controller, workspaces, and stateFor are required");let e=new Map,a=(c,I)=>{let B=(e.get(c)??Promise.resolve()).catch(()=>{}).then(I);return e.set(c,B),B.finally(()=>{e.get(c)===B&&e.delete(c)})},A=c=>lx(t,c,i),r=(c,I)=>{let d=t.incarnationFor(c);return a(c,async()=>{if(!(await n.status())?.bots?.some(Q=>Q?.botId===c)){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw Q.code="workspace-bot-not-found",Q}let f=await o(c);return await t.setWorkspace(c,I,{clearSessions:()=>f.clearSessions(),incarnation:d}),A(await n.status())})},s=(c,I)=>{let d=t.incarnationFor(c),B=Jl(I);return a(c,async()=>{if(!(await n.status())?.bots?.some(y=>y?.botId===c)){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=B&&i?await uM(i):null;if(B&&i&&!Q?.items.some(y=>y.id===B))throw dx();return await t.setAgentPreset(c,B,{incarnation:d}),lx(t,await n.status(),Q??i)})},g=(c,I)=>a(c,async()=>{let d=await t.beginRemoval(c,{clearSessions:async()=>{try{let B=await o(c);if(!B||typeof B.clearSessions!="function")throw new TypeError("bot state does not support session cleanup");await B.clearSessions()}catch(B){console.warn(`[dsh-im] ignored session cleanup failure while deleting bot ${c}:`,B?.message??B)}}});try{let B=await I();return await t.finishRemoval(d),A(B)}catch(B){let f=await Ade(n).catch(()=>null);throw Array.isArray(f?.bots)&&!f.bots.some(y=>y?.botId===c)?await t.finishRemoval(d):await t.abortRemoval(d),B}});return new Proxy(n,{get(c,I){if(I==="updateWorkspace")return r;if(I==="updateAgentPreset")return s;let d=Reflect.get(c,I,c);return typeof d!="function"?d:I==="deleteBot"?(B,...f)=>g(B,()=>d.call(c,B,...f)):I==="disconnect"?async(...B)=>{let Q=(await c.status())?.bots?.[0]?.botId;return Q?g(Q,()=>d.apply(c,B)):A(d.apply(c,B))}:(...B)=>A(d.apply(c,B))}})}var hx=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function tde(n){if(!Array.isArray(n)||n.length===0)return[...hx];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...hx]}var Rf=class{#e;#A;#t;#r;#a;#i;#c;#s=null;#I=null;#n=0;#o=!1;#g=!1;#l;#p;constructor({controller:t,harness:o,logger:i=console,retryDelaysMs:e,healthyIntervalMs:a=15e3,setTimeoutImpl:A=setTimeout,clearTimeoutImpl:r=clearTimeout}){if(!t||typeof t.initialize!="function"||typeof t.status!="function")throw new TypeError("ConnectionSupervisor requires a controller");if(!o||typeof o.ensureRunning!="function")throw new TypeError("ConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=i,this.#r=tde(e),this.#a=Number.isFinite(a)&&a>=0?a:15e3,this.#i=A,this.#c=r,this.#l=new Promise(s=>{this.#p=s})}get ready(){return this.#l}start(){return this.#g||this.#o?this:(this.#g=!0,this.#d(0),this)}async close(){this.#o||(this.#o=!0,this.#s!==null&&this.#c(this.#s),this.#s=null,await this.#I?.catch(()=>{}),this.#p?.(null),this.#p=null)}#d(t){this.#o||(this.#s=this.#i(()=>{this.#s=null,this.#h()},t),this.#s?.unref?.())}async#h(){if(this.#o||this.#I)return;let t=this.#E();this.#I=t;try{await t}finally{this.#I===t&&(this.#I=null)}}async#E(){try{if(await this.#A.ensureRunning(),this.#o)return;let t=await this.#e.initialize();if(this.#o)return;this.#p?.(t),this.#p=null;let{configured:o,connected:i}=t.totals;if(i{let A={namespace:"commands",method:"execute",args:{agentId:i,line:e,images:[]},signal:a.signal};try{return await o.invoke(A)}catch(r){if(r?.name!=="TypertGatewayError"||r.code!=="arguments-invalid"||r.endpoint!=="commands/execute"||r.message!=='typert gateway: commands/execute: args fields do not match the descriptor: unexpected "images"')throw r;return a.signal?.throwIfAborted(),o.invoke({...A,args:{agentId:i,line:e}})}}}}function Xr(n,t={}){if(t.harnessBaseUrl!==void 0)return{baseUrl:new URL(t.harnessBaseUrl)};if(!n?.apiProxy)throw new TypeError("dsh-im requires the Host apiProxy service; check that DSH has finished loading its Host services");return{apiProxy:n.apiProxy,interactionScope:n.root??n}}import{randomUUID as rde}from"node:crypto";function ade(n){if(typeof n?.get!="function")return;let t;try{t=n.get("agents")}catch{return}if(t!=null){if(typeof t.get!="function")throw new TypeError('dsh-im requires a callable AgentRegistry when ctx.get("agents") is present');return t}}function ide(n,t,o){if(n?.status!=="running")return!1;let i=n?.session?.events;if(!Array.isArray(i))return!1;let e=null,a=!1;for(let A of i){if(A?.type==="turn/start"){e=A.data?.turn??null,a=!1;continue}if(A?.type==="turn/end"&&A.data?.turn===e){e=null,a=!1;continue}e===t&&A?.type==="user/message"&&A.data?.source?.rpcId===o&&(a=!0)}return e===t&&a}function Ex(n){if(!n||typeof n!="object"||Object.isFrozen(n))return n;for(let t of Object.values(n))Ex(t);return Object.freeze(n)}function ode(n){return Ex({id:rde(),role:"user",content:[{type:"text",text:n}],source:{kind:"user"}})}function nde(n){let t=new Error("Session is busy with an active turn or maintenance task",{cause:n});return t.code="agent-busy",t}function sde(n){return({sessionId:t,expectedTurn:o,promptRpcId:i,action:e,text:a})=>{let A=n.get(t);if(A){if(!ide(A,o,i))return!1;if(e==="stop")return A.cancel({kind:"user"},{keepInbox:!0}),!0;if(e==="steer")return typeof a!="string"||!a.trim()?!1:(A.inject(ode(a)),!0);throw new TypeError(`Unsupported Harness control action: ${String(e)}`)}}}function gde(n){return({sessionId:t,operation:o})=>{if(typeof o!="function")throw new TypeError("maintenance operation is required");let i=n.get(t);if(!i)return o();try{return i.runMaintenance(e=>{if(n.get(t)!==i){let a=new Error("Session agent changed before maintenance started");throw a.code="agent-unavailable",a}return o(e)})}catch(e){throw nde(e)}}}function cde(n){return({sessionId:t,workspace:o,files:i,signal:e})=>{let A=n.get(t)?.session?.header?.cwd,r=typeof A=="string"&&A?A:o;if(typeof r!="string"||!r)throw new uo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");return GK({files:i},{workspace:r,signal:e})}}function va(n,t={}){let{controlExecutor:o,sessionMaintenanceExecutor:i,fileIngressExecutor:e}=t;if(o!==void 0&&typeof o!="function")throw new TypeError("controlExecutor must be a function");if(i!==void 0&&typeof i!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("fileIngressExecutor must be a function");let a=o&&i&&e?void 0:ade(n);return{controlExecutor:o??(a?sde(a):void 0),sessionMaintenanceExecutor:i??(a?gde(a):void 0),fileIngressExecutor:e??cde(a??{get:()=>{}})}}function pde(n){let t=iI(n.dshHome??process.env.DSH_HOME??nE(lde(),".dsh")),o=iI(n.dataDir??nE(t,"integrations","dsh-dingtalk"));return{root:o,config:iI(n.configPath??nE(o,"config.json")),bots:iI(n.botsDir??nE(o,"bots")),workspaces:iI(n.workspacesPath??nE(o,"workspaces.json"))}}async function fM(n,t={},o={}){if(!n?.credentials)throw new TypeError("dsh-dingtalk requires ctx.credentials");let i=Xr(n,t),e=o.ConfigStore??df,a=o.DeviceAuth??Ef,A=o.StateStore??Nf,r=o.HarnessClient??_f,s=o.Controller??qh,g=o.Runtime??tE,c=o.createConnectionSupervisor??BM,I=typeof n.logger=="function"?n.logger("dsh-dingtalk"):n.logger??console,d=()=>Ma(n),B=pde(t),f=await new e(B.config).load(),Q=iI(t.workspace??process.cwd()),y=o.WorkspaceStore??Zr,m=o.workspaces??await new y(B.workspaces,{defaultWorkspace:Q}).load(),_=typeof f.list=="function",T=_?f.list():[];_&&await m.reconcile(T.map(te=>te.botId)),await Promise.all(T.map(te=>m.ensure(te.botId,{defaultAgentPreset:t.agentPreset})));let G=typeof f.remove=="function"?Ta(f,{workspaces:m}):f,x=o.deviceAuth??new a({baseUrl:t.registrationBaseUrl}),J=new Map,L=te=>iI(B.bots,te,"state.json"),q=async te=>{let ne=J.get(te);return ne||(ne=await new A(L(te)).load(),J.set(te,ne)),ne},j=ka(n,o.commandExecutor),{controlExecutor:K,sessionMaintenanceExecutor:v,fileIngressExecutor:W}=va(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),Y=new r({...i,workspace:Q,autostart:!1,dshBin:t.dshBin??"dsh",...j?{commandExecutor:j}:{},...K?{controlExecutor:K}:{},...v?{sessionMaintenanceExecutor:v}:{},...W?{fileIngressExecutor:W}:{}}),N=new s({deviceAuth:x,credentials:n.credentials,configStore:G,logger:I,createRuntime:async({botId:te,config:ne,clientSecret:Ne})=>{let ce=await q(te);await m.ensure(te,{defaultAgentPreset:t.agentPreset});let Te=Na(Y,{botId:te,workspaces:m,state:ce,agentPresetCatalog:d});return new g({config:ne,clientSecret:Ne,harness:Te.harness,state:Te.state,replyTimeoutMs:t.replyTimeoutMs??6e5,maxMessageChars:t.maxMessageChars??4e3,connectTimeoutMs:t.connectTimeoutMs??15e3,logger:{error:(...fe)=>I.error?.(`[${te}]`,...fe),warn:(...fe)=>I.warn?.(`[${te}]`,...fe),info:(...fe)=>I.info?.(`[${te}]`,...fe),debug:(...fe)=>I.debug?.(`[${te}]`,...fe)}})},deleteState:async({botId:te})=>{let ne=J.get(te);if(J.delete(te),ne&&typeof ne.remove=="function")await ne.remove();else try{await Ide(L(te))}catch(Ne){if(Ne?.code!=="ENOENT")throw Ne}}}),P=Ra(N,{workspaces:m,stateFor:q,agentPresetCatalog:d}),V=c({controller:P,harness:Y,logger:I,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:P,ready:V.ready,async close(){await V.close(),await P.close(),Y.stopManagedProcess()}}}import Cde from"qrcode";var dde=new Set(["loopback","trusted-host"]);function yr(n){if(n===void 0)return"loopback";if(dde.has(n))return n;throw new TypeError('dsh-im rpcAuthority must be "loopback" or "trusted-host"')}import{isAbsolute as hde}from"node:path";var Ci="bot.workspace.set";function Pa(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).every(t=>["botId","workspace"].includes(t))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&typeof n.workspace=="string"&&n.workspace.length<=4096&&hde(n.workspace.trim())}function Ga(n){return["workspace-not-absolute","workspace-not-found","workspace-not-directory","workspace-bot-not-found","agent-preset-invalid","agent-preset-unavailable"].includes(n?.code)?{code:n.code,message:n.message}:null}var ui="bot.preset.set";function Ede(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Fa(n){return Ede(n)&&Object.keys(n).every(t=>["botId","agentPreset"].includes(t))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&(n.agentPreset===null||typeof n.agentPreset=="string"&&Xb.test(n.agentPreset))}var ux="/dingtalk",ar=Object.freeze({status:"connection.status",beginProvisioning:"provision.begin",pollProvisioning:"provision.poll",cancelProvisioning:"provision.cancel",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:Ci,setAgentPreset:ui,approveSender:"bot.sender.approve",revokeSender:"bot.sender.revoke"}),Bx=Object.freeze(Object.values(ar)),ude=new Set(["clientSecret","client_secret","deviceCode","device_code","secretRef","staffId","senderStaffId","verificationUrl","verificationUri","userCode"]);function yM(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Ug(n,t){return yM(n)&&Object.keys(n).every(o=>t.includes(o))}function oI(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function Cx(n,t){return typeof n=="string"&&n.trim().length>0&&n.length<=t}function Bde(n,t){return yM(t)?n===ar.status?Ug(t,[])?null:"connection.status does not accept fields.":n===ar.beginProvisioning?Ug(t,["locale"])&&(t.locale===void 0||t.locale==="zh-CN")?null:"provision.begin received unsupported fields.":[ar.pollProvisioning,ar.cancelProvisioning].includes(n)?Ug(t,["attemptId"])&&oI(t.attemptId)?null:`${n} requires an attemptId.`:n===ar.bindCredentials?Ug(t,["clientId","clientSecret"])&&Cx(t.clientId,256)&&Cx(t.clientSecret,1024)?null:"bot.bind-credentials requires Client ID and Client Secret.":n===ar.reconnectBot?Ug(t,["botId","sendTest"])&&oI(t.botId)&&(t.sendTest===void 0||t.sendTest===!0)?null:"bot.reconnect requires a botId and optional sendTest=true.":n===ar.deleteBot?Ug(t,["botId","confirm"])&&oI(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===ar.setWorkspace?Pa(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===ar.setAgentPreset?Fa(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===ar.approveSender?Ug(t,["botId","requestId","confirm"])&&oI(t.botId)&&oI(t.requestId)&&t.confirm===!0?null:"bot.sender.approve requires botId, requestId, and confirm=true.":n===ar.revokeSender?Ug(t,["botId","senderKey","confirm"])&&oI(t.botId)&&oI(t.senderKey)&&t.confirm===!0?null:"bot.sender.revoke requires botId, senderKey, and confirm=true.":"Unknown DingTalk endpoint.":"Payload must be an object."}function kf(n){return{ok:!1,error:{code:"bad-request",message:n}}}function sE(){return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}}function fde(){return{ok:!1,error:{code:"dingtalk-operation-failed",message:"\u9489\u9489\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}}function Xl(n){if(Array.isArray(n))return n.map(Xl);if(!yM(n))return n;let t={};for(let[o,i]of Object.entries(n))ude.has(o)||(t[o]=Xl(i));return t}async function Qde(n){return Cde.toDataURL(n,{type:"image/png",errorCorrectionLevel:"M",margin:2,width:320})}async function QM(n,t){return!n||typeof n.verificationUrl!="string"?Xl(n):Xl({...n,qrCodeDataUrl:await t(n.verificationUrl)})}async function Hg(n,t){let o=structuredClone(n);return o?.provisioning&&(o.provisioning=await QM(o.provisioning,t)),Xl(o)}function yde(n){for(let t of["status","startProvisioning","registrationStatus","cancelProvisioning","bindCredentials","reconnectBot","deleteBot","approveSender","revokeSender"])if(typeof n?.[t]!="function")throw new TypeError(`A complete DingTalk controller is required (${t})`)}function fx(n,{encodeQr:t=Qde}={}){yde(n);let o=new Map,i=e=>{let a=o.get(e);return a||(o.size>=16&&o.delete(o.keys().next().value),a=Promise.resolve().then(()=>t(e)),o.set(e,a)),a};return async(e,a,A)=>{if(A?.aborted)return sE();if(!Bx.includes(e))return kf("Unknown DingTalk endpoint.");let r=Bde(e,a);if(r)return kf(r);try{let s;if(e===ar.status)s=await Hg(await n.status(),i);else if(e===ar.beginProvisioning){let g=await n.startProvisioning({signal:A});if(A?.aborted)return await n.cancelProvisioning(g.attemptId),sE();s=await QM(g,i)}else if(e===ar.pollProvisioning){let g=await n.registrationStatus(a.attemptId);if(!g)return kf("The provisioning attempt no longer exists.");s=await QM(g,i)}else if(e===ar.cancelProvisioning){if(s=await n.cancelProvisioning(a.attemptId),!s)return kf("The provisioning attempt no longer exists.");s=Xl(s)}else if(e===ar.bindCredentials)s=await Hg(await n.bindCredentials(a),i);else if(e===ar.reconnectBot){let g=await n.reconnectBot(a.botId);if(A?.aborted)return sE();let c;if(a.sendTest===!0)if(!g?.bots?.some(d=>d?.botId===a.botId&&d?.connected===!0)||typeof n.sendConnectionTest!="function")c=rr(Ir("\u9489\u9489\u673A\u5668\u4EBA"));else try{await n.sendConnectionTest(a.botId),c=rr()}catch(d){c=rr(d)}s=await Hg({...g,...c?{testMessage:c}:{}},i)}else if(e===ar.deleteBot)s=await Hg(await n.deleteBot(a.botId),i);else if(e===ar.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");s=await Hg(await n.updateWorkspace(a.botId,a.workspace),i)}else if(e===ar.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");s=await Hg(await n.updateAgentPreset(a.botId,a.agentPreset),i)}else e===ar.approveSender?s=await Hg(await n.approveSender(a.botId,a.requestId),i):s=await Hg(await n.revokeSender(a.botId,a.senderKey),i);return A?.aborted?sE():{ok:!0,value:s}}catch(s){let g=Ga(s);return A?.aborted?sE():g?{ok:!1,error:g}:fde()}}}function vf(n,t,o,i){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(ux,fx(t,o),{authority:yr(i)})}async function Qx(n,t={}){if(t?.controller)return vf(n,t.controller,t.rpcOptions,t.rpcAuthority);let o=await fM(n,t,t.internals),i=vf(n,o.controller,t.rpcOptions,t.rpcAuthority);return n.effect(()=>async()=>{await o.close()},"dsh-dingtalk: close bot connections"),i}import{createHash as mde}from"node:crypto";import{mkdir as Sde,readFile as Dde,rename as wde,unlink as Ode,writeFile as bde}from"node:fs/promises";import{dirname as Mde}from"node:path";var mM=Object.freeze({version:1,bots:Object.freeze([])});function xs(n){return typeof n=="string"&&n.trim()?n.trim():null}function yx(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gE(n,{botPrefix:t,tokenRefPrefix:o}){let i=xs(n);if(!i)throw new TypeError("platformId is required");let e=mde("sha256").update(i).digest("hex").slice(0,24);return{botId:`${t}_${e}`,tokenRef:`${o}_${e.toUpperCase()}`}}function Pf(n,t){let o=xs(n)??"";return o.length<=10?o?`${o.slice(0,3)}\u2022\u2022\u2022`:t:`${o.slice(0,6)}\u2022\u2022\u2022\u2022${o.slice(-4)}`}var $l=class{#e;#A;#t;#r;#a;#i;#c;#s=mM;#I=Promise.resolve();constructor(t,{channel:o,botPrefix:i,tokenRefPrefix:e,normalizeBotExtension:a=()=>({})}){if(typeof a!="function")throw new TypeError("normalizeBotExtension must be a function");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=new RegExp(`^${yx(i)}_[a-f0-9]{24}$`),this.#c=new RegExp(`^${yx(e)}_[A-F0-9]{24}$`)}async load(){try{let t=this.#o(JSON.parse(await Dde(this.#e,"utf8")));if(!t)throw new Error(`dsh-im ${this.#A} config contains invalid bot data`);this.#s=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#s=mM}return this}list(){return structuredClone(this.#s.bots)}get(t){let o=this.#s.bots.find(i=>i.botId===t);return o?structuredClone(o):null}getByPlatformId(t){let o=this.#s.bots.find(i=>i.platformId===t);return o?structuredClone(o):null}async save(t){let o=this.#n(t);if(!o)throw new Error(`Refusing to persist incomplete ${this.#A} bot data`);return this.#g(i=>{let e=i.find(r=>r.platformId===o.platformId&&r.botId!==o.botId),a=i.find(r=>r.tokenRef===o.tokenRef&&r.botId!==o.botId);if(e||a)throw new Error(`Duplicate ${this.#A} bot identity`);let A=i.findIndex(r=>r.botId===o.botId);return A===-1?i.push(o):i[A]=o,structuredClone(o)})}async remove(t){if(!this.#i.test(t))throw new TypeError(`Invalid ${this.#A} bot id`);return this.#g(o=>{let i=o.findIndex(a=>a.botId===t);if(i===-1)return null;let[e]=o.splice(i,1);return structuredClone(e)})}async clear(){let t=this.#I.then(async()=>{try{await Ode(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#s=mM});this.#I=t.then(()=>{},()=>{}),await t}#n(t){if(!t||typeof t!="object")return null;let o=xs(t.platformId),i=xs(t.botId),e=xs(t.tokenRef),a=xs(t.name);if(!o||!i||!e||!a||!this.#i.test(i)||!this.#c.test(e))return null;let A=gE(o,{botPrefix:this.#t,tokenRefPrefix:this.#r});if(A.botId!==i||A.tokenRef!==e)return null;let r=this.#a(t);return!r||typeof r!="object"||Array.isArray(r)?null:Object.freeze({botId:i,platformId:o,tokenRef:e,name:a,username:xs(t.username),createdAt:xs(t.createdAt)??new Date().toISOString(),connectedAt:xs(t.connectedAt),...r})}#o(t){if(!t||t.version!==1||!Array.isArray(t.bots))return null;let o=t.bots.map(A=>this.#n(A));if(o.some(A=>A===null))return null;let i=new Set,e=new Set,a=new Set;for(let A of o){if(i.has(A.botId)||e.has(A.platformId)||a.has(A.tokenRef))return null;i.add(A.botId),e.add(A.platformId),a.add(A.tokenRef)}return Object.freeze({version:1,bots:Object.freeze(o)})}async#g(t){let o,i=this.#I.then(async()=>{let e=[...this.#s.bots];o=t(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#l(a),this.#s=a});return this.#I=i.then(()=>{},()=>{}),await i,o}async#l(t){await Sde(Mde(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await bde(o,`${JSON.stringify(t,null,2)} -`,{encoding:"utf8",mode:384}),await wde(o,this.#e)}};var mx=Object.freeze({botPrefix:"discord",tokenRefPrefix:"DSH_DISCORD_BOT_TOKEN"});function Sx(n){return gE(n,mx)}function Dx(n){return Pf(n,D("Discord\u673A\u5668\u4EBA"))}var Gf=class extends $l{constructor(t){super(t,{channel:"Discord",...mx})}};function cE(n){return typeof n=="string"&&n.trim()?n.trim():null}function IE(n,t){return Object.freeze({code:n,message:t})}var ep=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n=new Map;#o=new Map;#g=new Map;#l=0;#p=!1;constructor({descriptor:t,credentials:o,configStore:i,inspectToken:e,deriveIdentity:a,maskPlatformId:A,createRuntime:r,deleteState:s=async()=>{},logger:g=console}){if(!t?.key||!t?.label||!t?.connectionLabel)throw new TypeError("TokenBotController requires a channel descriptor");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError(`${t.label} requires the DSH credential provider`);if(!i||typeof i.list!="function"||typeof i.save!="function"||typeof i.remove!="function")throw new TypeError(`${t.label} requires a config store`);if(typeof e!="function"||typeof a!="function"||typeof A!="function"||typeof r!="function")throw new TypeError(`${t.label} controller dependencies are incomplete`);this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#s=s,this.#I=g}async initialize(){if(this.#p)return this.status();for(let t of this.#t.list())await this.#u(t.botId,async()=>{if(this.#p||this.#n.get(t.botId)?.status?.ready)return;let o=await this.#E(t.tokenRef);if(!o){this.#o.set(t.botId,IE("missing-token",D("{label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002",{label:this.#e.label})));return}try{await this.#d(t,o),this.#o.delete(t.botId)}catch(i){this.#o.set(t.botId,IE("connection-failed",D("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002",{label:this.#e.label}))),this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${t.botId} failed to initialize:`,i)}finally{this.#f()}});return this.status()}async bindCredentials({token:t}={}){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let o=cE(t);if(!o)throw new TypeError(`${this.#e.label} Bot Token is required`);let i=await this.#r(o),e=cE(i?.platformId),a=cE(i?.name);if(!e||!a)throw new Error(`${this.#e.label} returned an invalid bot identity`);let A=this.#a(e);return await this.#u(A.botId,async()=>{if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let r=this.#t.getByPlatformId(e),s=await this.#A.resolve(A.tokenRef).catch(()=>{}),g={botId:A.botId,platformId:e,tokenRef:A.tokenRef,name:a,username:cE(i.username),createdAt:r?.createdAt??new Date().toISOString(),connectedAt:new Date().toISOString()};await this.#A.set(A.tokenRef,o);try{await this.#t.save(g)}catch(c){throw await this.#B(A.tokenRef,s),c}try{await this.#d(g,o),this.#o.delete(A.botId)}catch(c){this.#o.set(A.botId,IE("connection-failed",D("{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002",{label:this.#e.label}))),this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${A.botId} credential connection failed:`,c)}this.#f()}),this.status()}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#u(t,async()=>{let i=await this.#E(o.tokenRef);if(!i)throw new Error(`${this.#e.label} bot token is missing`);try{await this.#d(o,i),this.#o.delete(t)}catch(e){throw this.#o.set(t,IE("connection-failed",D("{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{label:this.#e.label}))),e}finally{this.#f()}}),this.status()}async updateBotConfig(t,o){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);if(typeof o!="function")throw new TypeError("Bot config update must be a function");return await this.#u(t,async()=>{if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let i=this.#t.get(t);if(!i)throw new Error(`Unknown ${this.#e.label} bot`);let e=await this.#E(i.tokenRef);if(!e)throw new Error(`${this.#e.label} bot token is missing`);if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let a=o(i),A=await this.#t.save(a);try{await this.#d(A,e),this.#o.delete(t)}catch(r){throw this.#o.set(t,IE("connection-failed",D("{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{label:this.#e.label}))),r}finally{this.#f()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return this.#u(t,async()=>{let i=this.#n.get(t);if(!i?.status?.ready||typeof i.sendConnectionTest!="function"){let a=new Error(D("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw a.code="test-target-unavailable",a}let e=D("{name}\uFF08{id}\uFF09",{name:o.name,id:this.#i(o.platformId)});return await i.sendConnectionTest(Sa(e,D("{label}\u673A\u5668\u4EBA",{label:this.#e.label}))),{sent:!0}})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#u(t,async()=>{let i=await this.#A.resolve(o.tokenRef).catch(()=>{});await this.#h(t);try{await this.#A.unset(o.tokenRef),await this.#t.remove(t)}catch(e){throw i?.value&&(await this.#A.set(o.tokenRef,i.value).catch(()=>{}),await this.#d(o,i.value).catch(()=>{})),new Error(`Unable to remove the ${this.#e.label} bot safely.`,{cause:e})}await this.#s({botId:t,config:o}).catch(e=>{this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${t} state cleanup failed:`,e)}),this.#o.delete(t),this.#f()}),this.status()}status(){let t=this.#t.list().map(i=>{let e=this.#n.get(i.botId)?.status??null,a=e?.ready===!0&&e.connectionState==="connected"&&e.harnessReachable===!0,A=a?"connected":e?.connectionState==="connecting"?"connecting":this.#o.has(i.botId)||e?.connectionState==="failed"?"error":"offline";return{botId:i.botId,state:A,connected:a,configured:!0,bot:{name:i.name,username:i.username,idMasked:this.#i(i.platformId)},health:{status:a?"healthy":A==="error"?"error":"offline",summary:a?D("{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38",{label:this.#e.label,connectionLabel:D(this.#e.connectionLabel)}):A==="error"?D("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5",{label:this.#e.label}):D("{label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF",{label:this.#e.label}),lastCheckedAt:e?.lastCheckedAt??null,lastConnectedAt:e?.lastConnectedAt??null},stats:{messagesReceived:e?.messagesReceived??0,messagesReplied:e?.messagesReplied??0},lastMessageError:qr(e?.lastMessageError),error:structuredClone(this.#o.get(i.botId)??null)}}),o=t.filter(i=>i.connected).length;return{schemaVersion:1,revision:this.#l,state:t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o}}}async close(){this.#p||(this.#p=!0,await Promise.allSettled([...this.#g.values()]),await Promise.allSettled([...this.#n.keys()].map(t=>this.#h(t))))}async#d(t,o){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);if(await this.#h(t.botId),this.#p)throw new Error(`${this.#e.label} controller is closed`);let i=await this.#c({botId:t.botId,config:t,token:o});if(!i||typeof i.start!="function"||typeof i.stop!="function")throw new TypeError(`createRuntime returned an invalid ${this.#e.label} runtime`);this.#n.set(t.botId,i);try{await i.start()}catch(e){throw await i.stop().catch(()=>{}),this.#n.delete(t.botId),e}}async#h(t){let o=this.#n.get(t);this.#n.delete(t),await o?.stop().catch(i=>{this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${t} failed to stop cleanly:`,i)})}async#E(t){let o=await this.#A.resolve(t).catch(()=>{});return cE(o?.value)}async#B(t,o){o?.value?await this.#A.set(t,o.value).catch(()=>{}):await this.#A.unset(t).catch(()=>{})}#u(t,o){let a=(this.#g.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#g.get(t)===a&&this.#g.delete(t)});return this.#g.set(t,a),a}#f(){this.#l+=1}};import{createHash as _de}from"node:crypto";var Tde="https://discord.com/api/v10/",Nde=12e4,Rde=new Set([50001,50013]),kde=new Set([40005]);function Ln(n){return typeof n=="string"&&n.trim()?n.trim():null}function wx(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}function SM(n){return n?.reason instanceof Error?n.reason:new DOMException("The operation was aborted","AbortError")}function vde(n,t){if(!Number.isInteger(n)||n<1)throw new TypeError(`${t} must be a positive integer`);return n}function bx(n,t){return t?.providerCode!==void 0&&(n.providerCode=t.providerCode),t?.retry_after!==void 0&&(n.retry_after=t.retry_after,n.retryAfter=t.retry_after),Number.isInteger(t?.status)&&(n.status=t.status),n}function Pde(n){let t=Number(n?.providerCode),o=Number(n?.status),i=Ln(n?.message)??"",e="artifact-provider-rejected",a="Discord rejected the attachment.";o===401||o===403||Rde.has(t)?(e="artifact-permission-required",a="Discord denied permission to send the attachment."):o===413||kde.has(t)||/(?:request|attachment|file).{0,24}too large/i.test(i)?(e="artifact-too-large",a="The attachment exceeds Discord's size limit."):o===429?(e="artifact-rate-limited",a="Discord rate-limited attachment delivery."):o>=500&&(e="artifact-delivery-uncertain",a="Discord attachment delivery result is uncertain.");let A=new Error(a,{cause:n});return A.code=e,bx(A,n)}function Gde(n){let t=new Error("Discord attachment delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",bx(t,n)}function Fde(n,t){return new Promise((o,i)=>{if(t?.aborted){i(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(o,n);e?.unref?.(),t?.addEventListener("abort",()=>{clearTimeout(e),i(t.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function La(n,t){let o=Ln(n);if(!o||!/^\d{5,30}$/.test(o))throw new TypeError(`Invalid Discord ${t}`);return o}function Ox(n){let t=Ln(n);if(!t)throw new TypeError("A Discord reaction emoji is required");return t}function Lde(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{20,}$/.test(n.trim())}var lE=class{#e;#A;#t;#r;constructor({token:t,fetchImpl:o=fetch,baseUrl:i=Tde,fileUploadTimeoutMs:e=Nde}){if(!Lde(t))throw new TypeError("Discord Bot Token is invalid");if(typeof o!="function")throw new TypeError("DiscordApi requires fetch");this.#e=t.trim(),this.#A=o,this.#t=new URL(i),this.#r=vde(e,"fileUploadTimeoutMs")}getCurrentUser(t={}){return this.#a("users/@me",{...t,method:"GET"})}getGatewayBot(t={}){return this.#a("gateway/bot",{...t,method:"GET"})}getChannel({channelId:t,signal:o}={}){return this.#a(`channels/${La(t,"channel id")}`,{method:"GET",signal:o})}startThreadFromMessage({channelId:t,messageId:o,name:i,signal:e}={}){let a=Ln(i);if(!a||[...a].length>100)throw new TypeError("Discord thread name must contain 1-100 characters");if(e?.aborted)throw SM(e);return this.#a(`channels/${La(t,"channel id")}/messages/${La(o,"message id")}/threads`,{method:"POST",signal:e,body:{name:a}})}createMessage({channelId:t,content:o,replyToMessageId:i,signal:e}){return this.#a(`channels/${La(t,"channel id")}/messages`,{method:"POST",signal:e,body:{content:o,allowed_mentions:{parse:[],replied_user:!1},...i?{message_reference:{message_id:La(i,"message id"),channel_id:La(t,"channel id"),fail_if_not_exists:!1}}:{}}})}async createFileMessage({channelId:t,file:o,replyToMessageId:i,signal:e}){if(!o||typeof o!="object"||typeof o.fileName!="string"||!o.fileName||!Buffer.isBuffer(o.bytes))throw new TypeError("A Discord attachment is required");let a=Ln(o.deliveryKey)??Ln(o.artifactId),A=a?_de("sha256").update(a).digest("hex").slice(0,25):void 0,r=new FormData;r.append("payload_json",JSON.stringify({allowed_mentions:{parse:[],replied_user:!1},attachments:[{id:0,filename:o.fileName}],...A?{nonce:A,enforce_nonce:!0}:{},...i?{message_reference:{message_id:La(i,"message id"),channel_id:La(t,"channel id"),fail_if_not_exists:!1}}:{}})),r.append("files[0]",new Blob([o.bytes],{type:o.mediaType??"application/octet-stream"}),o.fileName);let s=La(t,"channel id");if(e?.aborted)throw SM(e);let g=wx(e,this.#r);try{return await this.#a(`channels/${s}/messages`,{method:"POST",signal:g,timeoutMs:this.#r,body:r,multipart:!0})}catch(c){throw e?.aborted?SM(e):c?.code?.startsWith?.("discord-")?Pde(c):Gde(c)}}editMessage({channelId:t,messageId:o,content:i,signal:e}){return this.#a(`channels/${La(t,"channel id")}/messages/${La(o,"message id")}`,{method:"PATCH",signal:e,body:{content:i,allowed_mentions:{parse:[],replied_user:!1}}})}sendTyping({channelId:t,signal:o}){return this.#a(`channels/${La(t,"channel id")}/typing`,{method:"POST",signal:o,expectBody:!1})}async addOwnReaction({channelId:t,messageId:o,emoji:i,signal:e}={}){let a=Ox(i);return await this.#a(`channels/${La(t,"channel id")}/messages/${La(o,"message id")}/reactions/${encodeURIComponent(a)}/@me`,{method:"PUT",signal:e,expectBody:!1,retry:!1}),a}removeOwnReaction({channelId:t,messageId:o,emoji:i,signal:e}={}){let a=Ox(i);return this.#a(`channels/${La(t,"channel id")}/messages/${La(o,"message id")}/reactions/${encodeURIComponent(a)}/@me`,{method:"DELETE",signal:e,expectBody:!1,retry:!1})}async#a(t,{method:o,body:i,signal:e,timeoutMs:a=15e3,expectBody:A=!0,retry:r=!0,multipart:s=!1}){let g;try{g=await this.#A(new URL(t,this.#t),{method:o,headers:{authorization:`Bot ${this.#e}`,...s?{}:{"content-type":"application/json"},"user-agent":"DeepSeek-Harness-dsh-im (https://github.com/xmanrui/dsh-im, 1.1.0)"},...i===void 0?{}:{body:s?i:JSON.stringify(i)},signal:wx(e,a),redirect:"error"})}catch(I){throw I?.name==="AbortError"||I?.name==="TimeoutError"?I:new Error(`Discord ${o} transport failed`)}let c=null;if(A||g.status===429||!g.ok)try{c=await g.json()}catch{if(A){let I=new Error(`Discord ${o} returned invalid JSON`);throw I.status=g?.status,I}}if(g.status===429&&r){let I=Math.min(1e4,Math.max(50,Number(c?.retry_after)*1e3||1e3));return await Fde(I,e),this.#a(t,{method:o,body:i,signal:e,timeoutMs:a,expectBody:A,retry:!1,multipart:s})}if(!g.ok){let I=new Error(Ln(c?.message)??`Discord API failed with HTTP ${g.status}`);I.code=`discord-${g.status}`,I.status=g.status,(Number.isInteger(c?.code)||typeof c?.code=="string")&&(I.providerCode=c.code);let d=Number(c?.retry_after);throw Number.isFinite(d)&&d>=0&&(I.retry_after=d,I.retryAfter=d),I}return A?c:null}};async function Mx(n,t={}){let i=await new lE({token:n,...t}).getCurrentUser();if(!i?.id||i?.bot!==!0)throw new Error("Discord token does not belong to a bot");return{platformId:String(i.id),name:Ln(i.global_name)??Ln(i.username)??D("Discord\u673A\u5668\u4EBA"),username:Ln(i.username)}}var Ude=Object.freeze({success(){},error(){},clear(){},settled:()=>Promise.resolve()});function _x(n,t){!n||typeof n!="object"||(n[t]=(n[t]??0)+1)}async function Hde(n,t){let o=AbortSignal.timeout(t),i,e=new Promise((a,A)=>{i=()=>A(o.reason??new DOMException("Timed out","TimeoutError")),o.addEventListener("abort",i,{once:!0})});try{return await Promise.race([n(o),e])}finally{o.removeEventListener("abort",i)}}function Ff({adapter:n,target:t,reactions:o,status:i,logger:e=console,label:a="channel",timeoutMs:A=2e3}={}){if(!t||typeof n?.addReaction!="function"||typeof n?.removeReaction!="function"||typeof o?.processing!="string"||!o.processing||!Number.isSafeInteger(A)||A<=0)return Ude;let r=null,s=!1,g=async(B,f)=>{try{let Q=await Hde(f,A);return _x(i,B==="add"?"reactionsAdded":"reactionsRemoved"),{ok:!0,value:Q}}catch(Q){return _x(i,"reactionErrors"),e.warn?.(`[dsh-im:${a}] status reaction ${B} failed:`,Q?.message??Q?.name??String(Q)),{ok:!1,value:null}}},c=async B=>{if(r!==null){let Q=r;r=null,await g("remove",y=>n.removeReaction(t,Q,{signal:y}))}if(typeof B!="string"||!B)return;let f=await g("add",Q=>n.addReaction(t,B,{signal:Q}));f.ok&&f.value!==void 0&&f.value!==null&&(r=f.value)},I=c(o.processing),d=B=>{s||(s=!0,I=I.then(()=>c(B),()=>c(B)),I.catch(()=>{}))};return Object.freeze({success:()=>d(o.success),error:()=>d(o.error),clear:()=>d(null),settled:()=>I})}var Tx="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",Kde="\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002";function Bi(n){return typeof n=="string"?n.trim():""}function xde(n,t,o){return t.actor===o&&(n.kind!=="group"||n.addressed===!0)&&!qt(n)&&!Gt(n)&&!!Bi(n.content)}function Yde(n,t,o){let i=String(n??D("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim().slice(0,255)||D("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u7684\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002",{name:i});case"artifact-permission-required":return o?.key==="slack"?D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Slack \u5E94\u7528\u7F3A\u5C11 files:write \u6743\u9650\u3002\u8BF7\u66F4\u65B0 Manifest\u3001\u91CD\u65B0\u5B89\u88C5\u5E94\u7528\u5E76\u91CD\u65B0\u8FDE\u63A5\u673A\u5668\u4EBA\u540E\u91CD\u8BD5\u3002",{name:i}):o?.key==="discord"?D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11 Discord \u7684 Send Messages\u3001Attach Files \u6216 Read Message History \u6743\u9650\u3002",{name:i}):o?.key==="telegram"?D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Telegram \u4E0D\u5141\u8BB8\u673A\u5668\u4EBA\u5728\u5F53\u524D\u804A\u5929\u53D1\u9001\u6587\u6863\uFF0C\u8BF7\u68C0\u67E5\u804A\u5929\u6743\u9650\u3002",{name:i}):D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u6E20\u9053\u6743\u9650\u3002",{name:i});case"artifact-too-large":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002",{name:i});case"artifact-empty":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002",{name:i});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002",{name:i});case"artifact-rate-limited":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5F53\u524D\u6E20\u9053\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:i});case"artifact-provider-rejected":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002",{name:i});default:return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:i})}}function xi(){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}var Un=class{#e;#A;#t;#r;#a;#i;#c;#s;#I=new Map;#n=new Map;#o=new Map;#g=new Set;#l=new Set;#p=new Set;#d;#h=new pi;constructor({descriptor:t,bot:o,harness:i,state:e,status:a=xi(),logger:A=console,replyTimeoutMs:r=6e5,signal:s}){if(!t?.key||!t?.label)throw new TypeError("A channel descriptor is required");if(!o||typeof o.sendText!="function")throw new TypeError("A bot client is required");if(!i||!e)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#s=s,this.#d=new ni({label:t.key,logger:A})}get status(){return structuredClone(this.#a)}accept(t){if(this.#s?.aborted)return Promise.resolve();let o=Bi(t?.conversationId),i=t?.kind==="group"?"group":"direct",e={...t,kind:i,conversationId:o},a=Bi(e.messageId),A=Bi(e.senderId);if(!a||!A||!o||e.senderIsBot===!0||this.#r.hasSeen(a)||this.#g.has(a))return Promise.resolve();this.#g.add(a);let r=Ff({adapter:this.#A,target:e.kind==="direct"||e.addressed===!0?e.reactionTarget:null,reactions:this.#e.reactions,status:this.#a,logger:this.#i,label:this.#e.key});e.statusReaction=r;let s=this.#E(e,a,A);return s.then(()=>r.success(),()=>r.error()),s}#E(t,o,i){t.kind==="direct"&&so(this.#r,t.connectionTestTarget??t.replyTarget);let e=`${t.kind}:${t.conversationId}`,a=this.#n.get(e),A=Bi(t.content),r=Eo(A);if(r&&t.kind==="group"&&t.addressed===!0)return this.#B(t,o,kn());if(r&&t.kind==="direct"){if(/^\/batch$/iu.test(A)&&(this.#I.has(e)||a||this.#d.hasPending(e)))return this.#B(t,o,Co());let d=this.#h.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!qt(t)&&!Gt(t)});if(d.handled)return d.kind==="submit"?this.#u({...t,content:d.prompt,batchSubmission:{token:d.token}},o,i,e):this.#B(t,o,d.message)}else if(t.kind==="direct"&&this.#h.status(e).phase==="collecting"){let I=this.#h.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!qt(t)&&!Gt(t)});if(I.handled)return this.#B(t,o,I.message)}let g=t.kind==="direct"&&this.#h.status(e).phase==="collecting"?null:ci(A)?Fi:Gt(t)?null:Li(A)?Ii:Ui(A)?Hi:Ki(A)?li:null;if(g&&(t.kind!=="group"||t.addressed===!0)){let I;return I=this.#f(t,o,e,g).finally(()=>{this.#g.delete(o),this.#p.delete(I)}),this.#p.add(I),I}let c=this.#d.claimReply({key:e,actor:i,messageId:o,text:qt(t)||Gt(t)?"":t.content,addressed:t.kind!=="group"||t.addressed===!0,hasPendingQuestion:!!a,questionCompletion:a?.submitting||a?.claimedReplyMessageId?a.queue:null,isQuestionPending:()=>this.#n.has(e),send:I=>this.#A.sendText(t.replyTarget,I)});if(c){let I;return I=c.process(async()=>this.#r.hasSeen(o)?!1:(await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString(),!0)).finally(()=>{this.#g.delete(o),this.#l.delete(I)}),this.#l.add(I),I}if(a&&a.actor!==i)return this.#u(t,o,i,e);if(a?.submitting||a?.claimedReplyMessageId)return this.#u(t,o,i,e);if(a){xde(t,a,i)&&(a.claimedReplyMessageId=o);let d=(a.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#Q(t,o,i,e,a)).finally(()=>{this.#g.delete(o),a.claimedReplyMessageId===o&&(a.claimedReplyMessageId=null),a.queue===d&&(a.queue=null)});return a.queue=d,d}return this.#u(t,o,i,e)}#B(t,o,i){let e;return e=(async()=>{this.#r.hasSeen(o)||(await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString(),i&&await this.#A.sendText(t.replyTarget,i),this.#a.lastError=null)})().catch(async a=>{if(this.#s?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#a.lastError=a?.message??String(a);let A=At(this.#a,a);this.#i.error?.(`[dsh-im:${this.#e.key}] failed to process a batch input message [${A.referenceId}]:`,a)}).finally(()=>{this.#g.delete(o),this.#p.delete(e)}),this.#p.add(e),e}#u(t,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1}={}){let s=(this.#I.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#y(t,o,i,e,{alreadyRecorded:A})).finally(()=>{a&&this.#g.delete(o),this.#I.get(e)===s&&this.#I.delete(e)});return this.#I.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#I.values(),...[...this.#n.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#l,...this.#p])}async#f(t,o,i,e){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString();let a=t.replyTarget;try{let A=await e(Bi(t.content),this.#t,this.#r,i,{signal:this.#s,isDirect:t.kind==="direct",hasImages:qt(t),hasFiles:Gt(t),pendingInteraction:this.#n.has(i)||this.#d.hasPending(i),control:{owner:this,key:i}});A?.stopped&&await Promise.allSettled([this.#k(i),this.#d.closeRoute(i)]);for(let r of A?.messages??[A?.message])r&&await this.#A.sendText(a,r);this.#a.lastError=null}catch(A){if(A?.code==="turn-stopped"||this.#s?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#a.lastError=A?.message??String(A);let r=At(this.#a,A);this.#i.error?.(`[dsh-im:${this.#e.key}] failed to process a command [${r.referenceId}]:`,A),await this.#A.sendText(a,dt(r)).catch(()=>{})}}sendConnectionTest(t){return Pg({state:this.#r,text:t,channelLabel:D("{label}\u673A\u5668\u4EBA",{label:this.#e.label}),send:(o,i)=>this.#A.sendText(o,i)})}async#m(t,o,i=[],e){let a=await fo({artifacts:i,baseReceipt:e,deliveryId:o,channelKey:this.#e.key,signal:this.#s,sendImage:typeof this.#A.sendImage=="function"?A=>this.#A.sendImage(t,A):void 0,sendFile:typeof this.#A.sendFile=="function"?A=>this.#A.sendFile(t,A):void 0,onFailure:(A,r)=>At(this.#a,r,{userMessage:Yde(A?.fileName,r,this.#e),reason:r?.code}),sendFailureNotice:(A,r,s)=>this.#A.sendText(t,dt(s)),logger:this.#i});return this.#a.artifactsSent=(this.#a.artifactsSent??0)+a.artifactsSent,this.#a.artifactSendErrors=(this.#a.artifactSendErrors??0)+a.artifactSendErrors,{receipt:a.receipt,userVisible:a.userVisible,artifactSendErrors:a.artifactSendErrors}}async#y(t,o,i,e,{alreadyRecorded:a=!1}={}){if(!a){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString()}let A=t.replyTarget,r=Bi(t.content),s=t.batchSubmission,g=null,c=!1;try{if(this.#s?.throwIfAborted(),t.kind==="group"&&t.addressed!==!0){this.#a.messagesRejected+=1,this.#a.lastRejectedAt=new Date().toISOString();return}let I=qt(t),d=Gt(t);if(!r&&!I&&!d){await this.#A.sendText(A,D("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"));return}let B=r.toLowerCase();if(!I&&!d&&B==="/help"){await this.#A.sendText(A,[D("{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002",{label:this.#e.label}),"",D("\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002"),D("/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD"),D("/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587"),D("/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09"),D("/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A"),D("/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"),D("/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898"),D("/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD"),D("/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B"),D("/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7"),D("/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7"),D("/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B"),D("\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]"),D("/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset"),D("/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset"),D("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),D("/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"),D("/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1"),D("/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1"),D("/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09"),D("/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21"),D("/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21"),D("/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001"),D("/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C"),D("/help \u663E\u793A\u672C\u5E2E\u52A9")].join(` -`));return}if(!I&&!d&&B==="/status"){await this.#t.ensureRunning({signal:this.#s}),await this.#A.sendText(A,D("{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002",{label:this.#e.label}));return}let f=!I&&!d?await po(r,this.#t,e):null;if(f){for(let v of f.messages??[f.message])await this.#A.sendText(A,v);return}if(!I&&!d&&B==="/new"){await this.#r.clearSession(e),await this.#A.sendText(A,D("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"));return}let Q=!I&&!d?await gi(r,this.#t,this.#r,e,{signal:this.#s}):null;if(Q){await this.#A.sendText(A,Q.message);return}await this.#A.sendTyping?.(A).catch(v=>{this.#i.warn?.(`[dsh-im:${this.#e.key}] typing indicator failed:`,v)});let y=!1;if(typeof this.#A.openDeliveryStream=="function")try{g=await this.#A.openDeliveryStream(A),c=!0}catch(v){this.#i.warn?.(`[dsh-im:${this.#e.key}] unable to start a semantic reply stream; using final delivery:`,v)}else if(typeof this.#A.openStream=="function")try{g=await this.#A.openStream(A)}catch(v){this.#i.warn?.(`[dsh-im:${this.#e.key}] unable to start a streamed reply; using text:`,v)}let m=I?await Io(t,{signal:this.#s}):void 0,{answer:_,artifacts:T=[]}=await si({harness:this.#t,state:this.#r,key:e,text:r,content:m,createOptions:this.#s?{signal:this.#s}:void 0,existsOptions:this.#s?{signal:this.#s}:void 0,askOptions:{timeoutMs:this.#c,signal:this.#s,control:{owner:this,key:e},onUpdate:g?async v=>{let W=v.type==="text"?v.text:v.type==="tool"?D("\u6B63\u5728\u4F7F\u7528{name}\u2026",{name:v.name}):v.text;if(W){let Y=v.type==="text"?"markdown":"plain";await g.update(c?Pn(W,Y):W)}}:void 0,onInteraction:v=>this.#C(v,{key:e,actor:i,target:A,requiresMention:t.kind==="group"&&t.requiresMention!==!1}),onInteractionResolved:v=>this.#M(v),files:t.files}});s&&this.#h.complete(e,s.token);let G=!Bi(_)&&T.length>0,x=G?D(Kde):_,J=G?"plain":"markdown",L=null,q=null;if(g)try{let v=await g.finish(c?Pn(x,J):x);y=!0,q=zt({deliveryId:o,presentation:v?.presentation??g.presentation??`${this.#e.key}-stream`,providerMessageIds:[...di(g),...di(v)],deliveryOutcome:v?.deliveryOutcome,reason:v?.reason})}catch(v){g.cancel?.(),this.#i.warn?.(`[dsh-im:${this.#e.key}] streamed reply finalization failed; using text:`,v)}if(!y)try{let v=typeof this.#A.sendDelivery=="function"?await this.#A.sendDelivery(A,Pn(x,J)):await this.#A.sendText(A,x);q=zt({deliveryId:o,presentation:v?.presentation??`${this.#e.key}-text`,providerMessageIds:di(v),deliveryOutcome:v?.deliveryOutcome,reason:v?.reason})}catch(v){L=Da(v)}let j=q?.deliveryOutcome==="unknown";q?.deliveryOutcome==="failed"?L=Da(new Error(`Final text delivery failed (${q.reason??"unknown"})`),{uncertain:!1}):j&&(L=Da(new Error(`Final text delivery outcome is unknown (${q.reason??"unknown"})`)));let K=await this.#m(A,o,T,q);if(L&&(!K.userVisible||j))throw L.deliveryReceipt=K.receipt,L;return L&&K.artifactSendErrors===0&&At(this.#a,L),K.userVisible&&(this.#a.messagesReplied+=1,this.#a.lastReplyAt=new Date().toISOString(),this.#a.lastError=null,!L&&K.artifactSendErrors===0&&go(this.#a)),K.receipt}catch(I){let d=I?.code==="turn-stopped";s&&d&&this.#h.complete(e,s.token);let B=s&&!d?this.#h.fail(e,s.token):null;if(d){if(t.statusReaction?.clear(),g)try{await g.finish(D("\u5DF2\u505C\u6B62\u3002"))}catch{g.cancel?.()}return}if(this.#s?.aborted){t.statusReaction?.clear(),g?.cancel?.();return}t.statusReaction?.error(),this.#a.lastError=I?.message??String(I);let f=async T=>{let G=typeof g?.fail=="function"?"fail":typeof g?.finish=="function"?"finish":null;if(!G)return!1;try{let x=await g[G](T);return G==="fail"?!!x&&x.deliveryOutcome!=="failed":x!==!1&&x?.deliveryOutcome!=="failed"}catch(x){return this.#i.warn?.(`[dsh-im:${this.#e.key}] unable to finalize the failed stream:`,x),!1}},Q=lo(I),y=Bo(I),m=At(this.#a,I,{userMessage:y??Q,reason:Gi(I)?.reason}),_=B?.retained?`${dt(m)} +${T}`:j;y&&await Q.finish(F)||await this.#O(g,F)}catch{this.#c.error?.("[dsh-dingtalk] failed to send the safe error reply")}}finally{await this.#N(e),await this.#B.closeRoute(e)}}async#w(t,o,i,e,a,A){this.#o?.throwIfAborted();let r=this.#l.get(e),s=a.claimedReplyMessageId===o;if(!r||r!==a||r.submitting)return s&&(!r||r!==a)?this.#k(t,o):this.#Q(t,o,i,e,{releaseMessageId:!1,statusReaction:A});if(this.#a.hasSeen(o))return;if(await this.#a.markSeen(o),Ta(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),String(t.conversationType)==="2"&&t.isInAtList!==!0){Ta(this.#i,"messagesIgnored");return}let g;try{g=xg(t.sessionWebhook)}catch{Ta(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=D("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=t?.msgtype==="text"?St(t?.text?.content):null;if(!c){try{await this.#O(g,D("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"))}catch{this.#c.error?.("[dsh-dingtalk] failed to reject a non-text interaction reply")}return}let I=this.#l.get(e);if(!I||I!==a||I.submitting){if(s&&(!I||I!==a)){try{await this.#O(g,D(wM))}catch{this.#c.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}return}return this.#Q(t,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0,statusReaction:A})}if(I.sessionWebhook=g,I.needsPresentation){try{await this.#R(I)}catch{this.#y(A,"error"),this.#i.lastError=D("\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002"),this.#c.error?.("[dsh-dingtalk] failed to retry an interaction question"),I.interaction.reconnect?.()}return}let d=I.questions[I.index];if(d){if(I.answers.push(ni(d,c)),I.index+=1,I.indexthis.#O(e,c)})||t?.kind!=="question")return;let A=t?.payload?.questions,r=typeof t?.interactionId=="string"?t.interactionId:t?.rpcId;if(typeof t.rpcId!="string"||typeof r!="string"||typeof t.sessionId!="string"||!Array.isArray(A)||A.length===0||A.some(c=>!ii(c))){this.#c.warn?.("[dsh-dingtalk] ignored an invalid Harness question interaction");return}if(t.recovered===!0){await t.respond({ok:!1,error:{code:"cancelled",message:"DingTalk safely cancelled an interaction left by an earlier client.",details:{}}});try{await this.#O(e,D("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"))}catch{this.#c.error?.("[dsh-dingtalk] failed to send an interaction recovery notice")}return}let s=this.#l.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#R(s);return}if(this.#p.has(r))return;if(s){this.#c.warn?.("[dsh-dingtalk] cancelled a second pending Harness question"),await t.respond({ok:!1,error:{code:"cancelled",message:"DingTalk is already handling another user interaction.",details:{}}});return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:i,requiresMention:a,questions:A,answers:[],index:0,sessionWebhook:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0};this.#l.set(o,g),this.#p.set(g.interactionId,o),await this.#R(g)}async#_(t){if(await this.#B.handleResolved(t))return;let o=t?.interactionId;if(t?.kind!=="question"||typeof o!="string")return;let i=this.#p.get(o);i&&this.#v(i,o)}async#R(t){let o=t.questions[t.index];o&&(await this.#O(t.sessionWebhook,oi(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1)}async#k(t,o){if(this.#a.hasSeen(o))return;await this.#a.markSeen(o),Ta(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let i;try{i=xg(t.sessionWebhook)}catch{Ta(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString();return}try{await this.#O(i,D(wM))}catch{this.#c.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}}#T(t,o){let i=this.#l.get(t);return!i||o!==void 0&&i.interactionId!==o?null:(this.#l.delete(t),this.#p.delete(i.interactionId),i)}#v(t,o){return this.#T(t,o)!==null}async#N(t){let o=this.#T(t);if(!(!o||o.kind!=="question"))try{await o.interaction.respond({ok:!1,error:{code:"cancelled",message:"The DingTalk interaction ended before the user answered.",details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(i){i?.code!=="interaction-not-pending"&&this.#c.warn?.("[dsh-dingtalk] failed to cancel a pending Harness interaction")}}#F(){typeof this.#a.pendingSenders=="function"&&(this.#i.pendingSenders=this.#a.pendingSenders())}async#O(t,o){let i=[];for(let e of cK(o,this.#n)){this.#o?.throwIfAborted();let a=await this.#e.sendText({clientId:this.#A,clientSecret:this.#t,sessionWebhook:t,text:e,signal:this.#o});i.push(...hi(a))}return i}async#U(t,o,i,e,a){let A=async(s,g)=>mpe(await this.#e[s]({clientId:this.#A,clientSecret:this.#t,target:t,file:g,signal:this.#o})),r=await Qo({artifacts:e,baseReceipt:a,deliveryId:i,aggregatePresentation:a?"dingtalk-text-and-files":"dingtalk-files",channelKey:"dingtalk",signal:this.#o,sendImage:typeof this.#e.sendImage=="function"?s=>A("sendImage",s):void 0,sendFile:typeof this.#e.sendFile=="function"?s=>A("sendFile",s):void 0,onFailure:(s,g)=>At(this.#i,g,{userMessage:Npe(s?.fileName,g),reason:g?.code}),sendFailureNotice:(s,g,c)=>this.#O(o,dt(c)),logger:this.#c});return this.#i.artifactsSent=(this.#i.artifactsSent??0)+r.artifactsSent,this.#i.artifactSendErrors=(this.#i.artifactSendErrors??0)+r.artifactSendErrors,{receipt:r.receipt,userVisible:r.userVisible,artifactSendErrors:r.artifactSendErrors}}};function Hf(n){return typeof n=="string"&&n.trim()?n.trim():null}function mx(n){let t=Array.isArray(n?.approvedSenders)?n.approvedSenders:n?.approvedSenders instanceof Set?[...n.approvedSenders]:[];return new Set(t.map(o=>Hf(typeof o=="string"?o:o?.staffId)).filter(Boolean))}function Ppe(n){return mx(n).size}function Sx(n){return n?.connected===!0||n?.socket?.readyState===1}function Gpe(n,t){return new Promise((o,i)=>{if(t.aborted){i(t.reason);return}let e=()=>i(t.reason);t.addEventListener("abort",e,{once:!0}),Promise.resolve(n).then(a=>{t.removeEventListener("abort",e),o(a)},a=>{t.removeEventListener("abort",e),i(a)})})}async function Fpe(n,t,o){for(;;){if(o?.throwIfAborted(),Sx(n))return;await new Promise((i,e)=>{let a=setTimeout(()=>{o?.removeEventListener("abort",A),i()},t),A=()=>{clearTimeout(a),e(o.reason??new DOMException("Aborted","AbortError"))};o?.addEventListener("abort",A,{once:!0})})}}async function Lpe(n,t,o,i){let e=AbortSignal.timeout(t),a=AbortSignal.any([i,e]),A=!1,r=Promise.resolve().then(()=>n.connect()).finally(()=>{A=!0});try{await Gpe(r,a),await Fpe(n,o,a)}catch(s){throw a.aborted?(A||r.then(()=>n.disconnect()).catch(()=>{}),i.aborted?i.reason:new Error(`DingTalk Stream handshake timed out after ${t}ms`)):s}}async function Upe({clientId:n,clientSecret:t}){let{DWClient:o,TOPIC_ROBOT:i}=await import("dingtalk-stream");return{client:new o({clientId:n,clientSecret:t,endpoint:"https://api.dingtalk.com",autoReconnect:!1,keepAlive:!0,debug:!1}),topic:i}}function Hpe({pendingSenders:n=[],approvedSenders:t=0}={}){return{startedAt:null,ready:!1,dingtalkStreamState:"idle",harnessReachable:!1,lastConnectedAt:null,lastCheckedAt:null,lastCallbackAt:null,authorizationMode:"sender-staff-id-approval",approvedSenderCount:t,...MM({pendingSenders:n})}}var sE=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n;#o;#g;#l=null;#p=null;#d=null;#h=null;#E=null;#B=null;#u=new Set;constructor({config:t,clientSecret:o,harness:i,state:e,logger:a=console,replyTimeoutMs:A=6e5,maxMessageChars:r=4e3,connectTimeoutMs:s=15e3,connectPollIntervalMs:g=25,api:c=IK(),streamFactory:I=Upe}){if(!t||!Hf(t.clientId)||!Hf(o))throw new TypeError("DingtalkRuntime requires app credentials");if(!i||!e)throw new TypeError("DingtalkRuntime requires Harness and state");if(typeof I!="function")throw new TypeError("streamFactory must be a function");this.#e=t,this.#A=o.trim(),this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#s=s,this.#I=g,this.#n=c,this.#o=I,this.#g=Hpe({pendingSenders:this.#m(),approvedSenders:Ppe(t)})}get status(){if(this.#p){let t=this.#p.status;Object.assign(this.#g,t)}else this.#g.pendingSenders=this.#m();return structuredClone(this.#g)}pendingSender(t){return typeof this.#r.pendingSender=="function"?this.#r.pendingSender(t):null}pendingSenders(){return this.#m()}async start(){return this.#l&&this.#g.ready?this.status:this.#h?this.#h:(this.#h=this.#f().finally(()=>{this.#h=null}),this.#h)}async#f(){await this.stop();let t=new AbortController;this.#B=t;let{signal:o}=t;this.#g.startedAt=new Date().toISOString(),this.#g.dingtalkStreamState="connecting",this.#g.lastError=null;try{if(await this.#t.ensureRunning({signal:o}),this.#g.harnessReachable=!0,typeof this.#r.removePendingSenderByStaffId=="function"){for(let A of mx(this.#e))await this.#r.removePendingSenderByStaffId(A);this.#g.pendingSenders=this.#m()}this.#p=new Uf({api:this.#n,clientId:this.#e.clientId,clientSecret:this.#A,approvedSenders:this.#e.approvedSenders,harness:this.#t,state:this.#r,status:this.#g,logger:this.#a,replyTimeoutMs:this.#i,maxMessageChars:this.#c,signal:o});let i=await this.#o({clientId:this.#e.clientId,clientSecret:this.#A});if(o.throwIfAborted(),this.#l=i?.client??i,this.#d=i?.topic??i?.TOPIC_ROBOT??"/v1.0/im/bot/messages/get",!this.#l||typeof this.#l.registerCallbackListener!="function"||typeof this.#l.connect!="function"||typeof this.#l.disconnect!="function"||typeof this.#l.socketCallBackResponse!="function")throw new TypeError("streamFactory returned an invalid DingTalk Stream client");let e=this.#l,a=this.#p;return e.registerCallbackListener(this.#d,A=>{if(this.#l!==e||this.#p!==a)return;let r=Hf(A?.headers?.messageId);if(r)try{e.socketCallBackResponse(r,{success:!0})}catch{this.#a.warn?.("[dsh-dingtalk] unable to acknowledge an inbound callback")}let s=Promise.resolve().then(async()=>{if(this.#p!==a)return;let g;try{g=typeof A?.data=="string"?JSON.parse(A.data):A?.data}catch{this.#g.lastError=D("\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002"),this.#a.warn?.("[dsh-dingtalk] ignored an invalid callback payload");return}!g||typeof g!="object"||(this.#g.lastCallbackAt=Date.now(),await a.accept(g))}).catch(()=>{o.aborted||this.#p!==a||(this.#g.lastError=D("\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002"),this.#a.error?.("[dsh-dingtalk] callback processing failed"))}).finally(()=>this.#u.delete(s));this.#u.add(s)}),await Lpe(e,this.#s,this.#I,o),this.#g.ready=!0,this.#g.dingtalkStreamState="connected",this.#g.lastConnectedAt=Date.now(),this.#g.lastCheckedAt=Date.now(),this.#g.lastError=null,this.#E=setInterval(()=>{let A=Sx(e);this.#g.ready=A,this.#g.dingtalkStreamState=A?"connected":"reconnecting",this.#g.lastCheckedAt=Date.now(),A&&(this.#g.lastError=null)},1e3),this.#E.unref?.(),this.status}catch(i){let e=o.aborted;throw this.#g.ready=!1,this.#g.dingtalkStreamState=e?"idle":"failed",this.#g.lastError=e?null:i?.message??String(i),await this.stop({preserveError:!e}),i}}async stop({preserveError:t=!1}={}){let o=t?this.#g.lastError:null,i=this.#B;this.#B=null,i?.abort(new DOMException("DingTalk runtime stopped","AbortError")),this.#E&&clearInterval(this.#E),this.#E=null,this.#g.ready=!1;let e=this.#l;if(this.#l=null,this.#d=null,e)try{await e.disconnect()}catch{this.#a.warn?.("[dsh-dingtalk] DingTalk Stream disconnect failed")}return await Promise.allSettled([...this.#u]),this.#u.clear(),this.#p&&await this.#p.waitForIdle(),this.#p=null,this.#g.dingtalkStreamState=t?"failed":"idle",this.#g.lastError=o,this.status}async sendConnectionTest(t){return Hg({state:this.#r,text:t,channelLabel:D("\u9489\u9489\u673A\u5668\u4EBA"),send:async({sessionWebhook:o},i)=>{if(!this.#g.ready||!this.#B)throw new Error("DingTalk runtime is not connected");await this.#n.sendText({clientId:this.#e.clientId,clientSecret:this.#A,sessionWebhook:o,text:i,signal:this.#B.signal})}})}#m(){return typeof this.#r.pendingSenders=="function"?this.#r.pendingSenders():[]}};import{spawn as Zpe}from"node:child_process";import{randomUUID as _M}from"node:crypto";import{isAbsolute as Xpe}from"node:path";import{isAbsolute as Kpe}from"node:path";var xpe=256,Ype=/[\p{White_Space}\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,jpe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;function gE(n,t){let o=new Error(t);return o.code=n,o}function Jpe(n){if(typeof n!="string"||!n||n.length>xpe||Ype.test(n))throw gE("session-id-invalid","A non-empty, safe session id is required");return n}function qpe(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds)||t.archivedSessionIds.some(i=>typeof i!="string"||!i))throw new Error("Harness returned an invalid response for workspace.list");let o=[];for(let i of t.items){if(typeof i?.workspaceId!="string"||!i.workspaceId||typeof i.path!="string"||!Kpe(i.path)||!Array.isArray(i.sessionIds)||i.sessionIds.some(e=>typeof e!="string"||!e))throw new Error("Harness returned an invalid response for workspace.list");for(let e of i.sessionIds)e===n&&o.push(i)}if(o.length===0)throw gE("session-not-registered","The session is not registered to a Harness workspace");if(o.length!==1)throw gE("session-workspace-ambiguous","The session is registered to more than one Harness workspace");if(jpe.test(o[0].path))throw new Error("Harness returned an unsafe workspace path for the session");return{workspace:o[0],archived:t.archivedSessionIds.includes(n)}}function zpe(n,t){if(!Array.isArray(t?.items)||t.items.some(a=>typeof a?.sessionId!="string"||!a.sessionId))throw new Error("Harness returned an invalid response for session.list");let o=t.items.filter(a=>a.sessionId===n);if(o.length===0)throw gE("session-summary-unavailable","The session is no longer available from Harness");if(o.length!==1)throw new Error("Harness returned duplicate session summaries for session.list");let[i]=o;if(i.origin==="subagent")throw gE("session-subagent-unsupported","Subagent sessions cannot be adopted as a bot conversation");if(i.origin!==void 0)throw new Error("Harness returned an invalid session origin for session.list");let e=i.projections?.values?.title;if(e!=null&&typeof e!="string")throw new Error("Harness returned an invalid session title for session.list");return{title:typeof e=="string"?e:null}}async function Dx(n,t,o={},i=3e4){let e=Jpe(t);await n.ensureRunning(o);let a=await n.rpc("workspace.list",{},i,o),{workspace:A,archived:r}=qpe(e,a),s=zpe(e,await n.rpc("session.list",{},i,o)),g=await n.rpc("session.create",{workspaceId:A.workspaceId,sessionId:e},i,o);if(!g||g.sessionId!==e)throw new Error("Harness returned an invalid response for session.create");return{sessionId:e,workspace:A.path,title:s.title,archived:r}}function cE(n,t,o){try{let i=n?.(t);i&&typeof i.then=="function"&&Promise.resolve(i).catch(o)}catch(i){o(i)}}async function Vpe({apiProxy:n,rpcId:t,signal:o,onOpen:i,onEnvelope:e}){let a=new AbortController,A=()=>a.abort(o.reason),r,s,g,c=I=>{a.signal.aborted||(g=I,A())};o.addEventListener("abort",A,{once:!0});try{for(r=n.events.mux({rpcId:t,payload:{}},a.signal)[Symbol.asyncIterator](),s=Promise.resolve(r.next()),a.signal.aborted||cE(i,A,c);!a.signal.aborted;){let{value:I,done:d}=await s;if(d||a.signal.aborted)break;cE(e,{type:"server-request",rpcId:I?.rpcId,method:I?.payload?.type,payload:I?.payload},c),a.signal.aborted||(s=Promise.resolve(r.next()))}}catch(I){c(I)}finally{let I=a.signal.aborted;o.removeEventListener("abort",A),A(),await s?.catch(()=>{});try{await r?.return?.()}catch(d){I||(g??=d)}}if(g)throw g}function Wpe({baseUrl:n,createWebSocket:t,signal:o,onOpen:i,onEnvelope:e,onMalformed:a}){let A=new URL("/api/events.mux",n);return A.protocol=A.protocol==="https:"?"wss:":"ws:",new Promise((r,s)=>{let g=t(A.toString()),c=!1,I=!1,d=T=>{if(!I){I=!0,g.removeEventListener("open",f),g.removeEventListener("message",Q),g.removeEventListener("close",y),g.removeEventListener("error",m),o.removeEventListener("abort",_);try{(g.readyState===0||g.readyState===1)&&g.close()}catch{}T&&!o.aborted?s(T):r()}},B=()=>d(),f=()=>{I||c||(c=!0,cE(i,B,d))},Q=T=>{if(I)return;let R;try{if(typeof T.data!="string")throw new Error("binary WebSocket frame");R=JSON.parse(T.data)}catch(H){cE(a,H,()=>{});return}cE(e,R,d)},y=()=>d(c?void 0:new Error("Harness event mux WebSocket closed before opening")),m=()=>d(new Error(c?"Harness event mux WebSocket failed":"Harness event mux WebSocket failed before opening")),_=()=>d();g.addEventListener("open",f),g.addEventListener("message",Q),g.addEventListener("close",y,{once:!0}),g.addEventListener("error",m,{once:!0}),o.addEventListener("abort",_,{once:!0}),o.aborted&&_()})}async function wx(n){if(!n.signal.aborted)return n.baseUrl!==void 0&&n.baseUrl!==null?Wpe(n):Vpe(n)}var $pe=new Map,ede=new WeakMap,Ade=64;async function tde(n){let t=n?.body;if(!t||typeof t.getReader!="function")return null;let o=t.getReader(),i=[],e=0;try{for(;;){let{done:r,value:s}=await o.read();if(r)break;if(!(s instanceof Uint8Array)||e+s.byteLength>Ade)return null;i.push(s),e+=s.byteLength}}catch{return null}finally{try{await o.cancel()}catch{}}let a=new Uint8Array(e),A=0;for(let r of i)a.set(r,A),A+=r.byteLength;return new TextDecoder().decode(a)}function rde(n){if(n==="localhost"||n==="[::1]")return!0;let t=n.split(".");return t.length===4&&t[0]==="127"&&t.every(o=>/^\d{1,3}$/.test(o)&&Number(o)<=255)}async function ade(n,t){return n.status===401?"harness-auth-required":n.status===407?"harness-proxy-auth-required":n.status===403?(await tde(n))?.trim()!=="forbidden"?"harness-request-forbidden":rde(t)?"harness-loopback-forbidden":"harness-host-untrusted":n.status===404?"harness-api-not-found":"harness-http-failed"}function ide(n){let t=typeof n=="string"?$pe:ede,o=t.get(n);return o||(o={ownerships:new Map,claims:new Map,controls:new WeakMap,nextOrder:0},t.set(n,o)),o}function Ox(n,t){return new Promise((o,i)=>{let e=()=>t.removeEventListener("abort",a),a=()=>{e(),i(t.reason)};if(t.aborted){a();return}t.addEventListener("abort",a,{once:!0}),Promise.resolve().then(()=>(t.throwIfAborted(),n())).then(A=>{e(),o(A)},A=>{e(),i(A)})})}function bx(n){let t=typeof n?.owner;return t!=="object"&&t!=="function"||n.owner===null||typeof n.key!="string"||!n.key?null:{owner:n.owner,key:n.key}}function TM(n){return n!==null&&typeof n=="object"&&typeof n.provider=="string"&&!!n.provider&&typeof n.model=="string"&&!!n.model&&(n.reasoningEffort===void 0||typeof n.reasoningEffort=="string"&&!!n.reasoningEffort)}function ode(n){return n!==null&&typeof n=="object"&&Array.isArray(n.efforts)&&n.efforts.length>0&&n.efforts.every(t=>t!==null&&typeof t=="object"&&typeof t.id=="string"&&!!t.id&&typeof t.name=="string"&&!!t.name&&(t.description===void 0||typeof t.description=="string"))&&(n.defaultEffort===void 0||typeof n.defaultEffort=="string"&&!!n.defaultEffort)}function Mx(n,t,{session:o=!1}={}){if(!n||typeof n!="object"||!Array.isArray(n.groups)||!Array.isArray(n.failures))throw new Error(`Harness returned an invalid response for ${t}`);for(let i of n.groups){if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||!Array.isArray(i.models))throw new Error(`Harness returned an invalid response for ${t}`);for(let e of i.models)if(!e||typeof e!="object"||typeof e.id!="string"||!e.id||typeof e.name!="string"||!e.name||e.description!==void 0&&typeof e.description!="string"||e.reasoning!==void 0&&!ode(e.reasoning))throw new Error(`Harness returned an invalid response for ${t}`)}for(let i of n.failures)if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||i.message!==void 0&&typeof i.message!="string")throw new Error(`Harness returned an invalid response for ${t}`);if(o&&(!TM(n.current)||typeof n.routable!="boolean"))throw new Error(`Harness returned an invalid response for ${t}`);return n}function _x(){let n=new Error("Harness turn was stopped before producing a text reply");return n.code="turn-stopped",n}function nde(n){return Array.isArray(n?.items)?n.items.flatMap(t=>typeof t?.path=="string"&&Xpe(t.path)?[t.path]:[]):[]}function sde(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds))throw new Error("Harness returned an invalid response for workspace.list");let o=t.items.find(i=>i?.path===n);if(!o)return null;if(!Array.isArray(o.sessionIds)||o.sessionIds.some(i=>typeof i!="string"))throw new Error("Harness returned invalid session IDs for workspace.list");return o}function gde(n){if(typeof n=="number"&&Number.isFinite(n))return n<1e12?n*1e3:n;if(typeof n=="string"&&n){let t=Date.parse(n);if(!Number.isNaN(t))return t}return null}function cde(n){if(!n||typeof n!="object")return null;let t=[n?.header?.lastActivityAt,n?.header?.updatedAt,n?.header?.createdAt,n?.projections?.values?.lastActivityAt,n?.projections?.values?.updatedAt,n?.projections?.values?.createdAt,n?.lastActivityAt,n?.updatedAt,n?.createdAt];for(let o of t){let i=gde(o);if(i!==null)return i}return null}function Ide(n,t,o){if(!Array.isArray(o?.items))throw new Error("Harness returned an invalid response for session.list");let i=new Set(t),e=new Map(o.items.flatMap(a=>typeof a?.sessionId=="string"?[[a.sessionId,a]]:[]));return{workspace:n.path,sessions:n.sessionIds.map(a=>{let A=e.get(a),r=A?.projections?.values?.title,s={sessionId:a,title:typeof r=="string"?r:null,archived:i.has(a),blank:A?.blank===!0,origin:A?.origin==="subagent"?"subagent":null,summaryAvailable:A!==void 0},g=A?.projections?.asOfSeq;Number.isSafeInteger(g)&&g>=-1&&(s.lastSeq=g);let c=cde(A);return c!==null&&(s.time=c),s})}}function IE(n,t){return new Promise((o,i)=>{if(t?.aborted){i(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(()=>{t?.removeEventListener("abort",a),o()},n),a=()=>{clearTimeout(e),i(t.reason??new DOMException("Aborted","AbortError"))};t?.addEventListener("abort",a,{once:!0})})}function lde(n){return(n?.data?.message?.content??[]).filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` +`).trim()}function Ei(n){return typeof n=="string"&&n.trim()?n.trim():null}function pde(n){if(!n||typeof n!="object")return null;let t=Ei(n.message);if(t)return t;let o=Ei(n.name),i=Ei(n.code);return o||i?[o??"Error",i].filter(Boolean).join(": "):null}function dde(n,t){let o=[...t].map(i=>i?.event??i).filter(Boolean).sort((i,e)=>(i.seq??-1)-(e.seq??-1));for(let i of o){let e=i.seq??-1;if(e<=n.lastSeq)continue;if(n.lastSeq=e,i.type==="turn/start"){let A=i.data?.turn??null;n.active&&A!==n.turn&&(n.active=!1),n.turn!==null&&A!==n.turn&&(n.completed=!0),n.openTurn=A;continue}if(i.type==="user/message"&&i.data?.source?.rpcId===n.promptRpcId){n.active=!0,n.started=!0,n.completed=!1,n.turn=i.data?.turn??n.openTurn;continue}if(i.type==="turn/end"&&i.data?.turn===n.turn){n.active=!1,n.completed=!0;continue}let a=null;if(i.type==="tool/call"&&n.active&&i.data?.turn===n.turn&&typeof i.data?.callId=="string"&&i.data.callId)a={callId:i.data.callId,name:i.data?.name,arguments:i.data?.arguments};else if(i.type==="tool/code-dispatch-start"&&n.active&&typeof i.data?.subCallId=="string"&&i.data.subCallId){let A;try{A=JSON.stringify(i.data?.arguments)}catch{A=void 0}a={callId:i.data.subCallId,name:i.data?.name,arguments:A}}a&&n.toolCalls.set(a.callId,Object.freeze(a))}}var Ap=class{#e;#A;#t=null;#r=null;#a=new Map;#i="";#c=!1;#s=null;#I=new Map;#n=null;constructor({promptRpcId:t,afterSeq:o=-1}){this.#e=t,this.#A=o}get finished(){return this.#c}get answer(){return this.#i.trim()}get reason(){return this.#s}get tracking(){return this.#r!==null&&!this.#c}get turn(){return this.#r}consumeAll(t){let o=[],i=a=>{if(a.type==="text"&&o.length>0&&o[o.length-1].type==="text"){o[o.length-1]=a;return}o.push(a)},e=[...t].map(a=>a?.event??a).filter(Boolean).sort((a,A)=>(a.seq??-1)-(A.seq??-1));for(let a of e){let A=a.seq??-1;if(!(A<=this.#A)){if(this.#A=A,a.type==="turn/start"&&(this.#t=a.data?.turn??null),a.type==="user/message"&&a.data?.source?.rpcId===this.#e){this.#r=this.#t;continue}if(this.#r!==null){if(a.type==="turn/end"){if(a.data?.turn!==this.#r)continue;this.#c=!0,this.#s=a.data?.reason??null,this.#t=null;continue}if(a.data?.turn===this.#r){if(a.type==="assistant/chunk"&&a.data?.chunk?.type==="text-delta"){let r=a.data?.step??0,s=a.data.chunk.index??0,g=`${r}:${s}`;this.#a.set(g,(this.#a.get(g)??"")+a.data.chunk.text);let c=`${r}:`,I=[...this.#a.entries()].filter(([d])=>d.startsWith(c)).sort(([d],[B])=>Number(d.split(":")[1])-Number(B.split(":")[1])).map(([,d])=>d).join(` +`).trim();I&&I!==this.#i&&(this.#i=I,i({type:"text",text:I}));continue}if(a.type==="assistant/message"){let r=lde(a);r&&r!==this.#i&&(this.#i=r,i({type:"text",text:r}));continue}if(a.type==="tool/call"){let r=Ei(a.data?.name)??D("\u5DE5\u5177"),s=Ei(a.data?.callId)??Ei(a.data?.subCallId);s&&this.#I.set(s,r),this.#n=r,i({type:"tool",name:r,...s?{callId:s}:{}})}else if(a.type==="tool/result"){let r=Ei(a.data?.message?.source?.callId)??Ei(a.data?.callId)??Ei(a.data?.subCallId),s=(r?this.#I.get(r):null)??this.#n,g=pde(a.data?.error);i({type:"status",text:D("\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026"),...s?{toolName:s}:{},...g?{error:g}:{}})}}}}}return o}consume(t){return this.consumeAll(t).at(-1)??null}},tn=class extends Error{constructor(t,o){super(`${t}: ${o?.message??"unknown Harness RPC error"}`),this.name="HarnessRpcError",this.method=t,this.code=o?.code??"internal",this.details=o?.details??{}}},Un=class extends Error{constructor(t,o,{cause:i,status:e}={}){let a=Number.isInteger(e)?`, HTTP ${e}`:"";super(`Harness ${o} transport failed (${t}${a})`,{cause:i}),this.name="HarnessTransportError",this.code=t,this.method=o,Number.isInteger(e)&&(this.status=e)}},NM=class extends Error{constructor(t){super("Harness health RPC was rejected",{cause:t}),this.name="HarnessHealthError",this.code="harness-rpc-rejected",this.method="host.describe"}},tp=class extends Error{constructor(t,o){super(o),this.name="HarnessInteractionError",this.code=t}},Hn=class extends Error{constructor(t,{reason:o,providerCode:i}={}){super(`Harness turn failed (${t})`),this.name="HarnessTurnError",this.code=t,this.promptAccepted=!0,o&&typeof o=="object"&&(this.reason=o),typeof i=="string"&&i&&(this.providerCode=i)}};function Tx(n){let t=Ei(n?.kind)??Ei(n);if(t==="error"){let o=n?.error??n?.failure;return new Hn("harness-turn-failed",{reason:n,providerCode:Ei(o?.code)??void 0})}return t==="max-tokens"?new Hn("model-max-tokens",{reason:n}):t==="blocked"?new Hn("turn-blocked",{reason:n}):["interrupted","stopped","cancelled","canceled"].includes(t)?new Hn("turn-interrupted",{reason:n}):t==="aborted"?new Hn("turn-aborted",{reason:n}):t==="completed"?new Hn("model-empty-response",{reason:n}):new Hn("harness-turn-failed",{reason:n})}function hde(n){return n==null?!0:(Ei(n?.kind)??Ei(n))==="completed"}var pr=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n;#o;#g;#l;#p;#d;#h=null;#E;#B;#u;#f;constructor({baseUrl:t,apiProxy:o,interactionScope:i=o,workspace:e,agentPreset:a,autostart:A=!1,dshBin:r="dsh",fetchImpl:s=fetch,createWebSocket:g=m=>new WebSocket(m),interactionReconnectDelayMs:c=500,rpcIdPrefix:I="im",logPrefix:d="dsh-im",commandExecutor:B,controlExecutor:f,sessionMaintenanceExecutor:Q,fileIngressExecutor:y}){if(typeof g!="function")throw new TypeError("createWebSocket must be a function");if(!Number.isFinite(c)||c<0)throw new TypeError("interactionReconnectDelayMs must be a non-negative number");if(typeof I!="string"||!I.trim())throw new TypeError("rpcIdPrefix must be a non-empty string");if(typeof d!="string"||!d.trim())throw new TypeError("logPrefix must be a non-empty string");if(B!==void 0&&typeof B!="function")throw new TypeError("commandExecutor must be a function");if(f!==void 0&&typeof f!="function")throw new TypeError("controlExecutor must be a function");if(Q!==void 0&&typeof Q!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");if(y!==void 0&&typeof y!="function")throw new TypeError("fileIngressExecutor must be a function");if(this.#e=t===void 0?null:new URL(t),this.#A=this.#e?null:o,!this.#e&&(!this.#A||typeof this.#A!="object"))throw new TypeError("HarnessClient requires the current Host apiProxy or an explicit baseUrl");if(this.#A&&(!i||!["object","function"].includes(typeof i)))throw new TypeError("interactionScope must identify the current Host");this.#t=e,this.#r=a??void 0,this.#a=!!(this.#e&&A),this.#i=r,this.#c=s,this.#s=g,this.#I=c,this.#n=I.trim(),this.#o=d.trim(),this.#g=B,this.#l=f,this.#p=Q,this.#d=y,this.#E=ide(this.#e?.origin??i),this.#B=this.#E.ownerships,this.#u=this.#E.claims,this.#f=this.#E.controls}async rpc(t,o={},i=3e4,e={}){let a=e.rpcId??`${this.#n}-${_M()}`,A=AbortSignal.timeout(i),r=e.signal?AbortSignal.any([e.signal,A]):A,s;try{if(this.#A){let[g,c,I]=t.split("."),d={host:"host",workspace:"workspace",session:"sessions",llm:"llm"}[g],B=d&&this.#A[d];if(I!==void 0||!Object.hasOwn(B??{},c)||typeof B[c]!="function")throw new Un("harness-api-not-found",t);s={type:"server-response",...await Ox(()=>B[c]({rpcId:a,payload:o},r),r)}}else{let g=await this.#c(new URL(`/api/${t}`,this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({type:"client-request",rpcId:a,method:t,payload:o}),signal:r});if(!g.ok){let c=await ade(g,this.#e.hostname);throw new Un(c,t,{status:g.status})}try{s=await g.json()}catch(c){throw new Un("harness-response-invalid",t,{cause:c})}}}catch(g){throw e.signal?.aborted||g instanceof Un?g:new Un(A.aborted?"harness-timeout":"harness-connect-failed",t,{cause:g})}if(s?.type!=="server-response"||s?.rpcId!==a)throw new Un("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid response for ${t}`)});if(!s.result||typeof s.result!="object"||typeof s.result.ok!="boolean")throw new Un("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid result for ${t}`)});if(!s.result?.ok)throw new tn(t,s.result?.error);return s.result.value}async health(t={}){try{return await this.rpc("host.describe",{},5e3,t),!0}catch(o){throw o instanceof tn?new NM(o):o}}async ensureRunning(t={}){try{return await this.health(t)}catch(e){if(!this.#a)throw e}if(!this.#h||this.#h.exitCode!==null){let e=this.#e.port||(this.#e.protocol==="https:"?"443":"80");this.#h=Zpe(this.#i,["web","--host",this.#e.hostname,"--port",e],{cwd:this.#t,env:process.env,stdio:["ignore","inherit","inherit"]}),this.#h.on("error",a=>{console.error(`[${this.#o}] failed to start Harness:`,a.message)})}let o=Date.now()+6e4,i;for(;Date.now(){let r=A&&i.signal?AbortSignal.any([A,i.signal]):A??i.signal;return this.rpc("session.selectModel",{sessionId:t,provider:o.provider,model:o.model,...o.reasoningEffort===void 0?{}:{reasoningEffort:o.reasoningEffort}},3e4,r?{...i,signal:r}:i)},a=this.#p?await this.#p({sessionId:t,operation:e}):await e();if(!a||typeof a!="object"||!TM(a.selected))throw new Error("Harness returned an invalid response for session.selectModel");return a}async isSessionRunning(t,o={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");await this.ensureRunning(o);let i=await this.rpc("session.list",{},3e4,o);if(!i||typeof i!="object"||!Array.isArray(i.items))throw new Error("Harness returned an invalid response for session.list");for(let e of i.items)if(!e||typeof e!="object"||typeof e.sessionId!="string"||!e.sessionId||typeof e.running!="boolean")throw new Error("Harness returned an invalid response for session.list");return i.items.find(e=>e.sessionId===t)?.running??!1}async adoptWorkspaceSession(t,o={}){return Dx(this,t,o)}async workspaceId(t={}){let{workspace:o=this.#t,...i}=t,{items:e}=await this.rpc("workspace.list",{},3e4,i),a=e.find(r=>r.path===o);return a?a.workspaceId:(await this.rpc("workspace.create",{path:o},3e4,i)).workspace.workspaceId}async createSession(t={}){let{agentPreset:o,...i}=t;await this.ensureRunning(i);let a={workspaceId:await this.workspaceId(i)},A=o!==void 0?o:this.#r;return A!=null&&(a.agentPreset=A),(await this.rpc("session.create",a,3e4,i)).sessionId}async executeCommand(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o)throw new TypeError("command line is required");if(!this.#g){let e=new Error("Harness command execution is unavailable");throw e.code="commands-unavailable",e}try{return await this.#g(t,o,i)}catch(e){throw e?.failure&&typeof e.failure=="object"?new tn("commands.execute",e.failure):e}}async readSessionHistory(t,{maxMessages:o=50,beforeSeq:i,timeoutMs:e=1e4,...a}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!Number.isSafeInteger(o)||o<1||i!==void 0&&(!Number.isSafeInteger(i)||i<0))throw new TypeError("Invalid history pagination");return this.rpc("session.history",{sessionId:t,maxMessages:o,...i===void 0?{}:{beforeSeq:i}},e,a)}async sessionExists(t,o={}){try{return await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,o),!0}catch(i){if(i instanceof tn&&i.code==="session-not-found")return!1;throw i}}async respondInteraction(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("rpcId is required");if(!o||typeof o!="object"||typeof o.ok!="boolean")throw new TypeError("A Harness RPC result is required");let e=AbortSignal.timeout(i.timeoutMs??3e4),a=i.signal?AbortSignal.any([i.signal,e]):e,A={type:"client-response",rpcId:t,result:o},r;if(this.#A)r=await Ox(()=>this.#A.respond(A),a);else{let g=await this.#c(new URL("/api/respond",this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(A),signal:a});if(!g.ok)throw new Error(`Harness transport respond failed: HTTP ${g.status}`);r=await g.json()}if(r?.accepted===!0)return r;if(r?.accepted!==!1||r.reason!=="bad-response"&&r.reason!=="not-pending")throw new Error("Harness returned an invalid interaction response receipt");let s=r.reason;throw new tp(`interaction-${s}`,`Harness interaction response was rejected (${s})`)}async watchInteractions(t,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!o||typeof o.addEventListener!="function")throw new TypeError("watchInteractions requires an AbortSignal");if(i!==void 0&&typeof i!="function")throw new TypeError("onInteraction must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("onResolved must be a function");if(a!==void 0&&typeof a!="function")throw new TypeError("onOpen must be a function");for(;!o.aborted;){try{await this.#k(t,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A})}catch(r){if(o.aborted)return;console.warn(`[${this.#o}] Harness interaction stream disconnected:`,r.message)}if(o.aborted)return;try{await IE(this.#I,o)}catch{if(o.aborted)return;throw new Error("Harness interaction reconnect wait failed")}}}#m(t,o){let i=this.#B.get(t)??new Set;o.order=this.#E.nextOrder,this.#E.nextOrder+=1,i.add(o),this.#B.set(t,i)}#y(t,o){let i=this.#B.get(t);i?.delete(o),i?.size===0&&this.#B.delete(t);for(let[e,a]of this.#u)a.ownership===o&&this.#u.delete(e)}#Q(t){if(!t.control)return;let o=this.#f.get(t.control.owner);o||(o=new Map,this.#f.set(t.control.owner,o));let i=o.get(t.control.key)??new Set;i.add(t),o.set(t.control.key,i)}#C(t){if(!t.control)return;let o=this.#f.get(t.control.owner),i=o?.get(t.control.key);i?.delete(t),i?.size===0&&o.delete(t.control.key),o?.size===0&&this.#f.delete(t.control.owner)}#M(t,o){let i=bx(o);return i?[...this.#f.get(i.owner)?.get(i.key)??[]].filter(a=>a.sessionId===t).sort((a,A)=>a.order-A.order):[]}#b(t,o){return this.#M(t,o).find(i=>i.started&&i.active&&!i.completed&&i.turn!==null)??null}async#w(t,o,i){let e=this.#M(t,o);if(e.length===0)return null;try{let a=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,i);this.#S(t,a.events??[])}catch(a){if(!(a instanceof tn)||a.code!=="session-not-found")throw a;for(let A of e)A.active=!1,A.completed=!0;return null}return this.#b(t,o)}async hasActiveTurn(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");return!!await this.#w(t,o,i)}async stopActiveTurn(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");let e=await this.#w(t,o,i);if(!e)return!1;if(e.stopRequested)return!0;if(this.#b(t,o)!==e)return!1;e.stopRequested=!0;try{if(this.#l){let a=this.#l({sessionId:t,expectedTurn:e.turn,promptRpcId:e.promptRpcId,action:"stop"});if(a&&typeof a.then=="function")throw new TypeError("controlExecutor must return synchronously");if(a!==void 0){if(typeof a!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return a||(e.stopRequested=!1),a}}return await this.rpc("session.cancel",{sessionId:t,keepInbox:!0},3e4,i),!0}catch(a){if(this.#b(t,o)===e&&(e.stopRequested=!1),a instanceof tn&&a.code==="session-not-found")return!1;throw a}}async steerActiveTurn(t,o,i,e={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("Steering text is required");let a=await this.#w(t,i,e);if(!a||a.stopRequested||this.#b(t,i)!==a)return!1;if(this.#l){let A=this.#l({sessionId:t,expectedTurn:a.turn,promptRpcId:a.promptRpcId,action:"steer",text:o});if(A&&typeof A.then=="function")throw new TypeError("controlExecutor must return synchronously");if(A!==void 0){if(typeof A!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return A}}return await this.rpc("session.prompt",{sessionId:t,mode:"steer",content:[{type:"text",text:o}],clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,e),!0}#S(t,o){for(let i of this.#B.get(t)??[])dde(i,o)}async#_(t,o){let i=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:o});this.#S(t,i.events??[])}#R(t,o,i){let e=this.#u.get(o);if(e&&this.#B.get(t)?.has(e.ownership))return e;let a=[...this.#B.get(t)??[]],A=a.filter(s=>s.active).sort((s,g)=>s.order-g.order);if(A.length>0)return{ownership:A[0],recovered:!1};let r=a.filter(s=>!s.started&&!s.completed).sort((s,g)=>s.order-g.order)[0]??null;return r?{ownership:r,recovered:!0}:null}async ask(t,o,i={}){typeof i=="number"&&(i={timeoutMs:i});let e=i.timeoutMs??6e5,a=i.signal,A=typeof i.onUpdate=="function"?i.onUpdate:null,r=i.progressMode==="all"?"all":"latest",s=typeof i.onArtifact=="function"?i.onArtifact:null,g=typeof i.onInteraction=="function"?i.onInteraction:void 0,c=typeof i.onInteractionResolved=="function"?i.onInteractionResolved:void 0,I=bx(i.control),d=Array.isArray(i.files)?i.files.filter(Boolean):[];await this.ensureRunning({signal:a});let B=await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,{signal:a}),f=Math.max(-1,...(B.events??[]).map(({event:z})=>z.seq??-1)),Q=`${this.#n}-${_M()}`,y=new Ap({promptRpcId:Q,afterSeq:f}),m=g||c?new AbortController:null,_=m?a?AbortSignal.any([a,m.signal]):m.signal:null,T=m||I?{sessionId:t,promptRpcId:Q,active:!1,started:!1,completed:!1,stopRequested:!1,turn:null,openTurn:null,lastSeq:f,reconnect:null,order:-1,toolCalls:new Map,control:I}:null,R=null,H=!1,j=0,F=null,q=!1,J=!1,x=async()=>{if(!s||H||y.turn===null)return j;H=!0;let z=gI.take(t,y.turn,{signal:a});for(let U of z)try{await s(U),j+=1}catch(N){gI.release(U),console.warn(`[${this.#o}] ignored an artifact handoff failure:`,N.message)}return j};T&&(this.#m(t,T),this.#Q(T));let P=gI.openConsumer(t,Q);try{if(d.length>0){if(!this.#d)throw new Bo("inbound-file-ingress-unavailable","Harness file ingress is unavailable in this Host process.");let N=(await this.rpc("session.list",{},3e4,{signal:a}))?.items?.find(k=>k?.sessionId===t)?.cwd;F=await this.#d({sessionId:t,workspace:N,files:d,signal:a}),o=ox(o,F)}if(_){let U,N=new Promise(k=>{U=k});R=this.watchInteractions(t,{signal:_,onInteraction:g,onResolved:c,onOpen:U,ownership:T}),R.catch(()=>{}),await Promise.race([N,IE(3e4,_).then(()=>{throw new Error("Harness interaction stream did not open within 30 seconds")})])}let z=typeof o=="string"?[{type:"text",text:o}]:o;if(!Array.isArray(z)||z.length===0)throw new TypeError("Harness prompt content is required");await this.rpc("session.prompt",{sessionId:t,mode:"queue",content:z,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},3e4,{rpcId:Q,signal:a}),q=!0;try{let U=Date.now()+e;for(;Date.now()0)return"";throw T?.stopRequested?_x():Tx(y.reason)}throw new Hn("harness-reply-timeout")}catch(U){if(!T?.stopRequested)throw U;if(y.answer)return y.answer;throw U?.code==="turn-stopped"?U:_x()}}finally{F&&(!q||J)&&await F.cleanup().catch(z=>{console.warn(`[${this.#o}] unable to clean inbound files:`,z.message)}),P(),T&&(this.#C(T),this.#y(t,T)),y.turn!==null&&gI.discard(t,y.turn),m?.abort(new DOMException("Harness turn finished","AbortError")),R&&await R.catch(()=>{})}}async#k(t,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A}){let r=!1,s=null,g=Promise.resolve(),c=A==null,I=[],d=()=>{},B=m=>{d=m,A&&(A.reconnect=d);try{a?.()}catch(_){console.warn(`[${this.#o}] ignored an interaction open callback failure:`,_.message)}A&&this.#_(t,o).then(()=>{if(!r){c=!0;for(let _ of I.splice(0))Q(_)}}).catch(_=>{s??=_,d()})},f=(m,_)=>{m&&(g=g.then(()=>m(_)).catch(T=>{s??=T,d()}))},Q=m=>{let _=m.payload;if(A&&_.type==="session/event"){this.#S(t,[_.event]);return}if(_.type==="question/requested"||_.type==="approval/requested"){let T=_.type==="question/requested"?"question":"approval",R=T==="question"?m.rpcId:_.approvalId,H=`${T}:${R}`;if(A){let F=this.#R(t,H,T);if(F?.ownership!==A)return;this.#u.set(H,F)}let j=T==="approval"&&A&&typeof _.callId=="string"?this.#u.get(H)?.ownership.toolCalls.get(_.callId):void 0;f(i,Object.freeze({kind:T,interactionId:R,rpcId:m.rpcId,sessionId:t,payload:_,recovered:A?this.#u.get(H)?.recovered===!0:!1,...j?{toolCall:j}:{},reconnect:d,respond:(F,q={})=>this.respondInteraction(m.rpcId,F,{...q,signal:q.signal??o})}));return}if(_.type==="question/resolved"||_.type==="approval/resolved"){let T=_.type==="question/resolved"?"question":"approval",R=T==="question"?_.questionRpcId:_.approvalId,H=`${T}:${R}`;if(A){if(this.#u.get(H)?.ownership!==A)return;this.#u.delete(H)}f(e,Object.freeze({kind:T,interactionId:R,sessionId:t,outcome:_.outcome,payload:_}))}},y=m=>{try{let _=m?.payload;if(m?.type!=="server-request"||typeof m.rpcId!="string"||!_||typeof _!="object"||m.method!==_.type)throw new Error("invalid server-request envelope");if(_.sessionId!==t)return;c?Q(m):I.push(m)}catch(_){console.warn(`[${this.#o}] ignored a malformed Harness interaction frame:`,_.message)}};try{await this.#T({signal:o,onOpen:B,onEnvelope:y})}finally{r=!0,A?.reconnect===d&&(A.reconnect=null),o.aborted||await g}if(!o.aborted&&s)throw s}async watchHarnessEvents({signal:t,onSessionEvent:o,onReconnect:i}={}){if(typeof o!="function")throw new TypeError("watchHarnessEvents requires onSessionEvent");if(!t||typeof t.addEventListener!="function")throw new TypeError("watchHarnessEvents requires an AbortSignal");if(i!==void 0&&typeof i!="function")throw new TypeError("onReconnect must be a function");for(;!t.aborted;){try{await this.#T({signal:t,onOpen:()=>{try{i?.()}catch(e){console.warn(`[${this.#o}] mux reconnect hook failed:`,e.message)}},onEnvelope:e=>{try{let a=e?.payload;if(e?.type!=="server-request"||!a||typeof a!="object"||e.method!==a.type||a.type!=="session/event"||typeof a.sessionId!="string"||!a.event||typeof a.event!="object")return;o({sessionId:a.sessionId,event:a.event})}catch(a){console.warn(`[${this.#o}] ignored a malformed global mux frame:`,a.message)}}})}catch(e){if(t.aborted)return;console.warn(`[${this.#o}] Harness event mux disconnected:`,e.message)}if(t.aborted)return;try{await IE(this.#I,t)}catch{if(t.aborted)return;throw new Error("Harness event mux reconnect wait failed")}}}#T(t){return wx({apiProxy:this.#A,baseUrl:this.#e,createWebSocket:this.#s,rpcId:`${this.#n}-${_M()}`,...t,onMalformed:o=>{console.warn(`[${this.#o}] ignored a malformed Harness mux frame:`,o.message)}})}stopManagedProcess(){this.#h?.exitCode===null&&this.#h.kill("SIGTERM")}};var Kf=class extends pr{constructor(t){super({...t,rpcIdPrefix:"dingtalk",logPrefix:"dsh-dingtalk"})}};import{randomUUID as Ede}from"node:crypto";import{mkdir as Cde,readFile as ude,rename as Bde,unlink as fde,writeFile as Qde}from"node:fs/promises";import{dirname as yde}from"node:path";var xf=Object.freeze({version:1,sessions:{},seenMessageIds:[],pendingSenders:{}});function dr(n){return typeof n=="string"&&n.trim()?n.trim():null}function Nx(n){return(dr(n)??D("\u9489\u9489\u7528\u6237")).slice(0,100)}function mde(n,t){if(!n||typeof n!="object")return null;let o=dr(n.requestId)??dr(t),i=dr(n.staffId),e=dr(n.requestedAt)??dr(n.lastSeenAt),a=dr(n.lastSeenAt)??e;return!o||!i||!e||!a?null:{requestId:o,staffId:i,displayName:Nx(n.displayName??n.nick),requestedAt:e,lastSeenAt:a}}function Sde(n){if(!n||typeof n!="object")return structuredClone(xf);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[e,a]of Object.entries(n.sessions)){let A=dr(e),r=dr(a);A&&r&&(t[A]=r)}let o={},i=Array.isArray(n.pendingSenders)?n.pendingSenders.map(e=>[e?.requestId,e]):Object.entries(n.pendingSenders&&typeof n.pendingSenders=="object"?n.pendingSenders:{});for(let[e,a]of i){let A=mde(a,e);if(!A)continue;let r=Object.values(o).find(s=>s.staffId===A.staffId);(!r||r.lastSeenAtnew Date().toISOString()}={}){if(!dr(t))throw new TypeError("state path is required");if(typeof o!="function"||typeof i!="function")throw new TypeError("idFactory and now must be functions");this.#e=t,this.#r=o,this.#a=i}async load(){try{this.#A=Sde(JSON.parse(await ude(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(xf),await this.#i()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){let i=dr(t),e=dr(o);if(!i||!e)throw new TypeError("key and sessionId are required");this.#A.sessions[i]=e,await this.#i()}async clearSession(t){let o=dr(t);!o||!(o in this.#A.sessions)||(delete this.#A.sessions[o],await this.#i())}async clearSessions(){this.#A.sessions={},await this.#i()}hasSeen(t){let o=dr(t);return!!(o&&this.#A.seenMessageIds.includes(o))}async markSeen(t){let o=dr(t);if(!o)throw new TypeError("messageId is required");this.hasSeen(o)||(this.#A.seenMessageIds.push(o),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#i())}pendingSenders(){return Object.values(this.#A.pendingSenders).sort((t,o)=>t.requestedAt.localeCompare(o.requestedAt)).map(t=>structuredClone(t))}pendingSender(t){let o=dr(t),i=o?this.#A.pendingSenders[o]:null;return i?structuredClone(i):null}async recordPendingSender(t,o,i){let e=t&&typeof t=="object"?t:{staffId:t,displayName:o,lastSeenAt:i},a=dr(e.staffId);if(!a)throw new TypeError("staffId is required");let A=dr(e.lastSeenAt)??dr(e.requestedAt)??this.#a(),r=Object.values(this.#A.pendingSenders).find(g=>g.staffId===a),s={requestId:r?.requestId??`ding_sender_${this.#r()}`,staffId:a,displayName:Nx(e.displayName??e.nick??o),requestedAt:r?.requestedAt??A,lastSeenAt:A};return this.#A.pendingSenders[s.requestId]=s,await this.#i(),structuredClone(s)}async removePendingSender(t){let o=dr(t);return!o||!this.#A.pendingSenders[o]?!1:(delete this.#A.pendingSenders[o],await this.#i(),!0)}async removePendingSenderByStaffId(t){let o=dr(t),i=o?Object.values(this.#A.pendingSenders).find(e=>e.staffId===o):null;return i?this.removePendingSender(i.requestId):!1}snapshot(){return structuredClone(this.#A)}async remove(){await this.#t;try{await fde(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(xf)}async#i(){let t=`${JSON.stringify(this.#A,null,2)} +`,o=this.#t.then(async()=>{await Cde(yde(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await Qde(i,t,{encoding:"utf8",mode:384}),await Bde(i,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};import{mkdir as Dde,readFile as wde,realpath as Ode,rename as bde,stat as Mde,unlink as _de,writeFile as Tde}from"node:fs/promises";import{dirname as Nde,isAbsolute as vx,resolve as lE}from"node:path";var n9e=Object.freeze({version:1,workspaces:Object.freeze({})});function cI(n){let t=new Error(n);return t.code=Ma,t}async function RM(n){return lE(await Ode(n))}async function Rde(n,t){if(n===t)return!0;try{return await RM(n)===await RM(t)}catch{return!1}}function Ci(n){if(typeof n!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n))throw new TypeError("Invalid bot id");return n}function kde(n){if(!n||n.version!==1||!n.workspaces||typeof n.workspaces!="object"||Array.isArray(n.workspaces))return null;let t={};for(let[i,e]of Object.entries(n.workspaces)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(i)||typeof e!="string"||!vx(e))return null;t[i]=lE(e)}let o={};if(n.agentPresets!==void 0){if(!n.agentPresets||typeof n.agentPresets!="object"||Array.isArray(n.agentPresets))return null;for(let[i,e]of Object.entries(n.agentPresets)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(i))return null;try{let a=Xl(e);if(!a)return null;o[i]=a}catch{return null}}}return{version:1,workspaces:t,agentPresets:o}}async function Rx(n){if(typeof n!="string"||!n.trim()||!vx(n.trim())){let i=new Error("\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002");throw i.code="workspace-not-absolute",i}let t=lE(n.trim()),o;try{o=await Mde(t)}catch(i){let e=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002",{cause:i});throw e.code="workspace-not-found",e}if(!o.isDirectory()){let i=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002");throw i.code="workspace-not-directory",i}return t}var Xr=class{#e;#A;#t={};#r={};#a=new Map;#i=1;#c=new Map;#s=1;#I=new Map;#n=new WeakMap;#o=new Set;#g=Promise.resolve();#l=new Map;constructor(t,{defaultWorkspace:o=process.cwd()}={}){if(typeof t!="string"||!t)throw new TypeError("workspace store path is required");this.#e=t,this.#A=lE(o)}async load(){try{let t=kde(JSON.parse(await wde(this.#e,"utf8")));if(!t)throw new Error("dsh-im workspace config is invalid");this.#t=t.workspaces,this.#r=t.agentPresets}catch(t){if(t?.code!=="ENOENT")throw t;this.#t={},this.#r={}}this.#a.clear(),this.#i=1,this.#c.clear(),this.#s=1,this.#I.clear(),this.#o.clear();for(let t of Object.keys(this.#t))this.#a.set(t,this.#p()),this.#c.set(t,this.#d());return this}has(t){let o=Ci(t);return Object.hasOwn(this.#t,o)&&!this.#I.has(o)}incarnationFor(t){return this.#c.get(Ci(t))??null}workspaceFor(t){return this.#t[Ci(t)]??this.#A}agentPresetFor(t){return this.#r[Ci(t)]??null}generationFor(t){return this.#a.get(Ci(t))??null}async whenIdle(){await this.#g}async whenBotIdle(t){let o=Ci(t);for(;;){let i=this.#l.get(o);if(!i||(await i,this.#l.get(o)===i))return}}async ensure(t,{workspace:o=this.#A,defaultAgentPreset:i}={}){let e=Ci(t),a=lE(o);return this.#B(e,async()=>{if(this.#t[e])this.#a.has(e)||this.#a.set(e,this.#p());else{let A=Xl(i),r=Object.hasOwn(this.#r,e),s=this.#r[e];this.#t[e]=a,A&&(this.#r[e]=A),this.#a.set(e,this.#p()),this.#c.set(e,this.#d());try{await this.#u()}catch(g){throw delete this.#t[e],r?this.#r[e]=s:delete this.#r[e],this.#a.delete(e),this.#c.delete(e),g}}return this.#t[e]})}async setWorkspace(t,o,{clearSessions:i,incarnation:e}={}){let a=Ci(t);if(!this.has(a)||e!==void 0&&e!==this.incarnationFor(a)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=await Rx(o);return this.#B(a,async()=>{if(!this.has(a)||e!==void 0&&e!==this.incarnationFor(a)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}if(A===this.workspaceFor(a))return A;let r=this.#t[a];this.#a.set(a,this.#p()),await i?.(),this.#t[a]=A;try{await this.#u()}catch(s){throw this.#t[a]=r,s}return A})}async setAgentPreset(t,o,{incarnation:i}={}){let e=Ci(t);if(!this.has(e)||i!==void 0&&i!==this.incarnationFor(e)){let A=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw A.code="workspace-bot-not-found",A}let a=Xl(o);return this.#B(e,async()=>{if(!this.has(e)||i!==void 0&&i!==this.incarnationFor(e)){let r=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw r.code="workspace-bot-not-found",r}let A=this.#r[e]??null;if(A===a)return a;a?this.#r[e]=a:delete this.#r[e];try{await this.#u()}catch(r){throw A?this.#r[e]=A:delete this.#r[e],r}return a})}async bindWorkspaceSession(t,o,{conversationKey:i,sessionId:e,clearSessions:a,setSession:A,incarnation:r,expectedGeneration:s}={}){let g=Ci(t);if(typeof i!="string"||!i||typeof e!="string"||!e)throw new TypeError("conversationKey and sessionId are required");if(typeof a!="function"||typeof A!="function")throw new TypeError("session state callbacks are required");if(!this.has(g)||r!==void 0&&r!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}let c=await RM(await Rx(o));return this.#B(g,async()=>{if(!this.has(g)||r!==void 0&&r!==this.incarnationFor(g)){let I=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw I.code="workspace-bot-not-found",I}if(s!==void 0&&s!==this.generationFor(g))throw cI("The bot workspace changed before the session binding could be committed.");if(!await Rde(c,this.workspaceFor(g))){let I=this.#t[g];this.#a.set(g,this.#p()),await a(),this.#t[g]=c;try{await this.#u()}catch(d){throw this.#t[g]=I,d}}return await A(i,e),{workspace:c,sessionId:e,generation:this.#a.get(g)}})}async invalidateSessions(t,{clearSessions:o}={}){let i=Ci(t);return this.#B(i,async()=>{this.#a.set(i,this.#p()),await o?.()})}async beginRemoval(t,{clearSessions:o}={}){let i=Ci(t);return this.#B(i,async()=>{let e=this.#I.get(i);if(e)return e;let a=Object.freeze({});this.#I.set(i,a),this.#n.set(a,{botId:i,incarnation:this.incarnationFor(i)}),this.#a.set(i,this.#p());try{await o?.()}catch(A){throw this.#I.get(i)===a&&this.#I.delete(i),A}return a})}async abortRemoval(t){let{botId:o}=this.#h(t);return this.#B(o,async()=>this.#I.get(o)!==t?!1:(this.#I.delete(o),Object.hasOwn(this.#t,o)&&(this.#a.set(o,this.#p()),this.#c.has(o)||this.#c.set(o,this.#d())),!0))}async finishRemoval(t){let{botId:o,incarnation:i}=this.#h(t);return this.#B(o,async()=>this.#I.get(o)!==t?{removed:!1,persisted:!0,error:null,stale:!0}:this.incarnationFor(o)!==i?(this.#I.delete(o),{removed:!1,persisted:!0,error:null,stale:!0}):(this.#I.delete(o),this.#E(o)))}async retireAfterConfigCommit(t){let o=Ci(t);return this.#B(o,async()=>(this.#I.delete(o),this.#E(o)))}async remove(t){let o=await this.retireAfterConfigCommit(t);if(o.error)throw o.error;return o.removed}async reconcile(t){let o=new Set([...t].map(Ci)),i=new Set([...Object.keys(this.#t),...Object.keys(this.#r),...this.#o]);for(let e of i)o.has(e)||await this.remove(e)}decorateStatus(t){return!t||typeof t!="object"||!Array.isArray(t.bots)?t:{...t,bots:t.bots.map(o=>o?.botId?{...o,workspace:this.workspaceFor(o.botId),agentPreset:this.agentPresetFor(o.botId)}:o)}}#p(){let t=this.#i;return this.#i+=1,t}#d(){let t=this.#s;return this.#s+=1,t}#h(t){if(!t||typeof t!="object")throw new TypeError("Invalid workspace removal transaction");let o=this.#n.get(t);if(!o)throw new TypeError("Invalid workspace removal transaction");return o}async#E(t){let o=Object.hasOwn(this.#t,t),i=Object.hasOwn(this.#r,t),e=o||i||this.#o.has(t);if(delete this.#t[t],delete this.#r[t],this.#a.delete(t),this.#c.delete(t),!e)return{removed:!1,persisted:!0,error:null,stale:!1};try{return await this.#f(),{removed:o,persisted:!0,error:null,stale:!1}}catch(a){return this.#o.add(t),{removed:o,persisted:!1,error:a,stale:!1}}}async#B(t,o){let i=this.#g.then(o,o),e=i.then(()=>{},()=>{});return this.#g=e,this.#l.set(t,e),e.finally(()=>{this.#l.get(t)===e&&this.#l.delete(t)}),i}async#u(){let t={version:1,workspaces:this.#t};Object.keys(this.#r).length>0&&(t.agentPresets=this.#r),await Dde(Nde(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await Tde(o,`${JSON.stringify(t,null,2)} +`,{encoding:"utf8",mode:384}),await bde(o,this.#e),this.#o.clear()}async#f(){if(Object.keys(this.#t).length>0||Object.keys(this.#r).length>0){await this.#u();return}try{await _de(this.#e),this.#o.clear()}catch(t){if(t?.code!=="ENOENT")throw t;this.#o.clear()}}};function kM(n){if(!n)return null;let t=typeof n=="function"?n():n;return t&&typeof t.then=="function"?t.then(Pn):Pn(t)}function Px(){let n=new Error("Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002");return n.code="agent-preset-unavailable",n}function rp(n){if(n())return;let t=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw t.code="workspace-bot-not-found",t}function kx(n,t,o){let i=e=>{let a=n.decorateStatus(e);if(!o||!a||typeof a!="object")return a;let A=s=>s?{...a,agentPresetCatalog:s}:a,r=kM(o);return r&&typeof r.then=="function"?r.then(A):A(r)};return t&&typeof t.then=="function"?t.then(i):i(t)}function vde(n){return Promise.resolve(n.status())}function Na(n,{workspaces:t,method:o="remove",botIdFromRemoved:i=e=>e?.botId}){if(!n||!t||typeof n[o]!="function")throw new TypeError("configStore removal observer dependencies are required");return new Proxy(n,{get(e,a){let A=Reflect.get(e,a,e);return a===o?async(...r)=>{let s=await A.apply(e,r),g=s?i(s,r):null;return g&&await t.retireAfterConfigCommit(g),s}:typeof A=="function"?A.bind(e):A}})}function Ra(n,{botId:t,workspaces:o,state:i,agentPresetCatalog:e}={}){if(!n||!o||!i)throw new TypeError("harness, workspaces, and state are required");let a=o.incarnationFor(t),A=()=>o.has(t)&&o.incarnationFor(t)===a,r=async(I=e)=>{let d;try{d=await kM(I)??Pn(null)}catch(B){throw rp(A),B}return rp(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:d}},s=new Map,g=new Proxy(n,{get(I,d){if(d==="agentPresetSettings")return async(f={})=>{f?.signal?.throwIfAborted(),rp(A);let Q=await r();return f?.signal?.throwIfAborted(),Q};if(d==="updateAgentPreset")return async(f,Q={})=>{Q?.signal?.throwIfAborted(),rp(A);let y=f==="--default"?null:Xl(f),m=null;if(y&&({agentPresetCatalog:m}=await r(),Q?.signal?.throwIfAborted(),!m.items.some(_=>_.id===y)))throw Px();if(await o.setAgentPreset(t,y,{incarnation:a}),rp(A),m)return{agentPreset:o.agentPresetFor(t),agentPresetCatalog:m};try{return await r()}catch(_){if(_?.code==="workspace-bot-not-found")throw _;return rp(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:Pn(null)}}};if(d==="currentWorkspace")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}return o.workspaceFor(t)};if(d==="assertWorkspaceScope")return()=>{if(!A()){let f=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw f.code="workspace-bot-not-found",f}};if((d==="listWorkspaces"||d==="listWorkspaceSessions"||d==="listModels")&&typeof I[d]=="function")return async(...f)=>{if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=await I[d](...f);if(!A()){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}return Q};if(d==="switchWorkspace")return f=>{if(!A()){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");return Q.code="workspace-bot-not-found",Promise.reject(Q)}return o.setWorkspace(t,f,{clearSessions:()=>i.clearSessions(),incarnation:a})};if(d==="bindWorkspaceSession")return async(f,Q)=>{if(typeof f!="string"||!f||typeof Q!="string"||!Q)throw new TypeError("conversationKey and sessionId are required");if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(typeof I.adoptWorkspaceSession!="function")throw new TypeError("Harness does not support adopting workspace sessions");let y=o.generationFor(t),m=await I.adoptWorkspaceSession(Q);if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(y!==o.generationFor(t))throw cI("The bot workspace changed while the session was being adopted.");if(!m||typeof m!="object"||m.sessionId!==Q||typeof m.workspace!="string")throw new TypeError("Harness returned an invalid adopted workspace session");let _=await o.bindWorkspaceSession(t,m.workspace,{conversationKey:f,sessionId:Q,clearSessions:()=>i.clearSessions(),setSession:(T,R)=>i.setSession(T,R),incarnation:a,expectedGeneration:y});if(!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}if(_.generation!==o.generationFor(t))throw cI("The bot workspace changed before the session binding completed.");return s.set(Q,_.generation),{...m,workspace:_.workspace,sessionId:_.sessionId}};if(d==="createSession")return async(f={})=>{if(await o.whenBotIdle(t),!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}let Q=o.generationFor(t),y=o.agentPresetFor(t),m=await I.createSession({...f,workspace:o.workspaceFor(t),...y==null?{}:{agentPreset:y}});return s.set(m,Q),m};if(d==="workspaceSession")return f=>{if(typeof f!="string"||!f)throw new TypeError("sessionId is required");let Q=s.get(f)??o.generationFor(t);s.delete(f);let y=()=>A()&&Q===o.generationFor(t),m=async(T,R,H)=>{if(!y())throw cI(`The bot workspace changed before this ${H} started.`);let j=await I[T](f,...R);if(!y())throw cI(`The bot workspace changed while this ${H} was running.`);return j},_=async(T,R,H)=>{if(!y())throw cI(`The bot workspace changed before this ${H} started.`);return I[T](f,...R)};return Object.freeze({sessionId:f,async sessionExists(...T){if(!y())return!1;let R=await I.sessionExists(f,...T);return y()&&R},models(...T){return m("getSessionModels",T,"model listing")},readHistory(...T){return m("readSessionHistory",T,"history read")},selectModel(...T){return m("selectSessionModel",T,"model selection")},isRunning(...T){return m("isSessionRunning",T,"run-state check")},hasActiveTurn(...T){return m("hasActiveTurn",T,"turn ownership check")},stopActiveTurn(...T){return _("stopActiveTurn",T,"turn stop")},steerActiveTurn(...T){return _("steerActiveTurn",T,"turn steering")},ask(...T){if(!y())throw cI("The bot workspace changed before this prompt started.");return I.ask(f,...T)}})};if(d==="sessionExists")return(f,...Q)=>{if(!A())return!1;let y=s.get(f);return y!==void 0&&y!==o.generationFor(t)?(s.delete(f),!1):I.sessionExists(f,...Q)};if(d==="ask")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(t)){let m=new Error("The bot workspace changed before this prompt started.");throw m.code=Ma,m}return I.ask(f,...Q)};if(d==="executeCommand"&&typeof I.executeCommand=="function")return(f,...Q)=>{let y=s.get(f);if(s.delete(f),!A()||y!==void 0&&y!==o.generationFor(t)){let m=new Error("The bot workspace changed before this command started.");throw m.code=Ma,m}return I.executeCommand(f,...Q)};let B=Reflect.get(I,d,I);return typeof B=="function"?B.bind(I):B}}),c=new Proxy(i,{get(I,d){if(d===qb)return I;if(d==="sessionFor")return(f,...Q)=>{if(!A())return null;let y=I.sessionFor(f,...Q);return y&&!s.has(y)&&s.set(y,o.generationFor(t)),y};if(d==="setSession")return(f,Q,...y)=>{let m=s.get(Q);return!A()||m!==void 0&&m!==o.generationFor(t)?(s.delete(Q),!1):I.setSession(f,Q,...y)};let B=Reflect.get(I,d,I);return typeof B=="function"?B.bind(I):B}});return Object.freeze({harness:g,state:c})}function ka(n,{workspaces:t,stateFor:o,agentPresetCatalog:i}={}){if(!n||!t||typeof o!="function")throw new TypeError("controller, workspaces, and stateFor are required");let e=new Map,a=(c,I)=>{let B=(e.get(c)??Promise.resolve()).catch(()=>{}).then(I);return e.set(c,B),B.finally(()=>{e.get(c)===B&&e.delete(c)})},A=c=>kx(t,c,i),r=(c,I)=>{let d=t.incarnationFor(c);return a(c,async()=>{if(!(await n.status())?.bots?.some(Q=>Q?.botId===c)){let Q=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw Q.code="workspace-bot-not-found",Q}let f=await o(c);return await t.setWorkspace(c,I,{clearSessions:()=>f.clearSessions(),incarnation:d}),A(await n.status())})},s=(c,I)=>{let d=t.incarnationFor(c),B=Xl(I);return a(c,async()=>{if(!(await n.status())?.bots?.some(y=>y?.botId===c)){let y=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw y.code="workspace-bot-not-found",y}let Q=B&&i?await kM(i):null;if(B&&i&&!Q?.items.some(y=>y.id===B))throw Px();return await t.setAgentPreset(c,B,{incarnation:d}),kx(t,await n.status(),Q??i)})},g=(c,I)=>a(c,async()=>{let d=await t.beginRemoval(c,{clearSessions:async()=>{try{let B=await o(c);if(!B||typeof B.clearSessions!="function")throw new TypeError("bot state does not support session cleanup");await B.clearSessions()}catch(B){console.warn(`[dsh-im] ignored session cleanup failure while deleting bot ${c}:`,B?.message??B)}}});try{let B=await I();return await t.finishRemoval(d),A(B)}catch(B){let f=await vde(n).catch(()=>null);throw Array.isArray(f?.bots)&&!f.bots.some(y=>y?.botId===c)?await t.finishRemoval(d):await t.abortRemoval(d),B}});return new Proxy(n,{get(c,I){if(I==="updateWorkspace")return r;if(I==="updateAgentPreset")return s;let d=Reflect.get(c,I,c);return typeof d!="function"?d:I==="deleteBot"?(B,...f)=>g(B,()=>d.call(c,B,...f)):I==="disconnect"?async(...B)=>{let Q=(await c.status())?.bots?.[0]?.botId;return Q?g(Q,()=>d.apply(c,B)):A(d.apply(c,B))}:(...B)=>A(d.apply(c,B))}})}var Gx=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function Pde(n){if(!Array.isArray(n)||n.length===0)return[...Gx];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...Gx]}var jf=class{#e;#A;#t;#r;#a;#i;#c;#s=null;#I=null;#n=0;#o=!1;#g=!1;#l;#p;constructor({controller:t,harness:o,logger:i=console,retryDelaysMs:e,healthyIntervalMs:a=15e3,setTimeoutImpl:A=setTimeout,clearTimeoutImpl:r=clearTimeout}){if(!t||typeof t.initialize!="function"||typeof t.status!="function")throw new TypeError("ConnectionSupervisor requires a controller");if(!o||typeof o.ensureRunning!="function")throw new TypeError("ConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=i,this.#r=Pde(e),this.#a=Number.isFinite(a)&&a>=0?a:15e3,this.#i=A,this.#c=r,this.#l=new Promise(s=>{this.#p=s})}get ready(){return this.#l}start(){return this.#g||this.#o?this:(this.#g=!0,this.#d(0),this)}async close(){this.#o||(this.#o=!0,this.#s!==null&&this.#c(this.#s),this.#s=null,await this.#I?.catch(()=>{}),this.#p?.(null),this.#p=null)}#d(t){this.#o||(this.#s=this.#i(()=>{this.#s=null,this.#h()},t),this.#s?.unref?.())}async#h(){if(this.#o||this.#I)return;let t=this.#E();this.#I=t;try{await t}finally{this.#I===t&&(this.#I=null)}}async#E(){try{if(await this.#A.ensureRunning(),this.#o)return;let t=await this.#e.initialize();if(this.#o)return;this.#p?.(t),this.#p=null;let{configured:o,connected:i}=t.totals;if(i{let A={namespace:"commands",method:"execute",args:{agentId:i,line:e,images:[]},signal:a.signal};try{return await o.invoke(A)}catch(r){if(r?.name!=="TypertGatewayError"||r.code!=="arguments-invalid"||r.endpoint!=="commands/execute"||r.message!=='typert gateway: commands/execute: args fields do not match the descriptor: unexpected "images"')throw r;return a.signal?.throwIfAborted(),o.invoke({...A,args:{agentId:i,line:e}})}}}}function $r(n,t={}){if(t.harnessBaseUrl!==void 0)return{baseUrl:new URL(t.harnessBaseUrl)};if(!n?.apiProxy)throw new TypeError("dsh-im requires the Host apiProxy service; check that DSH has finished loading its Host services");return{apiProxy:n.apiProxy,interactionScope:n.root??n}}import{randomUUID as Gde}from"node:crypto";function Fde(n){if(typeof n?.get!="function")return;let t;try{t=n.get("agents")}catch{return}if(t!=null){if(typeof t.get!="function")throw new TypeError('dsh-im requires a callable AgentRegistry when ctx.get("agents") is present');return t}}function Lde(n,t,o){if(n?.status!=="running")return!1;let i=n?.session?.events;if(!Array.isArray(i))return!1;let e=null,a=!1;for(let A of i){if(A?.type==="turn/start"){e=A.data?.turn??null,a=!1;continue}if(A?.type==="turn/end"&&A.data?.turn===e){e=null,a=!1;continue}e===t&&A?.type==="user/message"&&A.data?.source?.rpcId===o&&(a=!0)}return e===t&&a}function Fx(n){if(!n||typeof n!="object"||Object.isFrozen(n))return n;for(let t of Object.values(n))Fx(t);return Object.freeze(n)}function Ude(n){return Fx({id:Gde(),role:"user",content:[{type:"text",text:n}],source:{kind:"user"}})}function Hde(n){let t=new Error("Session is busy with an active turn or maintenance task",{cause:n});return t.code="agent-busy",t}function Kde(n){return({sessionId:t,expectedTurn:o,promptRpcId:i,action:e,text:a})=>{let A=n.get(t);if(A){if(!Lde(A,o,i))return!1;if(e==="stop")return A.cancel({kind:"user"},{keepInbox:!0}),!0;if(e==="steer")return typeof a!="string"||!a.trim()?!1:(A.inject(Ude(a)),!0);throw new TypeError(`Unsupported Harness control action: ${String(e)}`)}}}function xde(n){return({sessionId:t,operation:o})=>{if(typeof o!="function")throw new TypeError("maintenance operation is required");let i=n.get(t);if(!i)return o();try{return i.runMaintenance(e=>{if(n.get(t)!==i){let a=new Error("Session agent changed before maintenance started");throw a.code="agent-unavailable",a}return o(e)})}catch(e){throw Hde(e)}}}function Yde(n){return({sessionId:t,workspace:o,files:i,signal:e})=>{let A=n.get(t)?.session?.header?.cwd,r=typeof A=="string"&&A?A:o;if(typeof r!="string"||!r)throw new Bo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");return ix({files:i},{workspace:r,signal:e})}}function Pa(n,t={}){let{controlExecutor:o,sessionMaintenanceExecutor:i,fileIngressExecutor:e}=t;if(o!==void 0&&typeof o!="function")throw new TypeError("controlExecutor must be a function");if(i!==void 0&&typeof i!="function")throw new TypeError("sessionMaintenanceExecutor must be a function");if(e!==void 0&&typeof e!="function")throw new TypeError("fileIngressExecutor must be a function");let a=o&&i&&e?void 0:Fde(n);return{controlExecutor:o??(a?Kde(a):void 0),sessionMaintenanceExecutor:i??(a?xde(a):void 0),fileIngressExecutor:e??Yde(a??{get:()=>{}})}}function qde(n){let t=II(n.dshHome??process.env.DSH_HOME??pE(Jde(),".dsh")),o=II(n.dataDir??pE(t,"integrations","dsh-dingtalk"));return{root:o,config:II(n.configPath??pE(o,"config.json")),bots:II(n.botsDir??pE(o,"bots")),workspaces:II(n.workspacesPath??pE(o,"workspaces.json"))}}async function PM(n,t={},o={}){if(!n?.credentials)throw new TypeError("dsh-dingtalk requires ctx.credentials");let i=$r(n,t),e=o.ConfigStore??Df,a=o.DeviceAuth??Of,A=o.StateStore??Yf,r=o.HarnessClient??Kf,s=o.Controller??$h,g=o.Runtime??sE,c=o.createConnectionSupervisor??vM,I=typeof n.logger=="function"?n.logger("dsh-dingtalk"):n.logger??console,d=()=>_a(n),B=qde(t),f=await new e(B.config).load(),Q=II(t.workspace??process.cwd()),y=o.WorkspaceStore??Xr,m=o.workspaces??await new y(B.workspaces,{defaultWorkspace:Q}).load(),_=typeof f.list=="function",T=_?f.list():[];_&&await m.reconcile(T.map(ee=>ee.botId)),await Promise.all(T.map(ee=>m.ensure(ee.botId,{defaultAgentPreset:t.agentPreset})));let R=typeof f.remove=="function"?Na(f,{workspaces:m}):f,H=o.deviceAuth??new a({baseUrl:t.registrationBaseUrl}),j=new Map,F=ee=>II(B.bots,ee,"state.json"),q=async ee=>{let ie=j.get(ee);return ie||(ie=await new A(F(ee)).load(),j.set(ee,ie)),ie},J=va(n,o.commandExecutor),{controlExecutor:x,sessionMaintenanceExecutor:P,fileIngressExecutor:z}=Pa(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),U=new r({...i,workspace:Q,autostart:!1,dshBin:t.dshBin??"dsh",...J?{commandExecutor:J}:{},...x?{controlExecutor:x}:{},...P?{sessionMaintenanceExecutor:P}:{},...z?{fileIngressExecutor:z}:{}}),N=new s({deviceAuth:H,credentials:n.credentials,configStore:R,logger:I,createRuntime:async({botId:ee,config:ie,clientSecret:Te})=>{let se=await q(ee);await m.ensure(ee,{defaultAgentPreset:t.agentPreset});let Ne=Ra(U,{botId:ee,workspaces:m,state:se,agentPresetCatalog:d});return new g({config:ie,clientSecret:Te,harness:Ne.harness,state:Ne.state,replyTimeoutMs:t.replyTimeoutMs??6e5,maxMessageChars:t.maxMessageChars??4e3,connectTimeoutMs:t.connectTimeoutMs??15e3,logger:{error:(...fe)=>I.error?.(`[${ee}]`,...fe),warn:(...fe)=>I.warn?.(`[${ee}]`,...fe),info:(...fe)=>I.info?.(`[${ee}]`,...fe),debug:(...fe)=>I.debug?.(`[${ee}]`,...fe)}})},deleteState:async({botId:ee})=>{let ie=j.get(ee);if(j.delete(ee),ie&&typeof ie.remove=="function")await ie.remove();else try{await jde(F(ee))}catch(Te){if(Te?.code!=="ENOENT")throw Te}}}),k=ka(N,{workspaces:m,stateFor:q,agentPresetCatalog:d}),V=c({controller:k,harness:U,logger:I,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:k,ready:V.ready,async close(){await V.close(),await k.close(),U.stopManagedProcess()}}}import Zde from"qrcode";var zde=new Set(["loopback","trusted-host"]);function mr(n){if(n===void 0)return"loopback";if(zde.has(n))return n;throw new TypeError('dsh-im rpcAuthority must be "loopback" or "trusted-host"')}import{isAbsolute as Vde}from"node:path";var ui="bot.workspace.set";function Ga(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).every(t=>["botId","workspace"].includes(t))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&typeof n.workspace=="string"&&n.workspace.length<=4096&&Vde(n.workspace.trim())}function Fa(n){return["workspace-not-absolute","workspace-not-found","workspace-not-directory","workspace-bot-not-found","agent-preset-invalid","agent-preset-unavailable"].includes(n?.code)?{code:n.code,message:n.message}:null}var Bi="bot.preset.set";function Wde(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function La(n){return Wde(n)&&Object.keys(n).every(t=>["botId","agentPreset"].includes(t))&&typeof n.botId=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)&&(n.agentPreset===null||typeof n.agentPreset=="string"&&dM.test(n.agentPreset))}var Ux="/dingtalk",ir=Object.freeze({status:"connection.status",beginProvisioning:"provision.begin",pollProvisioning:"provision.poll",cancelProvisioning:"provision.cancel",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:ui,setAgentPreset:Bi,approveSender:"bot.sender.approve",revokeSender:"bot.sender.revoke"}),Hx=Object.freeze(Object.values(ir)),Xde=new Set(["clientSecret","client_secret","deviceCode","device_code","secretRef","staffId","senderStaffId","verificationUrl","verificationUri","userCode"]);function FM(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function jg(n,t){return FM(n)&&Object.keys(n).every(o=>t.includes(o))}function lI(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function Lx(n,t){return typeof n=="string"&&n.trim().length>0&&n.length<=t}function $de(n,t){return FM(t)?n===ir.status?jg(t,[])?null:"connection.status does not accept fields.":n===ir.beginProvisioning?jg(t,["locale"])&&(t.locale===void 0||t.locale==="zh-CN")?null:"provision.begin received unsupported fields.":[ir.pollProvisioning,ir.cancelProvisioning].includes(n)?jg(t,["attemptId"])&&lI(t.attemptId)?null:`${n} requires an attemptId.`:n===ir.bindCredentials?jg(t,["clientId","clientSecret"])&&Lx(t.clientId,256)&&Lx(t.clientSecret,1024)?null:"bot.bind-credentials requires Client ID and Client Secret.":n===ir.reconnectBot?jg(t,["botId","sendTest"])&&lI(t.botId)&&(t.sendTest===void 0||t.sendTest===!0)?null:"bot.reconnect requires a botId and optional sendTest=true.":n===ir.deleteBot?jg(t,["botId","confirm"])&&lI(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===ir.setWorkspace?Ga(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===ir.setAgentPreset?La(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===ir.approveSender?jg(t,["botId","requestId","confirm"])&&lI(t.botId)&&lI(t.requestId)&&t.confirm===!0?null:"bot.sender.approve requires botId, requestId, and confirm=true.":n===ir.revokeSender?jg(t,["botId","senderKey","confirm"])&&lI(t.botId)&&lI(t.senderKey)&&t.confirm===!0?null:"bot.sender.revoke requires botId, senderKey, and confirm=true.":"Unknown DingTalk endpoint.":"Payload must be an object."}function Jf(n){return{ok:!1,error:{code:"bad-request",message:n}}}function dE(){return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}}function ehe(){return{ok:!1,error:{code:"dingtalk-operation-failed",message:"\u9489\u9489\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}}function ap(n){if(Array.isArray(n))return n.map(ap);if(!FM(n))return n;let t={};for(let[o,i]of Object.entries(n))Xde.has(o)||(t[o]=ap(i));return t}async function Ahe(n){return Zde.toDataURL(n,{type:"image/png",errorCorrectionLevel:"M",margin:2,width:320})}async function GM(n,t){return!n||typeof n.verificationUrl!="string"?ap(n):ap({...n,qrCodeDataUrl:await t(n.verificationUrl)})}async function Jg(n,t){let o=structuredClone(n);return o?.provisioning&&(o.provisioning=await GM(o.provisioning,t)),ap(o)}function the(n){for(let t of["status","startProvisioning","registrationStatus","cancelProvisioning","bindCredentials","reconnectBot","deleteBot","approveSender","revokeSender"])if(typeof n?.[t]!="function")throw new TypeError(`A complete DingTalk controller is required (${t})`)}function Kx(n,{encodeQr:t=Ahe}={}){the(n);let o=new Map,i=e=>{let a=o.get(e);return a||(o.size>=16&&o.delete(o.keys().next().value),a=Promise.resolve().then(()=>t(e)),o.set(e,a)),a};return async(e,a,A)=>{if(A?.aborted)return dE();if(!Hx.includes(e))return Jf("Unknown DingTalk endpoint.");let r=$de(e,a);if(r)return Jf(r);try{let s;if(e===ir.status)s=await Jg(await n.status(),i);else if(e===ir.beginProvisioning){let g=await n.startProvisioning({signal:A});if(A?.aborted)return await n.cancelProvisioning(g.attemptId),dE();s=await GM(g,i)}else if(e===ir.pollProvisioning){let g=await n.registrationStatus(a.attemptId);if(!g)return Jf("The provisioning attempt no longer exists.");s=await GM(g,i)}else if(e===ir.cancelProvisioning){if(s=await n.cancelProvisioning(a.attemptId),!s)return Jf("The provisioning attempt no longer exists.");s=ap(s)}else if(e===ir.bindCredentials)s=await Jg(await n.bindCredentials(a),i);else if(e===ir.reconnectBot){let g=await n.reconnectBot(a.botId);if(A?.aborted)return dE();let c;if(a.sendTest===!0)if(!g?.bots?.some(d=>d?.botId===a.botId&&d?.connected===!0)||typeof n.sendConnectionTest!="function")c=ar(lr("\u9489\u9489\u673A\u5668\u4EBA"));else try{await n.sendConnectionTest(a.botId),c=ar()}catch(d){c=ar(d)}s=await Jg({...g,...c?{testMessage:c}:{}},i)}else if(e===ir.deleteBot)s=await Jg(await n.deleteBot(a.botId),i);else if(e===ir.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");s=await Jg(await n.updateWorkspace(a.botId,a.workspace),i)}else if(e===ir.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");s=await Jg(await n.updateAgentPreset(a.botId,a.agentPreset),i)}else e===ir.approveSender?s=await Jg(await n.approveSender(a.botId,a.requestId),i):s=await Jg(await n.revokeSender(a.botId,a.senderKey),i);return A?.aborted?dE():{ok:!0,value:s}}catch(s){let g=Fa(s);return A?.aborted?dE():g?{ok:!1,error:g}:ehe()}}}function qf(n,t,o,i){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(Ux,Kx(t,o),{authority:mr(i)})}async function xx(n,t={}){if(t?.controller)return qf(n,t.controller,t.rpcOptions,t.rpcAuthority);let o=await PM(n,t,t.internals),i=qf(n,o.controller,t.rpcOptions,t.rpcAuthority);return n.effect(()=>async()=>{await o.close()},"dsh-dingtalk: close bot connections"),i}import{createHash as rhe}from"node:crypto";import{mkdir as ahe,readFile as ihe,rename as ohe,unlink as nhe,writeFile as she}from"node:fs/promises";import{dirname as ghe}from"node:path";var LM=Object.freeze({version:1,bots:Object.freeze([])});function qs(n){return typeof n=="string"&&n.trim()?n.trim():null}function Yx(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hE(n,{botPrefix:t,tokenRefPrefix:o}){let i=qs(n);if(!i)throw new TypeError("platformId is required");let e=rhe("sha256").update(i).digest("hex").slice(0,24);return{botId:`${t}_${e}`,tokenRef:`${o}_${e.toUpperCase()}`}}function zf(n,t){let o=qs(n)??"";return o.length<=10?o?`${o.slice(0,3)}\u2022\u2022\u2022`:t:`${o.slice(0,6)}\u2022\u2022\u2022\u2022${o.slice(-4)}`}var ip=class{#e;#A;#t;#r;#a;#i;#c;#s=LM;#I=Promise.resolve();constructor(t,{channel:o,botPrefix:i,tokenRefPrefix:e,normalizeBotExtension:a=()=>({})}){if(typeof a!="function")throw new TypeError("normalizeBotExtension must be a function");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=new RegExp(`^${Yx(i)}_[a-f0-9]{24}$`),this.#c=new RegExp(`^${Yx(e)}_[A-F0-9]{24}$`)}async load(){try{let t=this.#o(JSON.parse(await ihe(this.#e,"utf8")));if(!t)throw new Error(`dsh-im ${this.#A} config contains invalid bot data`);this.#s=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#s=LM}return this}list(){return structuredClone(this.#s.bots)}get(t){let o=this.#s.bots.find(i=>i.botId===t);return o?structuredClone(o):null}getByPlatformId(t){let o=this.#s.bots.find(i=>i.platformId===t);return o?structuredClone(o):null}async save(t){let o=this.#n(t);if(!o)throw new Error(`Refusing to persist incomplete ${this.#A} bot data`);return this.#g(i=>{let e=i.find(r=>r.platformId===o.platformId&&r.botId!==o.botId),a=i.find(r=>r.tokenRef===o.tokenRef&&r.botId!==o.botId);if(e||a)throw new Error(`Duplicate ${this.#A} bot identity`);let A=i.findIndex(r=>r.botId===o.botId);return A===-1?i.push(o):i[A]=o,structuredClone(o)})}async remove(t){if(!this.#i.test(t))throw new TypeError(`Invalid ${this.#A} bot id`);return this.#g(o=>{let i=o.findIndex(a=>a.botId===t);if(i===-1)return null;let[e]=o.splice(i,1);return structuredClone(e)})}async clear(){let t=this.#I.then(async()=>{try{await nhe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#s=LM});this.#I=t.then(()=>{},()=>{}),await t}#n(t){if(!t||typeof t!="object")return null;let o=qs(t.platformId),i=qs(t.botId),e=qs(t.tokenRef),a=qs(t.name);if(!o||!i||!e||!a||!this.#i.test(i)||!this.#c.test(e))return null;let A=hE(o,{botPrefix:this.#t,tokenRefPrefix:this.#r});if(A.botId!==i||A.tokenRef!==e)return null;let r=this.#a(t);return!r||typeof r!="object"||Array.isArray(r)?null:Object.freeze({botId:i,platformId:o,tokenRef:e,name:a,username:qs(t.username),createdAt:qs(t.createdAt)??new Date().toISOString(),connectedAt:qs(t.connectedAt),...r})}#o(t){if(!t||t.version!==1||!Array.isArray(t.bots))return null;let o=t.bots.map(A=>this.#n(A));if(o.some(A=>A===null))return null;let i=new Set,e=new Set,a=new Set;for(let A of o){if(i.has(A.botId)||e.has(A.platformId)||a.has(A.tokenRef))return null;i.add(A.botId),e.add(A.platformId),a.add(A.tokenRef)}return Object.freeze({version:1,bots:Object.freeze(o)})}async#g(t){let o,i=this.#I.then(async()=>{let e=[...this.#s.bots];o=t(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#l(a),this.#s=a});return this.#I=i.then(()=>{},()=>{}),await i,o}async#l(t){await ahe(ghe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await she(o,`${JSON.stringify(t,null,2)} +`,{encoding:"utf8",mode:384}),await ohe(o,this.#e)}};var jx=Object.freeze({botPrefix:"discord",tokenRefPrefix:"DSH_DISCORD_BOT_TOKEN"});function Jx(n){return hE(n,jx)}function qx(n){return zf(n,D("Discord\u673A\u5668\u4EBA"))}var Vf=class extends ip{constructor(t){super(t,{channel:"Discord",...jx})}};function EE(n){return typeof n=="string"&&n.trim()?n.trim():null}function CE(n,t){return Object.freeze({code:n,message:t})}var op=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n=new Map;#o=new Map;#g=new Map;#l=0;#p=!1;constructor({descriptor:t,credentials:o,configStore:i,inspectToken:e,deriveIdentity:a,maskPlatformId:A,createRuntime:r,deleteState:s=async()=>{},logger:g=console}){if(!t?.key||!t?.label||!t?.connectionLabel)throw new TypeError("TokenBotController requires a channel descriptor");if(!o||typeof o.resolve!="function"||typeof o.set!="function"||typeof o.unset!="function")throw new TypeError(`${t.label} requires the DSH credential provider`);if(!i||typeof i.list!="function"||typeof i.save!="function"||typeof i.remove!="function")throw new TypeError(`${t.label} requires a config store`);if(typeof e!="function"||typeof a!="function"||typeof A!="function"||typeof r!="function")throw new TypeError(`${t.label} controller dependencies are incomplete`);this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#s=s,this.#I=g}async initialize(){if(this.#p)return this.status();for(let t of this.#t.list())await this.#u(t.botId,async()=>{if(this.#p||this.#n.get(t.botId)?.status?.ready)return;let o=await this.#E(t.tokenRef);if(!o){this.#o.set(t.botId,CE("missing-token",D("{label}\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u63A5\u5165\u3002",{label:this.#e.label})));return}try{await this.#d(t,o),this.#o.delete(t.botId)}catch(i){this.#o.set(t.botId,CE("connection-failed",D("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002",{label:this.#e.label}))),this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${t.botId} failed to initialize:`,i)}finally{this.#f()}});return this.status()}async bindCredentials({token:t}={}){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let o=EE(t);if(!o)throw new TypeError(`${this.#e.label} Bot Token is required`);let i=await this.#r(o),e=EE(i?.platformId),a=EE(i?.name);if(!e||!a)throw new Error(`${this.#e.label} returned an invalid bot identity`);let A=this.#a(e);return await this.#u(A.botId,async()=>{if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let r=this.#t.getByPlatformId(e),s=await this.#A.resolve(A.tokenRef).catch(()=>{}),g={botId:A.botId,platformId:e,tokenRef:A.tokenRef,name:a,username:EE(i.username),createdAt:r?.createdAt??new Date().toISOString(),connectedAt:new Date().toISOString()};await this.#A.set(A.tokenRef,o);try{await this.#t.save(g)}catch(c){throw await this.#B(A.tokenRef,s),c}try{await this.#d(g,o),this.#o.delete(A.botId)}catch(c){this.#o.set(A.botId,CE("connection-failed",D("{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002",{label:this.#e.label}))),this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${A.botId} credential connection failed:`,c)}this.#f()}),this.status()}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#u(t,async()=>{let i=await this.#E(o.tokenRef);if(!i)throw new Error(`${this.#e.label} bot token is missing`);try{await this.#d(o,i),this.#o.delete(t)}catch(e){throw this.#o.set(t,CE("connection-failed",D("{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{label:this.#e.label}))),e}finally{this.#f()}}),this.status()}async updateBotConfig(t,o){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);if(typeof o!="function")throw new TypeError("Bot config update must be a function");return await this.#u(t,async()=>{if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let i=this.#t.get(t);if(!i)throw new Error(`Unknown ${this.#e.label} bot`);let e=await this.#E(i.tokenRef);if(!e)throw new Error(`${this.#e.label} bot token is missing`);if(this.#p)throw new Error(`${this.#e.label} controller is closed`);let a=o(i),A=await this.#t.save(a);try{await this.#d(A,e),this.#o.delete(t)}catch(r){throw this.#o.set(t,CE("connection-failed",D("{label}\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{label:this.#e.label}))),r}finally{this.#f()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return this.#u(t,async()=>{let i=this.#n.get(t);if(!i?.status?.ready||typeof i.sendConnectionTest!="function"){let a=new Error(D("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw a.code="test-target-unavailable",a}let e=D("{name}\uFF08{id}\uFF09",{name:o.name,id:this.#i(o.platformId)});return await i.sendConnectionTest(Da(e,D("{label}\u673A\u5668\u4EBA",{label:this.#e.label}))),{sent:!0}})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#u(t,async()=>{let i=await this.#A.resolve(o.tokenRef).catch(()=>{});await this.#h(t);try{await this.#A.unset(o.tokenRef),await this.#t.remove(t)}catch(e){throw i?.value&&(await this.#A.set(o.tokenRef,i.value).catch(()=>{}),await this.#d(o,i.value).catch(()=>{})),new Error(`Unable to remove the ${this.#e.label} bot safely.`,{cause:e})}await this.#s({botId:t,config:o}).catch(e=>{this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${t} state cleanup failed:`,e)}),this.#o.delete(t),this.#f()}),this.status()}status(){let t=this.#t.list().map(i=>{let e=this.#n.get(i.botId)?.status??null,a=e?.ready===!0&&e.connectionState==="connected"&&e.harnessReachable===!0,A=a?"connected":e?.connectionState==="connecting"?"connecting":this.#o.has(i.botId)||e?.connectionState==="failed"?"error":"offline";return{botId:i.botId,state:A,connected:a,configured:!0,bot:{name:i.name,username:i.username,idMasked:this.#i(i.platformId)},health:{status:a?"healthy":A==="error"?"error":"offline",summary:a?D("{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38",{label:this.#e.label,connectionLabel:D(this.#e.connectionLabel)}):A==="error"?D("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5",{label:this.#e.label}):D("{label}\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF",{label:this.#e.label}),lastCheckedAt:e?.lastCheckedAt??null,lastConnectedAt:e?.lastConnectedAt??null},stats:{messagesReceived:e?.messagesReceived??0,messagesReplied:e?.messagesReplied??0},lastMessageError:zr(e?.lastMessageError),error:structuredClone(this.#o.get(i.botId)??null)}}),o=t.filter(i=>i.connected).length;return{schemaVersion:1,revision:this.#l,state:t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o}}}async close(){this.#p||(this.#p=!0,await Promise.allSettled([...this.#g.values()]),await Promise.allSettled([...this.#n.keys()].map(t=>this.#h(t))))}async#d(t,o){if(this.#p)throw new Error(`${this.#e.label} controller is closed`);if(await this.#h(t.botId),this.#p)throw new Error(`${this.#e.label} controller is closed`);let i=await this.#c({botId:t.botId,config:t,token:o});if(!i||typeof i.start!="function"||typeof i.stop!="function")throw new TypeError(`createRuntime returned an invalid ${this.#e.label} runtime`);this.#n.set(t.botId,i);try{await i.start()}catch(e){throw await i.stop().catch(()=>{}),this.#n.delete(t.botId),e}}async#h(t){let o=this.#n.get(t);this.#n.delete(t),await o?.stop().catch(i=>{this.#I.warn?.(`[dsh-im:${this.#e.key}] bot ${t} failed to stop cleanly:`,i)})}async#E(t){let o=await this.#A.resolve(t).catch(()=>{});return EE(o?.value)}async#B(t,o){o?.value?await this.#A.set(t,o.value).catch(()=>{}):await this.#A.unset(t).catch(()=>{})}#u(t,o){let a=(this.#g.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#g.get(t)===a&&this.#g.delete(t)});return this.#g.set(t,a),a}#f(){this.#l+=1}};import{createHash as che}from"node:crypto";var Ihe="https://discord.com/api/v10/",lhe=12e4,phe=new Set([50001,50013]),dhe=new Set([40005]);function Kn(n){return typeof n=="string"&&n.trim()?n.trim():null}function zx(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}function UM(n){return n?.reason instanceof Error?n.reason:new DOMException("The operation was aborted","AbortError")}function hhe(n,t){if(!Number.isInteger(n)||n<1)throw new TypeError(`${t} must be a positive integer`);return n}function Wx(n,t){return t?.providerCode!==void 0&&(n.providerCode=t.providerCode),t?.retry_after!==void 0&&(n.retry_after=t.retry_after,n.retryAfter=t.retry_after),Number.isInteger(t?.status)&&(n.status=t.status),n}function Ehe(n){let t=Number(n?.providerCode),o=Number(n?.status),i=Kn(n?.message)??"",e="artifact-provider-rejected",a="Discord rejected the attachment.";o===401||o===403||phe.has(t)?(e="artifact-permission-required",a="Discord denied permission to send the attachment."):o===413||dhe.has(t)||/(?:request|attachment|file).{0,24}too large/i.test(i)?(e="artifact-too-large",a="The attachment exceeds Discord's size limit."):o===429?(e="artifact-rate-limited",a="Discord rate-limited attachment delivery."):o>=500&&(e="artifact-delivery-uncertain",a="Discord attachment delivery result is uncertain.");let A=new Error(a,{cause:n});return A.code=e,Wx(A,n)}function Che(n){let t=new Error("Discord attachment delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",Wx(t,n)}function uhe(n,t){return new Promise((o,i)=>{if(t?.aborted){i(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(o,n);e?.unref?.(),t?.addEventListener("abort",()=>{clearTimeout(e),i(t.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function Ua(n,t){let o=Kn(n);if(!o||!/^\d{5,30}$/.test(o))throw new TypeError(`Invalid Discord ${t}`);return o}function Vx(n){let t=Kn(n);if(!t)throw new TypeError("A Discord reaction emoji is required");return t}function Bhe(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{20,}$/.test(n.trim())}var uE=class{#e;#A;#t;#r;constructor({token:t,fetchImpl:o=fetch,baseUrl:i=Ihe,fileUploadTimeoutMs:e=lhe}){if(!Bhe(t))throw new TypeError("Discord Bot Token is invalid");if(typeof o!="function")throw new TypeError("DiscordApi requires fetch");this.#e=t.trim(),this.#A=o,this.#t=new URL(i),this.#r=hhe(e,"fileUploadTimeoutMs")}getCurrentUser(t={}){return this.#a("users/@me",{...t,method:"GET"})}getGatewayBot(t={}){return this.#a("gateway/bot",{...t,method:"GET"})}getChannel({channelId:t,signal:o}={}){return this.#a(`channels/${Ua(t,"channel id")}`,{method:"GET",signal:o})}startThreadFromMessage({channelId:t,messageId:o,name:i,signal:e}={}){let a=Kn(i);if(!a||[...a].length>100)throw new TypeError("Discord thread name must contain 1-100 characters");if(e?.aborted)throw UM(e);return this.#a(`channels/${Ua(t,"channel id")}/messages/${Ua(o,"message id")}/threads`,{method:"POST",signal:e,body:{name:a}})}createMessage({channelId:t,content:o,replyToMessageId:i,signal:e}){return this.#a(`channels/${Ua(t,"channel id")}/messages`,{method:"POST",signal:e,body:{content:o,allowed_mentions:{parse:[],replied_user:!1},...i?{message_reference:{message_id:Ua(i,"message id"),channel_id:Ua(t,"channel id"),fail_if_not_exists:!1}}:{}}})}async createFileMessage({channelId:t,file:o,replyToMessageId:i,signal:e}){if(!o||typeof o!="object"||typeof o.fileName!="string"||!o.fileName||!Buffer.isBuffer(o.bytes))throw new TypeError("A Discord attachment is required");let a=Kn(o.deliveryKey)??Kn(o.artifactId),A=a?che("sha256").update(a).digest("hex").slice(0,25):void 0,r=new FormData;r.append("payload_json",JSON.stringify({allowed_mentions:{parse:[],replied_user:!1},attachments:[{id:0,filename:o.fileName}],...A?{nonce:A,enforce_nonce:!0}:{},...i?{message_reference:{message_id:Ua(i,"message id"),channel_id:Ua(t,"channel id"),fail_if_not_exists:!1}}:{}})),r.append("files[0]",new Blob([o.bytes],{type:o.mediaType??"application/octet-stream"}),o.fileName);let s=Ua(t,"channel id");if(e?.aborted)throw UM(e);let g=zx(e,this.#r);try{return await this.#a(`channels/${s}/messages`,{method:"POST",signal:g,timeoutMs:this.#r,body:r,multipart:!0})}catch(c){throw e?.aborted?UM(e):c?.code?.startsWith?.("discord-")?Ehe(c):Che(c)}}editMessage({channelId:t,messageId:o,content:i,signal:e}){return this.#a(`channels/${Ua(t,"channel id")}/messages/${Ua(o,"message id")}`,{method:"PATCH",signal:e,body:{content:i,allowed_mentions:{parse:[],replied_user:!1}}})}sendTyping({channelId:t,signal:o}){return this.#a(`channels/${Ua(t,"channel id")}/typing`,{method:"POST",signal:o,expectBody:!1})}async addOwnReaction({channelId:t,messageId:o,emoji:i,signal:e}={}){let a=Vx(i);return await this.#a(`channels/${Ua(t,"channel id")}/messages/${Ua(o,"message id")}/reactions/${encodeURIComponent(a)}/@me`,{method:"PUT",signal:e,expectBody:!1,retry:!1}),a}removeOwnReaction({channelId:t,messageId:o,emoji:i,signal:e}={}){let a=Vx(i);return this.#a(`channels/${Ua(t,"channel id")}/messages/${Ua(o,"message id")}/reactions/${encodeURIComponent(a)}/@me`,{method:"DELETE",signal:e,expectBody:!1,retry:!1})}async#a(t,{method:o,body:i,signal:e,timeoutMs:a=15e3,expectBody:A=!0,retry:r=!0,multipart:s=!1}){let g;try{g=await this.#A(new URL(t,this.#t),{method:o,headers:{authorization:`Bot ${this.#e}`,...s?{}:{"content-type":"application/json"},"user-agent":"DeepSeek-Harness-dsh-im (https://github.com/xmanrui/dsh-im, 1.1.0)"},...i===void 0?{}:{body:s?i:JSON.stringify(i)},signal:zx(e,a),redirect:"error"})}catch(I){throw I?.name==="AbortError"||I?.name==="TimeoutError"?I:new Error(`Discord ${o} transport failed`)}let c=null;if(A||g.status===429||!g.ok)try{c=await g.json()}catch{if(A){let I=new Error(`Discord ${o} returned invalid JSON`);throw I.status=g?.status,I}}if(g.status===429&&r){let I=Math.min(1e4,Math.max(50,Number(c?.retry_after)*1e3||1e3));return await uhe(I,e),this.#a(t,{method:o,body:i,signal:e,timeoutMs:a,expectBody:A,retry:!1,multipart:s})}if(!g.ok){let I=new Error(Kn(c?.message)??`Discord API failed with HTTP ${g.status}`);I.code=`discord-${g.status}`,I.status=g.status,(Number.isInteger(c?.code)||typeof c?.code=="string")&&(I.providerCode=c.code);let d=Number(c?.retry_after);throw Number.isFinite(d)&&d>=0&&(I.retry_after=d,I.retryAfter=d),I}return A?c:null}};async function Zx(n,t={}){let i=await new uE({token:n,...t}).getCurrentUser();if(!i?.id||i?.bot!==!0)throw new Error("Discord token does not belong to a bot");return{platformId:String(i.id),name:Kn(i.global_name)??Kn(i.username)??D("Discord\u673A\u5668\u4EBA"),username:Kn(i.username)}}var fhe=Object.freeze({success(){},error(){},clear(){},settled:()=>Promise.resolve()});function Xx(n,t){!n||typeof n!="object"||(n[t]=(n[t]??0)+1)}async function Qhe(n,t){let o=AbortSignal.timeout(t),i,e=new Promise((a,A)=>{i=()=>A(o.reason??new DOMException("Timed out","TimeoutError")),o.addEventListener("abort",i,{once:!0})});try{return await Promise.race([n(o),e])}finally{o.removeEventListener("abort",i)}}function Wf({adapter:n,target:t,reactions:o,status:i,logger:e=console,label:a="channel",timeoutMs:A=2e3}={}){if(!t||typeof n?.addReaction!="function"||typeof n?.removeReaction!="function"||typeof o?.processing!="string"||!o.processing||!Number.isSafeInteger(A)||A<=0)return fhe;let r=null,s=!1,g=async(B,f)=>{try{let Q=await Qhe(f,A);return Xx(i,B==="add"?"reactionsAdded":"reactionsRemoved"),{ok:!0,value:Q}}catch(Q){return Xx(i,"reactionErrors"),e.warn?.(`[dsh-im:${a}] status reaction ${B} failed:`,Q?.message??Q?.name??String(Q)),{ok:!1,value:null}}},c=async B=>{if(r!==null){let Q=r;r=null,await g("remove",y=>n.removeReaction(t,Q,{signal:y}))}if(typeof B!="string"||!B)return;let f=await g("add",Q=>n.addReaction(t,B,{signal:Q}));f.ok&&f.value!==void 0&&f.value!==null&&(r=f.value)},I=c(o.processing),d=B=>{s||(s=!0,I=I.then(()=>c(B),()=>c(B)),I.catch(()=>{}))};return Object.freeze({success:()=>d(o.success),error:()=>d(o.error),clear:()=>d(null),settled:()=>I})}var $x="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",yhe="\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002";function fi(n){return typeof n=="string"?n.trim():""}function mhe(n,t,o){return t.actor===o&&(n.kind!=="group"||n.addressed===!0)&&!zt(n)&&!Ft(n)&&!!fi(n.content)}function She(n,t,o){let i=String(n??D("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim().slice(0,255)||D("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u7684\u53D1\u9001\u7ED3\u679C\u672A\u80FD\u786E\u8BA4\uFF0C\u8BF7\u5148\u68C0\u67E5\u804A\u5929\u5185\u662F\u5426\u5DF2\u6536\u5230\uFF0C\u4E0D\u8981\u7ACB\u5373\u91CD\u8BD5\u3002",{name:i});case"artifact-permission-required":return o?.key==="slack"?D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Slack \u5E94\u7528\u7F3A\u5C11 files:write \u6743\u9650\u3002\u8BF7\u66F4\u65B0 Manifest\u3001\u91CD\u65B0\u5B89\u88C5\u5E94\u7528\u5E76\u91CD\u65B0\u8FDE\u63A5\u673A\u5668\u4EBA\u540E\u91CD\u8BD5\u3002",{name:i}):o?.key==="discord"?D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u673A\u5668\u4EBA\u7F3A\u5C11 Discord \u7684 Send Messages\u3001Attach Files \u6216 Read Message History \u6743\u9650\u3002",{name:i}):o?.key==="telegram"?D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46 Telegram \u4E0D\u5141\u8BB8\u673A\u5668\u4EBA\u5728\u5F53\u524D\u804A\u5929\u53D1\u9001\u6587\u6863\uFF0C\u8BF7\u68C0\u67E5\u804A\u5929\u6743\u9650\u3002",{name:i}):D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u6587\u4EF6\u53D1\u9001\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u6E20\u9053\u6743\u9650\u3002",{name:i});case"artifact-too-large":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002",{name:i});case"artifact-empty":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002",{name:i});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u6216\u51C6\u5907\u53D1\u9001\uFF0C\u8BF7\u786E\u8BA4\u6587\u4EF6\u4ECD\u53EF\u8BBF\u95EE\u540E\u91CD\u8BD5\u3002",{name:i});case"artifact-rate-limited":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u6682\u65F6\u88AB\u5F53\u524D\u6E20\u9053\u9650\u6D41\uFF0C\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:i});case"artifact-provider-rejected":return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u62D2\u7EDD\u4E86\u8BE5\u6587\u4EF6\u6216\u6587\u4EF6\u6D88\u606F\u3002",{name:i});default:return D("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u5DF2\u751F\u6210\uFF0C\u4F46\u5F53\u524D\u6E20\u9053\u6682\u65F6\u672A\u80FD\u53D1\u9001\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",{name:i})}}function Yi(){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}var xn=class{#e;#A;#t;#r;#a;#i;#c;#s;#I=new Map;#n=new Map;#o=new Map;#g=new Set;#l=new Set;#p=new Set;#d;#h=new di;constructor({descriptor:t,bot:o,harness:i,state:e,status:a=Yi(),logger:A=console,replyTimeoutMs:r=6e5,signal:s}){if(!t?.key||!t?.label)throw new TypeError("A channel descriptor is required");if(!o||typeof o.sendText!="function")throw new TypeError("A bot client is required");if(!i||!e)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#s=s,this.#d=new si({label:t.key,logger:A})}get status(){return structuredClone(this.#a)}accept(t){if(this.#s?.aborted)return Promise.resolve();let o=fi(t?.conversationId),i=t?.kind==="group"?"group":"direct",e={...t,kind:i,conversationId:o},a=fi(e.messageId),A=fi(e.senderId);if(!a||!A||!o||e.senderIsBot===!0||this.#r.hasSeen(a)||this.#g.has(a))return Promise.resolve();this.#g.add(a);let r=Wf({adapter:this.#A,target:e.kind==="direct"||e.addressed===!0?e.reactionTarget:null,reactions:this.#e.reactions,status:this.#a,logger:this.#i,label:this.#e.key});e.statusReaction=r;let s=this.#E(e,a,A);return s.then(()=>r.success(),()=>r.error()),s}#E(t,o,i){t.kind==="direct"&&go(this.#r,t.connectionTestTarget??t.replyTarget);let e=`${t.kind}:${t.conversationId}`,a=this.#n.get(e),A=fi(t.content),r=Co(A);if(r&&t.kind==="group"&&t.addressed===!0)return this.#B(t,o,Gn());if(r&&t.kind==="direct"){if(/^\/batch$/iu.test(A)&&(this.#I.has(e)||a||this.#d.hasPending(e)))return this.#B(t,o,uo());let d=this.#h.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!zt(t)&&!Ft(t)});if(d.handled)return d.kind==="submit"?this.#u({...t,content:d.prompt,batchSubmission:{token:d.token}},o,i,e):this.#B(t,o,d.message)}else if(t.kind==="direct"&&this.#h.status(e).phase==="collecting"){let I=this.#h.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!zt(t)&&!Ft(t)});if(I.handled)return this.#B(t,o,I.message)}let g=t.kind==="direct"&&this.#h.status(e).phase==="collecting"?null:Ii(A)?Li:Ft(t)?null:Ui(A)?li:Hi(A)?Ki:xi(A)?pi:null;if(g&&(t.kind!=="group"||t.addressed===!0)){let I;return I=this.#f(t,o,e,g).finally(()=>{this.#g.delete(o),this.#p.delete(I)}),this.#p.add(I),I}let c=this.#d.claimReply({key:e,actor:i,messageId:o,text:zt(t)||Ft(t)?"":t.content,addressed:t.kind!=="group"||t.addressed===!0,hasPendingQuestion:!!a,questionCompletion:a?.submitting||a?.claimedReplyMessageId?a.queue:null,isQuestionPending:()=>this.#n.has(e),send:I=>this.#A.sendText(t.replyTarget,I)});if(c){let I;return I=c.process(async()=>this.#r.hasSeen(o)?!1:(await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString(),!0)).finally(()=>{this.#g.delete(o),this.#l.delete(I)}),this.#l.add(I),I}if(a&&a.actor!==i)return this.#u(t,o,i,e);if(a?.submitting||a?.claimedReplyMessageId)return this.#u(t,o,i,e);if(a){mhe(t,a,i)&&(a.claimedReplyMessageId=o);let d=(a.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#Q(t,o,i,e,a)).finally(()=>{this.#g.delete(o),a.claimedReplyMessageId===o&&(a.claimedReplyMessageId=null),a.queue===d&&(a.queue=null)});return a.queue=d,d}return this.#u(t,o,i,e)}#B(t,o,i){let e;return e=(async()=>{this.#r.hasSeen(o)||(await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString(),i&&await this.#A.sendText(t.replyTarget,i),this.#a.lastError=null)})().catch(async a=>{if(this.#s?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#a.lastError=a?.message??String(a);let A=At(this.#a,a);this.#i.error?.(`[dsh-im:${this.#e.key}] failed to process a batch input message [${A.referenceId}]:`,a)}).finally(()=>{this.#g.delete(o),this.#p.delete(e)}),this.#p.add(e),e}#u(t,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1}={}){let s=(this.#I.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#y(t,o,i,e,{alreadyRecorded:A})).finally(()=>{a&&this.#g.delete(o),this.#I.get(e)===s&&this.#I.delete(e)});return this.#I.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#I.values(),...[...this.#n.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#l,...this.#p])}async#f(t,o,i,e){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString();let a=t.replyTarget;try{let A=await e(fi(t.content),this.#t,this.#r,i,{signal:this.#s,isDirect:t.kind==="direct",hasImages:zt(t),hasFiles:Ft(t),pendingInteraction:this.#n.has(i)||this.#d.hasPending(i),control:{owner:this,key:i}});A?.stopped&&await Promise.allSettled([this.#k(i),this.#d.closeRoute(i)]);for(let r of A?.messages??[A?.message])r&&await this.#A.sendText(a,r);this.#a.lastError=null}catch(A){if(A?.code==="turn-stopped"||this.#s?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#a.lastError=A?.message??String(A);let r=At(this.#a,A);this.#i.error?.(`[dsh-im:${this.#e.key}] failed to process a command [${r.referenceId}]:`,A),await this.#A.sendText(a,dt(r)).catch(()=>{})}}sendConnectionTest(t){return Hg({state:this.#r,text:t,channelLabel:D("{label}\u673A\u5668\u4EBA",{label:this.#e.label}),send:(o,i)=>this.#A.sendText(o,i)})}async#m(t,o,i=[],e){let a=await Qo({artifacts:i,baseReceipt:e,deliveryId:o,channelKey:this.#e.key,signal:this.#s,sendImage:typeof this.#A.sendImage=="function"?A=>this.#A.sendImage(t,A):void 0,sendFile:typeof this.#A.sendFile=="function"?A=>this.#A.sendFile(t,A):void 0,onFailure:(A,r)=>At(this.#a,r,{userMessage:She(A?.fileName,r,this.#e),reason:r?.code}),sendFailureNotice:(A,r,s)=>this.#A.sendText(t,dt(s)),logger:this.#i});return this.#a.artifactsSent=(this.#a.artifactsSent??0)+a.artifactsSent,this.#a.artifactSendErrors=(this.#a.artifactSendErrors??0)+a.artifactSendErrors,{receipt:a.receipt,userVisible:a.userVisible,artifactSendErrors:a.artifactSendErrors}}async#y(t,o,i,e,{alreadyRecorded:a=!1}={}){if(!a){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString()}let A=t.replyTarget,r=fi(t.content),s=t.batchSubmission,g=null,c=!1;try{if(this.#s?.throwIfAborted(),t.kind==="group"&&t.addressed!==!0){this.#a.messagesRejected+=1,this.#a.lastRejectedAt=new Date().toISOString();return}let I=zt(t),d=Ft(t);if(!r&&!I&&!d){await this.#A.sendText(A,D("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"));return}let B=r.toLowerCase();if(!I&&!d&&B==="/help"){await this.#A.sendText(A,[D("{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002",{label:this.#e.label}),"",D("\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002"),D("/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD"),D("/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587"),D("/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09"),D("/workspace \u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A"),D("/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"),D("/sessionlist [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898"),D("/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD"),D("/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B"),D("/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7"),D("/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7"),D("/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B"),D("\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]"),D("/presetlist \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset"),D("/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset"),D("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),D("/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"),D("/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1"),D("/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1"),D("/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09"),D("/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21"),D("/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21"),D("/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001"),D("/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C"),D("/help \u663E\u793A\u672C\u5E2E\u52A9")].join(` +`));return}if(!I&&!d&&B==="/status"){await this.#t.ensureRunning({signal:this.#s}),await this.#A.sendText(A,D("{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002",{label:this.#e.label}));return}let f=!I&&!d?await ho(r,this.#t,e):null;if(f){for(let P of f.messages??[f.message])await this.#A.sendText(A,P);return}if(!I&&!d&&B==="/new"){await this.#r.clearSession(e),await this.#A.sendText(A,D("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"));return}let Q=!I&&!d?await ci(r,this.#t,this.#r,e,{signal:this.#s}):null;if(Q){await this.#A.sendText(A,Q.message);return}await this.#A.sendTyping?.(A).catch(P=>{this.#i.warn?.(`[dsh-im:${this.#e.key}] typing indicator failed:`,P)});let y=!1;if(typeof this.#A.openDeliveryStream=="function")try{g=await this.#A.openDeliveryStream(A),c=!0}catch(P){this.#i.warn?.(`[dsh-im:${this.#e.key}] unable to start a semantic reply stream; using final delivery:`,P)}else if(typeof this.#A.openStream=="function")try{g=await this.#A.openStream(A)}catch(P){this.#i.warn?.(`[dsh-im:${this.#e.key}] unable to start a streamed reply; using text:`,P)}let m=I?await lo(t,{signal:this.#s}):void 0,{answer:_,artifacts:T=[]}=await gi({harness:this.#t,state:this.#r,key:e,text:r,content:m,createOptions:this.#s?{signal:this.#s}:void 0,existsOptions:this.#s?{signal:this.#s}:void 0,askOptions:{timeoutMs:this.#c,signal:this.#s,control:{owner:this,key:e},onUpdate:g?async P=>{let z=P.type==="text"?P.text:P.type==="tool"?D("\u6B63\u5728\u4F7F\u7528{name}\u2026",{name:P.name}):P.text;if(z){let U=P.type==="text"?"markdown":"plain";await g.update(c?Ln(z,U):z)}}:void 0,onInteraction:P=>this.#C(P,{key:e,actor:i,target:A,requiresMention:t.kind==="group"&&t.requiresMention!==!1}),onInteractionResolved:P=>this.#M(P),files:t.files}});s&&this.#h.complete(e,s.token);let R=!fi(_)&&T.length>0,H=R?D(yhe):_,j=R?"plain":"markdown",F=null,q=null;if(g)try{let P=await g.finish(c?Ln(H,j):H);y=!0,q=Vt({deliveryId:o,presentation:P?.presentation??g.presentation??`${this.#e.key}-stream`,providerMessageIds:[...hi(g),...hi(P)],deliveryOutcome:P?.deliveryOutcome,reason:P?.reason})}catch(P){g.cancel?.(),this.#i.warn?.(`[dsh-im:${this.#e.key}] streamed reply finalization failed; using text:`,P)}if(!y)try{let P=typeof this.#A.sendDelivery=="function"?await this.#A.sendDelivery(A,Ln(H,j)):await this.#A.sendText(A,H);q=Vt({deliveryId:o,presentation:P?.presentation??`${this.#e.key}-text`,providerMessageIds:hi(P),deliveryOutcome:P?.deliveryOutcome,reason:P?.reason})}catch(P){F=wa(P)}let J=q?.deliveryOutcome==="unknown";q?.deliveryOutcome==="failed"?F=wa(new Error(`Final text delivery failed (${q.reason??"unknown"})`),{uncertain:!1}):J&&(F=wa(new Error(`Final text delivery outcome is unknown (${q.reason??"unknown"})`)));let x=await this.#m(A,o,T,q);if(F&&(!x.userVisible||J))throw F.deliveryReceipt=x.receipt,F;return F&&x.artifactSendErrors===0&&At(this.#a,F),x.userVisible&&(this.#a.messagesReplied+=1,this.#a.lastReplyAt=new Date().toISOString(),this.#a.lastError=null,!F&&x.artifactSendErrors===0&&co(this.#a)),x.receipt}catch(I){let d=I?.code==="turn-stopped";s&&d&&this.#h.complete(e,s.token);let B=s&&!d?this.#h.fail(e,s.token):null;if(d){if(t.statusReaction?.clear(),g)try{await g.finish(D("\u5DF2\u505C\u6B62\u3002"))}catch{g.cancel?.()}return}if(this.#s?.aborted){t.statusReaction?.clear(),g?.cancel?.();return}t.statusReaction?.error(),this.#a.lastError=I?.message??String(I);let f=async T=>{let R=typeof g?.fail=="function"?"fail":typeof g?.finish=="function"?"finish":null;if(!R)return!1;try{let H=await g[R](T);return R==="fail"?!!H&&H.deliveryOutcome!=="failed":H!==!1&&H?.deliveryOutcome!=="failed"}catch(H){return this.#i.warn?.(`[dsh-im:${this.#e.key}] unable to finalize the failed stream:`,H),!1}},Q=po(I),y=fo(I),m=At(this.#a,I,{userMessage:y??Q,reason:Fi(I)?.reason}),_=B?.retained?`${dt(m)} -${B.message}`:dt(m);if(this.#i.error?.(`[dsh-im:${this.#e.key}] failed to process a message [${m.referenceId}]:`,I),await f(_))return I.deliveryReceipt;g?.cancel?.();try{await this.#A.sendText(A,_)}catch(T){this.#i.error?.(`[dsh-im:${this.#e.key}] failed to send the safe error reply:`,T)}return I.deliveryReceipt}finally{await Promise.allSettled([this.#k(e),this.#d.closeRoute(e)])}}async#Q(t,o,i,e,a){if(this.#s?.aborted){t.statusReaction?.clear();return}let A=this.#n.get(e),r=a.claimedReplyMessageId===o;if(!A||A!==a||A.submitting)return r&&(!A||A!==a)?this.#w(t,o):this.#u(t,o,i,e,{releaseMessageId:!1});if(this.#r.hasSeen(o))return;if(await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString(),t.kind==="group"&&t.addressed!==!0){this.#a.messagesRejected+=1,this.#a.lastRejectedAt=new Date().toISOString();return}let s=t.replyTarget,g=Bi(t.content);if(!g||qt(t)||Gt(t)){try{await this.#A.sendText(s,D("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"))}catch(d){this.#i.error?.(`[dsh-im:${this.#e.key}] failed to reject a non-text interaction reply:`,d)}return}let c=this.#n.get(e);if(!c||c!==a||c.submitting)return r&&(!c||c!==a)?this.#w(t,o,{alreadyRecorded:!0}):this.#u(t,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0});if(c.target=s,c.needsPresentation){let d=c.presentationTask!==null;try{await this.#b(c)}catch(f){t.statusReaction?.error(),this.#a.lastError=D("{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",{label:this.#e.label}),this.#i.error?.(`[dsh-im:${this.#e.key}] failed to retry an interaction question:`,f),c.interaction.reconnect?.();return}let B=this.#n.get(e);if(!B||B!==a||B.submitting)return r&&(!B||B!==a)?this.#w(t,o,{alreadyRecorded:!0}):this.#u(t,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0});if(!d)return}let I=c.questions[c.index];if(I){if(c.answers.push(oi(I,g)),c.index+=1,c.indexthis.#A.sendText(e,c)});if(t?.kind!=="question")return;let A=t?.payload?.questions,r=Bi(t?.interactionId)||Bi(t?.rpcId);if(!Bi(t?.rpcId)||!r||!Bi(t?.sessionId)||!Array.isArray(A)||A.length===0||A.some(c=>!ai(c))){this.#i.warn?.(`[dsh-im:${this.#e.key}] ignored an invalid Harness question interaction`);return}if(t.recovered===!0){await this.#R(t,`${this.#e.label} safely cancelled an interaction left by an earlier client.`);try{await this.#A.sendText(e,D("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"))}catch(c){this.#i.error?.(`[dsh-im:${this.#e.key}] failed to send an interaction recovery notice:`,c)}return}let s=this.#n.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#b(s);return}if(this.#o.has(r))return;if(s){this.#i.warn?.(`[dsh-im:${this.#e.key}] cancelled a second pending Harness question`),await this.#R(t,`${this.#e.label} is already handling another user interaction.`);return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:i,requiresMention:a,questions:A,answers:[],index:0,target:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0,presentationTask:null};this.#n.set(o,g),this.#o.set(r,o),await this.#b(g)}async#M(t){if(t?.kind==="approval"){await this.#d.handleResolved(t);return}let o=Bi(t?.interactionId);if(t?.kind!=="question"||!o)return;let i=this.#o.get(o);i&&this.#_(i,o)}#b(t){if(t.presentationTask)return t.presentationTask;let o=t.questions[t.index];if(!o)return Promise.resolve();let i=(async()=>{await this.#A.sendText(t.target,ii(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1})();return t.presentationTask=i,i.then(()=>{t.presentationTask===i&&(t.presentationTask=null)},()=>{t.presentationTask===i&&(t.presentationTask=null)}),i}async#w(t,o,{alreadyRecorded:i=!1}={}){if(!i){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString()}try{await this.#A.sendText(t.replyTarget,D(Tx))}catch(e){this.#i.error?.(`[dsh-im:${this.#e.key}] failed to send an expired interaction notice:`,e)}}#S(t,o){let i=this.#n.get(t);return!i||o!==void 0&&i.interactionId!==o?null:(this.#n.delete(t),this.#o.delete(i.interactionId),i)}#_(t,o){return this.#S(t,o)!==null}async#R(t,o){try{await t.respond({ok:!1,error:{code:"cancelled",message:o,details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(i){if(i?.code!=="interaction-not-pending")throw i}}async#k(t){let o=this.#S(t);if(!(!o||o.kind!=="question"))try{await this.#R(o.interaction,`The ${this.#e.label} interaction ended before the user answered.`)}catch(i){this.#i.warn?.(`[dsh-im:${this.#e.key}] failed to cancel a pending Harness interaction:`,i)}}};var DM=Object.freeze({key:"discord",label:"Discord",connectionLabel:" Gateway \u957F\u8FDE\u63A5",reactions:Object.freeze({processing:"\u{1F440}",success:"\u2705",error:"\u274C"})}),Lf=class extends Un{constructor(t){super({descriptor:DM,...t})}};var pE=class extends ep{constructor(t){super({...t,descriptor:DM,inspectToken:t.inspectToken??Mx,deriveIdentity:Sx,maskPlatformId:Dx})}};var Uf=class extends lr{constructor(t){super({...t,rpcIdPrefix:"discord",logPrefix:"dsh-discord"})}};function Hn(n,t){let o=typeof n=="string"?n.trim():"";if(!o)return[];let i=[],e=o;for(;e.length>t;){let a=e.lastIndexOf(` -`,t);anull,logger:r=console}){let s,g=[],c=null,I=null,d=null,B=!1,f=n,Q=()=>{B||I!==null||d||!c||(I=setTimeout(()=>{I=null;let y=c;c=null;let m=Hn(y,t)[0]??n;d=Promise.resolve(m===f?void 0:e(s,m)).then(()=>{f=m}).catch(_=>r.warn?.("[dsh-im] streamed message update failed:",_)).finally(()=>{d=null,Q()})},o),I?.unref?.())};return{get messageId(){return s},get providerMessageIds(){return[...g]},async start(){return s=await i(n),(typeof s=="string"&&s.trim()||Number.isSafeInteger(s))&&g.push(String(s)),this},update(y){B||typeof y!="string"||!y.trim()||(c=y,Q())},async finish(y){if(B)throw new Error("Message stream is already closed");B=!0,I!==null&&clearTimeout(I),I=null,c=null,await d?.catch(()=>{});let m=Hn(y,t),_=m[0]??D("\u5904\u7406\u5B8C\u6210\u3002");_!==f&&await e(s,_),f=_;for(let T of m.slice(1)){let G=await a(T),x=A(G);(typeof x=="string"&&x.trim()||Number.isSafeInteger(x))&&g.push(String(x))}},cancel(){B=!0,c=null,I!==null&&clearTimeout(I),I=null}}}async function Nx(n){try{await n?.body?.cancel?.()}catch{}}function jde(n,t){return!Array.isArray(t)||t.some(o=>typeof o=="string"&&(n.hostname===o||o.startsWith(".")&&(n.hostname===o.slice(1)||n.hostname.endsWith(o))))}async function Ap(n,{fetchImpl:t=fetch,headers:o,signal:i,allowedHosts:e}={}){let a=new URL(n);if(a.protocol!=="https:")throw new Error("File download URL must use HTTPS");if(!jde(a,e))throw new Error("File download URL is not hosted by the messaging platform");let A=await t(a,{method:"GET",headers:o,signal:i,redirect:"manual"});if(Number.isInteger(A?.status)&&A.status>=300&&A.status<400){await Nx(A);let r=new Error(`File download redirect was blocked (HTTP ${A.status})`);throw r.code="file-redirect-blocked",r}if(!A?.ok){await Nx(A);let r=new Error(`File download failed with HTTP ${A?.status??"unknown"}`);throw r.code="file-http-error",r.status=A?.status,r}if(A.body?.[Symbol.asyncIterator])return{stream:A.body};if(typeof A.arrayBuffer=="function"){let r=Buffer.from(await A.arrayBuffer());return{stream:(async function*(){yield r})()}}throw new Error("File download returned no readable body")}var Jde=37377,qde=5e3,Rx=Object.freeze([1e3,3e3,5e3,1e4,3e4]),zde=0,Vde=5,Wde=10,Zde=11,Xde=12,$de=new Set([Wde,Zde,Xde]),ehe=new Set(["image/jpeg","image/png","image/webp","image/gif"]),Ahe=new Map([[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".gif","image/gif"]]),Px=Object.freeze(["cdn.discordapp.com"]);function the(n){let t=new URL(n);if(t.protocol!=="wss:")throw new Error("Discord returned an insecure Gateway URL");return t.searchParams.set("v","10"),t.searchParams.set("encoding","json"),t.href}function wM(n,t,o){if(typeof n.addEventListener=="function")n.addEventListener(t,o);else if(typeof n.on=="function")n.on(t,o);else throw new TypeError("Discord WebSocket does not support events")}function rhe(n){return typeof n=="string"?n:typeof n?.data=="string"?n.data:Buffer.isBuffer(n)?n.toString("utf8"):Buffer.isBuffer(n?.data)?n.data.toString("utf8"):null}function ahe(n){if(n===4004){let o=new Error(D("Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002"));return o.code="discord-401",o}if(n===4013||n===4014){let o=new Error(D("Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002"));return o.code="discord-intents",o}let t=new Error(`Discord Gateway closed (${n||"unknown"})`);return t.code="discord-gateway-closed",t}function Gx(n,t){return typeof n!="string"?"":n.replace(new RegExp(`<@!?${t}>`,"g"),"").trim()}function ihe(n,t){return[...Gx(n?.content??"",t).replace(/\s+/g," ").trim()||"DeepSeek Harness"].slice(0,100).join("")}function MM(n){return $de.has(Number(n?.type))}function Fx(n,t){return MM(n)&&String(n?.id??"")===String(t?.id??"")&&String(n?.parent_id??"")===String(t?.channel_id??"")}function OM(n,t){return n?.id&&t?.(n),n}function nI(n,t,o,{fromSourceMessage:i=!1,fallback:e=null,notice:a=null}={}){let A=String(t?.id??n.conversationId),r=MM(t),s=r&&String(t?.owner_id??"")===String(o),g=r&&t?.parent_id?String(t.parent_id):A;return{...n,conversationId:A,addressed:n.addressed||s,requiresMention:r?!s:n.kind==="group",replyTarget:{channelId:A,...!i&&n.replyTarget?.replyToMessageId?{replyToMessageId:n.replyTarget.replyToMessageId}:{},...a?{notice:a}:{}},connectionTestTarget:{channelId:A},conversationRoute:{peerId:g,...r?{threadId:A,managed:s}:{},...e?{fallback:e}:{}}}}function ohe(n){let t=Number(n?.status);return!Number.isInteger(t)||t>=500}function kx(n){let t=new Error("Discord Thread creation result is uncertain",{cause:n});return t.code="discord-thread-create-uncertain",t}async function nhe(n,t,{signal:o,onChannel:i}={}){try{let e=OM(await n.getChannel({channelId:String(t.id),signal:o}),i);return Fx(e,t)?e:null}catch(e){if(e?.status===404)return null;throw e}}async function vx(n,t,o){try{await n.createMessage({channelId:t.replyTarget.channelId,replyToMessageId:t.replyTarget.replyToMessageId,content:"Thread \u521B\u5EFA\u7ED3\u679C\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u3002\u82E5\u5DF2\u521B\u5EFA\uFF0C\u8BF7\u5728\u5BF9\u5E94 Thread \u4E2D\u91CD\u8BD5\uFF1B\u82E5\u672A\u521B\u5EFA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0 @\u673A\u5668\u4EBA\u3002",signal:o})}catch(i){if(o?.aborted)throw o.reason??i}}function Lx(n){let t=typeof n?.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"";if(ehe.has(t))return t;let o=typeof n?.filename=="string"?n.filename.toLowerCase():"";for(let[i,e]of Ahe)if(o.endsWith(i))return e;return null}function Ux(n){return Number.isSafeInteger(n)&&n>=0?n:void 0}function she(n,t){let o=Lx(n);return!o||typeof n?.url!="string"?null:{name:typeof n.filename=="string"?n.filename:void 0,mediaType:o,size:Ux(n.size),load:i=>co(n.url,{...i,fetchImpl:t,allowedHosts:Px})}}function ghe(n,t){if(Lx(n)||typeof n?.url!="string"||!n.url)return null;let o=typeof n.content_type=="string"&&n.content_type?n.content_type.split(";",1)[0].trim().toLowerCase():void 0;return{name:typeof n.filename=="string"&&n.filename?n.filename:String(n.id??"discord-file"),...o?{mediaType:o}:{},size:Ux(n.size),load:({signal:i}={})=>Ap(n.url,{fetchImpl:t,signal:i,allowedHosts:Px})}}function che(n,t,{fetchImpl:o=fetch}={}){if(!n?.id||!n?.channel_id||!n?.author?.id||Number(n.type)===21)return null;let i=!n.guild_id,e=i||n.mentions?.some(a=>String(a?.id)===String(t));return{messageId:String(n.id),senderId:String(n.author.id),senderIsBot:n.author.bot===!0,kind:i?"direct":"group",conversationId:String(n.channel_id),content:Gx(n.content??"",t),plainText:(!Array.isArray(n.attachments)||n.attachments.length===0)&&(!Array.isArray(n.sticker_items)||n.sticker_items.length===0)&&!n.poll,images:Array.isArray(n.attachments)?n.attachments.map(a=>she(a,o)).filter(Boolean):[],files:Array.isArray(n.attachments)?n.attachments.map(a=>ghe(a,o)).filter(Boolean):[],addressed:e,replyTarget:{channelId:String(n.channel_id),replyToMessageId:String(n.id)},reactionTarget:{channelId:String(n.channel_id),messageId:String(n.id)},connectionTestTarget:{channelId:String(n.channel_id)}}}async function Ihe(n,t,{api:o,channel:i,fetchImpl:e=fetch,signal:a,onChannel:A}={}){let r=che(n,t,{fetchImpl:e});if(!r||r.senderIsBot)return r;if(a?.throwIfAborted(),r.kind==="direct")return nI(r,{id:r.conversationId,type:1},t);if(!o||typeof o.getChannel!="function")throw new TypeError("Discord route resolution requires the Discord API");let s=OM(i??await o.getChannel({channelId:r.conversationId,signal:a}),A);if(MM(s)||!r.addressed)return nI(r,s,t);let g=Number(s?.type);if(g!==zde&&g!==Vde)return nI(r,s,t,{fallback:"unsupported-channel",notice:"\u5F53\u524D\u9891\u9053\u4E0D\u652F\u6301\u81EA\u52A8\u521B\u5EFA Thread\uFF0C\u5DF2\u76F4\u63A5\u5728\u5F53\u524D\u9891\u9053\u56DE\u590D\u3002"});a?.throwIfAborted();let c;try{if(c=OM(await o.startThreadFromMessage({channelId:r.conversationId,messageId:r.messageId,name:ihe(n,t),signal:a}),A),!Fx(c,n))throw new Error("Discord returned an invalid thread for the source message")}catch(I){let d;try{d=await nhe(o,n,{signal:AbortSignal.timeout(qde),onChannel:A})}catch(B){throw a?.aborted?a.reason??I:(await vx(o,r,a),kx(B))}if(d)return nI(r,d,t,{fromSourceMessage:!0});if(a?.aborted)throw a.reason??I;if(ohe(I))throw await vx(o,r,a),kx(I);return nI(r,s,t,{fallback:"thread-create-failed",notice:"\u65E0\u6CD5\u521B\u5EFA Thread\uFF0C\u5DF2\u76F4\u63A5\u5728\u5F53\u524D\u9891\u9053\u56DE\u590D\u3002"})}return nI(r,c,t,{fromSourceMessage:!0})}var bM=class{#e;#A;#t=new WeakSet;constructor({api:t,signal:o}){this.#e=t,this.#A=o}async sendText(t,o){let i=!this.#t.has(t)&&t?.notice?String(t.notice):null,e=Hn(i?`${i} +${B.message}`:dt(m);if(this.#i.error?.(`[dsh-im:${this.#e.key}] failed to process a message [${m.referenceId}]:`,I),await f(_))return I.deliveryReceipt;g?.cancel?.();try{await this.#A.sendText(A,_)}catch(T){this.#i.error?.(`[dsh-im:${this.#e.key}] failed to send the safe error reply:`,T)}return I.deliveryReceipt}finally{await Promise.allSettled([this.#k(e),this.#d.closeRoute(e)])}}async#Q(t,o,i,e,a){if(this.#s?.aborted){t.statusReaction?.clear();return}let A=this.#n.get(e),r=a.claimedReplyMessageId===o;if(!A||A!==a||A.submitting)return r&&(!A||A!==a)?this.#w(t,o):this.#u(t,o,i,e,{releaseMessageId:!1});if(this.#r.hasSeen(o))return;if(await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString(),t.kind==="group"&&t.addressed!==!0){this.#a.messagesRejected+=1,this.#a.lastRejectedAt=new Date().toISOString();return}let s=t.replyTarget,g=fi(t.content);if(!g||zt(t)||Ft(t)){try{await this.#A.sendText(s,D("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"))}catch(d){this.#i.error?.(`[dsh-im:${this.#e.key}] failed to reject a non-text interaction reply:`,d)}return}let c=this.#n.get(e);if(!c||c!==a||c.submitting)return r&&(!c||c!==a)?this.#w(t,o,{alreadyRecorded:!0}):this.#u(t,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0});if(c.target=s,c.needsPresentation){let d=c.presentationTask!==null;try{await this.#b(c)}catch(f){t.statusReaction?.error(),this.#a.lastError=D("{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",{label:this.#e.label}),this.#i.error?.(`[dsh-im:${this.#e.key}] failed to retry an interaction question:`,f),c.interaction.reconnect?.();return}let B=this.#n.get(e);if(!B||B!==a||B.submitting)return r&&(!B||B!==a)?this.#w(t,o,{alreadyRecorded:!0}):this.#u(t,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0});if(!d)return}let I=c.questions[c.index];if(I){if(c.answers.push(ni(I,g)),c.index+=1,c.indexthis.#A.sendText(e,c)});if(t?.kind!=="question")return;let A=t?.payload?.questions,r=fi(t?.interactionId)||fi(t?.rpcId);if(!fi(t?.rpcId)||!r||!fi(t?.sessionId)||!Array.isArray(A)||A.length===0||A.some(c=>!ii(c))){this.#i.warn?.(`[dsh-im:${this.#e.key}] ignored an invalid Harness question interaction`);return}if(t.recovered===!0){await this.#R(t,`${this.#e.label} safely cancelled an interaction left by an earlier client.`);try{await this.#A.sendText(e,D("\u68C0\u6D4B\u5230\u8FD9\u4E2A Session \u4E2D\u9057\u7559\u7684\u5F85\u56DE\u7B54\u95EE\u9898\uFF0C\u5DF2\u5B89\u5168\u53D6\u6D88\u5E76\u7EE7\u7EED\u5904\u7406\u4F60\u521A\u624D\u7684\u6D88\u606F\u3002"))}catch(c){this.#i.error?.(`[dsh-im:${this.#e.key}] failed to send an interaction recovery notice:`,c)}return}let s=this.#n.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#b(s);return}if(this.#o.has(r))return;if(s){this.#i.warn?.(`[dsh-im:${this.#e.key}] cancelled a second pending Harness question`),await this.#R(t,`${this.#e.label} is already handling another user interaction.`);return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:i,requiresMention:a,questions:A,answers:[],index:0,target:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0,presentationTask:null};this.#n.set(o,g),this.#o.set(r,o),await this.#b(g)}async#M(t){if(t?.kind==="approval"){await this.#d.handleResolved(t);return}let o=fi(t?.interactionId);if(t?.kind!=="question"||!o)return;let i=this.#o.get(o);i&&this.#_(i,o)}#b(t){if(t.presentationTask)return t.presentationTask;let o=t.questions[t.index];if(!o)return Promise.resolve();let i=(async()=>{await this.#A.sendText(t.target,oi(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1})();return t.presentationTask=i,i.then(()=>{t.presentationTask===i&&(t.presentationTask=null)},()=>{t.presentationTask===i&&(t.presentationTask=null)}),i}async#w(t,o,{alreadyRecorded:i=!1}={}){if(!i){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#a.messagesReceived+=1,this.#a.lastMessageAt=new Date().toISOString()}try{await this.#A.sendText(t.replyTarget,D($x))}catch(e){this.#i.error?.(`[dsh-im:${this.#e.key}] failed to send an expired interaction notice:`,e)}}#S(t,o){let i=this.#n.get(t);return!i||o!==void 0&&i.interactionId!==o?null:(this.#n.delete(t),this.#o.delete(i.interactionId),i)}#_(t,o){return this.#S(t,o)!==null}async#R(t,o){try{await t.respond({ok:!1,error:{code:"cancelled",message:o,details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(i){if(i?.code!=="interaction-not-pending")throw i}}async#k(t){let o=this.#S(t);if(!(!o||o.kind!=="question"))try{await this.#R(o.interaction,`The ${this.#e.label} interaction ended before the user answered.`)}catch(i){this.#i.warn?.(`[dsh-im:${this.#e.key}] failed to cancel a pending Harness interaction:`,i)}}};var HM=Object.freeze({key:"discord",label:"Discord",connectionLabel:" Gateway \u957F\u8FDE\u63A5",reactions:Object.freeze({processing:"\u{1F440}",success:"\u2705",error:"\u274C"})}),Zf=class extends xn{constructor(t){super({descriptor:HM,...t})}};var BE=class extends op{constructor(t){super({...t,descriptor:HM,inspectToken:t.inspectToken??Zx,deriveIdentity:Jx,maskPlatformId:qx})}};var Xf=class extends pr{constructor(t){super({...t,rpcIdPrefix:"discord",logPrefix:"dsh-discord"})}};function Yn(n,t){let o=typeof n=="string"?n.trim():"";if(!o)return[];let i=[],e=o;for(;e.length>t;){let a=e.lastIndexOf(` +`,t);anull,logger:r=console}){let s,g=[],c=null,I=null,d=null,B=!1,f=n,Q=()=>{B||I!==null||d||!c||(I=setTimeout(()=>{I=null;let y=c;c=null;let m=Yn(y,t)[0]??n;d=Promise.resolve(m===f?void 0:e(s,m)).then(()=>{f=m}).catch(_=>r.warn?.("[dsh-im] streamed message update failed:",_)).finally(()=>{d=null,Q()})},o),I?.unref?.())};return{get messageId(){return s},get providerMessageIds(){return[...g]},async start(){return s=await i(n),(typeof s=="string"&&s.trim()||Number.isSafeInteger(s))&&g.push(String(s)),this},update(y){B||typeof y!="string"||!y.trim()||(c=y,Q())},async finish(y){if(B)throw new Error("Message stream is already closed");B=!0,I!==null&&clearTimeout(I),I=null,c=null,await d?.catch(()=>{});let m=Yn(y,t),_=m[0]??D("\u5904\u7406\u5B8C\u6210\u3002");_!==f&&await e(s,_),f=_;for(let T of m.slice(1)){let R=await a(T),H=A(R);(typeof H=="string"&&H.trim()||Number.isSafeInteger(H))&&g.push(String(H))}},cancel(){B=!0,c=null,I!==null&&clearTimeout(I),I=null}}}async function eY(n){try{await n?.body?.cancel?.()}catch{}}function Dhe(n,t){return!Array.isArray(t)||t.some(o=>typeof o=="string"&&(n.hostname===o||o.startsWith(".")&&(n.hostname===o.slice(1)||n.hostname.endsWith(o))))}async function np(n,{fetchImpl:t=fetch,headers:o,signal:i,allowedHosts:e}={}){let a=new URL(n);if(a.protocol!=="https:")throw new Error("File download URL must use HTTPS");if(!Dhe(a,e))throw new Error("File download URL is not hosted by the messaging platform");let A=await t(a,{method:"GET",headers:o,signal:i,redirect:"manual"});if(Number.isInteger(A?.status)&&A.status>=300&&A.status<400){await eY(A);let r=new Error(`File download redirect was blocked (HTTP ${A.status})`);throw r.code="file-redirect-blocked",r}if(!A?.ok){await eY(A);let r=new Error(`File download failed with HTTP ${A?.status??"unknown"}`);throw r.code="file-http-error",r.status=A?.status,r}if(A.body?.[Symbol.asyncIterator])return{stream:A.body};if(typeof A.arrayBuffer=="function"){let r=Buffer.from(await A.arrayBuffer());return{stream:(async function*(){yield r})()}}throw new Error("File download returned no readable body")}var whe=37377,Ohe=5e3,AY=Object.freeze([1e3,3e3,5e3,1e4,3e4]),bhe=0,Mhe=5,_he=10,The=11,Nhe=12,Rhe=new Set([_he,The,Nhe]),khe=new Set(["image/jpeg","image/png","image/webp","image/gif"]),vhe=new Map([[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".gif","image/gif"]]),aY=Object.freeze(["cdn.discordapp.com"]);function Phe(n){let t=new URL(n);if(t.protocol!=="wss:")throw new Error("Discord returned an insecure Gateway URL");return t.searchParams.set("v","10"),t.searchParams.set("encoding","json"),t.href}function KM(n,t,o){if(typeof n.addEventListener=="function")n.addEventListener(t,o);else if(typeof n.on=="function")n.on(t,o);else throw new TypeError("Discord WebSocket does not support events")}function Ghe(n){return typeof n=="string"?n:typeof n?.data=="string"?n.data:Buffer.isBuffer(n)?n.toString("utf8"):Buffer.isBuffer(n?.data)?n.data.toString("utf8"):null}function Fhe(n){if(n===4004){let o=new Error(D("Discord Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002"));return o.code="discord-401",o}if(n===4013||n===4014){let o=new Error(D("Discord Gateway Intents \u914D\u7F6E\u4E0D\u6B63\u786E\uFF0C\u8BF7\u68C0\u67E5 Developer Portal \u7684 Bot \u8BBE\u7F6E\u3002"));return o.code="discord-intents",o}let t=new Error(`Discord Gateway closed (${n||"unknown"})`);return t.code="discord-gateway-closed",t}function iY(n,t){return typeof n!="string"?"":n.replace(new RegExp(`<@!?${t}>`,"g"),"").trim()}function Lhe(n,t){return[...iY(n?.content??"",t).replace(/\s+/g," ").trim()||"DeepSeek Harness"].slice(0,100).join("")}function jM(n){return Rhe.has(Number(n?.type))}function oY(n,t){return jM(n)&&String(n?.id??"")===String(t?.id??"")&&String(n?.parent_id??"")===String(t?.channel_id??"")}function xM(n,t){return n?.id&&t?.(n),n}function pI(n,t,o,{fromSourceMessage:i=!1,fallback:e=null,notice:a=null}={}){let A=String(t?.id??n.conversationId),r=jM(t),s=r&&String(t?.owner_id??"")===String(o),g=r&&t?.parent_id?String(t.parent_id):A;return{...n,conversationId:A,addressed:n.addressed||s,requiresMention:r?!s:n.kind==="group",replyTarget:{channelId:A,...!i&&n.replyTarget?.replyToMessageId?{replyToMessageId:n.replyTarget.replyToMessageId}:{},...a?{notice:a}:{}},connectionTestTarget:{channelId:A},conversationRoute:{peerId:g,...r?{threadId:A,managed:s}:{},...e?{fallback:e}:{}}}}function Uhe(n){let t=Number(n?.status);return!Number.isInteger(t)||t>=500}function tY(n){let t=new Error("Discord Thread creation result is uncertain",{cause:n});return t.code="discord-thread-create-uncertain",t}async function Hhe(n,t,{signal:o,onChannel:i}={}){try{let e=xM(await n.getChannel({channelId:String(t.id),signal:o}),i);return oY(e,t)?e:null}catch(e){if(e?.status===404)return null;throw e}}async function rY(n,t,o){try{await n.createMessage({channelId:t.replyTarget.channelId,replyToMessageId:t.replyTarget.replyToMessageId,content:"Thread \u521B\u5EFA\u7ED3\u679C\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u3002\u82E5\u5DF2\u521B\u5EFA\uFF0C\u8BF7\u5728\u5BF9\u5E94 Thread \u4E2D\u91CD\u8BD5\uFF1B\u82E5\u672A\u521B\u5EFA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0 @\u673A\u5668\u4EBA\u3002",signal:o})}catch(i){if(o?.aborted)throw o.reason??i}}function nY(n){let t=typeof n?.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"";if(khe.has(t))return t;let o=typeof n?.filename=="string"?n.filename.toLowerCase():"";for(let[i,e]of vhe)if(o.endsWith(i))return e;return null}function sY(n){return Number.isSafeInteger(n)&&n>=0?n:void 0}function Khe(n,t){let o=nY(n);return!o||typeof n?.url!="string"?null:{name:typeof n.filename=="string"?n.filename:void 0,mediaType:o,size:sY(n.size),load:i=>Io(n.url,{...i,fetchImpl:t,allowedHosts:aY})}}function xhe(n,t){if(nY(n)||typeof n?.url!="string"||!n.url)return null;let o=typeof n.content_type=="string"&&n.content_type?n.content_type.split(";",1)[0].trim().toLowerCase():void 0;return{name:typeof n.filename=="string"&&n.filename?n.filename:String(n.id??"discord-file"),...o?{mediaType:o}:{},size:sY(n.size),load:({signal:i}={})=>np(n.url,{fetchImpl:t,signal:i,allowedHosts:aY})}}function Yhe(n,t,{fetchImpl:o=fetch}={}){if(!n?.id||!n?.channel_id||!n?.author?.id||Number(n.type)===21)return null;let i=!n.guild_id,e=i||n.mentions?.some(a=>String(a?.id)===String(t));return{messageId:String(n.id),senderId:String(n.author.id),senderIsBot:n.author.bot===!0,kind:i?"direct":"group",conversationId:String(n.channel_id),content:iY(n.content??"",t),plainText:(!Array.isArray(n.attachments)||n.attachments.length===0)&&(!Array.isArray(n.sticker_items)||n.sticker_items.length===0)&&!n.poll,images:Array.isArray(n.attachments)?n.attachments.map(a=>Khe(a,o)).filter(Boolean):[],files:Array.isArray(n.attachments)?n.attachments.map(a=>xhe(a,o)).filter(Boolean):[],addressed:e,replyTarget:{channelId:String(n.channel_id),replyToMessageId:String(n.id)},reactionTarget:{channelId:String(n.channel_id),messageId:String(n.id)},connectionTestTarget:{channelId:String(n.channel_id)}}}async function jhe(n,t,{api:o,channel:i,fetchImpl:e=fetch,signal:a,onChannel:A}={}){let r=Yhe(n,t,{fetchImpl:e});if(!r||r.senderIsBot)return r;if(a?.throwIfAborted(),r.kind==="direct")return pI(r,{id:r.conversationId,type:1},t);if(!o||typeof o.getChannel!="function")throw new TypeError("Discord route resolution requires the Discord API");let s=xM(i??await o.getChannel({channelId:r.conversationId,signal:a}),A);if(jM(s)||!r.addressed)return pI(r,s,t);let g=Number(s?.type);if(g!==bhe&&g!==Mhe)return pI(r,s,t,{fallback:"unsupported-channel",notice:"\u5F53\u524D\u9891\u9053\u4E0D\u652F\u6301\u81EA\u52A8\u521B\u5EFA Thread\uFF0C\u5DF2\u76F4\u63A5\u5728\u5F53\u524D\u9891\u9053\u56DE\u590D\u3002"});a?.throwIfAborted();let c;try{if(c=xM(await o.startThreadFromMessage({channelId:r.conversationId,messageId:r.messageId,name:Lhe(n,t),signal:a}),A),!oY(c,n))throw new Error("Discord returned an invalid thread for the source message")}catch(I){let d;try{d=await Hhe(o,n,{signal:AbortSignal.timeout(Ohe),onChannel:A})}catch(B){throw a?.aborted?a.reason??I:(await rY(o,r,a),tY(B))}if(d)return pI(r,d,t,{fromSourceMessage:!0});if(a?.aborted)throw a.reason??I;if(Uhe(I))throw await rY(o,r,a),tY(I);return pI(r,s,t,{fallback:"thread-create-failed",notice:"\u65E0\u6CD5\u521B\u5EFA Thread\uFF0C\u5DF2\u76F4\u63A5\u5728\u5F53\u524D\u9891\u9053\u56DE\u590D\u3002"})}return pI(r,c,t,{fromSourceMessage:!0})}var YM=class{#e;#A;#t=new WeakSet;constructor({api:t,signal:o}){this.#e=t,this.#A=o}async sendText(t,o){let i=!this.#t.has(t)&&t?.notice?String(t.notice):null,e=Yn(i?`${i} ${o}`:o,1900),a=[];for(let[A,r]of e.entries()){let s=await this.#e.createMessage({channelId:t.channelId,content:r,replyToMessageId:A===0?t.replyToMessageId:void 0,signal:this.#A});i&&A===0&&this.#t.add(t),typeof s?.id=="string"&&s.id&&a.push(s.id)}return{providerMessageIds:a}}sendTyping(t){return this.#e.sendTyping({channelId:t.channelId,signal:this.#A})}sendFile(t,o){return this.#e.createFileMessage({channelId:t.channelId,file:o,replyToMessageId:t.replyToMessageId,signal:this.#A})}addReaction(t,o,{signal:i}={}){return this.#e.addOwnReaction({channelId:t.channelId,messageId:t.messageId,emoji:o,signal:this.#r(i)})}removeReaction(t,o,{signal:i}={}){return this.#e.removeOwnReaction({channelId:t.channelId,messageId:t.messageId,emoji:o,signal:this.#r(i)})}async openStream(t){let o=!this.#t.has(t)&&t?.notice?String(t.notice):null,i=a=>o?`${o} -${a}`:a;return Hf({limit:o?1800:1900,create:async a=>{let A=await this.#e.createMessage({channelId:t.channelId,content:i(a),replyToMessageId:t.replyToMessageId,signal:this.#A});return o&&this.#t.add(t),A.id},edit:(a,A)=>this.#e.editMessage({channelId:t.channelId,messageId:a,content:i(A),signal:this.#A}),sendRemainder:a=>this.#e.createMessage({channelId:t.channelId,content:a,signal:this.#A}),messageIdForResult:a=>a?.id}).start()}#r(t){return t??this.#A}};function lhe(){return{startedAt:null,ready:!1,connectionState:"idle",harnessReachable:!1,lastCheckedAt:null,lastConnectedAt:null,lastError:null,...xi()}}var dE=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n;#o=lhe();#g=null;#l=null;#p=null;#d=null;#h=null;#E=null;#B=null;#u=null;#f=null;#m=!0;#y=null;#Q=0;#C=0;#M=!0;#b=null;#w=new Map;#S=new Map;constructor({config:t,token:o,harness:i,state:e,logger:a=console,replyTimeoutMs:A=6e5,connectTimeoutMs:r=2e4,createApi:s=I=>new lE(I),createWebSocket:g=I=>new WebSocket(I),random:c=Math.random}){if(!t||!o||!i||!e)throw new TypeError("DiscordRuntime requires config, token, Harness, and state");if(typeof g!="function")throw new TypeError("DiscordRuntime requires WebSocket");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#s=s,this.#I=g,this.#n=c}get status(){return structuredClone(this.#o)}async sendConnectionTest(t){if(!this.#o.ready||!this.#l){let o=new Error("Discord bot is not connected");throw o.code="test-target-unavailable",o}return this.#l.sendConnectionTest(t)}async start(){return this.#o.ready&&this.#d?this.status:this.#b?this.#b:(this.#b=this.#_().finally(()=>{this.#b=null}),this.#b)}async#_(){await this.stop(),this.#M=!1,this.#B=null,this.#E=null,this.#u=null,this.#Q=0,this.#w.clear(),this.#S.clear(),this.#o.startedAt=new Date().toISOString(),this.#o.connectionState="connecting",this.#o.lastError=null,await this.#t.ensureRunning(),this.#o.harnessReachable=!0;let t=new AbortController;this.#p=t;let o=this.#s({token:this.#A});this.#g=o;try{let[i,e]=await Promise.all([o.getCurrentUser({signal:t.signal}),o.getGatewayBot({signal:t.signal})]);if(String(i?.id??"")!==this.#e.platformId||i?.bot!==!0)throw new Error("Discord token identity does not match the saved bot");this.#h=e?.url;let a=new bM({api:o,signal:t.signal});this.#l=new Lf({bot:a,harness:this.#t,state:this.#r,status:this.#o,logger:this.#a,replyTimeoutMs:this.#i,signal:t.signal});let A;try{await Promise.race([this.#R(!1),new Promise((r,s)=>{A=setTimeout(()=>s(new Error("Discord Gateway did not become ready in time")),this.#c)})])}finally{clearTimeout(A)}return this.status}catch(i){throw this.#o.ready=!1,this.#o.connectionState="failed",this.#o.lastError=i?.message??String(i),await this.stop(),i}}#R(t){if(this.#M)return Promise.reject(new Error("Discord runtime is stopped"));let o=++this.#C,i=the(t&&this.#E?this.#E:this.#h),e=this.#I(i);this.#d=e;let a=!1;return new Promise((A,r)=>{let s=()=>{if(a||o!==this.#C)return;a=!0,this.#Q=0;let g=Date.now();this.#o.ready=!0,this.#o.connectionState="connected",this.#o.lastCheckedAt=g,this.#o.lastConnectedAt=g,this.#o.lastError=null,A()};wM(e,"message",g=>{if(o!==this.#C||this.#M)return;let c=rhe(g);if(!c)return;let I;try{I=JSON.parse(c)}catch{this.#a.warn?.("[dsh-im:discord] ignored malformed Gateway JSON");return}if(Number.isSafeInteger(I.s)&&(this.#u=I.s),I.op===10){this.#N(I.d?.heartbeat_interval,e,o),t&&this.#B?this.#v(e,{op:6,d:{token:this.#A,session_id:this.#B,seq:this.#u}}):this.#v(e,{op:2,d:{token:this.#A,intents:Jde,properties:{os:process.platform,browser:"dsh-im",device:"dsh-im"}}});return}if(I.op===11){this.#m=!0,this.#o.lastCheckedAt=Date.now();return}if(I.op===1){this.#F(e);return}if(I.op===7){e.close(4e3,"Reconnect requested");return}if(I.op===9){I.d!==!0&&(this.#B=null,this.#E=null,this.#u=null),e.close(4e3,"Invalid session");return}if(I.op===0){if(I.t==="READY")this.#B=I.d?.session_id??null,this.#E=I.d?.resume_gateway_url??null,s();else if(I.t==="RESUMED")s();else if(I.t==="GUILD_CREATE")for(let d of[...I.d?.channels??[],...I.d?.threads??[]])this.#k(d);else if(I.t==="CHANNEL_CREATE"||I.t==="CHANNEL_UPDATE"||I.t==="THREAD_CREATE"||I.t==="THREAD_UPDATE")this.#k(I.d);else if(I.t==="CHANNEL_DELETE"||I.t==="THREAD_DELETE")I.d?.id&&this.#w.delete(String(I.d.id));else if(I.t==="THREAD_LIST_SYNC")for(let d of I.d?.threads??[])this.#k(d);else if(I.t==="MESSAGE_CREATE"){let d=this.#l;I.d&&d&&this.#T(I.d,d).catch(B=>{o!==this.#C||this.#M||this.#a.error?.(`[dsh-im:discord] bot ${this.#e.botId} message handling failed:`,B)})}}}),wM(e,"close",(g={})=>{if(o!==this.#C)return;if(this.#O(),this.#d===e&&(this.#d=null),this.#M){a||r(new DOMException("Stopped","AbortError"));return}let c=ahe(Number(g.code)||0);if(this.#o.ready=!1,this.#o.connectionState="connecting",this.#o.lastError=c.message,a||(a=!0,r(c)),c.code==="discord-401"||c.code==="discord-intents"){this.#o.connectionState="failed";return}this.#U()}),wM(e,"error",()=>{o!==this.#C||this.#M||(this.#o.lastError="Discord Gateway WebSocket error")})})}#k(t){t?.id&&this.#w.set(String(t.id),t)}async#T(t,o){let i=String(t?.id??"");if(!i||this.#r.hasSeen(i))return;let e=this.#S.get(i);e||(e=Ihe(t,this.#e.platformId,{api:this.#g,channel:this.#w.get(String(t.channel_id)),signal:this.#p?.signal,onChannel:a=>this.#k(a)}),this.#S.set(i,e),e.finally(()=>{this.#S.get(i)===e&&this.#S.delete(i)}).catch(()=>{}));try{let a=await e;a&&await o.accept(a)}catch(a){throw a?.code==="discord-thread-create-uncertain"&&await this.#r.markSeen(i),a}}#v(t,o){t.readyState===1&&t.send(JSON.stringify(o))}#N(t,o,i){if(this.#O(),!Number.isFinite(t)||t<1e3){o.close(4e3,"Invalid heartbeat interval");return}this.#m=!0;let e=a=>{this.#f=setTimeout(()=>{if(!(this.#M||i!==this.#C||this.#d!==o)){if(!this.#m){o.close(4e3,"Heartbeat was not acknowledged");return}this.#F(o),e(t)}},a),this.#f?.unref?.()};e(Math.floor(t*this.#n()))}#F(t){this.#m=!1,this.#v(t,{op:1,d:this.#u})}#O(){this.#f!==null&&clearTimeout(this.#f),this.#f=null,this.#m=!0}#U(){if(this.#M||this.#y!==null)return;let t=Rx[Math.min(this.#Q,Rx.length-1)];this.#Q+=1,this.#y=setTimeout(()=>{this.#y=null,this.#R(!!this.#B).catch(o=>{this.#M||(this.#a.warn?.("[dsh-im:discord] Gateway reconnect failed:",o),this.#U())})},t),this.#y?.unref?.()}async stop(){this.#M=!0,this.#C+=1,this.#p?.abort(),this.#p=null,this.#y!==null&&clearTimeout(this.#y),this.#y=null,this.#O();let t=this.#d,o=this.#l;this.#d=null,this.#l=null,this.#g=null,this.#S.clear();try{t&&t.readyState<2&&t.close(1e3,"Plugin stopped")}catch(i){this.#a.warn?.(`[dsh-im:discord] bot ${this.#e.botId} failed to close Gateway:`,i)}return await Promise.race([o?.waitForIdle()??Promise.resolve(),new Promise(i=>setTimeout(i,2e3))]),this.#o.ready=!1,this.#o.connectionState="idle",this.status}};import{mkdir as phe,readFile as dhe,rename as hhe,unlink as Ehe,writeFile as Che}from"node:fs/promises";import{dirname as uhe}from"node:path";var Kf=Object.freeze({version:1,sessions:{},seenMessageIds:[],cursor:null});function Bhe(n){if(!n||typeof n!="object")return structuredClone(Kf);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[o,i]of Object.entries(n.sessions))typeof o=="string"&&o&&typeof i=="string"&&i&&(t[o]=i);return{version:1,sessions:t,seenMessageIds:Array.isArray(n.seenMessageIds)?n.seenMessageIds.filter(o=>typeof o=="string"&&o).slice(-1e3):[],cursor:Number.isSafeInteger(n.cursor)&&n.cursor>=0?n.cursor:null}}var Kn=class{#e;#A=structuredClone(Kf);#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{this.#A=Bhe(JSON.parse(await dhe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(Kf),await this.#r()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){this.#A.sessions[t]=o,await this.#r()}async clearSession(t){delete this.#A.sessions[t],await this.#r()}async clearSessions(){this.#A.sessions={},await this.#r()}hasSeen(t){return this.#A.seenMessageIds.includes(t)}async markSeen(t){this.hasSeen(t)||(this.#A.seenMessageIds.push(t),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#r())}cursor(){return this.#A.cursor}async setCursor(t){if(!Number.isSafeInteger(t)||t<0)throw new TypeError("Invalid update cursor");this.#A.cursor=t,await this.#r()}snapshot(){return structuredClone(this.#A)}async remove(){try{await Ehe(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(Kf)}async#r(){let t=`${JSON.stringify(this.#A,null,2)} -`,o=this.#t.then(async()=>{await phe(uhe(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await Che(i,t,{encoding:"utf8",mode:384}),await hhe(i,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var xf=class extends Kn{};import{unlink as Qhe}from"node:fs/promises";import{homedir as yhe}from"node:os";import{join as hE,resolve as sI}from"node:path";var Hx=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function fhe(n){if(!Array.isArray(n)||n.length===0)return[...Hx];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...Hx]}var _M=class{#e;#A;#t;#r;#a;#i;#c;#s;#I=null;#n=null;#o=0;#g=!1;#l=!1;#p;#d;constructor({channel:t,controller:o,harness:i,logger:e=console,retryDelaysMs:a,healthyIntervalMs:A=15e3,setTimeoutImpl:r=setTimeout,clearTimeoutImpl:s=clearTimeout}){if(!t)throw new TypeError("TokenConnectionSupervisor requires a channel");if(!o||typeof o.initialize!="function"||typeof o.status!="function")throw new TypeError("TokenConnectionSupervisor requires a controller");if(!i||typeof i.ensureRunning!="function")throw new TypeError("TokenConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=fhe(a),this.#i=Number.isFinite(A)&&A>=0?A:15e3,this.#c=r,this.#s=s,this.#p=new Promise(g=>{this.#d=g})}get ready(){return this.#p}start(){return this.#l||this.#g?this:(this.#l=!0,this.#h(0),this)}async close(){this.#g||(this.#g=!0,this.#I!==null&&this.#s(this.#I),this.#I=null,await this.#n?.catch(()=>{}),this.#d?.(null),this.#d=null)}#h(t){this.#g||(this.#I=this.#c(()=>{this.#I=null,this.#E()},t),this.#I?.unref?.())}async#E(){if(this.#g||this.#n)return;let t=this.#B();this.#n=t;try{await t}finally{this.#n===t&&(this.#n=null)}}async#B(){try{if(await this.#t.ensureRunning(),this.#g)return;let t=await this.#A.initialize();if(this.#g)return;this.#d?.(t),this.#d=null;let{configured:o,connected:i}=t.totals;if(iMa(n),x=TM(t,e),J=await new d(x.config).load(),L=sI(t.workspace??process.cwd()),q=o.WorkspaceStore??Zr,j=o.workspaces??await new q(x.workspaces,{defaultWorkspace:L}).load(),K=J.list();await j.reconcile(K.map(De=>De.botId)),await Promise.all(K.map(De=>j.ensure(De.botId,{defaultAgentPreset:t.agentPreset})));let v=typeof J.remove=="function"?Ta(J,{workspaces:j}):J,W=new Map,Y=De=>sI(x.bots,De,"state.json"),N=async De=>{let Ke=W.get(De);return Ke||(Ke=await new B(Y(De)).load(),W.set(De,Ke)),Ke},P=ka(n,o.commandExecutor),{controlExecutor:V,sessionMaintenanceExecutor:te,fileIngressExecutor:ne}=va(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),Ne=new f({...I,workspace:L,autostart:!1,dshBin:t.dshBin??"dsh",...P?{commandExecutor:P}:{},...V?{controlExecutor:V}:{},...te?{sessionMaintenanceExecutor:te}:{},...ne?{fileIngressExecutor:ne}:{}}),ce=new Q({credentials:n.credentials,configStore:v,logger:T,...o.inspectToken?{inspectToken:o.inspectToken}:{},createRuntime:async({botId:De,config:Ke,token:rA})=>{let ve=await N(De);await j.ensure(De,{defaultAgentPreset:t.agentPreset});let iA=Na(Ne,{botId:De,workspaces:j,state:ve,agentPresetCatalog:G});return new y({...m,config:Ke,token:rA,harness:iA.harness,state:iA.state,replyTimeoutMs:t.replyTimeoutMs??6e5,connectTimeoutMs:t.connectTimeoutMs??2e4,logger:{error:(...Ce)=>T.error?.(`[${De}]`,...Ce),warn:(...Ce)=>T.warn?.(`[${De}]`,...Ce),info:(...Ce)=>T.info?.(`[${De}]`,...Ce),debug:(...Ce)=>T.debug?.(`[${De}]`,...Ce)}})},deleteState:async({botId:De})=>{let Ke=W.get(De);if(W.delete(De),Ke&&typeof Ke.remove=="function")await Ke.remove();else try{await Qhe(Y(De))}catch(rA){if(rA?.code!=="ENOENT")throw rA}}}),Te=Ra(ce,{workspaces:j,stateFor:N,agentPresetCatalog:G}),fe=_({channel:e,controller:Te,harness:Ne,logger:T,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:Te,ready:fe.ready,async close(){await fe.close(),await Te.close(),Ne.stopManagedProcess()}}}function NM(n,t={},o={}){return Yf(n,t,o,{channel:"discord",ConfigStore:Gf,StateStore:xf,HarnessClient:Uf,Controller:pE,Runtime:dE})}var Ua=Object.freeze({status:"connection.status",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:Ci,setAgentPreset:ui}),mhe=Object.freeze(Object.values(Ua)),She=new Set(["token","botToken","tokenRef","platformId","secret","secretRef"]),Dhe=new Set(["telegram-transport-error","telegram-timeout","telegram-response-invalid"]);function kM(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function jf(n,t){return kM(n)&&Object.keys(n).every(o=>t.includes(o))}function Kx(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function whe(n){return typeof n=="string"&&n.trim().length>=20&&n.length<=4096}function Ohe(n,t){return kM(t)?n===Ua.status?jf(t,[])?null:"connection.status does not accept fields.":n===Ua.bindCredentials?jf(t,["token"])&&whe(t.token)?null:"bot.bind-credentials requires a Bot Token.":n===Ua.reconnectBot?jf(t,["botId","sendTest"])&&Kx(t.botId)&&(t.sendTest===void 0||typeof t.sendTest=="boolean")?null:"bot.reconnect requires a botId.":n===Ua.deleteBot?jf(t,["botId","confirm"])&&Kx(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Ua.setWorkspace?Pa(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Ua.setAgentPreset?Fa(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":"Unknown bot endpoint.":"Payload must be an object."}function RM(n){if(Array.isArray(n))return n.map(RM);if(!kM(n))return n;let t={};for(let[o,i]of Object.entries(n))She.has(o)||(t[o]=RM(i));return t}function bhe(n,t){let o=Ga(t);return o||(t?.code==="webhook-configured"?{code:"webhook-configured",message:t.message}:t?.code==="telegram-401"||t?.code==="discord-401"?{code:"invalid-token",message:`${n} Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002`}:n==="Telegram"&&Dhe.has(t?.code)?{code:"telegram-network-error",message:"\u65E0\u6CD5\u8BBF\u95EE Telegram Bot API\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\uFF1BNode.js 22.21+ \u53EF\u8BBE\u7F6E NODE_USE_ENV_PROXY=1\uFF0C\u5E76\u914D\u7F6E HTTPS_PROXY\u3001HTTP_PROXY \u548C NO_PROXY\uFF0C\u7136\u540E\u91CD\u542F dsh web\u3002"}:t?.code==="discord-intents"?{code:"discord-intents",message:t.message}:{code:`${n.toLowerCase()}-operation-failed`,message:`${n} \u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`})}function Jf(n,{channel:t}){for(let o of["status","bindCredentials","reconnectBot","deleteBot"])if(typeof n?.[o]!="function")throw new TypeError(`A complete ${t} controller is required (${o})`);return async(o,i,e)=>{if(e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(!mhe.includes(o))return{ok:!1,error:{code:"bad-request",message:`Unknown ${t} endpoint.`}};let a=Ohe(o,i);if(a)return{ok:!1,error:{code:"bad-request",message:a}};try{let A;if(o===Ua.status)A=await n.status();else if(o===Ua.bindCredentials)A=await n.bindCredentials(i);else if(o===Ua.reconnectBot){if(A=await n.reconnectBot(i.botId),e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(i.sendTest===!0){let r=null;try{if(A?.bots?.find(s=>s?.botId===i.botId)?.connected!==!0){let s=new Error("Bot is not connected");throw s.code="test-target-unavailable",s}if(typeof n.sendConnectionTest!="function"){let s=new Error("Connection test is unavailable");throw s.code="test-target-unavailable",s}await n.sendConnectionTest(i.botId)}catch(s){r=s}A={...A,testMessage:rr(r)}}}else if(o===Ua.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");A=await n.updateWorkspace(i.botId,i.workspace)}else if(o===Ua.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");A=await n.updateAgentPreset(i.botId,i.agentPreset)}else A=await n.deleteBot(i.botId);return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!0,value:RM(A)}}catch(A){return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!1,error:bhe(t,A)}}}}function xx(n,t,{channel:o,rpcChannel:i,authority:e}){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(i,Jf(t,{channel:o}),{authority:yr(e)})}var Yx="/discord",jx=Ua,Mhe=Object.freeze(Object.values(jx));function qf(n,t,o){return xx(n,t,{channel:"Discord",rpcChannel:Yx,authority:o})}async function Jx(n,t={}){if(t?.controller)return qf(n,t.controller,t.rpcAuthority);let o=await NM(n,t,t.internals??{}),i=qf(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close Discord bot connections"),i}import{homedir as Zhe}from"node:os";import{join as FM,resolve as LM}from"node:path";import{mkdir as _he,readFile as The,rename as Nhe,unlink as Rhe,writeFile as khe}from"node:fs/promises";import{dirname as vhe,isAbsolute as Phe}from"node:path";var rp="office-harness.v1",qx="/office",ap=Object.freeze({status:"connection.status",configure:"connector.configure",reconnect:"connector.reconnect",test:"connector.test",remove:"connector.remove"}),tn=Object.freeze({stream:"/api/harness/connector/stream",heartbeat:"/api/harness/connector/heartbeat",job:"/api/harness/connector/jobs/:id",accept:"/api/harness/connector/jobs/:id/accept",renew:"/api/harness/connector/jobs/:id/renew",progress:"/api/harness/connector/jobs/:id/progress",approval:"/api/harness/connector/jobs/:id/approval",result:"/api/harness/connector/jobs/:id/result",fail:"/api/harness/connector/jobs/:id/fail"});function EE(n){let t=new URL(typeof n=="string"?n.trim():""),o=t.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(t.hostname);if(t.protocol!=="https:"&&!o)throw new TypeError("AI Office URL must use HTTPS (HTTP is allowed only for loopback testing)");if(t.username||t.password||t.search||t.hash)throw new TypeError("AI Office URL must be a bare origin");return t.pathname="/",t}function zf(n){let t=EE(n);return Object.fromEntries(Object.entries(tn).map(([o,i])=>[o,new URL(i,t).toString()]))}var Ghe=/^[a-z][a-z0-9-]{1,63}$/,Fhe=/^[a-z0-9][a-z0-9_-]{2,63}$/i;function ip(n){return typeof n=="string"&&n.trim()?n.trim():null}function zx(n,{kind:t}){if(!n||typeof n!="object"||Array.isArray(n))return null;let o={};for(let[i,e]of Object.entries(n)){let a=ip(i),A=ip(e);if(!a||!Ghe.test(a)||!A||t==="workspace"&&!Phe(A)||t==="preset"&&A.length>8e3)return null;o[a]=A}return Object.freeze(o)}function Vf(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t;try{t=EE(n.baseUrl).origin}catch{return null}let o=ip(n.deviceId),i=ip(n.deviceTokenRef),e=zx(n.workspaces??{},{kind:"workspace"}),a=zx(n.instructionPresets??{},{kind:"preset"}),A=Number(n.maxConcurrency??1),r=Number(n.heartbeatSeconds??30);return!o||!Fhe.test(o)||!i||!/^DSH_OFFICE_DEVICE_TOKEN_[A-F0-9]{24}$/.test(i)||!e||!a||!Number.isInteger(A)||A<1||A>4||!Number.isInteger(r)||r<10||r>300?null:Object.freeze({version:1,protocolVersion:rp,baseUrl:t,deviceId:o,deviceTokenRef:i,maxConcurrency:A,heartbeatSeconds:r,workspaces:e,instructionPresets:a,createdAt:ip(n.createdAt)??new Date().toISOString(),updatedAt:ip(n.updatedAt)??new Date().toISOString()})}var Wf=class{#e;#A=null;#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{let t=Vf(JSON.parse(await The(this.#e,"utf8")));if(!t)throw new Error("dsh-im AI Office config is invalid");this.#A=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=null}return this}get(){return this.#A?structuredClone(this.#A):null}async save(t){let o=Vf(t);if(!o)throw new Error("Refusing to persist invalid AI Office configuration");let i=this.#t.then(async()=>{await _he(vhe(this.#e),{recursive:!0,mode:448});let e=`${this.#e}.tmp`;await khe(e,`${JSON.stringify(o,null,2)} -`,{mode:384}),await Nhe(e,this.#e),this.#A=o});return this.#t=i.then(()=>{},()=>{}),await i,this.get()}async clear(){let t=this.#t.then(async()=>{try{await Rhe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=null});this.#t=t.then(()=>{},()=>{}),await t}};import{createHash as Vhe}from"node:crypto";import{setTimeout as qhe}from"node:timers/promises";function vM(n,t){let o=new Error(`AI Office ${n} failed: HTTP ${t.status}`);return o.code=t.status===401?"invalid-device-token":t.status===404?"office-hook-unavailable":t.status===409?"office-job-conflict":"office-transport-failed",o}function op(n,t="office-transport-failed",o){let i=new Error(n,o===void 0?void 0:{cause:o});return i.code=t,i}function PM(n,t){return t?.aborted||n?.name==="AbortError"}function Lhe(n){let t="message",o,i=[];for(let a of n.split(/\r?\n/))a.startsWith("event:")?t=a.slice(6).trim()||"message":a.startsWith("id:")?o=a.slice(3).trim()||void 0:a.startsWith("data:")&&i.push(a.slice(5).trimStart());if(i.length===0)return null;let e;try{e=JSON.parse(i.join(` -`))}catch{throw new Error("AI Office SSE returned invalid JSON")}return{id:o,type:typeof e?.type=="string"?e.type:t,data:e}}var Zf=class{#e;#A;#t;#r;constructor({baseUrl:t,deviceId:o,token:i,fetchImpl:e=fetch}){this.#e=t,this.#A=o,this.#t=i,this.#r=e}hooks(){return zf(this.#e)}#a(t={}){return{authorization:`Bearer ${this.#t}`,"x-harness-device-id":this.#A,...t}}async heartbeat(t,{signal:o}={}){let i;try{i=await this.#r(new URL(tn.heartbeat,this.#e),{method:"POST",headers:this.#a({accept:"application/json","content-type":"application/json"}),body:JSON.stringify(t),signal:o,redirect:"error"})}catch(a){throw PM(a,o)?a:op("AI Office heartbeat request could not be completed",void 0,a)}if(!i.ok)throw vM("heartbeat",i);let e;try{e=await i.json()}catch(a){throw op("AI Office heartbeat returned invalid JSON","office-protocol-mismatch",a)}if(!e||typeof e!="object"||e.ok!==!0||e.protocolVersion!==rp)throw op("AI Office heartbeat protocol does not match","office-protocol-mismatch");return e}async#i(t,{method:o="POST",body:i,leaseToken:e,signal:a}={}){let A=this.#a({accept:"application/json"});i!==void 0&&(A["content-type"]="application/json"),e&&(A["x-harness-lease-token"]=e);let r;try{r=await this.#r(new URL(t,this.#e),{method:o,headers:A,...i===void 0?{}:{body:JSON.stringify(i)},signal:a,redirect:"error",cache:"no-store"})}catch(s){throw PM(s,a)?s:op("AI Office Job request could not be completed",void 0,s)}if(!r.ok)throw vM("Job request",r);try{return await r.json()}catch(s){throw op("AI Office Job returned invalid JSON","office-protocol-mismatch",s)}}async getJob(t,o={}){return this.#i(tn.job.replace(":id",t),{...o,method:"GET"})}async acceptJob(t,o={}){return this.#i(tn.accept.replace(":id",t),o)}async renewJob(t,o,i={}){return this.#i(tn.renew.replace(":id",t),{...i,leaseToken:o})}async progressJob(t,o,i,e={}){return this.#i(tn.progress.replace(":id",t),{...e,leaseToken:o,body:i})}async requestApproval(t,o,i,e={}){return this.#i(tn.approval.replace(":id",t),{...e,leaseToken:o,body:i})}async completeJob(t,o,i,e={}){return this.#i(tn.result.replace(":id",t),{...e,leaseToken:o,body:i})}async failJob(t,o,i,e={}){return this.#i(tn.fail.replace(":id",t),{...e,leaseToken:o,body:i})}async stream({signal:t,lastEventId:o,onOpen:i,onEvent:e}){let a=this.#a({accept:"text/event-stream"});o&&(a["last-event-id"]=o);let A;try{A=await this.#r(new URL(tn.stream,this.#e),{method:"GET",headers:a,signal:t,redirect:"error",cache:"no-store"})}catch(c){throw PM(c,t)?c:op("AI Office SSE request could not be completed",void 0,c)}if(!A.ok)throw vM("stream",A);if(!A.headers.get("content-type")?.toLowerCase().includes("text/event-stream"))throw new Error("AI Office stream did not return text/event-stream");if(!A.body)throw new Error("AI Office stream returned no body");i?.();let r=A.body.getReader(),s=new TextDecoder,g="";for(;;){let{value:c,done:I}=await r.read();if(I)break;g=`${g}${s.decode(c,{stream:!0})}`.replaceAll(`\r +${a}`:a;return $f({limit:o?1800:1900,create:async a=>{let A=await this.#e.createMessage({channelId:t.channelId,content:i(a),replyToMessageId:t.replyToMessageId,signal:this.#A});return o&&this.#t.add(t),A.id},edit:(a,A)=>this.#e.editMessage({channelId:t.channelId,messageId:a,content:i(A),signal:this.#A}),sendRemainder:a=>this.#e.createMessage({channelId:t.channelId,content:a,signal:this.#A}),messageIdForResult:a=>a?.id}).start()}#r(t){return t??this.#A}};function Jhe(){return{startedAt:null,ready:!1,connectionState:"idle",harnessReachable:!1,lastCheckedAt:null,lastConnectedAt:null,lastError:null,...Yi()}}var fE=class{#e;#A;#t;#r;#a;#i;#c;#s;#I;#n;#o=Jhe();#g=null;#l=null;#p=null;#d=null;#h=null;#E=null;#B=null;#u=null;#f=null;#m=!0;#y=null;#Q=0;#C=0;#M=!0;#b=null;#w=new Map;#S=new Map;constructor({config:t,token:o,harness:i,state:e,logger:a=console,replyTimeoutMs:A=6e5,connectTimeoutMs:r=2e4,createApi:s=I=>new uE(I),createWebSocket:g=I=>new WebSocket(I),random:c=Math.random}){if(!t||!o||!i||!e)throw new TypeError("DiscordRuntime requires config, token, Harness, and state");if(typeof g!="function")throw new TypeError("DiscordRuntime requires WebSocket");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a,this.#i=A,this.#c=r,this.#s=s,this.#I=g,this.#n=c}get status(){return structuredClone(this.#o)}async sendConnectionTest(t){if(!this.#o.ready||!this.#l){let o=new Error("Discord bot is not connected");throw o.code="test-target-unavailable",o}return this.#l.sendConnectionTest(t)}async start(){return this.#o.ready&&this.#d?this.status:this.#b?this.#b:(this.#b=this.#_().finally(()=>{this.#b=null}),this.#b)}async#_(){await this.stop(),this.#M=!1,this.#B=null,this.#E=null,this.#u=null,this.#Q=0,this.#w.clear(),this.#S.clear(),this.#o.startedAt=new Date().toISOString(),this.#o.connectionState="connecting",this.#o.lastError=null,await this.#t.ensureRunning(),this.#o.harnessReachable=!0;let t=new AbortController;this.#p=t;let o=this.#s({token:this.#A});this.#g=o;try{let[i,e]=await Promise.all([o.getCurrentUser({signal:t.signal}),o.getGatewayBot({signal:t.signal})]);if(String(i?.id??"")!==this.#e.platformId||i?.bot!==!0)throw new Error("Discord token identity does not match the saved bot");this.#h=e?.url;let a=new YM({api:o,signal:t.signal});this.#l=new Zf({bot:a,harness:this.#t,state:this.#r,status:this.#o,logger:this.#a,replyTimeoutMs:this.#i,signal:t.signal});let A;try{await Promise.race([this.#R(!1),new Promise((r,s)=>{A=setTimeout(()=>s(new Error("Discord Gateway did not become ready in time")),this.#c)})])}finally{clearTimeout(A)}return this.status}catch(i){throw this.#o.ready=!1,this.#o.connectionState="failed",this.#o.lastError=i?.message??String(i),await this.stop(),i}}#R(t){if(this.#M)return Promise.reject(new Error("Discord runtime is stopped"));let o=++this.#C,i=Phe(t&&this.#E?this.#E:this.#h),e=this.#I(i);this.#d=e;let a=!1;return new Promise((A,r)=>{let s=()=>{if(a||o!==this.#C)return;a=!0,this.#Q=0;let g=Date.now();this.#o.ready=!0,this.#o.connectionState="connected",this.#o.lastCheckedAt=g,this.#o.lastConnectedAt=g,this.#o.lastError=null,A()};KM(e,"message",g=>{if(o!==this.#C||this.#M)return;let c=Ghe(g);if(!c)return;let I;try{I=JSON.parse(c)}catch{this.#a.warn?.("[dsh-im:discord] ignored malformed Gateway JSON");return}if(Number.isSafeInteger(I.s)&&(this.#u=I.s),I.op===10){this.#N(I.d?.heartbeat_interval,e,o),t&&this.#B?this.#v(e,{op:6,d:{token:this.#A,session_id:this.#B,seq:this.#u}}):this.#v(e,{op:2,d:{token:this.#A,intents:whe,properties:{os:process.platform,browser:"dsh-im",device:"dsh-im"}}});return}if(I.op===11){this.#m=!0,this.#o.lastCheckedAt=Date.now();return}if(I.op===1){this.#F(e);return}if(I.op===7){e.close(4e3,"Reconnect requested");return}if(I.op===9){I.d!==!0&&(this.#B=null,this.#E=null,this.#u=null),e.close(4e3,"Invalid session");return}if(I.op===0){if(I.t==="READY")this.#B=I.d?.session_id??null,this.#E=I.d?.resume_gateway_url??null,s();else if(I.t==="RESUMED")s();else if(I.t==="GUILD_CREATE")for(let d of[...I.d?.channels??[],...I.d?.threads??[]])this.#k(d);else if(I.t==="CHANNEL_CREATE"||I.t==="CHANNEL_UPDATE"||I.t==="THREAD_CREATE"||I.t==="THREAD_UPDATE")this.#k(I.d);else if(I.t==="CHANNEL_DELETE"||I.t==="THREAD_DELETE")I.d?.id&&this.#w.delete(String(I.d.id));else if(I.t==="THREAD_LIST_SYNC")for(let d of I.d?.threads??[])this.#k(d);else if(I.t==="MESSAGE_CREATE"){let d=this.#l;I.d&&d&&this.#T(I.d,d).catch(B=>{o!==this.#C||this.#M||this.#a.error?.(`[dsh-im:discord] bot ${this.#e.botId} message handling failed:`,B)})}}}),KM(e,"close",(g={})=>{if(o!==this.#C)return;if(this.#O(),this.#d===e&&(this.#d=null),this.#M){a||r(new DOMException("Stopped","AbortError"));return}let c=Fhe(Number(g.code)||0);if(this.#o.ready=!1,this.#o.connectionState="connecting",this.#o.lastError=c.message,a||(a=!0,r(c)),c.code==="discord-401"||c.code==="discord-intents"){this.#o.connectionState="failed";return}this.#U()}),KM(e,"error",()=>{o!==this.#C||this.#M||(this.#o.lastError="Discord Gateway WebSocket error")})})}#k(t){t?.id&&this.#w.set(String(t.id),t)}async#T(t,o){let i=String(t?.id??"");if(!i||this.#r.hasSeen(i))return;let e=this.#S.get(i);e||(e=jhe(t,this.#e.platformId,{api:this.#g,channel:this.#w.get(String(t.channel_id)),signal:this.#p?.signal,onChannel:a=>this.#k(a)}),this.#S.set(i,e),e.finally(()=>{this.#S.get(i)===e&&this.#S.delete(i)}).catch(()=>{}));try{let a=await e;a&&await o.accept(a)}catch(a){throw a?.code==="discord-thread-create-uncertain"&&await this.#r.markSeen(i),a}}#v(t,o){t.readyState===1&&t.send(JSON.stringify(o))}#N(t,o,i){if(this.#O(),!Number.isFinite(t)||t<1e3){o.close(4e3,"Invalid heartbeat interval");return}this.#m=!0;let e=a=>{this.#f=setTimeout(()=>{if(!(this.#M||i!==this.#C||this.#d!==o)){if(!this.#m){o.close(4e3,"Heartbeat was not acknowledged");return}this.#F(o),e(t)}},a),this.#f?.unref?.()};e(Math.floor(t*this.#n()))}#F(t){this.#m=!1,this.#v(t,{op:1,d:this.#u})}#O(){this.#f!==null&&clearTimeout(this.#f),this.#f=null,this.#m=!0}#U(){if(this.#M||this.#y!==null)return;let t=AY[Math.min(this.#Q,AY.length-1)];this.#Q+=1,this.#y=setTimeout(()=>{this.#y=null,this.#R(!!this.#B).catch(o=>{this.#M||(this.#a.warn?.("[dsh-im:discord] Gateway reconnect failed:",o),this.#U())})},t),this.#y?.unref?.()}async stop(){this.#M=!0,this.#C+=1,this.#p?.abort(),this.#p=null,this.#y!==null&&clearTimeout(this.#y),this.#y=null,this.#O();let t=this.#d,o=this.#l;this.#d=null,this.#l=null,this.#g=null,this.#S.clear();try{t&&t.readyState<2&&t.close(1e3,"Plugin stopped")}catch(i){this.#a.warn?.(`[dsh-im:discord] bot ${this.#e.botId} failed to close Gateway:`,i)}return await Promise.race([o?.waitForIdle()??Promise.resolve(),new Promise(i=>setTimeout(i,2e3))]),this.#o.ready=!1,this.#o.connectionState="idle",this.status}};import{mkdir as qhe,readFile as zhe,rename as Vhe,unlink as Whe,writeFile as Zhe}from"node:fs/promises";import{dirname as Xhe}from"node:path";var eQ=Object.freeze({version:1,sessions:{},seenMessageIds:[],cursor:null});function $he(n){if(!n||typeof n!="object")return structuredClone(eQ);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[o,i]of Object.entries(n.sessions))typeof o=="string"&&o&&typeof i=="string"&&i&&(t[o]=i);return{version:1,sessions:t,seenMessageIds:Array.isArray(n.seenMessageIds)?n.seenMessageIds.filter(o=>typeof o=="string"&&o).slice(-1e3):[],cursor:Number.isSafeInteger(n.cursor)&&n.cursor>=0?n.cursor:null}}var jn=class{#e;#A=structuredClone(eQ);#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{this.#A=$he(JSON.parse(await zhe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(eQ),await this.#r()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){this.#A.sessions[t]=o,await this.#r()}async clearSession(t){delete this.#A.sessions[t],await this.#r()}async clearSessions(){this.#A.sessions={},await this.#r()}hasSeen(t){return this.#A.seenMessageIds.includes(t)}async markSeen(t){this.hasSeen(t)||(this.#A.seenMessageIds.push(t),this.#A.seenMessageIds.length>1e3&&this.#A.seenMessageIds.splice(0,this.#A.seenMessageIds.length-1e3),await this.#r())}cursor(){return this.#A.cursor}async setCursor(t){if(!Number.isSafeInteger(t)||t<0)throw new TypeError("Invalid update cursor");this.#A.cursor=t,await this.#r()}snapshot(){return structuredClone(this.#A)}async remove(){try{await Whe(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(eQ)}async#r(){let t=`${JSON.stringify(this.#A,null,2)} +`,o=this.#t.then(async()=>{await qhe(Xhe(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await Zhe(i,t,{encoding:"utf8",mode:384}),await Vhe(i,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var AQ=class extends jn{};import{unlink as AEe}from"node:fs/promises";import{homedir as tEe}from"node:os";import{join as QE,resolve as dI}from"node:path";var gY=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function eEe(n){if(!Array.isArray(n)||n.length===0)return[...gY];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...gY]}var JM=class{#e;#A;#t;#r;#a;#i;#c;#s;#I=null;#n=null;#o=0;#g=!1;#l=!1;#p;#d;constructor({channel:t,controller:o,harness:i,logger:e=console,retryDelaysMs:a,healthyIntervalMs:A=15e3,setTimeoutImpl:r=setTimeout,clearTimeoutImpl:s=clearTimeout}){if(!t)throw new TypeError("TokenConnectionSupervisor requires a channel");if(!o||typeof o.initialize!="function"||typeof o.status!="function")throw new TypeError("TokenConnectionSupervisor requires a controller");if(!i||typeof i.ensureRunning!="function")throw new TypeError("TokenConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=eEe(a),this.#i=Number.isFinite(A)&&A>=0?A:15e3,this.#c=r,this.#s=s,this.#p=new Promise(g=>{this.#d=g})}get ready(){return this.#p}start(){return this.#l||this.#g?this:(this.#l=!0,this.#h(0),this)}async close(){this.#g||(this.#g=!0,this.#I!==null&&this.#s(this.#I),this.#I=null,await this.#n?.catch(()=>{}),this.#d?.(null),this.#d=null)}#h(t){this.#g||(this.#I=this.#c(()=>{this.#I=null,this.#E()},t),this.#I?.unref?.())}async#E(){if(this.#g||this.#n)return;let t=this.#B();this.#n=t;try{await t}finally{this.#n===t&&(this.#n=null)}}async#B(){try{if(await this.#t.ensureRunning(),this.#g)return;let t=await this.#A.initialize();if(this.#g)return;this.#d?.(t),this.#d=null;let{configured:o,connected:i}=t.totals;if(i_a(n),H=qM(t,e),j=await new d(H.config).load(),F=dI(t.workspace??process.cwd()),q=o.WorkspaceStore??Xr,J=o.workspaces??await new q(H.workspaces,{defaultWorkspace:F}).load(),x=j.list();await J.reconcile(x.map(De=>De.botId)),await Promise.all(x.map(De=>J.ensure(De.botId,{defaultAgentPreset:t.agentPreset})));let P=typeof j.remove=="function"?Na(j,{workspaces:J}):j,z=new Map,U=De=>dI(H.bots,De,"state.json"),N=async De=>{let Ke=z.get(De);return Ke||(Ke=await new B(U(De)).load(),z.set(De,Ke)),Ke},k=va(n,o.commandExecutor),{controlExecutor:V,sessionMaintenanceExecutor:ee,fileIngressExecutor:ie}=Pa(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),Te=new f({...I,workspace:F,autostart:!1,dshBin:t.dshBin??"dsh",...k?{commandExecutor:k}:{},...V?{controlExecutor:V}:{},...ee?{sessionMaintenanceExecutor:ee}:{},...ie?{fileIngressExecutor:ie}:{}}),se=new Q({credentials:n.credentials,configStore:P,logger:T,...o.inspectToken?{inspectToken:o.inspectToken}:{},createRuntime:async({botId:De,config:Ke,token:rA})=>{let ve=await N(De);await J.ensure(De,{defaultAgentPreset:t.agentPreset});let iA=Ra(Te,{botId:De,workspaces:J,state:ve,agentPresetCatalog:R});return new y({...m,config:Ke,token:rA,harness:iA.harness,state:iA.state,replyTimeoutMs:t.replyTimeoutMs??6e5,connectTimeoutMs:t.connectTimeoutMs??2e4,logger:{error:(...Ce)=>T.error?.(`[${De}]`,...Ce),warn:(...Ce)=>T.warn?.(`[${De}]`,...Ce),info:(...Ce)=>T.info?.(`[${De}]`,...Ce),debug:(...Ce)=>T.debug?.(`[${De}]`,...Ce)}})},deleteState:async({botId:De})=>{let Ke=z.get(De);if(z.delete(De),Ke&&typeof Ke.remove=="function")await Ke.remove();else try{await AEe(U(De))}catch(rA){if(rA?.code!=="ENOENT")throw rA}}}),Ne=ka(se,{workspaces:J,stateFor:N,agentPresetCatalog:R}),fe=_({channel:e,controller:Ne,harness:Te,logger:T,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:Ne,ready:fe.ready,async close(){await fe.close(),await Ne.close(),Te.stopManagedProcess()}}}function zM(n,t={},o={}){return tQ(n,t,o,{channel:"discord",ConfigStore:Vf,StateStore:AQ,HarnessClient:Xf,Controller:BE,Runtime:fE})}var Ha=Object.freeze({status:"connection.status",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:ui,setAgentPreset:Bi}),rEe=Object.freeze(Object.values(Ha)),aEe=new Set(["token","botToken","tokenRef","platformId","secret","secretRef"]),iEe=new Set(["telegram-transport-error","telegram-timeout","telegram-response-invalid"]);function WM(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function rQ(n,t){return WM(n)&&Object.keys(n).every(o=>t.includes(o))}function cY(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function oEe(n){return typeof n=="string"&&n.trim().length>=20&&n.length<=4096}function nEe(n,t){return WM(t)?n===Ha.status?rQ(t,[])?null:"connection.status does not accept fields.":n===Ha.bindCredentials?rQ(t,["token"])&&oEe(t.token)?null:"bot.bind-credentials requires a Bot Token.":n===Ha.reconnectBot?rQ(t,["botId","sendTest"])&&cY(t.botId)&&(t.sendTest===void 0||typeof t.sendTest=="boolean")?null:"bot.reconnect requires a botId.":n===Ha.deleteBot?rQ(t,["botId","confirm"])&&cY(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Ha.setWorkspace?Ga(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Ha.setAgentPreset?La(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":"Unknown bot endpoint.":"Payload must be an object."}function VM(n){if(Array.isArray(n))return n.map(VM);if(!WM(n))return n;let t={};for(let[o,i]of Object.entries(n))aEe.has(o)||(t[o]=VM(i));return t}function sEe(n,t){let o=Fa(t);return o||(t?.code==="webhook-configured"?{code:"webhook-configured",message:t.message}:t?.code==="telegram-401"||t?.code==="discord-401"?{code:"invalid-token",message:`${n} Bot Token \u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199\u3002`}:n==="Telegram"&&iEe.has(t?.code)?{code:"telegram-network-error",message:"\u65E0\u6CD5\u8BBF\u95EE Telegram Bot API\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\uFF1BNode.js 22.21+ \u53EF\u8BBE\u7F6E NODE_USE_ENV_PROXY=1\uFF0C\u5E76\u914D\u7F6E HTTPS_PROXY\u3001HTTP_PROXY \u548C NO_PROXY\uFF0C\u7136\u540E\u91CD\u542F dsh web\u3002"}:t?.code==="discord-intents"?{code:"discord-intents",message:t.message}:{code:`${n.toLowerCase()}-operation-failed`,message:`${n} \u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002`})}function aQ(n,{channel:t}){for(let o of["status","bindCredentials","reconnectBot","deleteBot"])if(typeof n?.[o]!="function")throw new TypeError(`A complete ${t} controller is required (${o})`);return async(o,i,e)=>{if(e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(!rEe.includes(o))return{ok:!1,error:{code:"bad-request",message:`Unknown ${t} endpoint.`}};let a=nEe(o,i);if(a)return{ok:!1,error:{code:"bad-request",message:a}};try{let A;if(o===Ha.status)A=await n.status();else if(o===Ha.bindCredentials)A=await n.bindCredentials(i);else if(o===Ha.reconnectBot){if(A=await n.reconnectBot(i.botId),e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(i.sendTest===!0){let r=null;try{if(A?.bots?.find(s=>s?.botId===i.botId)?.connected!==!0){let s=new Error("Bot is not connected");throw s.code="test-target-unavailable",s}if(typeof n.sendConnectionTest!="function"){let s=new Error("Connection test is unavailable");throw s.code="test-target-unavailable",s}await n.sendConnectionTest(i.botId)}catch(s){r=s}A={...A,testMessage:ar(r)}}}else if(o===Ha.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");A=await n.updateWorkspace(i.botId,i.workspace)}else if(o===Ha.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");A=await n.updateAgentPreset(i.botId,i.agentPreset)}else A=await n.deleteBot(i.botId);return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!0,value:VM(A)}}catch(A){return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!1,error:sEe(t,A)}}}}function IY(n,t,{channel:o,rpcChannel:i,authority:e}){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(i,aQ(t,{channel:o}),{authority:mr(e)})}var lY="/discord",pY=Ha,gEe=Object.freeze(Object.values(pY));function iQ(n,t,o){return IY(n,t,{channel:"Discord",rpcChannel:lY,authority:o})}async function dY(n,t={}){if(t?.controller)return iQ(n,t.controller,t.rpcAuthority);let o=await zM(n,t,t.internals??{}),i=iQ(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close Discord bot connections"),i}import{homedir as TEe}from"node:os";import{join as e_,resolve as A_}from"node:path";import{mkdir as cEe,readFile as IEe,rename as lEe,unlink as pEe,writeFile as dEe}from"node:fs/promises";import{dirname as hEe,isAbsolute as EEe}from"node:path";var gp="office-harness.v1",hY="/office",cp=Object.freeze({status:"connection.status",configure:"connector.configure",reconnect:"connector.reconnect",test:"connector.test",remove:"connector.remove"}),rn=Object.freeze({stream:"/api/harness/connector/stream",heartbeat:"/api/harness/connector/heartbeat",job:"/api/harness/connector/jobs/:id",accept:"/api/harness/connector/jobs/:id/accept",renew:"/api/harness/connector/jobs/:id/renew",progress:"/api/harness/connector/jobs/:id/progress",approval:"/api/harness/connector/jobs/:id/approval",result:"/api/harness/connector/jobs/:id/result",fail:"/api/harness/connector/jobs/:id/fail"});function yE(n){let t=new URL(typeof n=="string"?n.trim():""),o=t.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(t.hostname);if(t.protocol!=="https:"&&!o)throw new TypeError("AI Office URL must use HTTPS (HTTP is allowed only for loopback testing)");if(t.username||t.password||t.search||t.hash)throw new TypeError("AI Office URL must be a bare origin");return t.pathname="/",t}function oQ(n){let t=yE(n);return Object.fromEntries(Object.entries(rn).map(([o,i])=>[o,new URL(i,t).toString()]))}var CEe=/^[a-z][a-z0-9-]{1,63}$/,uEe=/^[a-z0-9][a-z0-9_-]{2,63}$/i;function Ip(n){return typeof n=="string"&&n.trim()?n.trim():null}function EY(n,{kind:t}){if(!n||typeof n!="object"||Array.isArray(n))return null;let o={};for(let[i,e]of Object.entries(n)){let a=Ip(i),A=Ip(e);if(!a||!CEe.test(a)||!A||t==="workspace"&&!EEe(A)||t==="preset"&&A.length>8e3)return null;o[a]=A}return Object.freeze(o)}function nQ(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t;try{t=yE(n.baseUrl).origin}catch{return null}let o=Ip(n.deviceId),i=Ip(n.deviceTokenRef),e=EY(n.workspaces??{},{kind:"workspace"}),a=EY(n.instructionPresets??{},{kind:"preset"}),A=Number(n.maxConcurrency??1),r=Number(n.heartbeatSeconds??30);return!o||!uEe.test(o)||!i||!/^DSH_OFFICE_DEVICE_TOKEN_[A-F0-9]{24}$/.test(i)||!e||!a||!Number.isInteger(A)||A<1||A>4||!Number.isInteger(r)||r<10||r>300?null:Object.freeze({version:1,protocolVersion:gp,baseUrl:t,deviceId:o,deviceTokenRef:i,maxConcurrency:A,heartbeatSeconds:r,workspaces:e,instructionPresets:a,createdAt:Ip(n.createdAt)??new Date().toISOString(),updatedAt:Ip(n.updatedAt)??new Date().toISOString()})}var sQ=class{#e;#A=null;#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{let t=nQ(JSON.parse(await IEe(this.#e,"utf8")));if(!t)throw new Error("dsh-im AI Office config is invalid");this.#A=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=null}return this}get(){return this.#A?structuredClone(this.#A):null}async save(t){let o=nQ(t);if(!o)throw new Error("Refusing to persist invalid AI Office configuration");let i=this.#t.then(async()=>{await cEe(hEe(this.#e),{recursive:!0,mode:448});let e=`${this.#e}.tmp`;await dEe(e,`${JSON.stringify(o,null,2)} +`,{mode:384}),await lEe(e,this.#e),this.#A=o});return this.#t=i.then(()=>{},()=>{}),await i,this.get()}async clear(){let t=this.#t.then(async()=>{try{await pEe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=null});this.#t=t.then(()=>{},()=>{}),await t}};import{createHash as MEe}from"node:crypto";import{setTimeout as OEe}from"node:timers/promises";function ZM(n,t){let o=new Error(`AI Office ${n} failed: HTTP ${t.status}`);return o.code=t.status===401?"invalid-device-token":t.status===404?"office-hook-unavailable":t.status===409?"office-job-conflict":"office-transport-failed",o}function lp(n,t="office-transport-failed",o){let i=new Error(n,o===void 0?void 0:{cause:o});return i.code=t,i}function XM(n,t){return t?.aborted||n?.name==="AbortError"}function BEe(n){let t="message",o,i=[];for(let a of n.split(/\r?\n/))a.startsWith("event:")?t=a.slice(6).trim()||"message":a.startsWith("id:")?o=a.slice(3).trim()||void 0:a.startsWith("data:")&&i.push(a.slice(5).trimStart());if(i.length===0)return null;let e;try{e=JSON.parse(i.join(` +`))}catch{throw new Error("AI Office SSE returned invalid JSON")}return{id:o,type:typeof e?.type=="string"?e.type:t,data:e}}var gQ=class{#e;#A;#t;#r;constructor({baseUrl:t,deviceId:o,token:i,fetchImpl:e=fetch}){this.#e=t,this.#A=o,this.#t=i,this.#r=e}hooks(){return oQ(this.#e)}#a(t={}){return{authorization:`Bearer ${this.#t}`,"x-harness-device-id":this.#A,...t}}async heartbeat(t,{signal:o}={}){let i;try{i=await this.#r(new URL(rn.heartbeat,this.#e),{method:"POST",headers:this.#a({accept:"application/json","content-type":"application/json"}),body:JSON.stringify(t),signal:o,redirect:"error"})}catch(a){throw XM(a,o)?a:lp("AI Office heartbeat request could not be completed",void 0,a)}if(!i.ok)throw ZM("heartbeat",i);let e;try{e=await i.json()}catch(a){throw lp("AI Office heartbeat returned invalid JSON","office-protocol-mismatch",a)}if(!e||typeof e!="object"||e.ok!==!0||e.protocolVersion!==gp)throw lp("AI Office heartbeat protocol does not match","office-protocol-mismatch");return e}async#i(t,{method:o="POST",body:i,leaseToken:e,signal:a}={}){let A=this.#a({accept:"application/json"});i!==void 0&&(A["content-type"]="application/json"),e&&(A["x-harness-lease-token"]=e);let r;try{r=await this.#r(new URL(t,this.#e),{method:o,headers:A,...i===void 0?{}:{body:JSON.stringify(i)},signal:a,redirect:"error",cache:"no-store"})}catch(s){throw XM(s,a)?s:lp("AI Office Job request could not be completed",void 0,s)}if(!r.ok)throw ZM("Job request",r);try{return await r.json()}catch(s){throw lp("AI Office Job returned invalid JSON","office-protocol-mismatch",s)}}async getJob(t,o={}){return this.#i(rn.job.replace(":id",t),{...o,method:"GET"})}async acceptJob(t,o={}){return this.#i(rn.accept.replace(":id",t),o)}async renewJob(t,o,i={}){return this.#i(rn.renew.replace(":id",t),{...i,leaseToken:o})}async progressJob(t,o,i,e={}){return this.#i(rn.progress.replace(":id",t),{...e,leaseToken:o,body:i})}async requestApproval(t,o,i,e={}){return this.#i(rn.approval.replace(":id",t),{...e,leaseToken:o,body:i})}async completeJob(t,o,i,e={}){return this.#i(rn.result.replace(":id",t),{...e,leaseToken:o,body:i})}async failJob(t,o,i,e={}){return this.#i(rn.fail.replace(":id",t),{...e,leaseToken:o,body:i})}async stream({signal:t,lastEventId:o,onOpen:i,onEvent:e}){let a=this.#a({accept:"text/event-stream"});o&&(a["last-event-id"]=o);let A;try{A=await this.#r(new URL(rn.stream,this.#e),{method:"GET",headers:a,signal:t,redirect:"error",cache:"no-store"})}catch(c){throw XM(c,t)?c:lp("AI Office SSE request could not be completed",void 0,c)}if(!A.ok)throw ZM("stream",A);if(!A.headers.get("content-type")?.toLowerCase().includes("text/event-stream"))throw new Error("AI Office stream did not return text/event-stream");if(!A.body)throw new Error("AI Office stream returned no body");i?.();let r=A.body.getReader(),s=new TextDecoder,g="";for(;;){let{value:c,done:I}=await r.read();if(I)break;g=`${g}${s.decode(c,{stream:!0})}`.replaceAll(`\r `,` `);let d;for(;(d=g.indexOf(` -`))!==-1;){let B=g.slice(0,d);g=g.slice(d+2);let f=Lhe(B);f&&await e?.(f)}}throw new Error("AI Office SSE stream ended")}};import{setTimeout as Uhe}from"node:timers/promises";var Vx=/^job-[a-f0-9]{32}$/,Hhe=3e4,Khe=2048;function np(){return new DOMException("Office Job was cancelled","AbortError")}function Ha(n,t=8e3){return typeof n=="string"?n.trim().slice(0,t):""}function xhe(n){return n?.code==="office-job-alias-invalid"?n.message:n?.code==="turn-stopped"?D("\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002"):n?.code==="office-job-conflict"?D("Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002"):D("\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002")}function Yhe(n,t){return["# AI Office Handoff","",D("\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002"),D("\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002"),"",D("## \u672C\u673A Instruction Preset"),t,"",...Ha(n.instruction)?[D("## \u672C\u8F6E\u8865\u5145\u6307\u4EE4"),Ha(n.instruction),""]:[],D("## Office \u65F6\u95F4\u7EBF"),Ha(n.markdown,2e5)].join(` -`)}function jhe(n){let t=Ha(n?.interactionId||n?.rpcId,180);if(!t||typeof n?.respond!="function")return null;if(n.kind==="approval"){let i=Kb(n.payload,{toolCall:n.toolCall,maxArgumentsLength:1e4});return i?{id:t,kind:"approval",title:D("\u6279\u51C6 {tool}",{tool:Ha(n.payload?.toolName,120)||D("Harness \u5DE5\u5177")}),prompt:i,toolName:Ha(n.payload?.toolName,120)}:null}if(n.kind!=="question")return null;let o=n.payload?.questions;return!Array.isArray(o)||o.length===0||o.some(i=>!ai(i))?null:{id:t,kind:"question",title:o.length>1?D("Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F",{count:o.length}):Ha(o[0].header||o[0].question,160),prompt:o.map((i,e)=>ii(i,e,o.length)).join(` +`))!==-1;){let B=g.slice(0,d);g=g.slice(d+2);let f=BEe(B);f&&await e?.(f)}}throw new Error("AI Office SSE stream ended")}};import{setTimeout as fEe}from"node:timers/promises";var CY=/^job-[a-f0-9]{32}$/,QEe=3e4,yEe=2048;function pp(){return new DOMException("Office Job was cancelled","AbortError")}function Ka(n,t=8e3){return typeof n=="string"?n.trim().slice(0,t):""}function mEe(n){return n?.code==="office-job-alias-invalid"?n.message:n?.code==="turn-stopped"?D("\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002"):n?.code==="office-job-conflict"?D("Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002"):D("\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002")}function SEe(n,t){return["# AI Office Handoff","",D("\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002"),D("\u53EA\u5728\u5F53\u524D Workspace \u5185\u884C\u52A8\u3002\u5B8C\u6210\u540E\u5FC5\u987B\u8FD4\u56DE\uFF1A\u7ED3\u679C\u6458\u8981\u3001\u6539\u52A8\u6587\u4EF6\u3001\u9A8C\u8BC1\u8BC1\u636E\u3001\u672A\u89E3\u51B3\u98CE\u9669\u3002"),"",D("## \u672C\u673A Instruction Preset"),t,"",...Ka(n.instruction)?[D("## \u672C\u8F6E\u8865\u5145\u6307\u4EE4"),Ka(n.instruction),""]:[],D("## Office \u65F6\u95F4\u7EBF"),Ka(n.markdown,2e5)].join(` +`)}function DEe(n){let t=Ka(n?.interactionId||n?.rpcId,180);if(!t||typeof n?.respond!="function")return null;if(n.kind==="approval"){let i=aM(n.payload,{toolCall:n.toolCall,maxArgumentsLength:1e4});return i?{id:t,kind:"approval",title:D("\u6279\u51C6 {tool}",{tool:Ka(n.payload?.toolName,120)||D("Harness \u5DE5\u5177")}),prompt:i,toolName:Ka(n.payload?.toolName,120)}:null}if(n.kind!=="question")return null;let o=n.payload?.questions;return!Array.isArray(o)||o.length===0||o.some(i=>!ii(i))?null:{id:t,kind:"question",title:o.length>1?D("Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F",{count:o.length}):Ka(o[0].header||o[0].question,160),prompt:o.map((i,e)=>oi(i,e,o.length)).join(` --- -`),questions:o}}function Jhe(n,t){return new Promise((o,i)=>{if(n.controller.signal.aborted)return i(n.controller.signal.reason??np());let e=()=>{n.approvals.delete(t),i(n.controller.signal.reason??np())};n.controller.signal.addEventListener("abort",e,{once:!0}),n.approvals.set(t,{resolve(a){n.controller.signal.removeEventListener("abort",e),n.approvals.delete(t),o(a)}})})}var Xf=class{#e;#A;#t;#r;#a;#i=new Map;#c=new Set;#s=new Set;#I=!1;#n={running:0,completed:0,failed:0,lastJobId:null,lastJobAt:null};constructor({config:t,transport:o,createHarness:i,logger:e=console,sleepImpl:a=Uhe}){if(!t||!o||typeof i!="function")throw new TypeError("OfficeJobExecutor requires config, transport, and createHarness");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a}get status(){return structuredClone(this.#n)}offer(t){return this.#I||!Vx.test(t)||this.#i.has(t)||this.#c.has(t)||this.#s.has(t)?!1:(this.#c.add(t),this.#o(),!0)}handleEvent(t){let o=Ha(t?.data?.jobId,80);if(!Vx.test(o))return!1;if(t.type==="job.available")return this.offer(o);if(t.type==="job.cancel")return this.cancel(o);if(t.type==="approval.reply"){let i=this.#i.get(o),e=Ha(t.data?.approvalId,180),a=i?.approvals.get(e);return a?(a.resolve({decision:t.data?.decision==="approved"?"approved":"rejected",answer:Ha(t.data?.answer)}),!0):!1}return!1}cancel(t){this.#c.delete(t);let o=this.#i.get(t);return o?(o.cancelled=!0,o.controller.abort(np()),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{}),!0):!1}async close(){this.#I=!0,this.#c.clear();for(let t of this.#i.values())t.controller.abort(np());await Promise.allSettled([...this.#i.values()].map(t=>t.task))}#o(){for(;!this.#I&&this.#i.size0;){let t=this.#c.values().next().value;this.#c.delete(t);let o={controller:new AbortController,approvals:new Map,harness:null,sessionId:null,leaseToken:null,cancelled:!1,lastProgressAt:0,lastProgress:"",task:null};o.task=this.#g(t,o).finally(()=>{this.#i.delete(t),this.#n.running=this.#i.size,this.#o()}),this.#i.set(t,o),this.#n.running=this.#i.size,o.task.catch(i=>this.#r.warn?.("[dsh-im:office] Job task ended:",i.message))}}async#g(t,o){let i=o.controller.signal,e=null;try{let A=(await this.#A.getJob(t,{signal:i}))?.job;if(!A||A.id!==t)throw new Error("Office returned an invalid Job payload");let r=await this.#A.acceptJob(t,{signal:i});if(!Ha(r?.leaseToken,200))throw new Error("Office returned an invalid Job lease");o.leaseToken=r.leaseToken,e=this.#l(t,o);let s=this.#e.workspaces[A.workspaceAlias],g=this.#e.instructionPresets[A.instructionPreset];if(!s||!g){let I=new Error(D("Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002"));throw I.code="office-job-alias-invalid",I}o.harness=this.#t({workspace:s}),await this.#d(t,o,{kind:"status",message:D("\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}",{alias:A.workspaceAlias})},!0),o.sessionId=await o.harness.createSession({signal:i,workspace:s}),await this.#d(t,o,{kind:"status",message:D("Harness Session \u5DF2\u521B\u5EFA\u3002"),sessionId:o.sessionId},!0);let c=await o.harness.ask(o.sessionId,Yhe(A,g),{timeoutMs:30*6e4,signal:i,onUpdate:I=>this.#p(t,o,I),onInteraction:I=>this.#h(t,o,I),onInteractionResolved:I=>{let d=Ha(I?.interactionId,180);o.approvals.get(d)?.resolve({decision:"rejected",answer:""})}});if(i.aborted)throw i.reason??np();await this.#A.completeJob(t,o.leaseToken,{resultMarkdown:c,sessionId:o.sessionId},{signal:i}),this.#n.completed+=1,this.#E(t)}catch(a){if(!o.cancelled&&o.leaseToken&&(await this.#A.failJob(t,o.leaseToken,{error:xhe(a),...o.sessionId?{sessionId:o.sessionId}:{}}).catch(()=>{}),this.#n.failed+=1),a?.code==="office-job-conflict"||a?.code==="office-hook-unavailable"){this.#E(t);return}!o.cancelled&&!i.aborted&&this.#r.warn?.(`[dsh-im:office] Job ${t} failed:`,a.message)}finally{o.controller.abort(np()),await e?.catch(()=>{}),this.#n.lastJobId=t,this.#n.lastJobAt=new Date().toISOString()}}async#l(t,o){for(;!o.controller.signal.aborted;){try{await this.#a(Hhe,void 0,{signal:o.controller.signal})}catch{return}try{await this.#A.renewJob(t,o.leaseToken,{signal:o.controller.signal})}catch(i){if(o.controller.signal.aborted)return;o.cancelled=!0,o.controller.abort(i),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{});return}try{let e=(await this.#A.getJob(t,{signal:o.controller.signal}))?.job?.approval;e&&(e.status==="approved"||e.status==="rejected")&&o.approvals.get(e.id)?.resolve({decision:e.status,answer:Ha(e.answer)})}catch(i){if(o.controller.signal.aborted)return;this.#r.warn?.(`[dsh-im:office] Job ${t} approval poll failed; will retry after the next renewal:`,i.message)}}}async#p(t,o,i){let e=i?.type==="tool"?D("\u6B63\u5728\u4F7F\u7528 {tool}\u2026",{tool:Ha(i.name,160)||D("Harness \u5DE5\u5177")}):Ha(i?.text,4e3);if(!e)return;let a=`${i.type}:${e}`;if(a===o.lastProgress)return;let A=Date.now();i.type==="text"&&A-o.lastProgressAt<1e3||(o.lastProgress=a,o.lastProgressAt=A,await this.#d(t,o,{kind:i.type==="tool"?"tool":i.type==="text"?"text":"status",message:e,...o.sessionId?{sessionId:o.sessionId}:{}}))}#d(t,o,i,e=!1){let a=this.#A.progressJob(t,o.leaseToken,i,{signal:o.controller.signal});return e?a:a.catch(A=>{this.#r.debug?.("[dsh-im:office] ignored a progress delivery failure:",A.message)})}async#h(t,o,i){let e=jhe(i);if(!e){i?.kind==="approval"&&typeof i.respond=="function"&&await i.respond({ok:!0,value:{sessionId:i.sessionId,approvalId:i.payload?.approvalId,outcome:"rejected"}});return}let a=Jhe(o,e.id);try{await this.#A.requestApproval(t,o.leaseToken,e,{signal:o.controller.signal});let A=await a;if(e.kind==="approval"){await i.respond({ok:!0,value:{sessionId:i.sessionId,approvalId:i.payload.approvalId,outcome:A.decision==="approved"?"allowed-once":"rejected"}});return}if(A.decision!=="approved"){await i.respond({ok:!1,error:{code:"cancelled",message:"The AI Office user rejected this question.",details:{}}});return}let r=Ha(A.answer).split(/\r?\n/);await i.respond({ok:!0,value:{sessionId:i.sessionId,answer:{answers:e.questions.map((s,g)=>oi(s,r[g]||r[0]||""))}}})}catch(A){throw o.approvals.delete(e.id),A}}#E(t){this.#s.add(t),!(this.#s.size<=Khe)&&this.#s.delete(this.#s.values().next().value)}};var Wx=Object.freeze([1e3,3e3,1e4,3e4]);function zhe(n){let t=typeof n?.code=="string"?n.code:"office-connection-failed",o={"invalid-device-token":D("AI Office \u62D2\u7EDD\u4E86 Device Token\u3002"),"office-hook-unavailable":D("AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002"),"office-protocol-mismatch":D("AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002"),"office-transport-failed":D("\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002")};return{code:t,message:o[t]??D("AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002")}}var sp=class{#e;#A;#t;#r;#a;#i=null;#c=null;#s;#I;constructor({config:t,token:o,logger:i=console,transport:e,createHarness:a,jobExecutor:A,sleepImpl:r=qhe}){this.#e=t,this.#A=o,this.#t=i,this.#a=r,this.#r=e??new Zf({baseUrl:t.baseUrl,deviceId:t.deviceId,token:o}),this.#s={state:"idle",connected:!1,startedAt:null,lastHeartbeatAt:null,lastEventAt:null,lastEventId:null,lastEventType:null,reconnects:0,jobsOffered:0,error:null},this.#I=A??(a?new Xf({config:t,transport:this.#r,createHarness:a,logger:i}):null)}get status(){return structuredClone({...this.#s,...this.#I?{jobs:this.#I.status}:{}})}capabilities(){return{protocolVersion:rp,deviceId:this.#e.deviceId,workspaces:Object.keys(this.#e.workspaces),instructionPresets:Object.keys(this.#e.instructionPresets),maxConcurrency:this.#e.maxConcurrency}}async testConnection(t){return await this.#r.heartbeat({...this.capabilities(),probe:!0},{signal:t}),{ok:!0}}start(){return this.#c?this.status:(this.#i=new AbortController,this.#s.startedAt=new Date().toISOString(),this.#s.state="connecting",this.#c=this.#n(this.#i.signal).finally(()=>{this.#c=null}),this.#c.catch(t=>{this.#i?.signal.aborted||this.#t.error?.("[dsh-im:office] connector stopped:",t)}),this.status)}async#n(t){let o=0;for(;!t.aborted;){let i=new AbortController,e=AbortSignal.any([t,i.signal]);try{let a=await this.#r.heartbeat(this.capabilities(),{signal:e});this.#g(a?.jobs),this.#s.lastHeartbeatAt=new Date().toISOString();let A=!1,r=this.#o(e,()=>{A&&!e.aborted&&(o=0)}),s=this.#r.stream({signal:e,lastEventId:this.#s.lastEventId,onOpen:()=>{this.#s.connected=!0,this.#s.state="connected",this.#s.error=null,A=!0},onEvent:async g=>{this.#s.lastEventAt=new Date().toISOString(),this.#s.lastEventId=g.id??this.#s.lastEventId,this.#s.lastEventType=g.type,g.type==="job.available"&&(this.#s.jobsOffered+=1),this.#I?.handleEvent(g)}});await Promise.race([s,r])}catch(a){if(t.aborted)break;i.abort(),this.#s.connected=!1,this.#s.state="reconnecting",this.#s.error=zhe(a),this.#s.reconnects+=1;let A=Wx[Math.min(o,Wx.length-1)];o+=1;try{await this.#a(A,void 0,{signal:t})}catch{break}}finally{i.abort()}}this.#s.connected=!1,this.#s.state="idle"}async#o(t,o){for(;!t.aborted;){await this.#a(this.#e.heartbeatSeconds*1e3,void 0,{signal:t});let i=await this.#r.heartbeat(this.capabilities(),{signal:t});this.#g(i?.jobs),this.#s.lastHeartbeatAt=new Date().toISOString(),o?.()}}#g(t){if(Array.isArray(t))for(let o of t)typeof o?.id=="string"&&this.#I?.offer(o.id)&&(this.#s.jobsOffered+=1)}async stop(){let t=this.#c;return this.#i?.abort(),this.#i=null,t&&await t.catch(()=>{}),await this.#I?.close(),this.#s.connected=!1,this.#s.state="idle",this.status}};function GM(n){return typeof n=="string"&&n.trim()?n.trim():null}function Whe(n,t){return`DSH_OFFICE_DEVICE_TOKEN_${Vhe("sha256").update(`${n} -${t}`).digest("hex").slice(0,24).toUpperCase()}`}var $f=class{#e;#A;#t;#r;#a=null;#i=Promise.resolve();constructor({credentials:t,configStore:o,logger:i=console,createRuntime:e}){if(!t?.resolve||!t?.set||!t?.unset)throw new TypeError("AI Office requires the Harness credential provider");if(!o?.get||!o?.save||!o?.clear)throw new TypeError("AI Office requires a config store");this.#e=t,this.#A=o,this.#t=i,this.#r=e??(a=>new sp(a))}async initialize(){let t=this.#A.get();if(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});o?.value&&await this.#s(t,o.value)}return this.status()}async configure(t={}){return this.#n(async()=>{let o=this.#A.get(),i=GM(t.baseUrl),e=GM(t.deviceId);if(!i||!e)throw new TypeError("Office URL and Device ID are required");let a=EE(i).origin,A=Whe(a,e),r=GM(t.deviceToken),s=await this.#e.resolve(A).catch(()=>{}),g=r??s?.value;if(!g||g.length<32)throw new TypeError("Device Token must contain at least 32 characters");let c=new Date().toISOString(),I=Vf({version:1,baseUrl:a,deviceId:e,deviceTokenRef:A,maxConcurrency:t.maxConcurrency,heartbeatSeconds:t.heartbeatSeconds,workspaces:t.workspaces,instructionPresets:t.instructionPresets,createdAt:o?.createdAt??c,updatedAt:c});if(!I)throw new TypeError("AI Office connector configuration is invalid");await this.#e.set(A,g);try{await this.#A.save(I)}catch(d){throw s?.value?await this.#e.set(A,s.value).catch(()=>{}):await this.#e.unset(A).catch(()=>{}),d}return o?.deviceTokenRef&&o.deviceTokenRef!==A&&await this.#e.unset(o.deviceTokenRef).catch(()=>{}),await this.#s(I,g),this.status()})}async reconnect(){return this.#n(async()=>{let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");return await this.#s(t),this.status()})}async test(){let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");let o=await this.#c(t),i=this.#r({config:t,token:o,logger:this.#t});try{await i.testConnection(AbortSignal.timeout(1e4))}finally{await i.stop().catch(()=>{})}return{tested:!0,snapshot:await this.status()}}async remove(){return this.#n(async()=>{let t=this.#A.get();return await this.#I(),t?.deviceTokenRef&&await this.#e.unset(t.deviceTokenRef).catch(()=>{}),await this.#A.clear(),this.status()})}async status(){let t=this.#A.get();if(!t)return{schemaVersion:1,configured:!1,connected:!1,state:"unconfigured"};let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{}),i=this.#a?.status??null;return{schemaVersion:1,configured:!0,connected:i?.connected===!0,state:i?.state??(o?.value?"idle":"missing-token"),config:{protocolVersion:t.protocolVersion,baseUrl:t.baseUrl,deviceId:t.deviceId,maxConcurrency:t.maxConcurrency,heartbeatSeconds:t.heartbeatSeconds,workspaces:t.workspaces,instructionPresets:t.instructionPresets,hooks:zf(t.baseUrl)},health:i,tokenConfigured:!!o?.value}}async close(){await this.#i.catch(()=>{}),await this.#I()}async#c(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});if(!o?.value)throw new Error("AI Office Device Token is missing");return o.value}async#s(t,o){await this.#I();let i=o??await this.#c(t),e=this.#r({config:t,token:i,logger:this.#t});this.#a=e,e.start()}async#I(){let t=this.#a;this.#a=null,t&&await t.stop()}#n(t){let o=this.#i.then(t,t);return this.#i=o.then(()=>{},()=>{}),o}};function Xhe(n={}){let t=LM(n.dshHome??process.env.DSH_HOME??FM(Zhe(),".dsh")),o=LM(n.dataDir??FM(t,"integrations","dsh-office"));return{root:o,config:LM(n.configPath??FM(o,"config.json"))}}async function Zx(n,t={},o={}){let i=Xr(n,t),e=o.ConfigStore??Wf,a=o.Controller??$f,A=o.Runtime??sp,r=o.HarnessClient??lr,s=Xhe(t),g=await new e(s.config).load(),c=typeof n.logger=="function"?n.logger("dsh-im:office"):n.logger??console,I=o.createHarness??(({workspace:B})=>new r({...i,workspace:B,autostart:!1,dshBin:t.dshBin??"dsh",rpcIdPrefix:"office",logPrefix:"dsh-im:office"})),d=new a({credentials:n.credentials,configStore:g,logger:c,createRuntime:B=>new A({...B,createHarness:I,...o.transport?{transport:o.transport}:{}})});return await d.initialize(),{controller:d,close:()=>d.close(),paths:s}}function UM(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function CE(n,t){return UM(n)&&Object.keys(n).every(o=>t.includes(o))}function $he(n){return CE(n,["baseUrl","deviceId","deviceToken","maxConcurrency","heartbeatSeconds","workspaces","instructionPresets"])&&typeof n.baseUrl=="string"&&typeof n.deviceId=="string"&&(n.deviceToken===void 0||typeof n.deviceToken=="string")&&UM(n.workspaces)&&UM(n.instructionPresets)}function eEe(n){for(let t of["status","configure","reconnect","test","remove"])if(typeof n?.[t]!="function")throw new TypeError(`AI Office controller requires ${t}()`);return async(t,o,i)=>{if(i?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};try{let e;if(t===ap.status&&CE(o,[]))e=await n.status();else if(t===ap.configure&&$he(o))e=await n.configure(o);else if(t===ap.reconnect&&CE(o,[]))e=await n.reconnect();else if(t===ap.test&&CE(o,[]))e=await n.test();else if(t===ap.remove&&CE(o,["confirm"])&&o.confirm===!0)e=await n.remove();else return{ok:!1,error:{code:"bad-request",message:"Invalid AI Office connector request."}};return{ok:!0,value:e}}catch(e){let a=e?.code==="invalid-device-token"?"invalid-device-token":e?.code==="office-hook-unavailable"?"office-hook-unavailable":"office-operation-failed",A=a==="invalid-device-token"?"AI Office Device Token \u65E0\u6548\u3002":a==="office-hook-unavailable"?"AI Office Hook \u5C1A\u672A\u4E0A\u7EBF\u6216\u5730\u5740\u4E0D\u6B63\u786E\u3002":e instanceof TypeError?e.message:"AI Office \u8FDE\u63A5\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002";return{ok:!1,error:{code:a,message:A}}}}}function HM(n,t,o){return n.connection.rpc.handle(qx,eEe(t),{authority:yr(o)})}async function Xx(n,t={}){if(t.controller)return HM(n,t.controller,t.rpcAuthority);let o=await Zx(n,t,t.internals??{}),i=HM(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close AI Office connector"),i}var AEe=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]);function tEe(n){let t=n?.client_id??n?.appId,o=n?.client_secret??n?.appSecret;if(typeof t!="string"||t.length===0||typeof o!="string"||o.length===0)throw new TypeError("Feishu registration returned invalid credentials");return{appId:t,appSecret:o,userInfo:n?.user_info??n?.userInfo}}async function rEe(n){return typeof n.status!="function"?{}:await n.status()}function aEe(n){return n?.connected===!0?!0:n?.ready===!0&&n?.feishuLongConnectionState==="connected"&&n?.harnessReachable===!0}var eQ=class{#e;#A;#t;#r;#a=!1;#i=null;constructor({createProvisioningManager:t,credentialStore:o,connectionManager:i,registrationOptions:e={}}={}){if(typeof t!="function")throw new TypeError("createProvisioningManager is required");if(!o||typeof o.save!="function"||typeof o.clear!="function")throw new TypeError("credentialStore.save/clear are required");if(!i||typeof i.connect!="function"||typeof i.disconnect!="function")throw new TypeError("connectionManager.connect/disconnect are required");if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("registrationOptions must be an object");if(this.#e=o,this.#A=i,this.#t=structuredClone(e),this.#r=t({onCredentials:a=>this.#c(a)}),!this.#r||typeof this.#r.start!="function"||typeof this.#r.status!="function"||typeof this.#r.cancel!="function")throw new TypeError("The provisioning manager must implement start/status/cancel")}async startRegistration(){return this.#i=null,await this.#r.start(structuredClone(this.#t)),this.status()}async cancelRegistration(){return await this.#r.cancel(),this.status()}async disconnect(){await this.#r.cancel(),await this.#A.disconnect();try{await this.#e.clear(),this.#a=!1,this.#i=null}catch{this.#i={code:"credential_removal_failed",message:"Unable to remove the Feishu credentials."}}return this.status()}async status(){let t=await this.#r.status(),o=await rEe(this.#A),i=aEe(o),e=this.#a;if(typeof this.#e.configured=="function")try{e=await this.#e.configured()}catch{e=this.#a}let a="unconfigured";return i?a="connected":AEe.has(t?.state)?a="registering":t?.state==="saving"?a="connecting":this.#i||t?.state==="error"?a="error":e&&(a="disconnected"),{phase:a,connected:i,configured:e,registration:t,connection:o,error:this.#i??t?.error??null}}async close(){await this.#r.cancel(),await this.#A.disconnect()}async#c(t){let o=tEe(t);try{await this.#e.save(o),this.#a=!0,await this.#A.connect(o),this.#i=null}catch{throw this.#i={code:"connection_failed",message:"The bot was created, but its connection could not be started."},new Error("Unable to activate the Feishu connection.")}}};function KM(n){return new eQ(n)}import{homedir as M0e}from"node:os";import{join as Ad,resolve as oc}from"node:path";import{unlink as _0e}from"node:fs/promises";var Fk={};Mr(Fk,{AESCipher:()=>MC,AccessTokenError:()=>Vp,Aily:()=>dk,AppType:()=>Zn,CAppTicket:()=>bC,CTenantAccessToken:()=>mC,CardActionHandler:()=>ck,Client:()=>Py,ClientAssertionError:()=>xa,DefaultCache:()=>Ry,Domain:()=>Xn,EventDispatcher:()=>Fy,LarkChannel:()=>Yy,LarkChannelError:()=>Rt,LoggerLevel:()=>zi,LoggerProxy:()=>rc,WSClient:()=>Uy,adaptDefault:()=>zbe,adaptExpress:()=>Vbe,adaptKoa:()=>Wbe,adaptKoaRouter:()=>Zbe,createLarkChannel:()=>v_e,defaultHttpInstance:()=>Wp,defaultLogger:()=>rg,generateChallenge:()=>TC,internalCache:()=>_C,messageCard:()=>$be,normalize:()=>Lz,normalizeBotAdded:()=>Gz,normalizeCardAction:()=>Pz,normalizeComment:()=>Fz,normalizeReaction:()=>Ok,registerApp:()=>cMe,withAll:()=>Kbe,withHelpDeskCredential:()=>Ybe,withTenantKey:()=>xbe,withTenantToken:()=>jbe,withUserAccessToken:()=>Jbe});function uE(n,t){return function(){return n.apply(t,arguments)}}var{toString:iEe}=Object.prototype,{getPrototypeOf:gp}=Object,{iterator:fE,toStringTag:AY}=Symbol,tQ=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),BE=(n,t)=>{let o=n,i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),tQ(o,t))return!0;o=gp(o)}return!1},oEe=(n,t)=>n!=null&&BE(n,t)?n[t]:void 0,YM=(n=>t=>{let o=iEe.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Qo=n=>(n=n.toLowerCase(),t=>YM(t)===n),rQ=n=>t=>typeof t===n,{isArray:cI}=Array,II=rQ("undefined");function cp(n){return n!==null&&!II(n)&&n.constructor!==null&&!II(n.constructor)&&fi(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var tY=Qo("ArrayBuffer");function nEe(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&tY(n.buffer),t}var sEe=rQ("string"),fi=rQ("function"),rY=rQ("number"),Ip=n=>n!==null&&typeof n=="object",gEe=n=>n===!0||n===!1,AQ=n=>{if(!Ip(n))return!1;let t=gp(n);return(t===null||t===Object.prototype||gp(t)===null)&&!BE(n,AY)&&!BE(n,fE)},cEe=n=>{if(!Ip(n)||cp(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},IEe=Qo("Date"),lEe=Qo("File"),pEe=n=>!!(n&&typeof n.uri<"u"),dEe=n=>n&&typeof n.getParts<"u",hEe=Qo("Blob"),EEe=Qo("FileList"),CEe=Qo("Set"),uEe=n=>Ip(n)&&fi(n.pipe);function BEe(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var $x=BEe(),eY=typeof $x.FormData<"u"?$x.FormData:void 0,fEe=n=>{if(!n)return!1;if(eY&&n instanceof eY)return!0;let t=gp(n);if(!t||t===Object.prototype||!fi(n.append))return!1;let o=YM(n);return o==="formdata"||o==="object"&&fi(n.toString)&&n.toString()==="[object FormData]"},QEe=Qo("URLSearchParams"),[yEe,mEe,SEe,DEe]=["ReadableStream","Request","Response","Headers"].map(Qo),wEe=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function QE(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,e;if(typeof n!="object"&&(n=[n]),cI(n))for(i=0,e=n.length;i0;)if(e=o[i],t===e.toLowerCase())return e;return null}var gI=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iY=n=>!II(n)&&n!==gI;function xM(...n){let{caseless:t,skipUndefined:o}=iY(this)&&this||{},i={},e=(a,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")return;let r=t&&typeof A=="string"&&aY(i,A)||A,s=tQ(i,r)?i[r]:void 0;AQ(s)&&AQ(a)?i[r]=xM(s,a):AQ(a)?i[r]=xM({},a):cI(a)?i[r]=a.slice():(!o||!II(a))&&(i[r]=a)};for(let a=0,A=n.length;a(QE(t,(e,a)=>{o&&fi(e)?Object.defineProperty(n,a,{__proto__:null,value:uE(e,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,a,{__proto__:null,value:e,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),bEe=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),MEe=(n,t,o,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},_Ee=(n,t,o,i)=>{let e,a,A,r={};if(t=t||{},n==null)return t;do{for(e=Object.getOwnPropertyNames(n),a=e.length;a-- >0;)A=e[a],(!i||i(A,n,t))&&!r[A]&&(t[A]=n[A],r[A]=!0);n=o!==!1&&gp(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},TEe=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;let i=n.indexOf(t,o);return i!==-1&&i===o},NEe=n=>{if(!n)return null;if(cI(n))return n;let t=n.length;if(!rY(t))return null;let o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},REe=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&gp(Uint8Array)),kEe=(n,t)=>{let i=(n&&n[fE]).call(n),e;for(;(e=i.next())&&!e.done;){let a=e.value;t.call(n,a[0],a[1])}},vEe=(n,t)=>{let o,i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},PEe=Qo("HTMLFormElement"),GEe=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,e){return i.toUpperCase()+e}),{propertyIsEnumerable:FEe}=Object.prototype,LEe=Qo("RegExp"),oY=(n,t)=>{let o=Object.getOwnPropertyDescriptors(n),i={};QE(o,(e,a)=>{let A;(A=t(e,a,n))!==!1&&(i[a]=A||e)}),Object.defineProperties(n,i)},UEe=n=>{oY(n,(t,o)=>{if(fi(n)&&["arguments","caller","callee"].includes(o))return!1;let i=n[o];if(fi(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},HEe=(n,t)=>{let o={},i=e=>{e.forEach(a=>{o[a]=!0})};return cI(n)?i(n):i(String(n).split(t)),o},KEe=()=>{},xEe=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function YEe(n){return!!(n&&fi(n.append)&&n[AY]==="FormData"&&n[fE])}var jEe=n=>{let t=new WeakSet,o=i=>{if(Ip(i)){if(t.has(i))return;if(cp(i))return i;if(!("toJSON"in i)){t.add(i);let e;if(CEe(i)){e=[];for(let a of i){let A=o(a);!II(A)&&e.push(A)}}else e=cI(i)?[]:{},QE(i,(a,A)=>{let r=o(a);!II(r)&&(e[A]=r)});return t.delete(i),e}}return i};return o(n)},JEe=Qo("AsyncFunction"),qEe=n=>n&&(Ip(n)||fi(n))&&fi(n.then)&&fi(n.catch),nY=((n,t)=>n?setImmediate:t?((o,i)=>(gI.addEventListener("message",({source:e,data:a})=>{e===gI&&a===o&&i.length&&i.shift()()},!1),e=>{i.push(e),gI.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",fi(gI.postMessage)),zEe=typeof queueMicrotask<"u"?queueMicrotask.bind(gI):typeof process<"u"&&process.nextTick||nY,sY=n=>n!=null&&fi(n[fE]),VEe=n=>n!=null&&BE(n,fE)&&sY(n),Z={isArray:cI,isArrayBuffer:tY,isBuffer:cp,isFormData:fEe,isArrayBufferView:nEe,isString:sEe,isNumber:rY,isBoolean:gEe,isObject:Ip,isPlainObject:AQ,isEmptyObject:cEe,isReadableStream:yEe,isRequest:mEe,isResponse:SEe,isHeaders:DEe,isUndefined:II,isDate:IEe,isFile:lEe,isReactNativeBlob:pEe,isReactNative:dEe,isBlob:hEe,isRegExp:LEe,isFunction:fi,isStream:uEe,isURLSearchParams:QEe,isTypedArray:REe,isFileList:EEe,forEach:QE,merge:xM,extend:OEe,trim:wEe,stripBOM:bEe,inherits:MEe,toFlatObject:_Ee,kindOf:YM,kindOfTest:Qo,endsWith:TEe,toArray:NEe,forEachEntry:kEe,matchAll:vEe,isHTMLForm:PEe,hasOwnProperty:tQ,hasOwnProp:tQ,hasOwnInPrototypeChain:BE,getSafeProp:oEe,reduceDescriptors:oY,freezeMethods:UEe,toObjectSet:HEe,toCamelCase:GEe,noop:KEe,toFiniteNumber:xEe,findKey:aY,global:gI,isContextDefined:iY,isSpecCompliantForm:YEe,toJSONObject:jEe,isAsyncFn:JEe,isThenable:qEe,setImmediate:nY,asap:zEe,isIterable:sY,isSafeIterable:VEe};var WEe=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gY=n=>{let t={},o,i,e;return n&&n.split(` -`).forEach(function(A){e=A.indexOf(":"),o=A.substring(0,e).trim().toLowerCase(),i=A.substring(e+1).trim();let r=Z.hasOwnProp(t,o);!o||r&&Z.hasOwnProp(WEe,o)||(o==="set-cookie"?r?t[o].push(i):t[o]=[i]:t[o]=r?t[o]+", "+i:i)}),t};function ZEe(n){let t=0,o=n.length;for(;tt;){let i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}var XEe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),$Ee=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function jM(n,t){return Z.isArray(n)?n.map(o=>jM(o,t)):ZEe(String(n).replace(t,""))}var cY=n=>jM(n,XEe),eCe=n=>jM(n,$Ee);function lp(n){let t=Object.create(null);return Z.forEach(n.toJSON(),(o,i)=>{t[i]=eCe(o)}),t}var IY=Symbol("internals");function yE(n){return n&&String(n).trim().toLowerCase()}function aQ(n){return n===!1||n==null?n:Z.isArray(n)?n.map(aQ):cY(String(n))}function ACe(n){let t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=o.exec(n);)t[i[1]]=i[2];return t}var tCe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function JM(n){let t=0,o=n.length;for(;tt;){let i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}function rCe(n){let t=n.length-1;if(t<1||n.charCodeAt(0)!==34||n.charCodeAt(t)!==34)return n;let o="";for(let i=1;i=t))return n;o+=n[i]}return o}function aCe(n){let t=Object.create(null),o=String(n),i=0,e=!1,a=!1;function A(r){let s=JM(o.slice(i,r)),g=s.indexOf("=");if(g<1)return;let c=JM(s.slice(0,g));if(!tCe.test(c))return;let I=c.toLowerCase();if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=JM(s.slice(g+1));t[I]=rCe(d)}for(let r=0;r/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function qM(n,t,o,i,e){if(Z.isFunction(i))return i.call(this,t,o);if(e&&(t=o),!!Z.isString(t)){if(Z.isString(i))return t.indexOf(i)!==-1;if(Z.isRegExp(i))return i.test(t)}}function oCe(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function nCe(n,t){let o=Z.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+o,{__proto__:null,value:function(e,a,A){return this[i].call(this,t,e,a,A)},configurable:!0})})}var pp=class{constructor(t){t&&this.set(t)}set(t,o,i){let e=this;function a(r,s,g){let c=yE(s);if(!c)return;let I=Z.findKey(e,c);(!I||e[I]===void 0||g===!0||g===void 0&&e[I]!==!1)&&(e[I||s]=aQ(r))}let A=(r,s)=>Z.forEach(r,(g,c)=>a(g,c,s));if(Z.isPlainObject(t)||t instanceof this.constructor)A(t,o);else if(Z.isString(t)&&(t=t.trim())&&!iCe(t))A(gY(t),o);else if(Z.isObject(t)&&Z.isSafeIterable(t)){let r=Object.create(null),s,g;for(let c of t){if(!Z.isArray(c))throw new TypeError("Object iterator must return a key-value pair");g=c[0],Z.hasOwnProp(r,g)?(s=r[g],r[g]=Z.isArray(s)?[...s,c[1]]:[s,c[1]]):r[g]=c[1]}A(r,o)}else t!=null&&a(o,t,i);return this}get(t,o){if(t=yE(t),t){let i=Z.findKey(this,t);if(i){let e=this[i];if(!o)return e;if(o===!0)return ACe(e);if(Z.isFunction(o))return o.call(this,e,i);if(Z.isRegExp(o))return o.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=yE(t),t){let i=Z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||qM(this,this[i],i,o)))}return!1}delete(t,o){let i=this,e=!1;function a(A){if(A=yE(A),A){let r=Z.findKey(i,A);r&&(!o||qM(i,i[r],r,o))&&(delete i[r],e=!0)}}return Z.isArray(t)?t.forEach(a):a(t),e}clear(t){let o=Object.keys(this),i=o.length,e=!1;for(;i--;){let a=o[i];(!t||qM(this,this[a],a,t,!0))&&(delete this[a],e=!0)}return e}normalize(t){let o=this,i={};return Z.forEach(this,(e,a)=>{let A=Z.findKey(i,a);if(A){o[A]=aQ(e),delete o[a];return}let r=t?oCe(a):String(a).trim();r!==a&&delete o[a],o[r]=aQ(e),i[r]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let o=Object.create(null);return Z.forEach(this,(i,e)=>{i!=null&&i!==!1&&(o[e]=t&&Z.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(` -`)}getSetCookie(){let t=this.get("set-cookie");return Z.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return aCe(t)}static concat(t,...o){let i=new this(t);return o.forEach(e=>i.set(e)),i}static accessor(t){let i=(this[IY]=this[IY]={accessors:{}}).accessors,e=this.prototype;function a(A){let r=yE(A);i[r]||(nCe(e,A),i[r]=!0)}return Z.isArray(t)?t.forEach(a):a(t),this}};pp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(pp.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}});Z.freezeMethods(pp);var Ft=pp;var mE="[REDACTED ****]";function sCe(n){if(Z.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function gCe(n,t){let o=new Set(t.map(a=>String(a).toLowerCase())),i=[],e=a=>{if(a===null||typeof a!="object"||Z.isBuffer(a))return a;if(i.indexOf(a)!==-1)return;a instanceof Ft&&(a=a.toJSON()),i.push(a);let A;if(Z.isArray(a))A=[],a.forEach((r,s)=>{let g=e(r);Z.isUndefined(g)||(A[s]=g)});else{if(!Z.isPlainObject(a)&&sCe(a))return i.pop(),a;A=Object.create(null);for(let[r,s]of Object.entries(a)){let g=o.has(r.toLowerCase())?mE:e(s);Z.isUndefined(g)||(A[r]=g)}}return i.pop(),A};return e(n)}function lY(n){try{return String(n)}catch{return""}}function cCe(n){return n.errors.map(o=>{try{return o&&o.message?lY(o.message):lY(o)}catch{return""}}).filter(Boolean).join("; ")||n.name||"AggregateError"}var pa=class n extends Error{static from(t,o,i,e,a,A){let r=t.message;!r&&Z.isArray(t.errors)&&t.errors.length&&(r=cCe(t));let s=new n(r,o||t.code,i,e,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),A&&Object.assign(s,A),s}constructor(t,o,i,e,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),e&&(this.request=e),a&&(this.response=a,this.status=a.status)}toJSON(){let t=this.config,o=t&&Z.hasOwnProp(t,"redact")?t.redact:void 0,i=Z.isArray(o)&&o.length>0?gCe(t,o):Z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};pa.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";pa.ERR_BAD_OPTION="ERR_BAD_OPTION";pa.ECONNABORTED="ECONNABORTED";pa.ETIMEDOUT="ETIMEDOUT";pa.ECONNREFUSED="ECONNREFUSED";pa.ERR_NETWORK="ERR_NETWORK";pa.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";pa.ERR_DEPRECATED="ERR_DEPRECATED";pa.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";pa.ERR_BAD_REQUEST="ERR_BAD_REQUEST";pa.ERR_CANCELED="ERR_CANCELED";pa.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";pa.ERR_INVALID_URL="ERR_INVALID_URL";pa.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var we=pa;var d3=Ve(p3(),1),dQ=d3.default;var hQ={isBufferAvailable(){return typeof Buffer<"u"},from(n){return Buffer.from(n)}};var C_=100;function E_(n){return Z.isPlainObject(n)||Z.isArray(n)}function h3(n){return Z.endsWith(n,"[]")?n.slice(0,-2):n}function h_(n,t,o){return n?n.concat(t).map(function(e,a){return e=h3(e),!o&&a?"["+e+"]":e}).join(o?".":""):t}function Vue(n){return Z.isArray(n)&&!n.some(E_)}var Wue=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function Zue(n,t,o){if(!Z.isObject(n))throw new TypeError("target must be an object");t=t||new(dQ||FormData),o=Z.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,T){return!Z.isUndefined(T[_])});let i=o.metaTokens,e=o.visitor||f,a=o.dots,A=o.indexes,r=o.Blob||typeof Blob<"u"&&Blob,s=o.maxDepth===void 0?C_:o.maxDepth,g=r&&Z.isSpecCompliantForm(t),c=[];if(!Z.isFunction(e))throw new TypeError("visitor must be a function");function I(m){if(m===null)return"";if(Z.isDate(m))return m.toISOString();if(Z.isBoolean(m))return m.toString();if(!g&&Z.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");if(Z.isArrayBuffer(m)||Z.isTypedArray(m)){if(g&&typeof r=="function")return new r([m]);if(hQ&&hQ.isBufferAvailable())return hQ.from(m);throw new we("Blob is not supported. Use a Buffer instead.",we.ERR_NOT_SUPPORT)}return m}function d(m){if(m>s)throw new we("Object is too deeply nested ("+m+" levels). Max depth: "+s,we.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(m,_){if(s===1/0)return JSON.stringify(m);let T=[];return JSON.stringify(m,function(x,J){if(!Z.isObject(J))return J;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(J),d(_+T.length-1),J})}function f(m,_,T){let G=m;if(Z.isReactNative(t)&&Z.isReactNativeBlob(m))return t.append(h_(T,_,a),I(m)),!1;if(m&&!T&&typeof m=="object"){if(Z.endsWith(_,"{}"))_=i?_:_.slice(0,-2),m=B(m,1);else if(Z.isArray(m)&&Vue(m)||(Z.isFileList(m)||Z.endsWith(_,"[]"))&&(G=Z.toArray(m)))return _=h3(_),G.forEach(function(J,L){!(Z.isUndefined(J)||J===null)&&t.append(A===!0?h_([_],L,a):A===null?_:_+"[]",I(J))}),!1}return E_(m)?!0:(t.append(h_(T,_,a),I(m)),!1)}let Q=Object.assign(Wue,{defaultVisitor:f,convertValue:I,isVisitable:E_});function y(m,_,T=0){if(!Z.isUndefined(m)){if(d(T),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+_.join("."));c.push(m),Z.forEach(m,function(x,J){(!(Z.isUndefined(x)||x===null)&&e.call(t,x,Z.isString(J)?J.trim():J,_,Q))===!0&&y(x,_?_.concat(J):[J],T+1)}),c.pop()}}if(!Z.isObject(n))throw new TypeError("data must be an object");return y(n),t}var Yg=Zue;function E3(n){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function C3(n,t){this._pairs=[],n&&Yg(n,this,t)}var u3=C3.prototype;u3.append=function(t,o){this._pairs.push([t,o])};u3.toString=function(t){let o=t?i=>t.call(this,i,E3):E3;return this._pairs.map(function(e){return o(e[0])+"="+o(e[1])},"").join("&")};var B3=C3;function Xue(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function pI(n,t,o){if(!t)return n;n=n||"";let i=Z.isFunction(o)?{serialize:o}:o,e=Z.getSafeProp(i,"encode")||Xue,a=Z.getSafeProp(i,"serialize"),A;if(a?A=a(t,i):A=Z.isURLSearchParams(t)?t.toString():new B3(t,i).toString(e),A){let r=n.indexOf("#");r!==-1&&(n=n.slice(0,r)),n+=(n.indexOf("?")===-1?"?":"&")+A}return n}var u_=class{constructor(){this.handlers=[]}use(t,o,i){return this.handlers.push({fulfilled:t,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Z.forEach(this.handlers,function(i){i!==null&&t(i)})}},B_=u_;var jg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import eBe from"crypto";import $ue from"url";var f3=$ue.URLSearchParams;var f_="abcdefghijklmnopqrstuvwxyz",Q3="0123456789",y3={DIGIT:Q3,ALPHA:f_,ALPHA_DIGIT:f_+f_.toUpperCase()+Q3},ABe=(n=16,t=y3.ALPHA_DIGIT)=>{let o="",{length:i}=t,e=new Uint32Array(n);eBe.randomFillSync(e);for(let a=0;ay_,hasStandardBrowserEnv:()=>tBe,hasStandardBrowserWebWorkerEnv:()=>rBe,navigator:()=>Q_,origin:()=>aBe});var y_=typeof window<"u"&&typeof document<"u",Q_=typeof navigator=="object"&&navigator||void 0,tBe=y_&&(!Q_||["ReactNative","NativeScript","NS"].indexOf(Q_.product)<0),rBe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aBe=y_&&window.location.href||"http://localhost";var Bt={...m_,...m3};function S_(n,t){return Yg(n,new Bt.classes.URLSearchParams,{visitor:function(o,i,e,a){return Bt.isNode&&Z.isBuffer(o)?(this.append(i,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}var S3=C_;function D3(n){if(n>S3)throw new we("FormData field is too deeply nested ("+n+" levels). Max depth: "+S3,we.ERR_FORM_DATA_DEPTH_EXCEEDED)}function iBe(n){let t=[],o=/[^.[\]]+|\[([^.[\]]*)]/g,i;for(;(i=o.exec(n))!==null;)D3(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function oBe(n){let t={},o=Object.keys(n),i,e=o.length,a;for(i=0;i=o.length;return A=!A&&Z.isArray(e)?e.length:A,s?(Z.hasOwnProp(e,A)?e[A]=Z.isArray(e[A])?e[A].concat(i):[e[A],i]:e[A]=i,!r):((!Z.hasOwnProp(e,A)||!Z.isObject(e[A]))&&(e[A]=[]),t(o,i,e[A],a)&&Z.isArray(e[A])&&(e[A]=oBe(e[A])),!r)}if(Z.isFormData(n)&&Z.isFunction(n.entries)){let o={};return Z.forEachEntry(n,(i,e)=>{t(iBe(i),e,o,0)}),o}return null}var EQ=nBe;var up=(n,t)=>n!=null&&Z.hasOwnProp(n,t)?n[t]:void 0;function sBe(n,t,o){if(Z.isString(n))try{return(t||JSON.parse)(n),Z.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}var D_={transitional:jg,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){let i=o.getContentType()||"",e=i.indexOf("application/json")>-1,a=Z.isObject(t);if(a&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return e?JSON.stringify(EQ(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(a){let s=up(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return S_(t,s).toString();if((r=Z.isFileList(t))||i.indexOf("multipart/form-data")>-1){let g=up(this,"env"),c=g&&g.FormData;return Yg(r?{"files[]":t}:t,c&&new c,s)}}return a||e?(o.setContentType("application/json",!1),sBe(t)):t}],transformResponse:[function(t){let o=up(this,"transitional")||D_.transitional,i=o&&o.forcedJSONParsing,e=up(this,"responseType"),a=e==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(i&&!e||a)){let r=!(o&&o.silentJSONParsing)&&a;try{return JSON.parse(t,up(this,"parseReviver"))}catch(s){if(r)throw s.name==="SyntaxError"?we.from(s,we.ERR_BAD_RESPONSE,this,null,up(this,"response")):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bt.classes.FormData,Blob:Bt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch","query"],n=>{D_.headers[n]={}});var Bp=D_;function ME(n,t){let o=this||Bp,i=t||o,e=Ft.from(i.headers),a=i.data;return Z.forEach(n,function(r){a=r.call(o,a,e.normalize(),t?t.status:void 0)}),e.normalize(),a}function _E(n){return!!(n&&n.__CANCEL__)}var w_=class extends we{constructor(t,o,i){super(t??"canceled",we.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}},Yi=w_;function xn(n,t,o){let i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new we("Request failed with status code "+o.status,o.status>=400&&o.status<500?we.ERR_BAD_REQUEST:we.ERR_BAD_RESPONSE,o.config,o.request,o))}function O_(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function b_(n,t){if(!t)return n;let o=n.length;for(;o>0&&n.charCodeAt(o-1)===47;)o--;return n.slice(0,o)+"/"+t.replace(/^\/+/,"")}var gBe=/^https?:(?!\/\/)/i,cBe=/[\t\n\r]/g;function IBe(n){let t=0;for(;t`${o}${i}${mE}`)}function dBe(n){let t=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${mE}@`),o=t.indexOf("#"),e=(o===-1?t:t.slice(0,o)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${mE}`);return o===-1?e:`${e}#${pBe(t.slice(o+1))}`}function w3(n,t){if(typeof n=="string"){let o=lBe(n);if(gBe.test(o))throw new we(`Invalid URL ${JSON.stringify(dBe(o))}: missing "//" after protocol`,we.ERR_INVALID_URL,t)}}function dI(n,t,o,i){w3(t,i);let e=!O_(t);return n&&(e||o===!1)?(w3(n,i),b_(n,t)):t}var hBe={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function EBe(n){try{return new URL(n)}catch{return null}}function O3(n){var t=(typeof n=="string"?EBe(n):n)||{},o=t.protocol,i=t.host,e=t.port;if(typeof i!="string"||!i||typeof o!="string"||(o=o.split(":",1)[0],i=i.replace(/:\d*$/,""),e=parseInt(e)||hBe[o]||0,!CBe(i,e)))return"";var a=M_(o+"_proxy")||M_("all_proxy");return a&&a.indexOf("://")===-1&&(a=o+"://"+a),a}function CBe(n,t){var o=M_("no_proxy").toLowerCase();return o?o==="*"?!1:o.split(/[,\s]/).every(function(i){if(!i)return!0;var e=i.match(/^(.+):(\d+)$/),a=e?e[1]:i,A=e?parseInt(e[2]):0;return A&&A!==t?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!n.endsWith(a)):n!==a}):!0}function M_(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}var gT=Ve(L_(),1),Sj=Ve(V3(),1);import yj from"http";import mj from"https";import Jfe from"http2";import qfe from"util";import{resolve as lj}from"path";import yo from"zlib";var Ys="1.19.0";function LE(n){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}var Cfe=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function X_(n,t,o){let i=o&&o.Blob||Bt.classes.Blob,e=LE(n);if(t===void 0&&i&&(t=!0),e==="data"){n=e.length?n.slice(e.length+1):n;let a=Cfe.exec(n);if(!a)throw new we("Invalid URL",we.ERR_INVALID_URL);let A=a[1],r=a[2],s=a[3]?"base64":"utf8",g=a[4],c="";A?c=r?A+r:A:r&&(c="text/plain"+r);let I=s==="base64"?Buffer.from(g,"base64"):Buffer.from(decodeURIComponent(g),s);if(t){if(!i)throw new we("Blob is not supported",we.ERR_NOT_SUPPORT);return new i([I],{type:c})}return I}throw new we("Unsupported protocol "+e,we.ERR_NOT_SUPPORT)}import an from"stream";var ufe=["content-type","content-length"];function UE(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,e])=>{ufe.includes(i.toLowerCase())&&n.set(i,e)})}import Bfe from"stream";var $_=Symbol("internals"),eT=class extends Bfe.Transform{constructor(t){t=Z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,e)=>!Z.isUndefined(e[i])),super({readableHighWaterMark:t.chunkSize});let o=this[$_]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(o.isCaptured||(o.isCaptured=!0))})}_read(t){let o=this[$_];return o.onReadCallback&&o.onReadCallback(),super._read(t)}_transform(t,o,i){let e=this[$_],a=e.maxRate,A=this.readableHighWaterMark,r=e.timeWindow,s=1e3/r,g=a/s,c=e.minChunkSize!==!1?Math.max(e.minChunkSize,g*.01):0,I=(B,f)=>{let Q=Buffer.byteLength(B);e.bytesSeen+=Q,e.bytes+=Q,e.isCaptured&&this.emit("progress",e.bytesSeen),this.push(B)?process.nextTick(f):e.onReadCallback=()=>{e.onReadCallback=null,process.nextTick(f)}},d=(B,f)=>{let Q=Buffer.byteLength(B),y=null,m=A,_,T=0;if(a){let G=Date.now();(!e.ts||(T=G-e.ts)>=r)&&(e.ts=G,_=g-e.bytes,e.bytes=_<0?-_:0,T=0),_=g-e.bytes}if(a){if(_<=0)return setTimeout(()=>{f(null,B)},r-T);_m&&Q-m>c&&(y=B.subarray(m),B=B.subarray(0,m)),I(B,y?()=>{process.nextTick(f,null,y)}:f)};d(t,function B(f,Q){if(f)return i(f);Q?d(Q,B):i(null)})}},AT=eT;import{EventEmitter as zfe}from"events";import Qfe from"util";import{Readable as yfe}from"stream";var{asyncIterator:W3}=Symbol,ffe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[W3]?yield*n[W3]():yield n},yQ=ffe;var mfe=Bt.ALPHABET.ALPHA_DIGIT+"-_",HE=typeof TextEncoder=="function"?new TextEncoder:new Qfe.TextEncoder,BI=`\r -`,Sfe=HE.encode(BI),Dfe=2,tT=class{constructor(t,o){let{escapeName:i}=this.constructor,e=Z.isString(o),a=`Content-Disposition: form-data; name="${i(t)}"${!e&&o.name?`; filename="${i(o.name)}"`:""}${BI}`;if(e)o=HE.encode(String(o).replace(/\r?\n|\r\n?/g,BI));else{let A=String(o.type||"application/octet-stream").replace(/[\r\n]/g,"");a+=`Content-Type: ${A}${BI}`}this.headers=HE.encode(a+BI),this.contentLength=e?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+Dfe,this.name=t,this.value=o}async*encode(){yield this.headers;let{value:t}=this;Z.isTypedArray(t)?yield t:yield*yQ(t),yield Sfe}static escapeName(t){return String(t).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},wfe=(n,t,o)=>{let{tag:i="form-data-boundary",size:e=25,boundary:a=i+"-"+Bt.generateString(e,mfe)}=o||{};if(!Z.isFormData(n))throw new TypeError("FormData instance required");if(a.length<1||a.length>70)throw new Error("boundary must be 1-70 characters long");let A=HE.encode("--"+a+BI),r=HE.encode("--"+a+"--"+BI),s=r.byteLength,g=Array.from(n.entries()).map(([I,d])=>{let B=new tT(I,d);return s+=B.size,B});s+=A.byteLength*g.length,s=Z.toFiniteNumber(s);let c={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(s)&&(c["Content-Length"]=s),t&&t(c),yfe.from((async function*(){for(let I of g)yield A,yield*I.encode();yield r})())},Z3=wfe;import Ofe from"stream";var rT=class extends Ofe.Transform{__transform(t,o,i){this.push(t),i()}_transform(t,o,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,o)}this.__transform(t,o,i)}},X3=rT;import bfe from"http2";import Mfe from"util";var aT=class{constructor(){this.sessions=Object.create(null)}getSession(t,o){o=Object.assign({sessionTimeout:1e3},o);let i=this.sessions[t];if(i){let I=i.length;for(let d=0;d{if(a)return;a=!0,A&&(clearTimeout(A),A=null);let I=i,d=I.length,B=d;for(;B--;)if(I[B][0]===e){d===1?delete this.sessions[t]:I.splice(B,1),e.closed||e.close();return}},s=e.request,{sessionTimeout:g}=o;if(g!=null){let I=0;e.request=function(){let d=s.apply(this,arguments);return I++,A&&(clearTimeout(A),A=null),d.once("close",()=>{--I||(A=setTimeout(()=>{A=null,r()},g))}),d}}e.once("close",r);let c=[e,o];return i?i.push(c):i=this.sessions[t]=[c],e}},$3=aT;var _fe=(n,t)=>Z.isAsyncFn(n)?function(...o){let i=o.pop();n.apply(this,o).then(e=>{try{t?i(null,...t(e)):i(null,e)}catch(a){i(a)}},i)}:n,ej=_fe;var Tfe=new Set(["localhost","0.0.0.0"]),rj=n=>{let t=n.split(".");return t.length!==4||t[0]!=="127"?!1:t.every(o=>/^\d+$/.test(o)&&Number(o)>=0&&Number(o)<=255)},iT=n=>{if(/^0[xX][0-9a-fA-F]+$/.test(n)){let t=parseInt(n.slice(2),16);return Number.isFinite(t)?t:null}if(n.length>1&&/^0[0-7]+$/.test(n)){let t=parseInt(n,8);return Number.isFinite(t)?t:null}if(n.length>1&&/^0[0-9]+$/.test(n))return null;if(/^[0-9]+$/.test(n)){let t=parseInt(n,10);return Number.isFinite(t)?t:null}return null},Nfe=n=>{if(typeof n!="string"||!n||n.indexOf(":")!==-1)return n;let t=n;if(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),t=t.replace(/\.+$/,""),!/^[0-9.xXa-fA-F]+$/.test(t))return n;let o=t.split(".");if(o.some(c=>c===""))return n;if(o.length===4){let c=o.map(iT);return c.some(I=>I===null||I<0||I>255)?n:c.join(".")}if(o.length>4||o.length===1)return n;let i=o.slice(0,-1),e=o[o.length-1],a=4-i.length,A=iT(e);if(A===null)return n;let r=(1<<8*a)-1;if(A<0||A>r)return n;let s=new Array(a).fill(0);for(let c=a-1,I=A;c>=0;c--,I>>=8)s[c]=I&255;let g=i.map(iT);return g.some(c=>c===null||c<0||c>255)?n:[...g,...s].join(".")},oT=n=>/^0{1,4}$/.test(n),Rfe=n=>{if(n==="::")return!0;let t=n.indexOf("::");if(t!==-1){if(t!==n.lastIndexOf("::"))return!1;let i=n.slice(0,t),e=n.slice(t+2),a=i?i.split(":"):[],A=e?e.split(":"):[];return a.length+A.length<8&&a.every(oT)&&A.every(oT)}let o=n.split(":");return o.length===8&&o.every(oT)},kfe=n=>{if(n==="::1")return!0;let t=n.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return rj(t[1]);let o=n.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(o){let e=parseInt(o[1],16);return e>=32512&&e<=32767}let i=n.split(":");if(i.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(i[e]))return!1;return/^0*1$/.test(i[7])}return!1},Aj=n=>n?Tfe.has(n)||rj(n)||Rfe(n)?!0:kfe(n):!1,vfe={http:80,https:443,ws:80,wss:443,ftp:21},Pfe=n=>{let t=n,o=0;if(t.charAt(0)==="["){let a=t.indexOf("]");if(a!==-1){let A=t.slice(1,a),r=t.slice(a+1);return r.charAt(0)===":"&&/^\d+$/.test(r.slice(1))&&(o=Number.parseInt(r.slice(1),10)),[A,o]}}let i=t.indexOf(":"),e=t.lastIndexOf(":");return i!==-1&&i===e&&/^\d+$/.test(t.slice(e+1))&&(o=Number.parseInt(t.slice(e+1),10),t=t.slice(0,e)),[t,o]},Gfe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,Ffe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,Lfe=n=>{if(typeof n!="string"||n.indexOf(":")===-1)return n;let t=n.match(Gfe);if(t)return t[1];let o=n.match(Ffe);if(o){let i=parseInt(o[1],16),e=parseInt(o[2],16);return`${i>>8}.${i&255}.${e>>8}.${e&255}`}return n},tj=n=>{if(!n)return n;n.charAt(0)==="["&&n.charAt(n.length-1)==="]"&&(n=n.slice(1,-1));let t=n.replace(/\.+$/,""),o=Nfe(t);return o!==t?o:Lfe(t)};function nT(n){let t;try{t=new URL(n)}catch{return!1}let o=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!o)return!1;if(o==="*")return!0;let i=Number.parseInt(t.port,10)||vfe[t.protocol.split(":",1)[0]]||0,e=tj(t.hostname.toLowerCase());return o.split(/[\s,]+/).some(a=>{if(!a)return!1;if(a==="*")return!0;let[A,r]=Pfe(a);return A=tj(A),!A||r&&r!==i?!1:(A.charAt(0)==="*"&&(A=A.slice(1)),A.charAt(0)==="."?e.endsWith(A):e===A||Aj(e)&&Aj(A))})}function Ufe(n,t){n=n||10;let o=new Array(n),i=new Array(n),e=0,a=0,A;return t=t!==void 0?t:1e3,function(s){let g=Date.now(),c=i[a];A||(A=g),o[e]=s,i[e]=g;let I=a,d=0;for(;I!==e;)d+=o[I++],I=I%n;if(e=(e+1)%n,e===a&&(a=(a+1)%n),g-A{o=c,e=null,a&&(clearTimeout(a),a=null),n(...g)};return[(...g)=>{let c=Date.now(),I=c-o;I>=i?A(g,c):(e=g,a||(a=setTimeout(()=>{a=null,A(e)},i-I)))},()=>e&&A(e)]}var ij=Hfe;var js=(n,t,o=3)=>{let i=0,e=aj(50,250);return ij(a=>{if(!a||typeof a.loaded!="number")return;let A=a.loaded,r=a.lengthComputable?a.total:void 0,s=Math.max(0,r!=null?Math.min(A,r):A),g=Math.max(0,s-i),c=e(g);i=Math.max(i,s);let I={loaded:s,total:r,progress:r?s/r:void 0,bytes:g,rate:c||void 0,estimated:c&&r?(r-s)/c:void 0,event:a,lengthComputable:r!=null,[t?"download":"upload"]:!0};n(I)},o)},Sp=(n,t)=>{let o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},Dp=(n,t=Z.asap)=>(...o)=>t(()=>n(...o));var oj=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,sj=(n,t,o)=>t+2n<=57?n-48:(n&223)-55,Kfe=n=>n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47||n===45||n===95,xfe=n=>n===9||n===10||n===12||n===13||n===32,Yfe=n=>{let t=Math.floor(n/4),o=n%4;return t*3+(o===2?1:o===3?2:0)},gj=n=>{let t=n.length,o=0;return t>0&&n.charCodeAt(t-1)===61&&(o++,t>1&&n.charCodeAt(t-2)===61&&o++),Math.floor((t-o)*3/4)},jfe=n=>{let t=n.length,o=0,i=0,e=!1;for(let a=0;a0){e=!0;continue}o++}}return e||i>2||i>0&&(o+i)%4!==0||o%4===1?gj(n):Yfe(o)},cj=(n,t)=>{if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;let o=n.indexOf(",");if(o<0)return 0;let i=n.slice(5,o),e=n.slice(o+1);if(/;base64/i.test(i))return t(e);let A=0;for(let r=0,s=e.length;r=55296&&g<=56319&&r+1=56320&&c<=57343?(A+=4,r++):A+=3}else A+=3}return A};function sT(n){let t=typeof n=="string"?n.indexOf("#"):-1;return cj(t===-1?n:n.slice(0,t),jfe)}function Ij(n){return cj(n,gj)}var pj={flush:yo.constants.Z_SYNC_FLUSH,finishFlush:yo.constants.Z_SYNC_FLUSH},Vfe={flush:yo.constants.BROTLI_OPERATION_FLUSH,finishFlush:yo.constants.BROTLI_OPERATION_FLUSH},Wfe={flush:yo.constants.ZSTD_e_flush,finishFlush:yo.constants.ZSTD_e_flush},Dj=Z.isFunction(yo.createBrotliDecompress),wj=Z.isFunction(yo.createZstdDecompress),Oj="gzip, compress, deflate"+(Dj?", br":""),Zfe=Oj+(wj?", zstd":""),dj=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):Z.asap,{http:Xfe,https:$fe}=Sj.default,cT=/https:?/,hj=Symbol("axios.http.socketListener"),mQ=Symbol("axios.http.currentReq"),bj=Symbol("axios.http.installedTunnel"),eQe=new Map,Ej=new WeakMap,Cj={22:21,24:5};function AQe(n=process.versions&&process.versions.node){if(!n)return!1;let[t,o]=n.split(".").map(i=>Number(i));return!Number.isInteger(t)||!Number.isInteger(o)?!1:t>24?!0:Cj[t]!=null&&o>=Cj[t]}function tQe(n,t=process.versions&&process.versions.node){if(!AQe(t))return!1;let o=n&&n.options;return!!(o&&Z.hasOwnProp(o,"proxyEnv")&&o.proxyEnv!=null)}function rQe(n,t,o){return cT.test(n.protocol)?o||mj.globalAgent:t||yj.globalAgent}function aQe(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||"")+"#"+(n.auth||""),i=t?Ej.get(t)||Ej.set(t,new Map).get(t):eQe,e=i.get(o);if(e)return e;let a=t&&t.options?{...t.options,...n}:n;if(e=new gT.default(a),t&&t.options){let A={...t.options},r=e.callback;e.callback=function(g,c){return r.call(this,g,{...A,...c})}}return e[bj]=!0,i.set(o,e),e}var uj=Bt.protocols.map(n=>n+":"),Bj=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},fj=(n,[t,o])=>(n.on("end",o).on("error",o),t),iQe=new $3;function oQe(n,t,o){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.auth&&n.beforeRedirects.auth(n),n.beforeRedirects.sensitiveHeaders&&n.beforeRedirects.sensitiveHeaders(n,o),n.beforeRedirects.config&&n.beforeRedirects.config(n,t,o)}function nQe(n,t){n&&Object.keys(n).forEach(o=>{t.has(o.toLowerCase())&&delete n[o]})}function sQe(n,t){if(!t)return!1;try{return new URL(t.url).origin===new URL(n.href).origin}catch{return!1}}function Mj(n,t,o,i,e,a){let A=t,r=rQe(n,a,e);if(!A&&A!==!1&&!tQe(r)){let s=O3(o);s&&(nT(o)||(A=new URL(s)))}if(i&&n.headers)for(let s of Object.keys(n.headers))s.toLowerCase()==="proxy-authorization"&&delete n.headers[s];if(i&&n.agent&&n.agent[bj]&&(n.agent=void 0),A){let s=A instanceof URL,g=f=>s||Z.hasOwnProp(A,f)?A[f]:void 0,c=g("username"),I=g("password"),d=Z.hasOwnProp(A,"auth")?A.auth:void 0;if(c&&(d=(c||"")+":"+(I||"")),d){let f=typeof d=="object",Q=f&&Z.hasOwnProp(d,"username")?d.username:void 0,y=f&&Z.hasOwnProp(d,"password")?d.password:void 0;if(!!(Q||y))d=(Q||"")+":"+(y||"");else if(f)throw new we("Invalid proxy authorization",we.ERR_BAD_OPTION,{proxy:A})}if(cT.test(n.protocol)){if(!(e instanceof gT.default)){let f=g("hostname")||g("host"),Q=g("port"),y=g("protocol"),m=y?y.includes(":")?y:`${y}:`:"http:",_=f&&f.includes(":")&&!f.startsWith("[")?`[${f}]`:f,T=new URL(`${m}//${_}${Q?":"+Q:""}`),G={protocol:T.protocol,hostname:T.hostname.replace(/^\[|\]$/g,""),port:T.port,auth:d&&typeof d=="string"?d:void 0};T.protocol==="https:"&&(G.ALPNProtocols=["http/1.1"]);let x=aQe(G,e);n.agent=x,n.agents&&(n.agents.https=x)}}else{if(d){let m=Buffer.from(d,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+m}let f=!1;for(let m of Object.keys(n.headers))if(m.toLowerCase()==="host"){f=!0;break}f||(n.headers.host=n.hostname+(n.port?":"+n.port:""));let Q=g("hostname")||g("host");n.hostname=Q,n.host=Q,n.port=g("port"),n.path=o;let y=g("protocol");y&&(n.protocol=y.includes(":")?y:`${y}:`)}}n.beforeRedirects.proxy=function(g){Mj(g,t,g.href,!0,e,a)}}var gQe=typeof process<"u"&&Z.kindOf(process)==="process",cQe=n=>new Promise((t,o)=>{let i,e,a=(s,g)=>{e||(e=!0,i&&i(s,g))},A=s=>{a(s),t(s)},r=s=>{a(s,!0),o(s)};n(A,r,s=>i=s).catch(r)}),IQe=({address:n,family:t})=>{if(!Z.isString(n))throw TypeError("address must be a string");return{address:n,family:t||(n.indexOf(".")<0?6:4)}},Qj=(n,t)=>IQe(Z.isObject(n)?n:{address:n,family:t}),lQe={request(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||(n.protocol==="https:"?443:80)),{http2Options:i,headers:e}=n,a=iQe.getSession(o,i),{HTTP2_HEADER_SCHEME:A,HTTP2_HEADER_METHOD:r,HTTP2_HEADER_PATH:s,HTTP2_HEADER_STATUS:g}=Jfe.constants,c={[A]:n.protocol.replace(":",""),[r]:n.method,[s]:n.path};Z.forEach(e,(d,B)=>{B.charAt(0)!==":"&&(c[B]=d)});let I=a.request(c);return I.once("response",d=>{let B=I;d=Object.assign({},d);let f=d[g];delete d[g],B.headers=d,B.statusCode=+f,t(B)}),I}},_j=gQe&&function(t){return cQe(async function(i,e,a){let A=Be=>Z.getSafeProp(t,Be),r=A("transitional")||jg,s=A("data"),g=A("lookup"),c=A("family"),I=A("httpVersion");I===void 0&&(I=1);let d=A("http2Options"),B=A("httpAgent"),f=A("httpsAgent"),Q=A("proxy"),y=A("responseType"),m=A("responseEncoding"),_=A("socketPath"),T=A("method").toUpperCase(),G=A("maxRedirects"),x=A("maxBodyLength"),J=A("maxContentLength"),L=A("decompress"),q,j=!1,K,v;if(I=+I,Number.isNaN(I))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(I!==1&&I!==2)throw TypeError(`Unsupported protocol version '${I}'`);let W=I===2;if(g){let Be=ej(g,Re=>Z.isArray(Re)?Re:[Re]);g=(Re,Le,MA)=>{Be(Re,Le,(He,_A,at)=>{if(He)return MA(He);let DA=Z.isArray(_A)?_A.map(lt=>Qj(lt)):[Qj(_A,at)];Le.all?MA(He,DA):MA(He,DA[0].address,DA[0].family)})}}let Y=new zfe;function N(Be){try{Y.emit("abort",!Be||Be.type?new Yi(null,t,K):Be)}catch{}}function P(){v&&(clearTimeout(v),v=null)}function V(){let Be=A("timeout"),Re=Be?"timeout of "+Be+"ms exceeded":"timeout exceeded",Le=A("timeoutErrorMessage");return Le&&(Re=Le),new we(Re,r.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,t,K)}Y.once("abort",e);let te=()=>{P(),t.cancelToken&&t.cancelToken.unsubscribe(N),t.signal&&t.signal.removeEventListener("abort",N),Y.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(N),t.signal&&(t.signal.aborted?N():t.signal.addEventListener("abort",N))),a((Be,Re)=>{if(q=!0,P(),Re){j=!0,te();return}let{data:Le}=Be;if(Le instanceof an.Readable||Le instanceof an.Duplex){let MA=an.finished(Le,()=>{MA(),te()})}else te()});let ne=dI(A("baseURL"),A("url"),A("allowAbsoluteUrls"),t),Ne=_?"http://localhost":Bt.hasBrowserEnv?Bt.origin:void 0,ce=new URL(ne,Ne),Te=ce.protocol||uj[0];if(Te==="data:"){if(J>-1){let Re=String(A("url")||ne||"");if(Ij(Re)>J)return e(new we("maxContentLength size of "+J+" exceeded",we.ERR_BAD_RESPONSE,t))}let Be;if(T!=="GET")return xn(i,e,{status:405,statusText:"method not allowed",headers:{},config:t});try{Be=X_(A("url"),y==="blob",{Blob:t.env&&t.env.Blob})}catch(Re){throw we.from(Re,we.ERR_BAD_REQUEST,t)}return y==="text"?(Be=Be.toString(m),(!m||m==="utf8")&&(Be=Z.stripBOM(Be))):y==="stream"&&(Be=an.Readable.from(Be)),xn(i,e,{data:Be,status:200,statusText:"OK",headers:new Ft,config:t})}if(uj.indexOf(Te)===-1)return e(new we("Unsupported protocol "+Te,we.ERR_BAD_REQUEST,t));let fe=Ft.from(t.headers).normalize();fe.set("User-Agent","axios/"+Ys,!1);let{onUploadProgress:De,onDownloadProgress:Ke}=t,rA=t.maxRate,ve,iA;if(Z.isSpecCompliantForm(s)){let Be=fe.getContentType(/boundary=([-_\w\d]{10,70})/i);s=Z3(s,Re=>{fe.set(Re)},{tag:`axios-${Ys}-boundary`,boundary:Be&&Be[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)&&s.getHeaders!==Object.prototype.getHeaders){if(UE(fe,s.getHeaders(),A("formDataHeaderPolicy")),!fe.hasContentLength())try{let Be=await qfe.promisify(s.getLength).call(s);Number.isFinite(Be)&&Be>=0&&fe.setContentLength(Be)}catch{}}else if(Z.isBlob(s)||Z.isFile(s))s.size&&fe.setContentType(s.type||"application/octet-stream"),fe.setContentLength(s.size||0),s=an.Readable.from(yQ(s));else if(s&&!Z.isStream(s)){if(!Buffer.isBuffer(s))if(Z.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(Z.isString(s))s=Buffer.from(s,"utf-8");else return e(new we("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",we.ERR_BAD_REQUEST,t));if(fe.setContentLength(s.length,!1),x>-1&&s.length>x)return e(new we("Request body larger than maxBodyLength limit",we.ERR_BAD_REQUEST,t))}let Ce=Z.toFiniteNumber(fe.getContentLength());Z.isArray(rA)?(ve=rA[0],iA=rA[1]):ve=iA=rA,s&&(De||ve)&&(Z.isStream(s)||(s=an.Readable.from(s,{objectMode:!1})),s=an.pipeline([s,new AT({maxRate:Z.toFiniteNumber(ve)})],Z.noop),De&&s.on("progress",fj(s,Sp(Ce,js(Dp(De,dj),!1,3)))));let he,Ze=A("auth");if(Ze){let Be=Z.getSafeProp(Ze,"username")||"",Re=Z.getSafeProp(Ze,"password")||"";he=Be+":"+Re}if(!he&&(ce.username||ce.password)){let Be=Bj(ce.username),Re=Bj(ce.password);he=Be+":"+Re}he&&fe.delete("authorization");let je;try{je=pI(ce.pathname+ce.search,A("params"),A("paramsSerializer")).replace(/^\?/,"")}catch(Be){return e(we.from(Be,we.ERR_BAD_REQUEST,t,null,null,{url:A("url"),exists:!0}))}fe.set("Accept-Encoding",Z.hasOwnProp(r,"advertiseZstdAcceptEncoding")&&r.advertiseZstdAcceptEncoding===!0?Zfe:Oj,!1);let Oe=Object.assign(Object.create(null),{path:je,method:T,headers:lp(fe),agents:{http:B,https:f},auth:he,protocol:Te,family:c,beforeRedirect:oQe,beforeRedirects:Object.create(null),http2Options:d});if(!Z.isUndefined(g)&&(Oe.lookup=g),_){if(typeof _!="string")return e(new we("socketPath must be a string",we.ERR_BAD_OPTION_VALUE,t));let Be=A("allowedSocketPaths");if(Be!=null){let Re=Array.isArray(Be)?Be:[Be],Le=lj(_);if(!Re.some(He=>typeof He=="string"&&lj(He)===Le))return e(new we(`socketPath "${_}" is not permitted by allowedSocketPaths`,we.ERR_BAD_OPTION_VALUE,t))}Oe.socketPath=_}else Oe.hostname=ce.hostname.startsWith("[")?ce.hostname.slice(1,-1):ce.hostname,Oe.port=ce.port,Mj(Oe,Q,Te+"//"+ce.hostname+(ce.port?":"+ce.port:"")+Oe.path,!1,f,B);let hA,dA=!1,aA=!1,We=cT.test(Oe.protocol);if(Oe.agent==null&&(Oe.agent=We?f:B),W)hA=lQe;else{let Be=A("transport");if(Be)hA=Be;else if(G===0)hA=We?mj:yj,dA=!0;else{aA=!0,Oe.sensitiveHeaders=[],G&&(Oe.maxRedirects=G);let Re=A("beforeRedirect");if(Re&&(Oe.beforeRedirects.config=Re),he){let MA=ce.origin,He=he;Oe.beforeRedirects.auth=function(at){try{new URL(at.href).origin===MA&&(at.auth=He)}catch{}}}let Le=A("sensitiveHeaders");if(Le!=null){if(!Z.isArray(Le))return e(new we("sensitiveHeaders must be an array of strings",we.ERR_BAD_OPTION_VALUE,t));let MA=new Set;for(let He of Le){if(!Z.isString(He))return e(new we("sensitiveHeaders must be an array of strings",we.ERR_BAD_OPTION_VALUE,t));MA.add(He.toLowerCase())}MA.size&&(Oe.sensitiveHeaders=Array.from(MA),Oe.beforeRedirects.sensitiveHeaders=function(_A,at){sQe(_A,at)||nQe(_A.headers,MA)})}hA=We?$fe:Xfe}}x>-1?Oe.maxBodyLength=x:Oe.maxBodyLength=1/0,Oe.insecureHTTPParser=!!A("insecureHTTPParser"),K=hA.request(Oe,function(Re){if(P(),K.destroyed)return;let Le=[Re],MA=Z.toFiniteNumber(Re.headers["content-length"]);if(Ke||iA){let DA=new AT({maxRate:Z.toFiniteNumber(iA)});Ke&&DA.on("progress",fj(DA,Sp(MA,js(Dp(Ke,dj),!0,3)))),Le.push(DA)}let He=Re,_A=Re.req||K;if(L!==!1&&Re.headers["content-encoding"])switch((T==="HEAD"||Re.statusCode===204)&&delete Re.headers["content-encoding"],(Re.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Le.push(yo.createUnzip(pj)),delete Re.headers["content-encoding"];break;case"deflate":Le.push(new X3),Le.push(yo.createUnzip(pj)),delete Re.headers["content-encoding"];break;case"br":Dj&&(Le.push(yo.createBrotliDecompress(Vfe)),delete Re.headers["content-encoding"]);break;case"zstd":wj&&(Le.push(yo.createZstdDecompress(Wfe)),delete Re.headers["content-encoding"]);break}He=Le.length>1?an.pipeline(Le,Z.noop):Le[0];let at={status:Re.statusCode,statusText:Re.statusMessage,headers:new Ft(Re.headers),config:t,request:_A};if(y==="stream"){if(J>-1){let DA=J,lt=He;async function*cr(){let UA=0;for await(let le of lt){if(UA+=le.length,UA>DA)throw new we("maxContentLength size of "+DA+" exceeded",we.ERR_BAD_RESPONSE,t,_A);yield le}}He=an.Readable.from(cr(),{objectMode:!1})}at.data=He,xn(i,e,at)}else{let DA=[],lt=0;He.on("data",function(UA){DA.push(UA),lt+=UA.length,J>-1&<>J&&(j=!0,He.destroy(),N(new we("maxContentLength size of "+J+" exceeded",we.ERR_BAD_RESPONSE,t,_A)))}),He.on("aborted",function(){if(j)return;let UA=new we("stream has been aborted",we.ERR_BAD_RESPONSE,t,_A,at);He.destroy(UA),e(UA)}),He.on("error",function(UA){j||e(we.from(UA,null,t,_A,at))}),He.on("end",function(){try{let UA=DA.length===1?DA[0]:Buffer.concat(DA);y!=="arraybuffer"&&(UA=UA.toString(m),(!m||m==="utf8")&&(UA=Z.stripBOM(UA))),at.data=UA}catch(UA){return e(we.from(UA,null,t,at.request,at))}xn(i,e,at)})}Y.once("abort",DA=>{He.destroyed||(He.emit("error",DA),He.destroy())})}),Y.once("abort",Be=>{K.close?K.close():K.destroy(Be)}),K.on("error",function(Re){e(we.from(Re,null,t,K))});let bA=new Set;if(K.on("socket",function(Re){typeof Re.setKeepAlive=="function"&&Re.setKeepAlive(!0,1e3*60),Re[hj]||(Re.on("error",function(MA){let He=Re[mQ];He&&!He.destroyed&&He.destroy(MA)}),Re[hj]=!0),Re[mQ]=K,bA.add(Re)}),K.once("close",function(){P();for(let Re of bA)Re[mQ]===K&&(Re[mQ]=null);bA.clear()}),A("timeout")){let Be=parseInt(A("timeout"),10);if(Number.isNaN(Be)){N(new we("error trying to parse `config.timeout` to int",we.ERR_BAD_OPTION_VALUE,t,K));return}let Re=function(){q||N(V())};dA&&Be>0&&(v=setTimeout(Re,Be)),K.setTimeout(Be,Re)}else K.setTimeout(0);if(Z.isStream(s)){let Be=!1,Re=!1;s.on("end",()=>{Be=!0}),s.once("error",MA=>{Re=!0,K.destroy(MA)}),s.on("close",()=>{!Be&&!Re&&N(new Yi("Request stream has been aborted",t,K))});let Le=s;if(x>-1&&!aA){let MA=x,He=0;Le=an.pipeline([s,new an.Transform({transform(_A,at,DA){if(He+=_A.length,He>MA)return DA(new we("Request body larger than maxBodyLength limit",we.ERR_BAD_REQUEST,t,K));DA(null,_A)}})],Z.noop),Le.on("error",_A=>{K.destroyed||K.destroy(_A)})}Le.pipe(K)}else s&&K.write(s),K.end()})};var Tj=Bt.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,Bt.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(Bt.origin),Bt.navigator&&/(msie|trident)/i.test(Bt.navigator.userAgent)):()=>!0;var Nj=Bt.hasStandardBrowserEnv?{write(n,t,o,i,e,a,A){if(typeof document>"u")return;let r=[`${n}=${encodeURIComponent(t)}`];Z.isNumber(o)&&r.push(`expires=${new Date(o).toUTCString()}`),Z.isString(i)&&r.push(`path=${i}`),Z.isString(e)&&r.push(`domain=${e}`),a===!0&&r.push("secure"),Z.isString(A)&&r.push(`SameSite=${A}`),document.cookie=r.join("; ")},read(n){if(typeof document>"u")return null;let t=document.cookie.split(";");for(let o=0;on instanceof Ft?{...n}:n,pQe=n=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(n).concat(Object.getOwnPropertySymbols(n).filter(t=>Object.getOwnPropertyDescriptor(n,t).enumerable)):Object.keys(n);function on(n,t){n=n||{},t=t||{};let o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(c,I,d,B){return Z.isPlainObject(c)&&Z.isPlainObject(I)?Z.merge.call({caseless:B},c,I):Z.isPlainObject(I)?Z.merge({},I):Z.isArray(I)?I.slice():I}function e(c,I,d,B){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return i(void 0,c,d,B)}else return i(c,I,d,B)}function a(c,I){if(!Z.isUndefined(I))return i(void 0,I)}function A(c,I){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return i(void 0,c)}else return i(void 0,I)}function r(c){let I=Z.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Z.isUndefined(I))if(Z.isPlainObject(I)){if(Z.hasOwnProp(I,c))return I[c]}else return;let d=Z.hasOwnProp(n,"transitional")?n.transitional:void 0;if(Z.isPlainObject(d)&&Z.hasOwnProp(d,c))return d[c]}function s(c,I,d){if(Z.hasOwnProp(t,d))return i(c,I);if(Z.hasOwnProp(n,d))return i(void 0,c)}let g={url:a,method:a,data:a,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,allowedSocketPaths:A,responseEncoding:A,validateStatus:s,headers:(c,I,d)=>e(Rj(c),Rj(I),d,!0)};return Z.forEach(pQe({...n,...t}),function(I){if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=Z.hasOwnProp(g,I)?g[I]:e,B=Z.hasOwnProp(n,I)?n[I]:void 0,f=Z.hasOwnProp(t,I)?t[I]:void 0,Q=d(B,f,I);Z.isUndefined(Q)&&d!==s||(o[I]=Q)}),Z.hasOwnProp(t,"validateStatus")&&Z.isUndefined(t.validateStatus)&&r("validateStatusUndefinedResolves")===!1&&(Z.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}var dQe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function hQe(n){let t=on({},n),o=d=>Z.hasOwnProp(t,d)?t[d]:void 0,i=o("data"),e=o("withXSRFToken"),a=o("xsrfHeaderName"),A=o("xsrfCookieName"),r=o("headers"),s=o("auth"),g=o("baseURL"),c=o("allowAbsoluteUrls"),I=o("url");if(t.headers=r=Ft.from(r),t.url=pI(dI(g,I,c,t),o("params"),o("paramsSerializer")),s){let d=Z.getSafeProp(s,"username")||"",B=Z.getSafeProp(s,"password")||"";try{r.set("Authorization","Basic "+btoa(d+":"+(B?dQe(B):"")))}catch(f){throw we.from(f,we.ERR_BAD_OPTION_VALUE,n)}}if(Z.isFormData(i)&&(Bt.hasStandardBrowserEnv||Bt.hasStandardBrowserWebWorkerEnv||Z.isReactNative(i)?r.setContentType(void 0):Z.isFunction(i.getHeaders)&&UE(r,i.getHeaders(),o("formDataHeaderPolicy"))),Bt.hasStandardBrowserEnv&&(Z.isFunction(e)&&(e=e(t)),e===!0||e==null&&Tj(t.url))){let B=a&&A&&Nj.read(A);B&&r.set(a,B)}return t}var SQ=hQe;var EQe=typeof XMLHttpRequest<"u",kj=EQe&&function(n){return new Promise(function(o,i){let e=SQ(n),a=e.data,A=Ft.from(e.headers).normalize(),{responseType:r,onUploadProgress:s,onDownloadProgress:g}=e,c,I,d,B,f;function Q(){B&&B(),f&&f(),e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(e.method.toUpperCase(),e.url,!0),y.timeout=e.timeout;function m(){if(!y)return;let T=Ft.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!r||r==="text"||r==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:T,config:n,request:y};xn(function(L){o(L),Q()},function(L){i(L),Q()},x),y=null}"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(m)},y.onabort=function(){y&&(i(new we("Request aborted",we.ECONNABORTED,n,y)),Q(),y=null)},y.onerror=function(G){let x=G&&G.message?G.message:"Network Error",J=new we(x,we.ERR_NETWORK,n,y);J.event=G||null,i(J),Q(),y=null},y.ontimeout=function(){let G=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",x=e.transitional||jg;e.timeoutErrorMessage&&(G=e.timeoutErrorMessage),i(new we(G,x.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,n,y)),Q(),y=null},a===void 0&&A.setContentType(null),"setRequestHeader"in y&&Z.forEach(lp(A),function(G,x){y.setRequestHeader(x,G)}),Z.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),r&&r!=="json"&&(y.responseType=e.responseType),g&&([d,f]=js(g,!0),y.addEventListener("progress",d)),s&&y.upload&&([I,B]=js(s),y.upload.addEventListener("progress",I),y.upload.addEventListener("loadend",B)),(e.cancelToken||e.signal)&&(c=T=>{y&&(i(!T||T.type?new Yi(null,n,y):T),y.abort(),Q(),y=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let _=LE(e.url);if(_&&!Bt.protocols.includes(_)){i(new we("Unsupported protocol "+_+":",we.ERR_BAD_REQUEST,n)),Q();return}y.send(a||null)})};var CQe=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;let o=new AbortController,i=!1,e=function(s){if(!i){i=!0,A();let g=s instanceof Error?s:this.reason;o.abort(g instanceof we?g:new Yi(g instanceof Error?g.message:g))}},a=t&&setTimeout(()=>{a=null,e(new we(`timeout of ${t}ms exceeded`,we.ETIMEDOUT))},t),A=()=>{n&&(a&&clearTimeout(a),a=null,n.forEach(s=>{s.unsubscribe?s.unsubscribe(e):s.removeEventListener("abort",e)}),n=null)};n.forEach(s=>{if(!i){if(s.aborted){e.call(s);return}s.addEventListener("abort",e,{once:!0})}});let{signal:r}=o;return r.unsubscribe=()=>Z.asap(A),r},vj=CQe;var uQe=function*(n,t){let o=n.byteLength;if(!t||o{let e=BQe(n,t),a=0,A,r=s=>{A||(A=!0,i&&i(s))};return new ReadableStream({async pull(s){try{let{done:g,value:c}=await e.next();if(g){r(),s.close();return}let I=c.byteLength;if(o){let d=a+=I;o(d)}s.enqueue(new Uint8Array(c))}catch(g){throw r(g),g}},cancel(s){return r(s),e.return()}},{highWaterMark:2})};var Pj=64*1024,{isFunction:DQ}=Z,QQe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),Gj=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Fj=(n,...t)=>{try{return!!n(...t)}catch{return!1}},yQe=n=>{let t=n.indexOf("://"),o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},mQe=n=>{let t=Z.global!==void 0&&Z.global!==null?Z.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);let{fetch:e,Request:a,Response:A}=n,r=e?DQ(e):typeof fetch=="function",s=DQ(a),g=DQ(A);if(!r)return!1;let c=r&&DQ(o),I=r&&(typeof i=="function"?(m=>_=>m.encode(_))(new i):async m=>new Uint8Array(await new a(m).arrayBuffer())),d=s&&c&&Fj(()=>{let m=!1,_=new a(Bt.origin,{body:new o,method:"POST",get duplex(){return m=!0,"half"}}),T=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),m&&!T}),B=g&&c&&Fj(()=>Z.isReadableStream(new A("").body)),f={stream:B&&(m=>m.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!f[m]&&(f[m]=(_,T)=>{let G=_&&_[m];if(G)return G.call(_);throw new we(`Response type '${m}' is not supported`,we.ERR_NOT_SUPPORT,T)})});let Q=async m=>{if(m==null)return 0;if(Z.isBlob(m))return m.size;if(Z.isSpecCompliantForm(m))return(await new a(Bt.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(m)||Z.isArrayBuffer(m))return m.byteLength;if(Z.isURLSearchParams(m)&&(m=m+""),Z.isString(m))return(await I(m)).byteLength},y=async(m,_)=>{let T=Z.toFiniteNumber(m.getContentLength());return T??Q(_)};return async m=>{let{url:_,method:T,data:G,signal:x,cancelToken:J,timeout:L,onDownloadProgress:q,onUploadProgress:j,responseType:K,headers:v,withCredentials:W="same-origin",fetchOptions:Y,maxContentLength:N,maxBodyLength:P}=SQ(m),V=Z.isNumber(N)&&N>-1,te=Z.isNumber(P)&&P>-1,ne=ve=>Z.hasOwnProp(m,ve)?m[ve]:void 0,Ne=e||fetch;K=K?(K+"").toLowerCase():"text";let ce=vj([x,J&&J.toAbortSignal()],L),Te=null,fe=ce&&ce.unsubscribe&&(()=>{ce.unsubscribe()}),De,Ke=null,rA=()=>new we("Request body larger than maxBodyLength limit",we.ERR_BAD_REQUEST,m,Te);try{let ve,iA=ne("auth");if(iA){let We=Z.getSafeProp(iA,"username")||"",bA=Z.getSafeProp(iA,"password")||"";ve={username:We,password:bA}}if(yQe(_)){let We=new URL(_,Bt.origin);if(!ve&&(We.username||We.password)){let bA=Gj(We.username),Be=Gj(We.password);ve={username:bA,password:Be}}(We.username||We.password)&&(We.username="",We.password="",_=We.href)}if(ve&&(v.delete("authorization"),v.set("Authorization","Basic "+btoa(QQe((ve.username||"")+":"+(ve.password||""))))),V&&typeof _=="string"&&_.startsWith("data:")&&sT(_)>N)throw new we("maxContentLength size of "+N+" exceeded",we.ERR_BAD_RESPONSE,m,Te);if(te&&T!=="get"&&T!=="head"){let We=await Q(G);if(typeof We=="number"&&isFinite(We)&&(De=We,We>P))throw rA()}let Ce=te&&(Z.isReadableStream(G)||Z.isStream(G)),he=(We,bA,Be)=>IT(We,Pj,Re=>{if(te&&Re>P)throw Ke=rA();bA&&bA(Re)},Be);if(d&&T!=="get"&&T!=="head"&&(j||Ce)){if(De=De??await y(v,G),De!==0||Ce){let We=new a(_,{method:"POST",body:G,duplex:"half"}),bA;if(Z.isFormData(G)&&(bA=We.headers.get("content-type"))&&v.setContentType(bA),We.body){let[Be,Re]=j&&Sp(De,js(Dp(j)))||[];G=he(We.body,Be,Re)}}}else if(Ce&&!s&&c&&T!=="get"&&T!=="head")G=he(G);else if(Ce&&s&&!d&&T!=="get"&&T!=="head")throw new we("Stream request bodies are not supported by the current fetch implementation",we.ERR_NOT_SUPPORT,m,Te);Z.isString(W)||(W=W?"include":"omit");let Ze=s&&"credentials"in a.prototype;if(Z.isFormData(G)){let We=v.getContentType();We&&/^multipart\/form-data/i.test(We)&&!/boundary=/i.test(We)&&v.delete("content-type")}v.set("User-Agent","axios/"+Ys,!1);let je={...Y,signal:ce,method:T.toUpperCase(),headers:lp(v.normalize()),body:G,duplex:"half",credentials:Ze?W:void 0};Te=s&&new a(_,je);let Oe=await(s?Ne(Te,Y):Ne(_,je)),hA=Ft.from(Oe.headers);if(V){let We=Z.toFiniteNumber(hA.getContentLength());if(We!=null&&We>N)throw new we("maxContentLength size of "+N+" exceeded",we.ERR_BAD_RESPONSE,m,Te)}let dA=B&&(K==="stream"||K==="response");if(B&&Oe.body&&(q||V||dA&&fe)){let We={};["status","statusText","headers"].forEach(He=>{We[He]=Oe[He]});let bA=Z.toFiniteNumber(hA.getContentLength()),[Be,Re]=q&&Sp(bA,js(Dp(q),!0))||[],Le=0,MA=He=>{if(V&&(Le=He,Le>N))throw new we("maxContentLength size of "+N+" exceeded",we.ERR_BAD_RESPONSE,m,Te);Be&&Be(He)};Oe=new A(IT(Oe.body,Pj,MA,()=>{Re&&Re(),fe&&fe()}),We)}K=K||"text";let aA=await f[Z.findKey(f,K)||"text"](Oe,m);if(V&&!B&&!dA){let We;if(aA!=null&&(typeof aA.byteLength=="number"?We=aA.byteLength:typeof aA.size=="number"?We=aA.size:typeof aA=="string"&&(We=typeof i=="function"?new i().encode(aA).byteLength:aA.length)),typeof We=="number"&&We>N)throw new we("maxContentLength size of "+N+" exceeded",we.ERR_BAD_RESPONSE,m,Te)}return!dA&&fe&&fe(),await new Promise((We,bA)=>{xn(We,bA,{data:aA,headers:Ft.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:m,request:Te})})}catch(ve){if(fe&&fe(),ce&&ce.aborted&&ce.reason instanceof we){let iA=ce.reason;throw iA.config=m,Te&&(iA.request=Te),ve!==iA&&Object.defineProperty(iA,"cause",{__proto__:null,value:ve,writable:!0,enumerable:!1,configurable:!0}),iA}if(Ke)throw Te&&!Ke.request&&(Ke.request=Te),Ke;if(ve instanceof we)throw Te&&!ve.request&&(ve.request=Te),ve;if(ve&&ve.name==="TypeError"&&/Load failed|fetch/i.test(ve.message)){let iA=new we("Network Error",we.ERR_NETWORK,m,Te,ve&&ve.response);throw Object.defineProperty(iA,"cause",{__proto__:null,value:ve.cause||ve,writable:!0,enumerable:!1,configurable:!0}),iA}throw we.from(ve,ve&&ve.code,m,Te,ve&&ve.response)}}},SQe=new Map,lT=n=>{let t=n&&n.env||{},{fetch:o,Request:i,Response:e}=t,a=[i,e,o],A=a.length,r=A,s,g,c=SQe;for(;r--;)s=a[r],g=c.get(s),g===void 0&&c.set(s,g=r?new Map:mQe(t)),c=g;return g},RtA=lT();var pT={http:_j,xhr:kj,fetch:{get:lT}};Z.forEach(pT,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});var Lj=n=>`- ${n}`,wQe=n=>Z.isFunction(n)||n===null||n===!1;function OQe(n,t){n=Z.isArray(n)?n:[n];let{length:o}=n,i,e,a={};for(let A=0;A`adapter ${s} `+(g===!1?"is not supported by the environment":"is not available in the build")),r=o?A.length>1?`since : -`+A.map(Lj).join(` -`):" "+Lj(A[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+r,we.ERR_NOT_SUPPORT)}return e}var wQ={getAdapter:OQe,adapters:pT};function dT(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Yi(null,n)}function KE(n){return dT(n),n.headers=Ft.from(n.headers),n.data=ME.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),wQ.getAdapter(n.adapter||Bp.adapter,n)(n).then(function(i){dT(n),n.response=i;try{i.data=ME.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=Ft.from(i.headers),i},function(i){if(!_E(i)&&(dT(n),i&&i.response)){n.response=i.response;try{i.response.data=ME.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=Ft.from(i.response.headers)}return Promise.reject(i)})}var OQ={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{OQ[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});var Uj={};OQ.transitional=function(t,o,i){function e(a,A){return"[Axios v"+Ys+"] Transitional option '"+a+"'"+A+(i?". "+i:"")}return(a,A,r)=>{if(t===!1)throw new we(e(A," has been removed"+(o?" in "+o:"")),we.ERR_DEPRECATED);return o&&!Uj[A]&&(Uj[A]=!0,console.warn(e(A," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(a,A,r):!0}};OQ.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function bQe(n,t,o){if(typeof n!="object"||n===null)throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);let i=Object.keys(n),e=i.length;for(;e-- >0;){let a=i[e],A=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(A){let r=n[a],s=r===void 0||A(r,a,n);if(s!==!0)throw new we("option "+a+" must be "+s,we.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new we("Unknown option "+a,we.ERR_BAD_OPTION)}}var xE={assertOptions:bQe,validators:OQ};var Ka=xE.validators,wp=class{constructor(t){this.defaults=t||{},this.interceptors={request:new B_,response:new B_}}async request(t,o){try{return await this._request(t,o)}catch(i){if(i instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;let a=(()=>{if(!e.stack)return"";let A=e.stack.indexOf(` +`),questions:o}}function wEe(n,t){return new Promise((o,i)=>{if(n.controller.signal.aborted)return i(n.controller.signal.reason??pp());let e=()=>{n.approvals.delete(t),i(n.controller.signal.reason??pp())};n.controller.signal.addEventListener("abort",e,{once:!0}),n.approvals.set(t,{resolve(a){n.controller.signal.removeEventListener("abort",e),n.approvals.delete(t),o(a)}})})}var cQ=class{#e;#A;#t;#r;#a;#i=new Map;#c=new Set;#s=new Set;#I=!1;#n={running:0,completed:0,failed:0,lastJobId:null,lastJobAt:null};constructor({config:t,transport:o,createHarness:i,logger:e=console,sleepImpl:a=fEe}){if(!t||!o||typeof i!="function")throw new TypeError("OfficeJobExecutor requires config, transport, and createHarness");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#a=a}get status(){return structuredClone(this.#n)}offer(t){return this.#I||!CY.test(t)||this.#i.has(t)||this.#c.has(t)||this.#s.has(t)?!1:(this.#c.add(t),this.#o(),!0)}handleEvent(t){let o=Ka(t?.data?.jobId,80);if(!CY.test(o))return!1;if(t.type==="job.available")return this.offer(o);if(t.type==="job.cancel")return this.cancel(o);if(t.type==="approval.reply"){let i=this.#i.get(o),e=Ka(t.data?.approvalId,180),a=i?.approvals.get(e);return a?(a.resolve({decision:t.data?.decision==="approved"?"approved":"rejected",answer:Ka(t.data?.answer)}),!0):!1}return!1}cancel(t){this.#c.delete(t);let o=this.#i.get(t);return o?(o.cancelled=!0,o.controller.abort(pp()),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{}),!0):!1}async close(){this.#I=!0,this.#c.clear();for(let t of this.#i.values())t.controller.abort(pp());await Promise.allSettled([...this.#i.values()].map(t=>t.task))}#o(){for(;!this.#I&&this.#i.size0;){let t=this.#c.values().next().value;this.#c.delete(t);let o={controller:new AbortController,approvals:new Map,harness:null,sessionId:null,leaseToken:null,cancelled:!1,lastProgressAt:0,lastProgress:"",task:null};o.task=this.#g(t,o).finally(()=>{this.#i.delete(t),this.#n.running=this.#i.size,this.#o()}),this.#i.set(t,o),this.#n.running=this.#i.size,o.task.catch(i=>this.#r.warn?.("[dsh-im:office] Job task ended:",i.message))}}async#g(t,o){let i=o.controller.signal,e=null;try{let A=(await this.#A.getJob(t,{signal:i}))?.job;if(!A||A.id!==t)throw new Error("Office returned an invalid Job payload");let r=await this.#A.acceptJob(t,{signal:i});if(!Ka(r?.leaseToken,200))throw new Error("Office returned an invalid Job lease");o.leaseToken=r.leaseToken,e=this.#l(t,o);let s=this.#e.workspaces[A.workspaceAlias],g=this.#e.instructionPresets[A.instructionPreset];if(!s||!g){let I=new Error(D("Office Job \u5F15\u7528\u4E86\u672C\u673A\u672A\u914D\u7F6E\u7684 Workspace/Preset alias\u3002"));throw I.code="office-job-alias-invalid",I}o.harness=this.#t({workspace:s}),await this.#d(t,o,{kind:"status",message:D("\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}",{alias:A.workspaceAlias})},!0),o.sessionId=await o.harness.createSession({signal:i,workspace:s}),await this.#d(t,o,{kind:"status",message:D("Harness Session \u5DF2\u521B\u5EFA\u3002"),sessionId:o.sessionId},!0);let c=await o.harness.ask(o.sessionId,SEe(A,g),{timeoutMs:30*6e4,signal:i,onUpdate:I=>this.#p(t,o,I),onInteraction:I=>this.#h(t,o,I),onInteractionResolved:I=>{let d=Ka(I?.interactionId,180);o.approvals.get(d)?.resolve({decision:"rejected",answer:""})}});if(i.aborted)throw i.reason??pp();await this.#A.completeJob(t,o.leaseToken,{resultMarkdown:c,sessionId:o.sessionId},{signal:i}),this.#n.completed+=1,this.#E(t)}catch(a){if(!o.cancelled&&o.leaseToken&&(await this.#A.failJob(t,o.leaseToken,{error:mEe(a),...o.sessionId?{sessionId:o.sessionId}:{}}).catch(()=>{}),this.#n.failed+=1),a?.code==="office-job-conflict"||a?.code==="office-hook-unavailable"){this.#E(t);return}!o.cancelled&&!i.aborted&&this.#r.warn?.(`[dsh-im:office] Job ${t} failed:`,a.message)}finally{o.controller.abort(pp()),await e?.catch(()=>{}),this.#n.lastJobId=t,this.#n.lastJobAt=new Date().toISOString()}}async#l(t,o){for(;!o.controller.signal.aborted;){try{await this.#a(QEe,void 0,{signal:o.controller.signal})}catch{return}try{await this.#A.renewJob(t,o.leaseToken,{signal:o.controller.signal})}catch(i){if(o.controller.signal.aborted)return;o.cancelled=!0,o.controller.abort(i),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{});return}try{let e=(await this.#A.getJob(t,{signal:o.controller.signal}))?.job?.approval;e&&(e.status==="approved"||e.status==="rejected")&&o.approvals.get(e.id)?.resolve({decision:e.status,answer:Ka(e.answer)})}catch(i){if(o.controller.signal.aborted)return;this.#r.warn?.(`[dsh-im:office] Job ${t} approval poll failed; will retry after the next renewal:`,i.message)}}}async#p(t,o,i){let e=i?.type==="tool"?D("\u6B63\u5728\u4F7F\u7528 {tool}\u2026",{tool:Ka(i.name,160)||D("Harness \u5DE5\u5177")}):Ka(i?.text,4e3);if(!e)return;let a=`${i.type}:${e}`;if(a===o.lastProgress)return;let A=Date.now();i.type==="text"&&A-o.lastProgressAt<1e3||(o.lastProgress=a,o.lastProgressAt=A,await this.#d(t,o,{kind:i.type==="tool"?"tool":i.type==="text"?"text":"status",message:e,...o.sessionId?{sessionId:o.sessionId}:{}}))}#d(t,o,i,e=!1){let a=this.#A.progressJob(t,o.leaseToken,i,{signal:o.controller.signal});return e?a:a.catch(A=>{this.#r.debug?.("[dsh-im:office] ignored a progress delivery failure:",A.message)})}async#h(t,o,i){let e=DEe(i);if(!e){i?.kind==="approval"&&typeof i.respond=="function"&&await i.respond({ok:!0,value:{sessionId:i.sessionId,approvalId:i.payload?.approvalId,outcome:"rejected"}});return}let a=wEe(o,e.id);try{await this.#A.requestApproval(t,o.leaseToken,e,{signal:o.controller.signal});let A=await a;if(e.kind==="approval"){await i.respond({ok:!0,value:{sessionId:i.sessionId,approvalId:i.payload.approvalId,outcome:A.decision==="approved"?"allowed-once":"rejected"}});return}if(A.decision!=="approved"){await i.respond({ok:!1,error:{code:"cancelled",message:"The AI Office user rejected this question.",details:{}}});return}let r=Ka(A.answer).split(/\r?\n/);await i.respond({ok:!0,value:{sessionId:i.sessionId,answer:{answers:e.questions.map((s,g)=>ni(s,r[g]||r[0]||""))}}})}catch(A){throw o.approvals.delete(e.id),A}}#E(t){this.#s.add(t),!(this.#s.size<=yEe)&&this.#s.delete(this.#s.values().next().value)}};var uY=Object.freeze([1e3,3e3,1e4,3e4]);function bEe(n){let t=typeof n?.code=="string"?n.code:"office-connection-failed",o={"invalid-device-token":D("AI Office \u62D2\u7EDD\u4E86 Device Token\u3002"),"office-hook-unavailable":D("AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002"),"office-protocol-mismatch":D("AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002"),"office-transport-failed":D("\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002")};return{code:t,message:o[t]??D("AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002")}}var dp=class{#e;#A;#t;#r;#a;#i=null;#c=null;#s;#I;constructor({config:t,token:o,logger:i=console,transport:e,createHarness:a,jobExecutor:A,sleepImpl:r=OEe}){this.#e=t,this.#A=o,this.#t=i,this.#a=r,this.#r=e??new gQ({baseUrl:t.baseUrl,deviceId:t.deviceId,token:o}),this.#s={state:"idle",connected:!1,startedAt:null,lastHeartbeatAt:null,lastEventAt:null,lastEventId:null,lastEventType:null,reconnects:0,jobsOffered:0,error:null},this.#I=A??(a?new cQ({config:t,transport:this.#r,createHarness:a,logger:i}):null)}get status(){return structuredClone({...this.#s,...this.#I?{jobs:this.#I.status}:{}})}capabilities(){return{protocolVersion:gp,deviceId:this.#e.deviceId,workspaces:Object.keys(this.#e.workspaces),instructionPresets:Object.keys(this.#e.instructionPresets),maxConcurrency:this.#e.maxConcurrency}}async testConnection(t){return await this.#r.heartbeat({...this.capabilities(),probe:!0},{signal:t}),{ok:!0}}start(){return this.#c?this.status:(this.#i=new AbortController,this.#s.startedAt=new Date().toISOString(),this.#s.state="connecting",this.#c=this.#n(this.#i.signal).finally(()=>{this.#c=null}),this.#c.catch(t=>{this.#i?.signal.aborted||this.#t.error?.("[dsh-im:office] connector stopped:",t)}),this.status)}async#n(t){let o=0;for(;!t.aborted;){let i=new AbortController,e=AbortSignal.any([t,i.signal]);try{let a=await this.#r.heartbeat(this.capabilities(),{signal:e});this.#g(a?.jobs),this.#s.lastHeartbeatAt=new Date().toISOString();let A=!1,r=this.#o(e,()=>{A&&!e.aborted&&(o=0)}),s=this.#r.stream({signal:e,lastEventId:this.#s.lastEventId,onOpen:()=>{this.#s.connected=!0,this.#s.state="connected",this.#s.error=null,A=!0},onEvent:async g=>{this.#s.lastEventAt=new Date().toISOString(),this.#s.lastEventId=g.id??this.#s.lastEventId,this.#s.lastEventType=g.type,g.type==="job.available"&&(this.#s.jobsOffered+=1),this.#I?.handleEvent(g)}});await Promise.race([s,r])}catch(a){if(t.aborted)break;i.abort(),this.#s.connected=!1,this.#s.state="reconnecting",this.#s.error=bEe(a),this.#s.reconnects+=1;let A=uY[Math.min(o,uY.length-1)];o+=1;try{await this.#a(A,void 0,{signal:t})}catch{break}}finally{i.abort()}}this.#s.connected=!1,this.#s.state="idle"}async#o(t,o){for(;!t.aborted;){await this.#a(this.#e.heartbeatSeconds*1e3,void 0,{signal:t});let i=await this.#r.heartbeat(this.capabilities(),{signal:t});this.#g(i?.jobs),this.#s.lastHeartbeatAt=new Date().toISOString(),o?.()}}#g(t){if(Array.isArray(t))for(let o of t)typeof o?.id=="string"&&this.#I?.offer(o.id)&&(this.#s.jobsOffered+=1)}async stop(){let t=this.#c;return this.#i?.abort(),this.#i=null,t&&await t.catch(()=>{}),await this.#I?.close(),this.#s.connected=!1,this.#s.state="idle",this.status}};function $M(n){return typeof n=="string"&&n.trim()?n.trim():null}function _Ee(n,t){return`DSH_OFFICE_DEVICE_TOKEN_${MEe("sha256").update(`${n} +${t}`).digest("hex").slice(0,24).toUpperCase()}`}var IQ=class{#e;#A;#t;#r;#a=null;#i=Promise.resolve();constructor({credentials:t,configStore:o,logger:i=console,createRuntime:e}){if(!t?.resolve||!t?.set||!t?.unset)throw new TypeError("AI Office requires the Harness credential provider");if(!o?.get||!o?.save||!o?.clear)throw new TypeError("AI Office requires a config store");this.#e=t,this.#A=o,this.#t=i,this.#r=e??(a=>new dp(a))}async initialize(){let t=this.#A.get();if(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});o?.value&&await this.#s(t,o.value)}return this.status()}async configure(t={}){return this.#n(async()=>{let o=this.#A.get(),i=$M(t.baseUrl),e=$M(t.deviceId);if(!i||!e)throw new TypeError("Office URL and Device ID are required");let a=yE(i).origin,A=_Ee(a,e),r=$M(t.deviceToken),s=await this.#e.resolve(A).catch(()=>{}),g=r??s?.value;if(!g||g.length<32)throw new TypeError("Device Token must contain at least 32 characters");let c=new Date().toISOString(),I=nQ({version:1,baseUrl:a,deviceId:e,deviceTokenRef:A,maxConcurrency:t.maxConcurrency,heartbeatSeconds:t.heartbeatSeconds,workspaces:t.workspaces,instructionPresets:t.instructionPresets,createdAt:o?.createdAt??c,updatedAt:c});if(!I)throw new TypeError("AI Office connector configuration is invalid");await this.#e.set(A,g);try{await this.#A.save(I)}catch(d){throw s?.value?await this.#e.set(A,s.value).catch(()=>{}):await this.#e.unset(A).catch(()=>{}),d}return o?.deviceTokenRef&&o.deviceTokenRef!==A&&await this.#e.unset(o.deviceTokenRef).catch(()=>{}),await this.#s(I,g),this.status()})}async reconnect(){return this.#n(async()=>{let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");return await this.#s(t),this.status()})}async test(){let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");let o=await this.#c(t),i=this.#r({config:t,token:o,logger:this.#t});try{await i.testConnection(AbortSignal.timeout(1e4))}finally{await i.stop().catch(()=>{})}return{tested:!0,snapshot:await this.status()}}async remove(){return this.#n(async()=>{let t=this.#A.get();return await this.#I(),t?.deviceTokenRef&&await this.#e.unset(t.deviceTokenRef).catch(()=>{}),await this.#A.clear(),this.status()})}async status(){let t=this.#A.get();if(!t)return{schemaVersion:1,configured:!1,connected:!1,state:"unconfigured"};let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{}),i=this.#a?.status??null;return{schemaVersion:1,configured:!0,connected:i?.connected===!0,state:i?.state??(o?.value?"idle":"missing-token"),config:{protocolVersion:t.protocolVersion,baseUrl:t.baseUrl,deviceId:t.deviceId,maxConcurrency:t.maxConcurrency,heartbeatSeconds:t.heartbeatSeconds,workspaces:t.workspaces,instructionPresets:t.instructionPresets,hooks:oQ(t.baseUrl)},health:i,tokenConfigured:!!o?.value}}async close(){await this.#i.catch(()=>{}),await this.#I()}async#c(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});if(!o?.value)throw new Error("AI Office Device Token is missing");return o.value}async#s(t,o){await this.#I();let i=o??await this.#c(t),e=this.#r({config:t,token:i,logger:this.#t});this.#a=e,e.start()}async#I(){let t=this.#a;this.#a=null,t&&await t.stop()}#n(t){let o=this.#i.then(t,t);return this.#i=o.then(()=>{},()=>{}),o}};function NEe(n={}){let t=A_(n.dshHome??process.env.DSH_HOME??e_(TEe(),".dsh")),o=A_(n.dataDir??e_(t,"integrations","dsh-office"));return{root:o,config:A_(n.configPath??e_(o,"config.json"))}}async function BY(n,t={},o={}){let i=$r(n,t),e=o.ConfigStore??sQ,a=o.Controller??IQ,A=o.Runtime??dp,r=o.HarnessClient??pr,s=NEe(t),g=await new e(s.config).load(),c=typeof n.logger=="function"?n.logger("dsh-im:office"):n.logger??console,I=o.createHarness??(({workspace:B})=>new r({...i,workspace:B,autostart:!1,dshBin:t.dshBin??"dsh",rpcIdPrefix:"office",logPrefix:"dsh-im:office"})),d=new a({credentials:n.credentials,configStore:g,logger:c,createRuntime:B=>new A({...B,createHarness:I,...o.transport?{transport:o.transport}:{}})});return await d.initialize(),{controller:d,close:()=>d.close(),paths:s}}function t_(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function mE(n,t){return t_(n)&&Object.keys(n).every(o=>t.includes(o))}function REe(n){return mE(n,["baseUrl","deviceId","deviceToken","maxConcurrency","heartbeatSeconds","workspaces","instructionPresets"])&&typeof n.baseUrl=="string"&&typeof n.deviceId=="string"&&(n.deviceToken===void 0||typeof n.deviceToken=="string")&&t_(n.workspaces)&&t_(n.instructionPresets)}function kEe(n){for(let t of["status","configure","reconnect","test","remove"])if(typeof n?.[t]!="function")throw new TypeError(`AI Office controller requires ${t}()`);return async(t,o,i)=>{if(i?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};try{let e;if(t===cp.status&&mE(o,[]))e=await n.status();else if(t===cp.configure&&REe(o))e=await n.configure(o);else if(t===cp.reconnect&&mE(o,[]))e=await n.reconnect();else if(t===cp.test&&mE(o,[]))e=await n.test();else if(t===cp.remove&&mE(o,["confirm"])&&o.confirm===!0)e=await n.remove();else return{ok:!1,error:{code:"bad-request",message:"Invalid AI Office connector request."}};return{ok:!0,value:e}}catch(e){let a=e?.code==="invalid-device-token"?"invalid-device-token":e?.code==="office-hook-unavailable"?"office-hook-unavailable":"office-operation-failed",A=a==="invalid-device-token"?"AI Office Device Token \u65E0\u6548\u3002":a==="office-hook-unavailable"?"AI Office Hook \u5C1A\u672A\u4E0A\u7EBF\u6216\u5730\u5740\u4E0D\u6B63\u786E\u3002":e instanceof TypeError?e.message:"AI Office \u8FDE\u63A5\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002";return{ok:!1,error:{code:a,message:A}}}}}function r_(n,t,o){return n.connection.rpc.handle(hY,kEe(t),{authority:mr(o)})}async function fY(n,t={}){if(t.controller)return r_(n,t.controller,t.rpcAuthority);let o=await BY(n,t,t.internals??{}),i=r_(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close AI Office connector"),i}var vEe=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]);function PEe(n){let t=n?.client_id??n?.appId,o=n?.client_secret??n?.appSecret;if(typeof t!="string"||t.length===0||typeof o!="string"||o.length===0)throw new TypeError("Feishu registration returned invalid credentials");return{appId:t,appSecret:o,userInfo:n?.user_info??n?.userInfo}}async function GEe(n){return typeof n.status!="function"?{}:await n.status()}function FEe(n){return n?.connected===!0?!0:n?.ready===!0&&n?.feishuLongConnectionState==="connected"&&n?.harnessReachable===!0}var lQ=class{#e;#A;#t;#r;#a=!1;#i=null;constructor({createProvisioningManager:t,credentialStore:o,connectionManager:i,registrationOptions:e={}}={}){if(typeof t!="function")throw new TypeError("createProvisioningManager is required");if(!o||typeof o.save!="function"||typeof o.clear!="function")throw new TypeError("credentialStore.save/clear are required");if(!i||typeof i.connect!="function"||typeof i.disconnect!="function")throw new TypeError("connectionManager.connect/disconnect are required");if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("registrationOptions must be an object");if(this.#e=o,this.#A=i,this.#t=structuredClone(e),this.#r=t({onCredentials:a=>this.#c(a)}),!this.#r||typeof this.#r.start!="function"||typeof this.#r.status!="function"||typeof this.#r.cancel!="function")throw new TypeError("The provisioning manager must implement start/status/cancel")}async startRegistration(){return this.#i=null,await this.#r.start(structuredClone(this.#t)),this.status()}async cancelRegistration(){return await this.#r.cancel(),this.status()}async disconnect(){await this.#r.cancel(),await this.#A.disconnect();try{await this.#e.clear(),this.#a=!1,this.#i=null}catch{this.#i={code:"credential_removal_failed",message:"Unable to remove the Feishu credentials."}}return this.status()}async status(){let t=await this.#r.status(),o=await GEe(this.#A),i=FEe(o),e=this.#a;if(typeof this.#e.configured=="function")try{e=await this.#e.configured()}catch{e=this.#a}let a="unconfigured";return i?a="connected":vEe.has(t?.state)?a="registering":t?.state==="saving"?a="connecting":this.#i||t?.state==="error"?a="error":e&&(a="disconnected"),{phase:a,connected:i,configured:e,registration:t,connection:o,error:this.#i??t?.error??null}}async close(){await this.#r.cancel(),await this.#A.disconnect()}async#c(t){let o=PEe(t);try{await this.#e.save(o),this.#a=!0,await this.#A.connect(o),this.#i=null}catch{throw this.#i={code:"connection_failed",message:"The bot was created, but its connection could not be started."},new Error("Unable to activate the Feishu connection.")}}};function a_(n){return new lQ(n)}import{homedir as gNe}from"node:os";import{join as nd,resolve as Ic}from"node:path";import{unlink as cNe}from"node:fs/promises";var ev={};_r(ev,{AESCipher:()=>vC,AccessTokenError:()=>Ad,Aily:()=>_k,AppType:()=>es,CAppTicket:()=>kC,CTenantAccessToken:()=>MC,CardActionHandler:()=>wk,Client:()=>zy,ClientAssertionError:()=>Ya,DefaultCache:()=>jy,Domain:()=>As,EventDispatcher:()=>Wy,LarkChannel:()=>tm,LarkChannelError:()=>kt,LoggerLevel:()=>Vi,LoggerProxy:()=>sc,WSClient:()=>Xy,adaptDefault:()=>bMe,adaptExpress:()=>MMe,adaptKoa:()=>_Me,adaptKoaRouter:()=>TMe,createLarkChannel:()=>hTe,defaultHttpInstance:()=>td,defaultLogger:()=>ng,generateChallenge:()=>GC,internalCache:()=>PC,messageCard:()=>RMe,normalize:()=>nV,normalizeBotAdded:()=>iV,normalizeCardAction:()=>aV,normalizeComment:()=>oV,normalizeReaction:()=>xk,registerApp:()=>YMe,withAll:()=>yMe,withHelpDeskCredential:()=>SMe,withTenantKey:()=>mMe,withTenantToken:()=>DMe,withUserAccessToken:()=>wMe});function SE(n,t){return function(){return n.apply(t,arguments)}}var{toString:LEe}=Object.prototype,{getPrototypeOf:hp}=Object,{iterator:wE,toStringTag:mY}=Symbol,dQ=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),DE=(n,t)=>{let o=n,i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),dQ(o,t))return!0;o=hp(o)}return!1},UEe=(n,t)=>n!=null&&DE(n,t)?n[t]:void 0,o_=(n=>t=>{let o=LEe.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),yo=n=>(n=n.toLowerCase(),t=>o_(t)===n),hQ=n=>t=>typeof t===n,{isArray:EI}=Array,CI=hQ("undefined");function Ep(n){return n!==null&&!CI(n)&&n.constructor!==null&&!CI(n.constructor)&&Qi(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var SY=yo("ArrayBuffer");function HEe(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&SY(n.buffer),t}var KEe=hQ("string"),Qi=hQ("function"),DY=hQ("number"),Cp=n=>n!==null&&typeof n=="object",xEe=n=>n===!0||n===!1,pQ=n=>{if(!Cp(n))return!1;let t=hp(n);return(t===null||t===Object.prototype||hp(t)===null)&&!DE(n,mY)&&!DE(n,wE)},YEe=n=>{if(!Cp(n)||Ep(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},jEe=yo("Date"),JEe=yo("File"),qEe=n=>!!(n&&typeof n.uri<"u"),zEe=n=>n&&typeof n.getParts<"u",VEe=yo("Blob"),WEe=yo("FileList"),ZEe=yo("Set"),XEe=n=>Cp(n)&&Qi(n.pipe);function $Ee(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var QY=$Ee(),yY=typeof QY.FormData<"u"?QY.FormData:void 0,eCe=n=>{if(!n)return!1;if(yY&&n instanceof yY)return!0;let t=hp(n);if(!t||t===Object.prototype||!Qi(n.append))return!1;let o=o_(n);return o==="formdata"||o==="object"&&Qi(n.toString)&&n.toString()==="[object FormData]"},ACe=yo("URLSearchParams"),[tCe,rCe,aCe,iCe]=["ReadableStream","Request","Response","Headers"].map(yo),oCe=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function OE(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,e;if(typeof n!="object"&&(n=[n]),EI(n))for(i=0,e=n.length;i0;)if(e=o[i],t===e.toLowerCase())return e;return null}var hI=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,OY=n=>!CI(n)&&n!==hI;function i_(...n){let{caseless:t,skipUndefined:o}=OY(this)&&this||{},i={},e=(a,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")return;let r=t&&typeof A=="string"&&wY(i,A)||A,s=dQ(i,r)?i[r]:void 0;pQ(s)&&pQ(a)?i[r]=i_(s,a):pQ(a)?i[r]=i_({},a):EI(a)?i[r]=a.slice():(!o||!CI(a))&&(i[r]=a)};for(let a=0,A=n.length;a(OE(t,(e,a)=>{o&&Qi(e)?Object.defineProperty(n,a,{__proto__:null,value:SE(e,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,a,{__proto__:null,value:e,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),sCe=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),gCe=(n,t,o,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},cCe=(n,t,o,i)=>{let e,a,A,r={};if(t=t||{},n==null)return t;do{for(e=Object.getOwnPropertyNames(n),a=e.length;a-- >0;)A=e[a],(!i||i(A,n,t))&&!r[A]&&(t[A]=n[A],r[A]=!0);n=o!==!1&&hp(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},ICe=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;let i=n.indexOf(t,o);return i!==-1&&i===o},lCe=n=>{if(!n)return null;if(EI(n))return n;let t=n.length;if(!DY(t))return null;let o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},pCe=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&hp(Uint8Array)),dCe=(n,t)=>{let i=(n&&n[wE]).call(n),e;for(;(e=i.next())&&!e.done;){let a=e.value;t.call(n,a[0],a[1])}},hCe=(n,t)=>{let o,i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},ECe=yo("HTMLFormElement"),CCe=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,e){return i.toUpperCase()+e}),{propertyIsEnumerable:uCe}=Object.prototype,BCe=yo("RegExp"),bY=(n,t)=>{let o=Object.getOwnPropertyDescriptors(n),i={};OE(o,(e,a)=>{let A;(A=t(e,a,n))!==!1&&(i[a]=A||e)}),Object.defineProperties(n,i)},fCe=n=>{bY(n,(t,o)=>{if(Qi(n)&&["arguments","caller","callee"].includes(o))return!1;let i=n[o];if(Qi(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},QCe=(n,t)=>{let o={},i=e=>{e.forEach(a=>{o[a]=!0})};return EI(n)?i(n):i(String(n).split(t)),o},yCe=()=>{},mCe=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function SCe(n){return!!(n&&Qi(n.append)&&n[mY]==="FormData"&&n[wE])}var DCe=n=>{let t=new WeakSet,o=i=>{if(Cp(i)){if(t.has(i))return;if(Ep(i))return i;if(!("toJSON"in i)){t.add(i);let e;if(ZEe(i)){e=[];for(let a of i){let A=o(a);!CI(A)&&e.push(A)}}else e=EI(i)?[]:{},OE(i,(a,A)=>{let r=o(a);!CI(r)&&(e[A]=r)});return t.delete(i),e}}return i};return o(n)},wCe=yo("AsyncFunction"),OCe=n=>n&&(Cp(n)||Qi(n))&&Qi(n.then)&&Qi(n.catch),MY=((n,t)=>n?setImmediate:t?((o,i)=>(hI.addEventListener("message",({source:e,data:a})=>{e===hI&&a===o&&i.length&&i.shift()()},!1),e=>{i.push(e),hI.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Qi(hI.postMessage)),bCe=typeof queueMicrotask<"u"?queueMicrotask.bind(hI):typeof process<"u"&&process.nextTick||MY,_Y=n=>n!=null&&Qi(n[wE]),MCe=n=>n!=null&&DE(n,wE)&&_Y(n),Z={isArray:EI,isArrayBuffer:SY,isBuffer:Ep,isFormData:eCe,isArrayBufferView:HEe,isString:KEe,isNumber:DY,isBoolean:xEe,isObject:Cp,isPlainObject:pQ,isEmptyObject:YEe,isReadableStream:tCe,isRequest:rCe,isResponse:aCe,isHeaders:iCe,isUndefined:CI,isDate:jEe,isFile:JEe,isReactNativeBlob:qEe,isReactNative:zEe,isBlob:VEe,isRegExp:BCe,isFunction:Qi,isStream:XEe,isURLSearchParams:ACe,isTypedArray:pCe,isFileList:WEe,forEach:OE,merge:i_,extend:nCe,trim:oCe,stripBOM:sCe,inherits:gCe,toFlatObject:cCe,kindOf:o_,kindOfTest:yo,endsWith:ICe,toArray:lCe,forEachEntry:dCe,matchAll:hCe,isHTMLForm:ECe,hasOwnProperty:dQ,hasOwnProp:dQ,hasOwnInPrototypeChain:DE,getSafeProp:UEe,reduceDescriptors:bY,freezeMethods:fCe,toObjectSet:QCe,toCamelCase:CCe,noop:yCe,toFiniteNumber:mCe,findKey:wY,global:hI,isContextDefined:OY,isSpecCompliantForm:SCe,toJSONObject:DCe,isAsyncFn:wCe,isThenable:OCe,setImmediate:MY,asap:bCe,isIterable:_Y,isSafeIterable:MCe};var _Ce=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),TY=n=>{let t={},o,i,e;return n&&n.split(` +`).forEach(function(A){e=A.indexOf(":"),o=A.substring(0,e).trim().toLowerCase(),i=A.substring(e+1).trim();let r=Z.hasOwnProp(t,o);!o||r&&Z.hasOwnProp(_Ce,o)||(o==="set-cookie"?r?t[o].push(i):t[o]=[i]:t[o]=r?t[o]+", "+i:i)}),t};function TCe(n){let t=0,o=n.length;for(;tt;){let i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}var NCe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),RCe=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function n_(n,t){return Z.isArray(n)?n.map(o=>n_(o,t)):TCe(String(n).replace(t,""))}var NY=n=>n_(n,NCe),kCe=n=>n_(n,RCe);function up(n){let t=Object.create(null);return Z.forEach(n.toJSON(),(o,i)=>{t[i]=kCe(o)}),t}var RY=Symbol("internals");function bE(n){return n&&String(n).trim().toLowerCase()}function EQ(n){return n===!1||n==null?n:Z.isArray(n)?n.map(EQ):NY(String(n))}function vCe(n){let t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=o.exec(n);)t[i[1]]=i[2];return t}var PCe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function s_(n){let t=0,o=n.length;for(;tt;){let i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}function GCe(n){let t=n.length-1;if(t<1||n.charCodeAt(0)!==34||n.charCodeAt(t)!==34)return n;let o="";for(let i=1;i=t))return n;o+=n[i]}return o}function FCe(n){let t=Object.create(null),o=String(n),i=0,e=!1,a=!1;function A(r){let s=s_(o.slice(i,r)),g=s.indexOf("=");if(g<1)return;let c=s_(s.slice(0,g));if(!PCe.test(c))return;let I=c.toLowerCase();if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=s_(s.slice(g+1));t[I]=GCe(d)}for(let r=0;r/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function g_(n,t,o,i,e){if(Z.isFunction(i))return i.call(this,t,o);if(e&&(t=o),!!Z.isString(t)){if(Z.isString(i))return t.indexOf(i)!==-1;if(Z.isRegExp(i))return i.test(t)}}function UCe(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function HCe(n,t){let o=Z.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+o,{__proto__:null,value:function(e,a,A){return this[i].call(this,t,e,a,A)},configurable:!0})})}var Bp=class{constructor(t){t&&this.set(t)}set(t,o,i){let e=this;function a(r,s,g){let c=bE(s);if(!c)return;let I=Z.findKey(e,c);(!I||e[I]===void 0||g===!0||g===void 0&&e[I]!==!1)&&(e[I||s]=EQ(r))}let A=(r,s)=>Z.forEach(r,(g,c)=>a(g,c,s));if(Z.isPlainObject(t)||t instanceof this.constructor)A(t,o);else if(Z.isString(t)&&(t=t.trim())&&!LCe(t))A(TY(t),o);else if(Z.isObject(t)&&Z.isSafeIterable(t)){let r=Object.create(null),s,g;for(let c of t){if(!Z.isArray(c))throw new TypeError("Object iterator must return a key-value pair");g=c[0],Z.hasOwnProp(r,g)?(s=r[g],r[g]=Z.isArray(s)?[...s,c[1]]:[s,c[1]]):r[g]=c[1]}A(r,o)}else t!=null&&a(o,t,i);return this}get(t,o){if(t=bE(t),t){let i=Z.findKey(this,t);if(i){let e=this[i];if(!o)return e;if(o===!0)return vCe(e);if(Z.isFunction(o))return o.call(this,e,i);if(Z.isRegExp(o))return o.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=bE(t),t){let i=Z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||g_(this,this[i],i,o)))}return!1}delete(t,o){let i=this,e=!1;function a(A){if(A=bE(A),A){let r=Z.findKey(i,A);r&&(!o||g_(i,i[r],r,o))&&(delete i[r],e=!0)}}return Z.isArray(t)?t.forEach(a):a(t),e}clear(t){let o=Object.keys(this),i=o.length,e=!1;for(;i--;){let a=o[i];(!t||g_(this,this[a],a,t,!0))&&(delete this[a],e=!0)}return e}normalize(t){let o=this,i={};return Z.forEach(this,(e,a)=>{let A=Z.findKey(i,a);if(A){o[A]=EQ(e),delete o[a];return}let r=t?UCe(a):String(a).trim();r!==a&&delete o[a],o[r]=EQ(e),i[r]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let o=Object.create(null);return Z.forEach(this,(i,e)=>{i!=null&&i!==!1&&(o[e]=t&&Z.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(` +`)}getSetCookie(){let t=this.get("set-cookie");return Z.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return FCe(t)}static concat(t,...o){let i=new this(t);return o.forEach(e=>i.set(e)),i}static accessor(t){let i=(this[RY]=this[RY]={accessors:{}}).accessors,e=this.prototype;function a(A){let r=bE(A);i[r]||(HCe(e,A),i[r]=!0)}return Z.isArray(t)?t.forEach(a):a(t),this}};Bp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(Bp.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}});Z.freezeMethods(Bp);var Lt=Bp;var ME="[REDACTED ****]";function KCe(n){if(Z.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function xCe(n,t){let o=new Set(t.map(a=>String(a).toLowerCase())),i=[],e=a=>{if(a===null||typeof a!="object"||Z.isBuffer(a))return a;if(i.indexOf(a)!==-1)return;a instanceof Lt&&(a=a.toJSON()),i.push(a);let A;if(Z.isArray(a))A=[],a.forEach((r,s)=>{let g=e(r);Z.isUndefined(g)||(A[s]=g)});else{if(!Z.isPlainObject(a)&&KCe(a))return i.pop(),a;A=Object.create(null);for(let[r,s]of Object.entries(a)){let g=o.has(r.toLowerCase())?ME:e(s);Z.isUndefined(g)||(A[r]=g)}}return i.pop(),A};return e(n)}function kY(n){try{return String(n)}catch{return""}}function YCe(n){return n.errors.map(o=>{try{return o&&o.message?kY(o.message):kY(o)}catch{return""}}).filter(Boolean).join("; ")||n.name||"AggregateError"}var da=class n extends Error{static from(t,o,i,e,a,A){let r=t.message;!r&&Z.isArray(t.errors)&&t.errors.length&&(r=YCe(t));let s=new n(r,o||t.code,i,e,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),A&&Object.assign(s,A),s}constructor(t,o,i,e,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),e&&(this.request=e),a&&(this.response=a,this.status=a.status)}toJSON(){let t=this.config,o=t&&Z.hasOwnProp(t,"redact")?t.redact:void 0,i=Z.isArray(o)&&o.length>0?xCe(t,o):Z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};da.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";da.ERR_BAD_OPTION="ERR_BAD_OPTION";da.ECONNABORTED="ECONNABORTED";da.ETIMEDOUT="ETIMEDOUT";da.ECONNREFUSED="ECONNREFUSED";da.ERR_NETWORK="ERR_NETWORK";da.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";da.ERR_DEPRECATED="ERR_DEPRECATED";da.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";da.ERR_BAD_REQUEST="ERR_BAD_REQUEST";da.ERR_CANCELED="ERR_CANCELED";da.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";da.ERR_INVALID_URL="ERR_INVALID_URL";da.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var we=da;var P3=qe(v3(),1),wQ=P3.default;var OQ={isBufferAvailable(){return typeof Buffer<"u"},from(n){return Buffer.from(n)}};var R_=100;function N_(n){return Z.isPlainObject(n)||Z.isArray(n)}function G3(n){return Z.endsWith(n,"[]")?n.slice(0,-2):n}function T_(n,t,o){return n?n.concat(t).map(function(e,a){return e=G3(e),!o&&a?"["+e+"]":e}).join(o?".":""):t}function MBe(n){return Z.isArray(n)&&!n.some(N_)}var _Be=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function TBe(n,t,o){if(!Z.isObject(n))throw new TypeError("target must be an object");t=t||new(wQ||FormData),o=Z.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,T){return!Z.isUndefined(T[_])});let i=o.metaTokens,e=o.visitor||f,a=o.dots,A=o.indexes,r=o.Blob||typeof Blob<"u"&&Blob,s=o.maxDepth===void 0?R_:o.maxDepth,g=r&&Z.isSpecCompliantForm(t),c=[];if(!Z.isFunction(e))throw new TypeError("visitor must be a function");function I(m){if(m===null)return"";if(Z.isDate(m))return m.toISOString();if(Z.isBoolean(m))return m.toString();if(!g&&Z.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");if(Z.isArrayBuffer(m)||Z.isTypedArray(m)){if(g&&typeof r=="function")return new r([m]);if(OQ&&OQ.isBufferAvailable())return OQ.from(m);throw new we("Blob is not supported. Use a Buffer instead.",we.ERR_NOT_SUPPORT)}return m}function d(m){if(m>s)throw new we("Object is too deeply nested ("+m+" levels). Max depth: "+s,we.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(m,_){if(s===1/0)return JSON.stringify(m);let T=[];return JSON.stringify(m,function(H,j){if(!Z.isObject(j))return j;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(j),d(_+T.length-1),j})}function f(m,_,T){let R=m;if(Z.isReactNative(t)&&Z.isReactNativeBlob(m))return t.append(T_(T,_,a),I(m)),!1;if(m&&!T&&typeof m=="object"){if(Z.endsWith(_,"{}"))_=i?_:_.slice(0,-2),m=B(m,1);else if(Z.isArray(m)&&MBe(m)||(Z.isFileList(m)||Z.endsWith(_,"[]"))&&(R=Z.toArray(m)))return _=G3(_),R.forEach(function(j,F){!(Z.isUndefined(j)||j===null)&&t.append(A===!0?T_([_],F,a):A===null?_:_+"[]",I(j))}),!1}return N_(m)?!0:(t.append(T_(T,_,a),I(m)),!1)}let Q=Object.assign(_Be,{defaultVisitor:f,convertValue:I,isVisitable:N_});function y(m,_,T=0){if(!Z.isUndefined(m)){if(d(T),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+_.join("."));c.push(m),Z.forEach(m,function(H,j){(!(Z.isUndefined(H)||H===null)&&e.call(t,H,Z.isString(j)?j.trim():j,_,Q))===!0&&y(H,_?_.concat(j):[j],T+1)}),c.pop()}}if(!Z.isObject(n))throw new TypeError("data must be an object");return y(n),t}var Vg=TBe;function F3(n){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function L3(n,t){this._pairs=[],n&&Vg(n,this,t)}var U3=L3.prototype;U3.append=function(t,o){this._pairs.push([t,o])};U3.toString=function(t){let o=t?i=>t.call(this,i,F3):F3;return this._pairs.map(function(e){return o(e[0])+"="+o(e[1])},"").join("&")};var H3=L3;function NBe(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function BI(n,t,o){if(!t)return n;n=n||"";let i=Z.isFunction(o)?{serialize:o}:o,e=Z.getSafeProp(i,"encode")||NBe,a=Z.getSafeProp(i,"serialize"),A;if(a?A=a(t,i):A=Z.isURLSearchParams(t)?t.toString():new H3(t,i).toString(e),A){let r=n.indexOf("#");r!==-1&&(n=n.slice(0,r)),n+=(n.indexOf("?")===-1?"?":"&")+A}return n}var k_=class{constructor(){this.handlers=[]}use(t,o,i){return this.handlers.push({fulfilled:t,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Z.forEach(this.handlers,function(i){i!==null&&t(i)})}},v_=k_;var Wg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import kBe from"crypto";import RBe from"url";var K3=RBe.URLSearchParams;var P_="abcdefghijklmnopqrstuvwxyz",x3="0123456789",Y3={DIGIT:x3,ALPHA:P_,ALPHA_DIGIT:P_+P_.toUpperCase()+x3},vBe=(n=16,t=Y3.ALPHA_DIGIT)=>{let o="",{length:i}=t,e=new Uint32Array(n);kBe.randomFillSync(e);for(let a=0;aF_,hasStandardBrowserEnv:()=>PBe,hasStandardBrowserWebWorkerEnv:()=>GBe,navigator:()=>G_,origin:()=>FBe});var F_=typeof window<"u"&&typeof document<"u",G_=typeof navigator=="object"&&navigator||void 0,PBe=F_&&(!G_||["ReactNative","NativeScript","NS"].indexOf(G_.product)<0),GBe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",FBe=F_&&window.location.href||"http://localhost";var Bt={...L_,...j3};function U_(n,t){return Vg(n,new Bt.classes.URLSearchParams,{visitor:function(o,i,e,a){return Bt.isNode&&Z.isBuffer(o)?(this.append(i,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}var J3=R_;function q3(n){if(n>J3)throw new we("FormData field is too deeply nested ("+n+" levels). Max depth: "+J3,we.ERR_FORM_DATA_DEPTH_EXCEEDED)}function LBe(n){let t=[],o=/[^.[\]]+|\[([^.[\]]*)]/g,i;for(;(i=o.exec(n))!==null;)q3(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function UBe(n){let t={},o=Object.keys(n),i,e=o.length,a;for(i=0;i=o.length;return A=!A&&Z.isArray(e)?e.length:A,s?(Z.hasOwnProp(e,A)?e[A]=Z.isArray(e[A])?e[A].concat(i):[e[A],i]:e[A]=i,!r):((!Z.hasOwnProp(e,A)||!Z.isObject(e[A]))&&(e[A]=[]),t(o,i,e[A],a)&&Z.isArray(e[A])&&(e[A]=UBe(e[A])),!r)}if(Z.isFormData(n)&&Z.isFunction(n.entries)){let o={};return Z.forEachEntry(n,(i,e)=>{t(LBe(i),e,o,0)}),o}return null}var bQ=HBe;var Sp=(n,t)=>n!=null&&Z.hasOwnProp(n,t)?n[t]:void 0;function KBe(n,t,o){if(Z.isString(n))try{return(t||JSON.parse)(n),Z.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}var H_={transitional:Wg,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){let i=o.getContentType()||"",e=i.indexOf("application/json")>-1,a=Z.isObject(t);if(a&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return e?JSON.stringify(bQ(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(a){let s=Sp(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return U_(t,s).toString();if((r=Z.isFileList(t))||i.indexOf("multipart/form-data")>-1){let g=Sp(this,"env"),c=g&&g.FormData;return Vg(r?{"files[]":t}:t,c&&new c,s)}}return a||e?(o.setContentType("application/json",!1),KBe(t)):t}],transformResponse:[function(t){let o=Sp(this,"transitional")||H_.transitional,i=o&&o.forcedJSONParsing,e=Sp(this,"responseType"),a=e==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(i&&!e||a)){let r=!(o&&o.silentJSONParsing)&&a;try{return JSON.parse(t,Sp(this,"parseReviver"))}catch(s){if(r)throw s.name==="SyntaxError"?we.from(s,we.ERR_BAD_RESPONSE,this,null,Sp(this,"response")):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bt.classes.FormData,Blob:Bt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch","query"],n=>{H_.headers[n]={}});var Dp=H_;function vE(n,t){let o=this||Dp,i=t||o,e=Lt.from(i.headers),a=i.data;return Z.forEach(n,function(r){a=r.call(o,a,e.normalize(),t?t.status:void 0)}),e.normalize(),a}function PE(n){return!!(n&&n.__CANCEL__)}var K_=class extends we{constructor(t,o,i){super(t??"canceled",we.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}},ji=K_;function Jn(n,t,o){let i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new we("Request failed with status code "+o.status,o.status>=400&&o.status<500?we.ERR_BAD_REQUEST:we.ERR_BAD_RESPONSE,o.config,o.request,o))}function x_(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Y_(n,t){if(!t)return n;let o=n.length;for(;o>0&&n.charCodeAt(o-1)===47;)o--;return n.slice(0,o)+"/"+t.replace(/^\/+/,"")}var xBe=/^https?:(?!\/\/)/i,YBe=/[\t\n\r]/g;function jBe(n){let t=0;for(;t`${o}${i}${ME}`)}function zBe(n){let t=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ME}@`),o=t.indexOf("#"),e=(o===-1?t:t.slice(0,o)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ME}`);return o===-1?e:`${e}#${qBe(t.slice(o+1))}`}function z3(n,t){if(typeof n=="string"){let o=JBe(n);if(xBe.test(o))throw new we(`Invalid URL ${JSON.stringify(zBe(o))}: missing "//" after protocol`,we.ERR_INVALID_URL,t)}}function fI(n,t,o,i){z3(t,i);let e=!x_(t);return n&&(e||o===!1)?(z3(n,i),Y_(n,t)):t}var VBe={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function WBe(n){try{return new URL(n)}catch{return null}}function V3(n){var t=(typeof n=="string"?WBe(n):n)||{},o=t.protocol,i=t.host,e=t.port;if(typeof i!="string"||!i||typeof o!="string"||(o=o.split(":",1)[0],i=i.replace(/:\d*$/,""),e=parseInt(e)||VBe[o]||0,!ZBe(i,e)))return"";var a=j_(o+"_proxy")||j_("all_proxy");return a&&a.indexOf("://")===-1&&(a=o+"://"+a),a}function ZBe(n,t){var o=j_("no_proxy").toLowerCase();return o?o==="*"?!1:o.split(/[,\s]/).every(function(i){if(!i)return!0;var e=i.match(/^(.+):(\d+)$/),a=e?e[1]:i,A=e?parseInt(e[2]):0;return A&&A!==t?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!n.endsWith(a)):n!==a}):!0}function j_(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}var DT=qe(AT(),1),Jj=qe(Cj(),1);import Yj from"http";import jj from"https";import wQe from"http2";import OQe from"util";import{resolve as kj}from"path";import mo from"zlib";var zs="1.19.0";function jE(n){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}var Zfe=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function dT(n,t,o){let i=o&&o.Blob||Bt.classes.Blob,e=jE(n);if(t===void 0&&i&&(t=!0),e==="data"){n=e.length?n.slice(e.length+1):n;let a=Zfe.exec(n);if(!a)throw new we("Invalid URL",we.ERR_INVALID_URL);let A=a[1],r=a[2],s=a[3]?"base64":"utf8",g=a[4],c="";A?c=r?A+r:A:r&&(c="text/plain"+r);let I=s==="base64"?Buffer.from(g,"base64"):Buffer.from(decodeURIComponent(g),s);if(t){if(!i)throw new we("Blob is not supported",we.ERR_NOT_SUPPORT);return new i([I],{type:c})}return I}throw new we("Unsupported protocol "+e,we.ERR_NOT_SUPPORT)}import on from"stream";var Xfe=["content-type","content-length"];function JE(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,e])=>{Xfe.includes(i.toLowerCase())&&n.set(i,e)})}import $fe from"stream";var hT=Symbol("internals"),ET=class extends $fe.Transform{constructor(t){t=Z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,e)=>!Z.isUndefined(e[i])),super({readableHighWaterMark:t.chunkSize});let o=this[hT]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(o.isCaptured||(o.isCaptured=!0))})}_read(t){let o=this[hT];return o.onReadCallback&&o.onReadCallback(),super._read(t)}_transform(t,o,i){let e=this[hT],a=e.maxRate,A=this.readableHighWaterMark,r=e.timeWindow,s=1e3/r,g=a/s,c=e.minChunkSize!==!1?Math.max(e.minChunkSize,g*.01):0,I=(B,f)=>{let Q=Buffer.byteLength(B);e.bytesSeen+=Q,e.bytes+=Q,e.isCaptured&&this.emit("progress",e.bytesSeen),this.push(B)?process.nextTick(f):e.onReadCallback=()=>{e.onReadCallback=null,process.nextTick(f)}},d=(B,f)=>{let Q=Buffer.byteLength(B),y=null,m=A,_,T=0;if(a){let R=Date.now();(!e.ts||(T=R-e.ts)>=r)&&(e.ts=R,_=g-e.bytes,e.bytes=_<0?-_:0,T=0),_=g-e.bytes}if(a){if(_<=0)return setTimeout(()=>{f(null,B)},r-T);_m&&Q-m>c&&(y=B.subarray(m),B=B.subarray(0,m)),I(B,y?()=>{process.nextTick(f,null,y)}:f)};d(t,function B(f,Q){if(f)return i(f);Q?d(Q,B):i(null)})}},CT=ET;import{EventEmitter as bQe}from"events";import AQe from"util";import{Readable as tQe}from"stream";var{asyncIterator:uj}=Symbol,eQe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[uj]?yield*n[uj]():yield n},kQ=eQe;var rQe=Bt.ALPHABET.ALPHA_DIGIT+"-_",qE=typeof TextEncoder=="function"?new TextEncoder:new AQe.TextEncoder,DI=`\r +`,aQe=qE.encode(DI),iQe=2,uT=class{constructor(t,o){let{escapeName:i}=this.constructor,e=Z.isString(o),a=`Content-Disposition: form-data; name="${i(t)}"${!e&&o.name?`; filename="${i(o.name)}"`:""}${DI}`;if(e)o=qE.encode(String(o).replace(/\r?\n|\r\n?/g,DI));else{let A=String(o.type||"application/octet-stream").replace(/[\r\n]/g,"");a+=`Content-Type: ${A}${DI}`}this.headers=qE.encode(a+DI),this.contentLength=e?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+iQe,this.name=t,this.value=o}async*encode(){yield this.headers;let{value:t}=this;Z.isTypedArray(t)?yield t:yield*kQ(t),yield aQe}static escapeName(t){return String(t).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},oQe=(n,t,o)=>{let{tag:i="form-data-boundary",size:e=25,boundary:a=i+"-"+Bt.generateString(e,rQe)}=o||{};if(!Z.isFormData(n))throw new TypeError("FormData instance required");if(a.length<1||a.length>70)throw new Error("boundary must be 1-70 characters long");let A=qE.encode("--"+a+DI),r=qE.encode("--"+a+"--"+DI),s=r.byteLength,g=Array.from(n.entries()).map(([I,d])=>{let B=new uT(I,d);return s+=B.size,B});s+=A.byteLength*g.length,s=Z.toFiniteNumber(s);let c={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(s)&&(c["Content-Length"]=s),t&&t(c),tQe.from((async function*(){for(let I of g)yield A,yield*I.encode();yield r})())},Bj=oQe;import nQe from"stream";var BT=class extends nQe.Transform{__transform(t,o,i){this.push(t),i()}_transform(t,o,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,o)}this.__transform(t,o,i)}},fj=BT;import sQe from"http2";import gQe from"util";var fT=class{constructor(){this.sessions=Object.create(null)}getSession(t,o){o=Object.assign({sessionTimeout:1e3},o);let i=this.sessions[t];if(i){let I=i.length;for(let d=0;d{if(a)return;a=!0,A&&(clearTimeout(A),A=null);let I=i,d=I.length,B=d;for(;B--;)if(I[B][0]===e){d===1?delete this.sessions[t]:I.splice(B,1),e.closed||e.close();return}},s=e.request,{sessionTimeout:g}=o;if(g!=null){let I=0;e.request=function(){let d=s.apply(this,arguments);return I++,A&&(clearTimeout(A),A=null),d.once("close",()=>{--I||(A=setTimeout(()=>{A=null,r()},g))}),d}}e.once("close",r);let c=[e,o];return i?i.push(c):i=this.sessions[t]=[c],e}},Qj=fT;var cQe=(n,t)=>Z.isAsyncFn(n)?function(...o){let i=o.pop();n.apply(this,o).then(e=>{try{t?i(null,...t(e)):i(null,e)}catch(a){i(a)}},i)}:n,yj=cQe;var IQe=new Set(["localhost","0.0.0.0"]),Dj=n=>{let t=n.split(".");return t.length!==4||t[0]!=="127"?!1:t.every(o=>/^\d+$/.test(o)&&Number(o)>=0&&Number(o)<=255)},QT=n=>{if(/^0[xX][0-9a-fA-F]+$/.test(n)){let t=parseInt(n.slice(2),16);return Number.isFinite(t)?t:null}if(n.length>1&&/^0[0-7]+$/.test(n)){let t=parseInt(n,8);return Number.isFinite(t)?t:null}if(n.length>1&&/^0[0-9]+$/.test(n))return null;if(/^[0-9]+$/.test(n)){let t=parseInt(n,10);return Number.isFinite(t)?t:null}return null},lQe=n=>{if(typeof n!="string"||!n||n.indexOf(":")!==-1)return n;let t=n;if(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),t=t.replace(/\.+$/,""),!/^[0-9.xXa-fA-F]+$/.test(t))return n;let o=t.split(".");if(o.some(c=>c===""))return n;if(o.length===4){let c=o.map(QT);return c.some(I=>I===null||I<0||I>255)?n:c.join(".")}if(o.length>4||o.length===1)return n;let i=o.slice(0,-1),e=o[o.length-1],a=4-i.length,A=QT(e);if(A===null)return n;let r=(1<<8*a)-1;if(A<0||A>r)return n;let s=new Array(a).fill(0);for(let c=a-1,I=A;c>=0;c--,I>>=8)s[c]=I&255;let g=i.map(QT);return g.some(c=>c===null||c<0||c>255)?n:[...g,...s].join(".")},yT=n=>/^0{1,4}$/.test(n),pQe=n=>{if(n==="::")return!0;let t=n.indexOf("::");if(t!==-1){if(t!==n.lastIndexOf("::"))return!1;let i=n.slice(0,t),e=n.slice(t+2),a=i?i.split(":"):[],A=e?e.split(":"):[];return a.length+A.length<8&&a.every(yT)&&A.every(yT)}let o=n.split(":");return o.length===8&&o.every(yT)},dQe=n=>{if(n==="::1")return!0;let t=n.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return Dj(t[1]);let o=n.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(o){let e=parseInt(o[1],16);return e>=32512&&e<=32767}let i=n.split(":");if(i.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(i[e]))return!1;return/^0*1$/.test(i[7])}return!1},mj=n=>n?IQe.has(n)||Dj(n)||pQe(n)?!0:dQe(n):!1,hQe={http:80,https:443,ws:80,wss:443,ftp:21},EQe=n=>{let t=n,o=0;if(t.charAt(0)==="["){let a=t.indexOf("]");if(a!==-1){let A=t.slice(1,a),r=t.slice(a+1);return r.charAt(0)===":"&&/^\d+$/.test(r.slice(1))&&(o=Number.parseInt(r.slice(1),10)),[A,o]}}let i=t.indexOf(":"),e=t.lastIndexOf(":");return i!==-1&&i===e&&/^\d+$/.test(t.slice(e+1))&&(o=Number.parseInt(t.slice(e+1),10),t=t.slice(0,e)),[t,o]},CQe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,uQe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,BQe=n=>{if(typeof n!="string"||n.indexOf(":")===-1)return n;let t=n.match(CQe);if(t)return t[1];let o=n.match(uQe);if(o){let i=parseInt(o[1],16),e=parseInt(o[2],16);return`${i>>8}.${i&255}.${e>>8}.${e&255}`}return n},Sj=n=>{if(!n)return n;n.charAt(0)==="["&&n.charAt(n.length-1)==="]"&&(n=n.slice(1,-1));let t=n.replace(/\.+$/,""),o=lQe(t);return o!==t?o:BQe(t)};function mT(n){let t;try{t=new URL(n)}catch{return!1}let o=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!o)return!1;if(o==="*")return!0;let i=Number.parseInt(t.port,10)||hQe[t.protocol.split(":",1)[0]]||0,e=Sj(t.hostname.toLowerCase());return o.split(/[\s,]+/).some(a=>{if(!a)return!1;if(a==="*")return!0;let[A,r]=EQe(a);return A=Sj(A),!A||r&&r!==i?!1:(A.charAt(0)==="*"&&(A=A.slice(1)),A.charAt(0)==="."?e.endsWith(A):e===A||mj(e)&&mj(A))})}function fQe(n,t){n=n||10;let o=new Array(n),i=new Array(n),e=0,a=0,A;return t=t!==void 0?t:1e3,function(s){let g=Date.now(),c=i[a];A||(A=g),o[e]=s,i[e]=g;let I=a,d=0;for(;I!==e;)d+=o[I++],I=I%n;if(e=(e+1)%n,e===a&&(a=(a+1)%n),g-A{o=c,e=null,a&&(clearTimeout(a),a=null),n(...g)};return[(...g)=>{let c=Date.now(),I=c-o;I>=i?A(g,c):(e=g,a||(a=setTimeout(()=>{a=null,A(e)},i-I)))},()=>e&&A(e)]}var Oj=QQe;var Vs=(n,t,o=3)=>{let i=0,e=wj(50,250);return Oj(a=>{if(!a||typeof a.loaded!="number")return;let A=a.loaded,r=a.lengthComputable?a.total:void 0,s=Math.max(0,r!=null?Math.min(A,r):A),g=Math.max(0,s-i),c=e(g);i=Math.max(i,s);let I={loaded:s,total:r,progress:r?s/r:void 0,bytes:g,rate:c||void 0,estimated:c&&r?(r-s)/c:void 0,event:a,lengthComputable:r!=null,[t?"download":"upload"]:!0};n(I)},o)},_p=(n,t)=>{let o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},Tp=(n,t=Z.asap)=>(...o)=>t(()=>n(...o));var bj=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,_j=(n,t,o)=>t+2n<=57?n-48:(n&223)-55,yQe=n=>n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47||n===45||n===95,mQe=n=>n===9||n===10||n===12||n===13||n===32,SQe=n=>{let t=Math.floor(n/4),o=n%4;return t*3+(o===2?1:o===3?2:0)},Tj=n=>{let t=n.length,o=0;return t>0&&n.charCodeAt(t-1)===61&&(o++,t>1&&n.charCodeAt(t-2)===61&&o++),Math.floor((t-o)*3/4)},DQe=n=>{let t=n.length,o=0,i=0,e=!1;for(let a=0;a0){e=!0;continue}o++}}return e||i>2||i>0&&(o+i)%4!==0||o%4===1?Tj(n):SQe(o)},Nj=(n,t)=>{if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;let o=n.indexOf(",");if(o<0)return 0;let i=n.slice(5,o),e=n.slice(o+1);if(/;base64/i.test(i))return t(e);let A=0;for(let r=0,s=e.length;r=55296&&g<=56319&&r+1=56320&&c<=57343?(A+=4,r++):A+=3}else A+=3}return A};function ST(n){let t=typeof n=="string"?n.indexOf("#"):-1;return Nj(t===-1?n:n.slice(0,t),DQe)}function Rj(n){return Nj(n,Tj)}var vj={flush:mo.constants.Z_SYNC_FLUSH,finishFlush:mo.constants.Z_SYNC_FLUSH},MQe={flush:mo.constants.BROTLI_OPERATION_FLUSH,finishFlush:mo.constants.BROTLI_OPERATION_FLUSH},_Qe={flush:mo.constants.ZSTD_e_flush,finishFlush:mo.constants.ZSTD_e_flush},qj=Z.isFunction(mo.createBrotliDecompress),zj=Z.isFunction(mo.createZstdDecompress),Vj="gzip, compress, deflate"+(qj?", br":""),TQe=Vj+(zj?", zstd":""),Pj=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):Z.asap,{http:NQe,https:RQe}=Jj.default,wT=/https:?/,Gj=Symbol("axios.http.socketListener"),vQ=Symbol("axios.http.currentReq"),Wj=Symbol("axios.http.installedTunnel"),kQe=new Map,Fj=new WeakMap,Lj={22:21,24:5};function vQe(n=process.versions&&process.versions.node){if(!n)return!1;let[t,o]=n.split(".").map(i=>Number(i));return!Number.isInteger(t)||!Number.isInteger(o)?!1:t>24?!0:Lj[t]!=null&&o>=Lj[t]}function PQe(n,t=process.versions&&process.versions.node){if(!vQe(t))return!1;let o=n&&n.options;return!!(o&&Z.hasOwnProp(o,"proxyEnv")&&o.proxyEnv!=null)}function GQe(n,t,o){return wT.test(n.protocol)?o||jj.globalAgent:t||Yj.globalAgent}function FQe(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||"")+"#"+(n.auth||""),i=t?Fj.get(t)||Fj.set(t,new Map).get(t):kQe,e=i.get(o);if(e)return e;let a=t&&t.options?{...t.options,...n}:n;if(e=new DT.default(a),t&&t.options){let A={...t.options},r=e.callback;e.callback=function(g,c){return r.call(this,g,{...A,...c})}}return e[Wj]=!0,i.set(o,e),e}var Uj=Bt.protocols.map(n=>n+":"),Hj=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Kj=(n,[t,o])=>(n.on("end",o).on("error",o),t),LQe=new Qj;function UQe(n,t,o){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.auth&&n.beforeRedirects.auth(n),n.beforeRedirects.sensitiveHeaders&&n.beforeRedirects.sensitiveHeaders(n,o),n.beforeRedirects.config&&n.beforeRedirects.config(n,t,o)}function HQe(n,t){n&&Object.keys(n).forEach(o=>{t.has(o.toLowerCase())&&delete n[o]})}function KQe(n,t){if(!t)return!1;try{return new URL(t.url).origin===new URL(n.href).origin}catch{return!1}}function Zj(n,t,o,i,e,a){let A=t,r=GQe(n,a,e);if(!A&&A!==!1&&!PQe(r)){let s=V3(o);s&&(mT(o)||(A=new URL(s)))}if(i&&n.headers)for(let s of Object.keys(n.headers))s.toLowerCase()==="proxy-authorization"&&delete n.headers[s];if(i&&n.agent&&n.agent[Wj]&&(n.agent=void 0),A){let s=A instanceof URL,g=f=>s||Z.hasOwnProp(A,f)?A[f]:void 0,c=g("username"),I=g("password"),d=Z.hasOwnProp(A,"auth")?A.auth:void 0;if(c&&(d=(c||"")+":"+(I||"")),d){let f=typeof d=="object",Q=f&&Z.hasOwnProp(d,"username")?d.username:void 0,y=f&&Z.hasOwnProp(d,"password")?d.password:void 0;if(!!(Q||y))d=(Q||"")+":"+(y||"");else if(f)throw new we("Invalid proxy authorization",we.ERR_BAD_OPTION,{proxy:A})}if(wT.test(n.protocol)){if(!(e instanceof DT.default)){let f=g("hostname")||g("host"),Q=g("port"),y=g("protocol"),m=y?y.includes(":")?y:`${y}:`:"http:",_=f&&f.includes(":")&&!f.startsWith("[")?`[${f}]`:f,T=new URL(`${m}//${_}${Q?":"+Q:""}`),R={protocol:T.protocol,hostname:T.hostname.replace(/^\[|\]$/g,""),port:T.port,auth:d&&typeof d=="string"?d:void 0};T.protocol==="https:"&&(R.ALPNProtocols=["http/1.1"]);let H=FQe(R,e);n.agent=H,n.agents&&(n.agents.https=H)}}else{if(d){let m=Buffer.from(d,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+m}let f=!1;for(let m of Object.keys(n.headers))if(m.toLowerCase()==="host"){f=!0;break}f||(n.headers.host=n.hostname+(n.port?":"+n.port:""));let Q=g("hostname")||g("host");n.hostname=Q,n.host=Q,n.port=g("port"),n.path=o;let y=g("protocol");y&&(n.protocol=y.includes(":")?y:`${y}:`)}}n.beforeRedirects.proxy=function(g){Zj(g,t,g.href,!0,e,a)}}var xQe=typeof process<"u"&&Z.kindOf(process)==="process",YQe=n=>new Promise((t,o)=>{let i,e,a=(s,g)=>{e||(e=!0,i&&i(s,g))},A=s=>{a(s),t(s)},r=s=>{a(s,!0),o(s)};n(A,r,s=>i=s).catch(r)}),jQe=({address:n,family:t})=>{if(!Z.isString(n))throw TypeError("address must be a string");return{address:n,family:t||(n.indexOf(".")<0?6:4)}},xj=(n,t)=>jQe(Z.isObject(n)?n:{address:n,family:t}),JQe={request(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||(n.protocol==="https:"?443:80)),{http2Options:i,headers:e}=n,a=LQe.getSession(o,i),{HTTP2_HEADER_SCHEME:A,HTTP2_HEADER_METHOD:r,HTTP2_HEADER_PATH:s,HTTP2_HEADER_STATUS:g}=wQe.constants,c={[A]:n.protocol.replace(":",""),[r]:n.method,[s]:n.path};Z.forEach(e,(d,B)=>{B.charAt(0)!==":"&&(c[B]=d)});let I=a.request(c);return I.once("response",d=>{let B=I;d=Object.assign({},d);let f=d[g];delete d[g],B.headers=d,B.statusCode=+f,t(B)}),I}},Xj=xQe&&function(t){return YQe(async function(i,e,a){let A=Be=>Z.getSafeProp(t,Be),r=A("transitional")||Wg,s=A("data"),g=A("lookup"),c=A("family"),I=A("httpVersion");I===void 0&&(I=1);let d=A("http2Options"),B=A("httpAgent"),f=A("httpsAgent"),Q=A("proxy"),y=A("responseType"),m=A("responseEncoding"),_=A("socketPath"),T=A("method").toUpperCase(),R=A("maxRedirects"),H=A("maxBodyLength"),j=A("maxContentLength"),F=A("decompress"),q,J=!1,x,P;if(I=+I,Number.isNaN(I))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(I!==1&&I!==2)throw TypeError(`Unsupported protocol version '${I}'`);let z=I===2;if(g){let Be=yj(g,Re=>Z.isArray(Re)?Re:[Re]);g=(Re,Le,MA)=>{Be(Re,Le,(He,_A,at)=>{if(He)return MA(He);let DA=Z.isArray(_A)?_A.map(lt=>xj(lt)):[xj(_A,at)];Le.all?MA(He,DA):MA(He,DA[0].address,DA[0].family)})}}let U=new bQe;function N(Be){try{U.emit("abort",!Be||Be.type?new ji(null,t,x):Be)}catch{}}function k(){P&&(clearTimeout(P),P=null)}function V(){let Be=A("timeout"),Re=Be?"timeout of "+Be+"ms exceeded":"timeout exceeded",Le=A("timeoutErrorMessage");return Le&&(Re=Le),new we(Re,r.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,t,x)}U.once("abort",e);let ee=()=>{k(),t.cancelToken&&t.cancelToken.unsubscribe(N),t.signal&&t.signal.removeEventListener("abort",N),U.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(N),t.signal&&(t.signal.aborted?N():t.signal.addEventListener("abort",N))),a((Be,Re)=>{if(q=!0,k(),Re){J=!0,ee();return}let{data:Le}=Be;if(Le instanceof on.Readable||Le instanceof on.Duplex){let MA=on.finished(Le,()=>{MA(),ee()})}else ee()});let ie=fI(A("baseURL"),A("url"),A("allowAbsoluteUrls"),t),Te=_?"http://localhost":Bt.hasBrowserEnv?Bt.origin:void 0,se=new URL(ie,Te),Ne=se.protocol||Uj[0];if(Ne==="data:"){if(j>-1){let Re=String(A("url")||ie||"");if(Rj(Re)>j)return e(new we("maxContentLength size of "+j+" exceeded",we.ERR_BAD_RESPONSE,t))}let Be;if(T!=="GET")return Jn(i,e,{status:405,statusText:"method not allowed",headers:{},config:t});try{Be=dT(A("url"),y==="blob",{Blob:t.env&&t.env.Blob})}catch(Re){throw we.from(Re,we.ERR_BAD_REQUEST,t)}return y==="text"?(Be=Be.toString(m),(!m||m==="utf8")&&(Be=Z.stripBOM(Be))):y==="stream"&&(Be=on.Readable.from(Be)),Jn(i,e,{data:Be,status:200,statusText:"OK",headers:new Lt,config:t})}if(Uj.indexOf(Ne)===-1)return e(new we("Unsupported protocol "+Ne,we.ERR_BAD_REQUEST,t));let fe=Lt.from(t.headers).normalize();fe.set("User-Agent","axios/"+zs,!1);let{onUploadProgress:De,onDownloadProgress:Ke}=t,rA=t.maxRate,ve,iA;if(Z.isSpecCompliantForm(s)){let Be=fe.getContentType(/boundary=([-_\w\d]{10,70})/i);s=Bj(s,Re=>{fe.set(Re)},{tag:`axios-${zs}-boundary`,boundary:Be&&Be[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)&&s.getHeaders!==Object.prototype.getHeaders){if(JE(fe,s.getHeaders(),A("formDataHeaderPolicy")),!fe.hasContentLength())try{let Be=await OQe.promisify(s.getLength).call(s);Number.isFinite(Be)&&Be>=0&&fe.setContentLength(Be)}catch{}}else if(Z.isBlob(s)||Z.isFile(s))s.size&&fe.setContentType(s.type||"application/octet-stream"),fe.setContentLength(s.size||0),s=on.Readable.from(kQ(s));else if(s&&!Z.isStream(s)){if(!Buffer.isBuffer(s))if(Z.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(Z.isString(s))s=Buffer.from(s,"utf-8");else return e(new we("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",we.ERR_BAD_REQUEST,t));if(fe.setContentLength(s.length,!1),H>-1&&s.length>H)return e(new we("Request body larger than maxBodyLength limit",we.ERR_BAD_REQUEST,t))}let Ce=Z.toFiniteNumber(fe.getContentLength());Z.isArray(rA)?(ve=rA[0],iA=rA[1]):ve=iA=rA,s&&(De||ve)&&(Z.isStream(s)||(s=on.Readable.from(s,{objectMode:!1})),s=on.pipeline([s,new CT({maxRate:Z.toFiniteNumber(ve)})],Z.noop),De&&s.on("progress",Kj(s,_p(Ce,Vs(Tp(De,Pj),!1,3)))));let he,Ze=A("auth");if(Ze){let Be=Z.getSafeProp(Ze,"username")||"",Re=Z.getSafeProp(Ze,"password")||"";he=Be+":"+Re}if(!he&&(se.username||se.password)){let Be=Hj(se.username),Re=Hj(se.password);he=Be+":"+Re}he&&fe.delete("authorization");let je;try{je=BI(se.pathname+se.search,A("params"),A("paramsSerializer")).replace(/^\?/,"")}catch(Be){return e(we.from(Be,we.ERR_BAD_REQUEST,t,null,null,{url:A("url"),exists:!0}))}fe.set("Accept-Encoding",Z.hasOwnProp(r,"advertiseZstdAcceptEncoding")&&r.advertiseZstdAcceptEncoding===!0?TQe:Vj,!1);let Oe=Object.assign(Object.create(null),{path:je,method:T,headers:up(fe),agents:{http:B,https:f},auth:he,protocol:Ne,family:c,beforeRedirect:UQe,beforeRedirects:Object.create(null),http2Options:d});if(!Z.isUndefined(g)&&(Oe.lookup=g),_){if(typeof _!="string")return e(new we("socketPath must be a string",we.ERR_BAD_OPTION_VALUE,t));let Be=A("allowedSocketPaths");if(Be!=null){let Re=Array.isArray(Be)?Be:[Be],Le=kj(_);if(!Re.some(He=>typeof He=="string"&&kj(He)===Le))return e(new we(`socketPath "${_}" is not permitted by allowedSocketPaths`,we.ERR_BAD_OPTION_VALUE,t))}Oe.socketPath=_}else Oe.hostname=se.hostname.startsWith("[")?se.hostname.slice(1,-1):se.hostname,Oe.port=se.port,Zj(Oe,Q,Ne+"//"+se.hostname+(se.port?":"+se.port:"")+Oe.path,!1,f,B);let hA,dA=!1,aA=!1,We=wT.test(Oe.protocol);if(Oe.agent==null&&(Oe.agent=We?f:B),z)hA=JQe;else{let Be=A("transport");if(Be)hA=Be;else if(R===0)hA=We?jj:Yj,dA=!0;else{aA=!0,Oe.sensitiveHeaders=[],R&&(Oe.maxRedirects=R);let Re=A("beforeRedirect");if(Re&&(Oe.beforeRedirects.config=Re),he){let MA=se.origin,He=he;Oe.beforeRedirects.auth=function(at){try{new URL(at.href).origin===MA&&(at.auth=He)}catch{}}}let Le=A("sensitiveHeaders");if(Le!=null){if(!Z.isArray(Le))return e(new we("sensitiveHeaders must be an array of strings",we.ERR_BAD_OPTION_VALUE,t));let MA=new Set;for(let He of Le){if(!Z.isString(He))return e(new we("sensitiveHeaders must be an array of strings",we.ERR_BAD_OPTION_VALUE,t));MA.add(He.toLowerCase())}MA.size&&(Oe.sensitiveHeaders=Array.from(MA),Oe.beforeRedirects.sensitiveHeaders=function(_A,at){KQe(_A,at)||HQe(_A.headers,MA)})}hA=We?RQe:NQe}}H>-1?Oe.maxBodyLength=H:Oe.maxBodyLength=1/0,Oe.insecureHTTPParser=!!A("insecureHTTPParser"),x=hA.request(Oe,function(Re){if(k(),x.destroyed)return;let Le=[Re],MA=Z.toFiniteNumber(Re.headers["content-length"]);if(Ke||iA){let DA=new CT({maxRate:Z.toFiniteNumber(iA)});Ke&&DA.on("progress",Kj(DA,_p(MA,Vs(Tp(Ke,Pj),!0,3)))),Le.push(DA)}let He=Re,_A=Re.req||x;if(F!==!1&&Re.headers["content-encoding"])switch((T==="HEAD"||Re.statusCode===204)&&delete Re.headers["content-encoding"],(Re.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Le.push(mo.createUnzip(vj)),delete Re.headers["content-encoding"];break;case"deflate":Le.push(new fj),Le.push(mo.createUnzip(vj)),delete Re.headers["content-encoding"];break;case"br":qj&&(Le.push(mo.createBrotliDecompress(MQe)),delete Re.headers["content-encoding"]);break;case"zstd":zj&&(Le.push(mo.createZstdDecompress(_Qe)),delete Re.headers["content-encoding"]);break}He=Le.length>1?on.pipeline(Le,Z.noop):Le[0];let at={status:Re.statusCode,statusText:Re.statusMessage,headers:new Lt(Re.headers),config:t,request:_A};if(y==="stream"){if(j>-1){let DA=j,lt=He;async function*Ir(){let UA=0;for await(let le of lt){if(UA+=le.length,UA>DA)throw new we("maxContentLength size of "+DA+" exceeded",we.ERR_BAD_RESPONSE,t,_A);yield le}}He=on.Readable.from(Ir(),{objectMode:!1})}at.data=He,Jn(i,e,at)}else{let DA=[],lt=0;He.on("data",function(UA){DA.push(UA),lt+=UA.length,j>-1&<>j&&(J=!0,He.destroy(),N(new we("maxContentLength size of "+j+" exceeded",we.ERR_BAD_RESPONSE,t,_A)))}),He.on("aborted",function(){if(J)return;let UA=new we("stream has been aborted",we.ERR_BAD_RESPONSE,t,_A,at);He.destroy(UA),e(UA)}),He.on("error",function(UA){J||e(we.from(UA,null,t,_A,at))}),He.on("end",function(){try{let UA=DA.length===1?DA[0]:Buffer.concat(DA);y!=="arraybuffer"&&(UA=UA.toString(m),(!m||m==="utf8")&&(UA=Z.stripBOM(UA))),at.data=UA}catch(UA){return e(we.from(UA,null,t,at.request,at))}Jn(i,e,at)})}U.once("abort",DA=>{He.destroyed||(He.emit("error",DA),He.destroy())})}),U.once("abort",Be=>{x.close?x.close():x.destroy(Be)}),x.on("error",function(Re){e(we.from(Re,null,t,x))});let bA=new Set;if(x.on("socket",function(Re){typeof Re.setKeepAlive=="function"&&Re.setKeepAlive(!0,1e3*60),Re[Gj]||(Re.on("error",function(MA){let He=Re[vQ];He&&!He.destroyed&&He.destroy(MA)}),Re[Gj]=!0),Re[vQ]=x,bA.add(Re)}),x.once("close",function(){k();for(let Re of bA)Re[vQ]===x&&(Re[vQ]=null);bA.clear()}),A("timeout")){let Be=parseInt(A("timeout"),10);if(Number.isNaN(Be)){N(new we("error trying to parse `config.timeout` to int",we.ERR_BAD_OPTION_VALUE,t,x));return}let Re=function(){q||N(V())};dA&&Be>0&&(P=setTimeout(Re,Be)),x.setTimeout(Be,Re)}else x.setTimeout(0);if(Z.isStream(s)){let Be=!1,Re=!1;s.on("end",()=>{Be=!0}),s.once("error",MA=>{Re=!0,x.destroy(MA)}),s.on("close",()=>{!Be&&!Re&&N(new ji("Request stream has been aborted",t,x))});let Le=s;if(H>-1&&!aA){let MA=H,He=0;Le=on.pipeline([s,new on.Transform({transform(_A,at,DA){if(He+=_A.length,He>MA)return DA(new we("Request body larger than maxBodyLength limit",we.ERR_BAD_REQUEST,t,x));DA(null,_A)}})],Z.noop),Le.on("error",_A=>{x.destroyed||x.destroy(_A)})}Le.pipe(x)}else s&&x.write(s),x.end()})};var $j=Bt.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,Bt.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(Bt.origin),Bt.navigator&&/(msie|trident)/i.test(Bt.navigator.userAgent)):()=>!0;var eJ=Bt.hasStandardBrowserEnv?{write(n,t,o,i,e,a,A){if(typeof document>"u")return;let r=[`${n}=${encodeURIComponent(t)}`];Z.isNumber(o)&&r.push(`expires=${new Date(o).toUTCString()}`),Z.isString(i)&&r.push(`path=${i}`),Z.isString(e)&&r.push(`domain=${e}`),a===!0&&r.push("secure"),Z.isString(A)&&r.push(`SameSite=${A}`),document.cookie=r.join("; ")},read(n){if(typeof document>"u")return null;let t=document.cookie.split(";");for(let o=0;on instanceof Lt?{...n}:n,qQe=n=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(n).concat(Object.getOwnPropertySymbols(n).filter(t=>Object.getOwnPropertyDescriptor(n,t).enumerable)):Object.keys(n);function nn(n,t){n=n||{},t=t||{};let o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(c,I,d,B){return Z.isPlainObject(c)&&Z.isPlainObject(I)?Z.merge.call({caseless:B},c,I):Z.isPlainObject(I)?Z.merge({},I):Z.isArray(I)?I.slice():I}function e(c,I,d,B){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return i(void 0,c,d,B)}else return i(c,I,d,B)}function a(c,I){if(!Z.isUndefined(I))return i(void 0,I)}function A(c,I){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return i(void 0,c)}else return i(void 0,I)}function r(c){let I=Z.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Z.isUndefined(I))if(Z.isPlainObject(I)){if(Z.hasOwnProp(I,c))return I[c]}else return;let d=Z.hasOwnProp(n,"transitional")?n.transitional:void 0;if(Z.isPlainObject(d)&&Z.hasOwnProp(d,c))return d[c]}function s(c,I,d){if(Z.hasOwnProp(t,d))return i(c,I);if(Z.hasOwnProp(n,d))return i(void 0,c)}let g={url:a,method:a,data:a,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,allowedSocketPaths:A,responseEncoding:A,validateStatus:s,headers:(c,I,d)=>e(AJ(c),AJ(I),d,!0)};return Z.forEach(qQe({...n,...t}),function(I){if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=Z.hasOwnProp(g,I)?g[I]:e,B=Z.hasOwnProp(n,I)?n[I]:void 0,f=Z.hasOwnProp(t,I)?t[I]:void 0,Q=d(B,f,I);Z.isUndefined(Q)&&d!==s||(o[I]=Q)}),Z.hasOwnProp(t,"validateStatus")&&Z.isUndefined(t.validateStatus)&&r("validateStatusUndefinedResolves")===!1&&(Z.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}var zQe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function VQe(n){let t=nn({},n),o=d=>Z.hasOwnProp(t,d)?t[d]:void 0,i=o("data"),e=o("withXSRFToken"),a=o("xsrfHeaderName"),A=o("xsrfCookieName"),r=o("headers"),s=o("auth"),g=o("baseURL"),c=o("allowAbsoluteUrls"),I=o("url");if(t.headers=r=Lt.from(r),t.url=BI(fI(g,I,c,t),o("params"),o("paramsSerializer")),s){let d=Z.getSafeProp(s,"username")||"",B=Z.getSafeProp(s,"password")||"";try{r.set("Authorization","Basic "+btoa(d+":"+(B?zQe(B):"")))}catch(f){throw we.from(f,we.ERR_BAD_OPTION_VALUE,n)}}if(Z.isFormData(i)&&(Bt.hasStandardBrowserEnv||Bt.hasStandardBrowserWebWorkerEnv||Z.isReactNative(i)?r.setContentType(void 0):Z.isFunction(i.getHeaders)&&JE(r,i.getHeaders(),o("formDataHeaderPolicy"))),Bt.hasStandardBrowserEnv&&(Z.isFunction(e)&&(e=e(t)),e===!0||e==null&&$j(t.url))){let B=a&&A&&eJ.read(A);B&&r.set(a,B)}return t}var PQ=VQe;var WQe=typeof XMLHttpRequest<"u",tJ=WQe&&function(n){return new Promise(function(o,i){let e=PQ(n),a=e.data,A=Lt.from(e.headers).normalize(),{responseType:r,onUploadProgress:s,onDownloadProgress:g}=e,c,I,d,B,f;function Q(){B&&B(),f&&f(),e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(e.method.toUpperCase(),e.url,!0),y.timeout=e.timeout;function m(){if(!y)return;let T=Lt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),H={data:!r||r==="text"||r==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:T,config:n,request:y};Jn(function(F){o(F),Q()},function(F){i(F),Q()},H),y=null}"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(m)},y.onabort=function(){y&&(i(new we("Request aborted",we.ECONNABORTED,n,y)),Q(),y=null)},y.onerror=function(R){let H=R&&R.message?R.message:"Network Error",j=new we(H,we.ERR_NETWORK,n,y);j.event=R||null,i(j),Q(),y=null},y.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",H=e.transitional||Wg;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),i(new we(R,H.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,n,y)),Q(),y=null},a===void 0&&A.setContentType(null),"setRequestHeader"in y&&Z.forEach(up(A),function(R,H){y.setRequestHeader(H,R)}),Z.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),r&&r!=="json"&&(y.responseType=e.responseType),g&&([d,f]=Vs(g,!0),y.addEventListener("progress",d)),s&&y.upload&&([I,B]=Vs(s),y.upload.addEventListener("progress",I),y.upload.addEventListener("loadend",B)),(e.cancelToken||e.signal)&&(c=T=>{y&&(i(!T||T.type?new ji(null,n,y):T),y.abort(),Q(),y=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let _=jE(e.url);if(_&&!Bt.protocols.includes(_)){i(new we("Unsupported protocol "+_+":",we.ERR_BAD_REQUEST,n)),Q();return}y.send(a||null)})};var ZQe=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;let o=new AbortController,i=!1,e=function(s){if(!i){i=!0,A();let g=s instanceof Error?s:this.reason;o.abort(g instanceof we?g:new ji(g instanceof Error?g.message:g))}},a=t&&setTimeout(()=>{a=null,e(new we(`timeout of ${t}ms exceeded`,we.ETIMEDOUT))},t),A=()=>{n&&(a&&clearTimeout(a),a=null,n.forEach(s=>{s.unsubscribe?s.unsubscribe(e):s.removeEventListener("abort",e)}),n=null)};n.forEach(s=>{if(!i){if(s.aborted){e.call(s);return}s.addEventListener("abort",e,{once:!0})}});let{signal:r}=o;return r.unsubscribe=()=>Z.asap(A),r},rJ=ZQe;var XQe=function*(n,t){let o=n.byteLength;if(!t||o{let e=$Qe(n,t),a=0,A,r=s=>{A||(A=!0,i&&i(s))};return new ReadableStream({async pull(s){try{let{done:g,value:c}=await e.next();if(g){r(),s.close();return}let I=c.byteLength;if(o){let d=a+=I;o(d)}s.enqueue(new Uint8Array(c))}catch(g){throw r(g),g}},cancel(s){return r(s),e.return()}},{highWaterMark:2})};var aJ=64*1024,{isFunction:GQ}=Z,Aye=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),iJ=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},oJ=(n,...t)=>{try{return!!n(...t)}catch{return!1}},tye=n=>{let t=n.indexOf("://"),o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},rye=n=>{let t=Z.global!==void 0&&Z.global!==null?Z.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);let{fetch:e,Request:a,Response:A}=n,r=e?GQ(e):typeof fetch=="function",s=GQ(a),g=GQ(A);if(!r)return!1;let c=r&&GQ(o),I=r&&(typeof i=="function"?(m=>_=>m.encode(_))(new i):async m=>new Uint8Array(await new a(m).arrayBuffer())),d=s&&c&&oJ(()=>{let m=!1,_=new a(Bt.origin,{body:new o,method:"POST",get duplex(){return m=!0,"half"}}),T=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),m&&!T}),B=g&&c&&oJ(()=>Z.isReadableStream(new A("").body)),f={stream:B&&(m=>m.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!f[m]&&(f[m]=(_,T)=>{let R=_&&_[m];if(R)return R.call(_);throw new we(`Response type '${m}' is not supported`,we.ERR_NOT_SUPPORT,T)})});let Q=async m=>{if(m==null)return 0;if(Z.isBlob(m))return m.size;if(Z.isSpecCompliantForm(m))return(await new a(Bt.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(m)||Z.isArrayBuffer(m))return m.byteLength;if(Z.isURLSearchParams(m)&&(m=m+""),Z.isString(m))return(await I(m)).byteLength},y=async(m,_)=>{let T=Z.toFiniteNumber(m.getContentLength());return T??Q(_)};return async m=>{let{url:_,method:T,data:R,signal:H,cancelToken:j,timeout:F,onDownloadProgress:q,onUploadProgress:J,responseType:x,headers:P,withCredentials:z="same-origin",fetchOptions:U,maxContentLength:N,maxBodyLength:k}=PQ(m),V=Z.isNumber(N)&&N>-1,ee=Z.isNumber(k)&&k>-1,ie=ve=>Z.hasOwnProp(m,ve)?m[ve]:void 0,Te=e||fetch;x=x?(x+"").toLowerCase():"text";let se=rJ([H,j&&j.toAbortSignal()],F),Ne=null,fe=se&&se.unsubscribe&&(()=>{se.unsubscribe()}),De,Ke=null,rA=()=>new we("Request body larger than maxBodyLength limit",we.ERR_BAD_REQUEST,m,Ne);try{let ve,iA=ie("auth");if(iA){let We=Z.getSafeProp(iA,"username")||"",bA=Z.getSafeProp(iA,"password")||"";ve={username:We,password:bA}}if(tye(_)){let We=new URL(_,Bt.origin);if(!ve&&(We.username||We.password)){let bA=iJ(We.username),Be=iJ(We.password);ve={username:bA,password:Be}}(We.username||We.password)&&(We.username="",We.password="",_=We.href)}if(ve&&(P.delete("authorization"),P.set("Authorization","Basic "+btoa(Aye((ve.username||"")+":"+(ve.password||""))))),V&&typeof _=="string"&&_.startsWith("data:")&&ST(_)>N)throw new we("maxContentLength size of "+N+" exceeded",we.ERR_BAD_RESPONSE,m,Ne);if(ee&&T!=="get"&&T!=="head"){let We=await Q(R);if(typeof We=="number"&&isFinite(We)&&(De=We,We>k))throw rA()}let Ce=ee&&(Z.isReadableStream(R)||Z.isStream(R)),he=(We,bA,Be)=>OT(We,aJ,Re=>{if(ee&&Re>k)throw Ke=rA();bA&&bA(Re)},Be);if(d&&T!=="get"&&T!=="head"&&(J||Ce)){if(De=De??await y(P,R),De!==0||Ce){let We=new a(_,{method:"POST",body:R,duplex:"half"}),bA;if(Z.isFormData(R)&&(bA=We.headers.get("content-type"))&&P.setContentType(bA),We.body){let[Be,Re]=J&&_p(De,Vs(Tp(J)))||[];R=he(We.body,Be,Re)}}}else if(Ce&&!s&&c&&T!=="get"&&T!=="head")R=he(R);else if(Ce&&s&&!d&&T!=="get"&&T!=="head")throw new we("Stream request bodies are not supported by the current fetch implementation",we.ERR_NOT_SUPPORT,m,Ne);Z.isString(z)||(z=z?"include":"omit");let Ze=s&&"credentials"in a.prototype;if(Z.isFormData(R)){let We=P.getContentType();We&&/^multipart\/form-data/i.test(We)&&!/boundary=/i.test(We)&&P.delete("content-type")}P.set("User-Agent","axios/"+zs,!1);let je={...U,signal:se,method:T.toUpperCase(),headers:up(P.normalize()),body:R,duplex:"half",credentials:Ze?z:void 0};Ne=s&&new a(_,je);let Oe=await(s?Te(Ne,U):Te(_,je)),hA=Lt.from(Oe.headers);if(V){let We=Z.toFiniteNumber(hA.getContentLength());if(We!=null&&We>N)throw new we("maxContentLength size of "+N+" exceeded",we.ERR_BAD_RESPONSE,m,Ne)}let dA=B&&(x==="stream"||x==="response");if(B&&Oe.body&&(q||V||dA&&fe)){let We={};["status","statusText","headers"].forEach(He=>{We[He]=Oe[He]});let bA=Z.toFiniteNumber(hA.getContentLength()),[Be,Re]=q&&_p(bA,Vs(Tp(q),!0))||[],Le=0,MA=He=>{if(V&&(Le=He,Le>N))throw new we("maxContentLength size of "+N+" exceeded",we.ERR_BAD_RESPONSE,m,Ne);Be&&Be(He)};Oe=new A(OT(Oe.body,aJ,MA,()=>{Re&&Re(),fe&&fe()}),We)}x=x||"text";let aA=await f[Z.findKey(f,x)||"text"](Oe,m);if(V&&!B&&!dA){let We;if(aA!=null&&(typeof aA.byteLength=="number"?We=aA.byteLength:typeof aA.size=="number"?We=aA.size:typeof aA=="string"&&(We=typeof i=="function"?new i().encode(aA).byteLength:aA.length)),typeof We=="number"&&We>N)throw new we("maxContentLength size of "+N+" exceeded",we.ERR_BAD_RESPONSE,m,Ne)}return!dA&&fe&&fe(),await new Promise((We,bA)=>{Jn(We,bA,{data:aA,headers:Lt.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:m,request:Ne})})}catch(ve){if(fe&&fe(),se&&se.aborted&&se.reason instanceof we){let iA=se.reason;throw iA.config=m,Ne&&(iA.request=Ne),ve!==iA&&Object.defineProperty(iA,"cause",{__proto__:null,value:ve,writable:!0,enumerable:!1,configurable:!0}),iA}if(Ke)throw Ne&&!Ke.request&&(Ke.request=Ne),Ke;if(ve instanceof we)throw Ne&&!ve.request&&(ve.request=Ne),ve;if(ve&&ve.name==="TypeError"&&/Load failed|fetch/i.test(ve.message)){let iA=new we("Network Error",we.ERR_NETWORK,m,Ne,ve&&ve.response);throw Object.defineProperty(iA,"cause",{__proto__:null,value:ve.cause||ve,writable:!0,enumerable:!1,configurable:!0}),iA}throw we.from(ve,ve&&ve.code,m,Ne,ve&&ve.response)}}},aye=new Map,bT=n=>{let t=n&&n.env||{},{fetch:o,Request:i,Response:e}=t,a=[i,e,o],A=a.length,r=A,s,g,c=aye;for(;r--;)s=a[r],g=c.get(s),g===void 0&&c.set(s,g=r?new Map:rye(t)),c=g;return g},xrA=bT();var MT={http:Xj,xhr:tJ,fetch:{get:bT}};Z.forEach(MT,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});var nJ=n=>`- ${n}`,oye=n=>Z.isFunction(n)||n===null||n===!1;function nye(n,t){n=Z.isArray(n)?n:[n];let{length:o}=n,i,e,a={};for(let A=0;A`adapter ${s} `+(g===!1?"is not supported by the environment":"is not available in the build")),r=o?A.length>1?`since : +`+A.map(nJ).join(` +`):" "+nJ(A[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+r,we.ERR_NOT_SUPPORT)}return e}var FQ={getAdapter:nye,adapters:MT};function _T(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ji(null,n)}function zE(n){return _T(n),n.headers=Lt.from(n.headers),n.data=vE.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),FQ.getAdapter(n.adapter||Dp.adapter,n)(n).then(function(i){_T(n),n.response=i;try{i.data=vE.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=Lt.from(i.headers),i},function(i){if(!PE(i)&&(_T(n),i&&i.response)){n.response=i.response;try{i.response.data=vE.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=Lt.from(i.response.headers)}return Promise.reject(i)})}var LQ={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{LQ[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});var sJ={};LQ.transitional=function(t,o,i){function e(a,A){return"[Axios v"+zs+"] Transitional option '"+a+"'"+A+(i?". "+i:"")}return(a,A,r)=>{if(t===!1)throw new we(e(A," has been removed"+(o?" in "+o:"")),we.ERR_DEPRECATED);return o&&!sJ[A]&&(sJ[A]=!0,console.warn(e(A," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(a,A,r):!0}};LQ.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function sye(n,t,o){if(typeof n!="object"||n===null)throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);let i=Object.keys(n),e=i.length;for(;e-- >0;){let a=i[e],A=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(A){let r=n[a],s=r===void 0||A(r,a,n);if(s!==!0)throw new we("option "+a+" must be "+s,we.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new we("Unknown option "+a,we.ERR_BAD_OPTION)}}var VE={assertOptions:sye,validators:LQ};var xa=VE.validators,Np=class{constructor(t){this.defaults=t||{},this.interceptors={request:new v_,response:new v_}}async request(t,o){try{return await this._request(t,o)}catch(i){if(i instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;let a=(()=>{if(!e.stack)return"";let A=e.stack.indexOf(` `);return A===-1?"":e.stack.slice(A+1)})();try{if(!i.stack)i.stack=a;else if(a){let A=a.indexOf(` `),r=A===-1?-1:a.indexOf(` `,A+1),s=r===-1?"":a.slice(r+1);String(i.stack).endsWith(s)||(i.stack+=` -`+a)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=on(this.defaults,o);let{transitional:i,paramsSerializer:e,headers:a}=o;i!==void 0&&xE.assertOptions(i,{silentJSONParsing:Ka.transitional(Ka.boolean),forcedJSONParsing:Ka.transitional(Ka.boolean),clarifyTimeoutError:Ka.transitional(Ka.boolean),legacyInterceptorReqResOrdering:Ka.transitional(Ka.boolean),advertiseZstdAcceptEncoding:Ka.transitional(Ka.boolean),validateStatusUndefinedResolves:Ka.transitional(Ka.boolean)},!1),e!=null&&(Z.isFunction(e)?o.paramsSerializer={serialize:e}:xE.assertOptions(e,{encode:Ka.function,serialize:Ka.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),xE.assertOptions(o,{baseUrl:Ka.spelling("baseURL"),withXsrfToken:Ka.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let A=a&&Z.merge(a.common,a[o.method]);a&&Z.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete a[f]}),o.headers=Ft.concat(A,a);let r=[],s=!0;this.interceptors.request.forEach(function(Q){if(typeof Q.runWhen=="function"&&Q.runWhen(o)===!1)return;s=s&&Q.synchronous;let y=o.transitional||jg;y&&y.legacyInterceptorReqResOrdering?r.unshift(Q.fulfilled,Q.rejected):r.push(Q.fulfilled,Q.rejected)});let g=[];this.interceptors.response.forEach(function(Q){g.push(Q.fulfilled,Q.rejected)});let c,I=0,d;if(!s){let f=[KE.bind(this),void 0];for(f.unshift(...r),f.push(...g),d=f.length,c=Promise.resolve(o);IKE.call(this,B)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=KE.call(this,B)}catch(f){c=Promise.reject(f)}for(I=0,d=g.length;I{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](e);i._listeners=null}),this.promise.then=e=>{let a,A=new Promise(r=>{i.subscribe(r),a=r}).then(e);return A.cancel=function(){i.unsubscribe(a)},A},t(function(a,A,r){i.reason||(i.reason=new Yi(a,A,r),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let t=new AbortController,o=i=>{t.abort(i)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new n(function(e){t=e}),cancel:t}}},Hj=hT;function ET(n){return function(o){return n.apply(null,o)}}function CT(n){return Z.isObject(n)&&n.isAxiosError===!0}var uT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(uT).forEach(([n,t])=>{uT[t]=n});var Kj=uT;function xj(n){let t=new YE(n),o=uE(YE.prototype.request,t);return Z.extend(o,YE.prototype,t,{allOwnKeys:!0}),Z.extend(o,t,null,{allOwnKeys:!0}),o.create=function(e){return xj(on(n,e))},o}var mr=xj(Bp);mr.Axios=YE;mr.CanceledError=Yi;mr.CancelToken=Hj;mr.isCancel=_E;mr.VERSION=Ys;mr.toFormData=Yg;mr.AxiosError=we;mr.Cancel=mr.CanceledError;mr.all=function(t){return Promise.all(t)};mr.spread=ET;mr.isAxiosError=CT;mr.mergeConfig=on;mr.AxiosHeaders=Ft;mr.formToJSON=n=>EQ(Z.isHTMLForm(n)?new FormData(n):n);mr.getAdapter=wQ.getAdapter;mr.HttpStatusCode=Kj;mr.default=mr;var bQ=mr;var{Axios:_rA,AxiosError:BT,CanceledError:TrA,isCancel:NrA,CancelToken:RrA,VERSION:krA,all:vrA,Cancel:PrA,isAxiosError:GrA,spread:FrA,toFormData:LrA,AxiosHeaders:UrA,HttpStatusCode:HrA,formToJSON:KrA,getAdapter:xrA,mergeConfig:YrA,create:jrA}=bQ;var E=Ve(PJ()),b=Ve(FJ()),M=Ve(Qq()),uz=Ve(Wq());import tt from"fs";import SC from"path";import _y from"crypto";import wbe from"querystring";var cbe=Ve(j4(),1),Ibe=Ve(hy(),1),lbe=Ve(Up(),1),pbe=Ve(w0(),1),dbe=Ve(M0(),1),hbe=Ve(v0(),1),e8=Ve(By(),1),Ebe=Ve($4(),1);var Do=e8.default;import{gzipSync as Obe}from"zlib";import bbe from"http";import Mbe from"https";import{promises as _be}from"dns";import{isIP as Bz}from"net";function U(n,t){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,i=Object.getOwnPropertySymbols(n);e=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function S(n){return this instanceof S?(this.v=n,this):new S(n)}function H(n,t,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o.apply(n,t||[]),e,a=[];return e={},A("next"),A("throw"),A("return"),e[Symbol.asyncIterator]=function(){return this},e;function A(d){i[d]&&(e[d]=function(B){return new Promise(function(f,Q){a.push([d,B,f,Q])>1||r(d,B)})})}function r(d,B){try{s(i[d](B))}catch(f){I(a[0][3],f)}}function s(d){d.value instanceof S?Promise.resolve(d.value.v).then(g,c):I(a[0][2],d)}function g(d){r("next",d)}function c(d){r("throw",d)}function I(d,B){d(B),a.shift(),a.length&&r(a[0][0],a[0][1])}}function $8(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],o;return t?t.call(n):(n=typeof X8=="function"?X8(n):n[Symbol.iterator](),o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o);function i(a){o[a]=n[a]&&function(A){return new Promise(function(r,s){A=n[a](A),e(r,s,A.done,A.value)})}}function e(a,A,r,s){Promise.resolve(s).then(function(g){a({value:g,done:r})},A)}}var wy;function Tbe(){if(wy!==void 0)return wy;let n=[SC.resolve(__dirname,"..","package.json"),SC.resolve(__dirname,"..","..","package.json")];for(let t of n)try{let o=JSON.parse(tt.readFileSync(t,"utf-8"));if(o.name==="@larksuiteoapi/node-sdk"&&typeof o.version=="string")return wy=o.version,o.version}catch{}return wy="unknown","unknown"}function ez(n){return n.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,64)}function bk(n,t){let o=`oapi-node-sdk/${Tbe()}`;if(n){let i=ez(n);i&&(o+=` source/${i}`)}if(t?.extraTags)for(let i of t.extraTags){let e=ez(i);e&&(o+=` ${e}`)}return o}var Wp=bQ.create(),Nbe=bk();Wp.interceptors.request.use(n=>(n.headers&&!n.headers["User-Agent"]&&(n.headers["User-Agent"]=Nbe),n),void 0,{synchronous:!0});Wp.interceptors.response.use(n=>n.config.$return_headers?{data:n.data,headers:n.headers}:n.data);var Zn;(function(n){n[n.SelfBuild=0]="SelfBuild",n[n.ISV=1]="ISV"})(Zn||(Zn={}));var Xn;(function(n){n[n.Feishu=0]="Feishu",n[n.Lark=1]="Lark"})(Xn||(Xn={}));var zi;(function(n){n[n.fatal=0]="fatal",n[n.error=1]="error",n[n.warn=2]="warn",n[n.info=3]="info",n[n.debug=4]="debug",n[n.trace=5]="trace"})(zi||(zi={}));var Ty=Symbol("event-type"),Ny=Symbol("tenant-key"),bC=Symbol("app-ticket"),mC=Symbol("tenant-access-token"),fz=Symbol("with-helpdesk-authorization"),Qz=Symbol("with-user-access-token"),Rbe=Symbol("user-access-token"),Az=Symbol("aily-session-record"),kbe=n=>Buffer.from(n).toString("base64"),Ry=class{constructor(){this.values=new Map}getCacheKey(t,o){return o?`${o}/${t.toString()}`:t}get(t,o){return h(this,void 0,void 0,function*(){let i=this.getCacheKey(t,o?.namespace),e=this.values.get(i);if(e){let{value:a,expiredTime:A}=e;if(!A||A-new Date().getTime()>0)return a}})}set(t,o,i,e){return h(this,void 0,void 0,function*(){let a=this.getCacheKey(t,e?.namespace);return this.values.set(a,{value:o,expiredTime:i}),!0})}},_C=new Ry,MC=class{constructor(t){let o=_y.createHash("sha256");o.update(t),this.key=o.digest()}decrypt(t){let o=Buffer.from(t,"base64"),i=_y.createDecipheriv("aes-256-cbc",this.key,o.slice(0,16)),e=i.update(o.slice(16).toString("hex"),"hex","utf8");return e+=i.final("utf8"),e}},yz=n=>{switch(n){case Xn.Feishu:return"https://open.feishu.cn";case Xn.Lark:return"https://open.larksuite.com";default:return n}},C=(n,t={})=>n.replace(/:([^/]+)/g,(o,i)=>{if(t[i]!==void 0)return t[i];throw new Error(`request miss ${i} path argument`)}),ky=(n,t)=>h(void 0,void 0,void 0,function*(){(typeof n=="function"?n():n)&&(yield t())}),vbe=n=>n?n.replace(/^\//,""):"",Oy=(n,t=[])=>{let o={};return n&&t.forEach(i=>{Object.prototype.hasOwnProperty.call(n,i)&&(o[i]=n[i])}),o},u=n=>{var t;if(n instanceof BT){let{message:o,response:i,request:e,config:a}=Oy(n,["message","response","request","config"]),r=[{message:o,config:Oy(a,["data","url","params","method"]),request:Oy(e,["protocol","host","path","method"]),response:Oy(i,["data","status","statusText"])}],s=(t=n?.response)===null||t===void 0?void 0:t.data;return s&&(typeof s=="object"?r.push(Object.assign(Object.assign({},s),s.error?s.error:{})):r.push(s)),r}return[n]},$0=class{constructor(){this.acs={accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},eN=class extends $0{constructor(){super(...arguments),this.admin={badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},AN=class extends eN{constructor(){super(...arguments),this.aily_rag={}}},tN=class extends AN{constructor(){super(...arguments),this.aily={v1:{ailySession:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appDataAssetTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appSkill:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appKnowledge:{ask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appDataAsset:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadFile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/upload_file`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},ailySessionRun:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ailySessionAilyMessage:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentVisibility:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/agent_visibility/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentAttachment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},tenantAppStat:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentChat:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats/:agent_chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentChatSession:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentArtifact:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/artifacts/:agent_artifact_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},rN=class extends tN{constructor(){super(...arguments),this.apaas={v1:{approvalTask:{addAssignee:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),agree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationObjectRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationObject:{oqlQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/oql_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationFunction:{invoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationRoleMember:{batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationRecordPermissionMember:{batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationEnvironmentVariable:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTask:{expediting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/expediting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),chatGroup:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/chat_group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rollbackPoints:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback_points`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_task/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationFlow:{execute:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approvalInstance:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationAuditLog:{auditLogList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),dataChangeLogsList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),dataChangeLogDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},seatAssignment:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},seatActivity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workspaceTable:{recordsBatchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recordsDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recordsPatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recordsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recordsPost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tableGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workspace:{sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workspaceView:{viewsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workspaceEnum:{enumGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantAppMetrics:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/tenant_app_metrics/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},aN=class extends rN{constructor(){super(...arguments),this.application={applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v5:{application:{favouriteWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),favourite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recommendWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),recommend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v6:{applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v7:{applicationBase:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/applications/:app_id/base`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationPublish:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/applications/:app_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appAvatarUpload:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/app_avatar/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},applicationConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/applications/:app_id/config`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationAbility:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/applications/:app_id/ability`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},iN=class extends aN{constructor(){super(...arguments),this.approval={instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v4:{instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},oN=class extends iN{constructor(){super(...arguments),this.attendance_machine={}}},nN=class extends oN{constructor(){super(...arguments),this.attendance={file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},sN=class extends nN{constructor(){super(...arguments),this.audio_video_ai={}}},gN=class extends sN{constructor(){super(...arguments),this.auth={appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v3:{appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},cN=class extends gN{constructor(){super(...arguments),this.authen={userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},IN=class extends cN{constructor(){super(...arguments),this.authz={}}},lN=class extends IN{constructor(){super(...arguments),this.aweme_ecosystem={}}},pN=class extends lN{constructor(){super(...arguments),this.baike={entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},dN=class extends pN{constructor(){super(...arguments),this.base={v2:{appRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/base/v2/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},hN=class extends dN{constructor(){super(...arguments),this.bitable={appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},EN=class extends hN{constructor(){super(...arguments),this.block={entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v2:{entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},CN=class extends EN{constructor(){super(...arguments),this.board={v1:{whiteboardNode:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createPlantuml:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},whiteboard:{downloadAsImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),theme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateTheme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},uN=class extends CN{constructor(){super(...arguments),this.bot={v4:{bot:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},BN=class extends uN{constructor(){super(...arguments),this.c360={}}},fN=class extends BN{constructor(){super(...arguments),this.calendar={exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v4:{exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},QN=class extends fN{constructor(){super(...arguments),this.cardkit={v1:{card:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),settings:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/settings`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/id_convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},cardElement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),content:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id/content`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},yN=class extends QN{constructor(){super(...arguments),this.ccm_unified_resource={}}},mN=class extends yN{constructor(){super(...arguments),this.collab_plugins={}}},SN=class extends mN{constructor(){super(...arguments),this.comment_sdk={}}},DN=class extends SN{constructor(){super(...arguments),this.compensation={v1:{indicator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},socialPlan:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_plans/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},item:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},plan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},socialInsurance:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_insurances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},itemCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},changeReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},archive:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/archives`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/archives/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},recurringPayment:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},socialArchive:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_archive/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},socialArchiveAdjustRecord:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},lumpSumPayment:{batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryDetailWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},wN=class extends DN{constructor(){super(...arguments),this.contact={group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v3:{group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},ON=class extends wN{constructor(){super(...arguments),this.content_check={}}},bN=class extends ON{constructor(){super(...arguments),this.contract={}}},MN=class extends bN{constructor(){super(...arguments),this.corehr={contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{costCenter:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoCountryRegionSubdivision:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},probation:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),enableDisableAssessment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/edit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},probationAssessment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customOrg:{deleteOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/delete_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/:org_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateRule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/update_rule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},preHire:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transitTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),withdrawOnboarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),restoreFlowInstance:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transformOnboardingTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobGrade:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},position:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/del_position`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/:position_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeesBp:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},bp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeesAdditionalJob:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoNationality:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoCountryRegion:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoCity:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoDistrict:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoBank:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoCurrency:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeCustomOrg:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/create_emp_custom_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),editEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/edit_emp_custom_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),employmentCustomOrgRecord:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/employment_custom_org_record`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),querybyid:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/querybyid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},signatureFile:{listByBizId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`,A),method:"POST",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},signatureNode:{listByFileId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},company:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryOperationLogsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryOperationLogs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),parents:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/parents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},draft:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approvalGroups:{openQueryPositionChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approval_groups/:process_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),openQueryJobChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_job_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),openQueryDepartmentChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/:location_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},locationAddress:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoLanguage:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoTimeZone:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reportDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workforcePlanDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchDelete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchSave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offboarding:{submitV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/offboardings/edit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/offboardings/revoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoBankBranch:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},enum:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/enums/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},process:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),flowVariableData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processApprover:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/approvers/:approver_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processWithdraw:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approver:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processTransfer:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processExtra:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/extra`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeesInternationalAssignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},pathway:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processStart:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/process_start`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costAllocation:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_allocations/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_allocations/update_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_allocations/create_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_allocations/remove_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costCenterVersion:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processQueryFlowDataTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/query_flow_data_template`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},defaultCostCenter:{createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/default_cost_centers/create_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/default_cost_centers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/default_cost_centers/remove_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/default_cost_centers/update_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processRevoke:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},signatureTemplateInfoWithThumbnail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobChange:{revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},contract:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workforcePlanDetail:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch_v2`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employee:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},signatureTemplate:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_templates/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeesJobData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/job_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/job_datas/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},person:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workforcePlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},_N=class extends MN{constructor(){super(...arguments),this.data_cube={}}},TN=class extends _N{constructor(){super(...arguments),this.device={}}},NN=class extends TN{constructor(){super(...arguments),this.directory={v1:{employee:{resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),regular:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id/regular`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),toBeResigned:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id/to_be_resigned`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collaborationTenant:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collaborationRule:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collborationShareEntity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},RN=class extends NN{constructor(){super(...arguments),this.docs_ai={}}},kN=class extends RN{constructor(){super(...arguments),this.docs_tool={}}},vN=class extends kN{constructor(){super(...arguments),this.docs={v1:{content:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docs/v1/content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},PN=class extends vN{constructor(){super(...arguments),this.document_ai={v1:{businessCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},contract:{fieldExtraction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},businessLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},drivingLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},vehicleLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},foodManageLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},foodProduceLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},hkmMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},chinesePassport:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},twMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},healthCertificate:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/health_certificate/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},vehicleInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/vehicle_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},resume:{parse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/resume/parse`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},bankCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},trainInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},taxiInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},vatInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},idCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})}}}}},GN=class extends PN{constructor(){super(...arguments),this.docx={document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},FN=class extends GN{constructor(){super(...arguments),this.drive={file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{fileLike:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commentReaction:{updateReaction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/files/:file_token/comments/reaction`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublic:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},LN=class extends FN{constructor(){super(...arguments),this.ea_symphony={}}},UN=class extends LN{constructor(){super(...arguments),this.edu={}}},HN=class extends UN{constructor(){super(...arguments),this.ehr={attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},KN=class extends HN{constructor(){super(...arguments),this.elearning={}}},xN=class extends KN{constructor(){super(...arguments),this.event={outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},YN=class extends xN{constructor(){super(...arguments),this.exam={}}},jN=class extends YN{constructor(){super(...arguments),this.face_detection={}}},JN=class extends jN{constructor(){super(...arguments),this.financial_access_platform={}}},qN=class extends JN{constructor(){super(...arguments),this.grounding={}}},zN=class extends qN{constructor(){super(...arguments),this.gtm_ai={}}},VN=class extends zN{constructor(){super(...arguments),this.helpdesk={agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},WN=class extends VN{constructor(){super(...arguments),this.hire={websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{talent:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v2/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v2/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},ZN=class extends WN{constructor(){super(...arguments),this.human_authentication={identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},XN=class extends ZN{constructor(){super(...arguments),this.im={message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=U(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=U(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=U(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=U(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=U(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=U(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{bizEntityTagRelation:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},urlPreview:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/url_previews/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appFeedCardBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},feedCard:{botTimeSentive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/feed_cards/:feed_card_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tag:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/tags`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/tags/:tag_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatButton:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/chat_button`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appFeedCard:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/app_feed_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chat:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},$N=class extends XN{constructor(){super(...arguments),this.inline_platform={}}},eR=class extends $N{constructor(){super(...arguments),this.laps={}}},AR=class extends eR{constructor(){super(...arguments),this.lingo={v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},repo:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/repos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},tR=class extends AR{constructor(){super(...arguments),this.llpp={}}},rR=class extends tR{constructor(){super(...arguments),this.mail={mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},aR=class extends rR{constructor(){super(...arguments),this.mcp={}}},iR=class extends aR{constructor(){super(...arguments),this.mdm={userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v3:{countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v3/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},batchCountryRegion:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v3/batch_country_region`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},oR=class extends iR{constructor(){super(...arguments),this.meeting_room={}}},nR=class extends oR{constructor(){super(...arguments),this.mindnote={}}},sR=class extends nR{constructor(){super(...arguments),this.minutes={v1:{minuteTranscript:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/transcript`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},minuteStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},minuteMedia:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/media`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},minute:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),artifacts:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/artifacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},gR=class extends sR{constructor(){super(...arguments),this.moments={post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},cR=class extends gR{constructor(){super(...arguments),this.myai_ai_extension={}}},IR=class extends cR{constructor(){super(...arguments),this.myai_assistant={}}},lR=class extends IR{constructor(){super(...arguments),this.myai_base_ai={}}},pR=class extends lR{constructor(){super(...arguments),this.myai_ccm_extension={}}},dR=class extends pR{constructor(){super(...arguments),this.myai_data={}}},hR=class extends dR{constructor(){super(...arguments),this.myai_im_extension={}}},ER=class extends hR{constructor(){super(...arguments),this.myai_mail={}}},CR=class extends ER{constructor(){super(...arguments),this.myai_memory_reflection={}}},uR=class extends CR{constructor(){super(...arguments),this.myai_scenario_summary={}}},BR=class extends uR{constructor(){super(...arguments),this.myai_slides={}}},fR=class extends BR{constructor(){super(...arguments),this.myai_url_extension={}}},QR=class extends fR{constructor(){super(...arguments),this.myai={}}},yR=class extends QR{constructor(){super(...arguments),this.okr={review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},v1:{review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})}},v2:{okrAlignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjective:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),keyResultsPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_position`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),keyResultsWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_weight`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrKeyResult:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjectiveAlignment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrCycle:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),objectivesWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_weight`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),objectivesPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_position`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjectiveKeyResult:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrKeyResultIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjectiveIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrCycleObjective:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrIndicator:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/indicators/:indicator_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjectiveProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrKeyResultProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},mR=class extends yR{constructor(){super(...arguments),this.optical_char_recognition={image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},SR=class extends mR{constructor(){super(...arguments),this.partner_ai={}}},DR=class extends SR{constructor(){super(...arguments),this.passport={session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},wR=class extends DR{constructor(){super(...arguments),this.payroll={v1:{datasourceRecord:{save:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasource_records/save`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},paymentDetail:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_detail/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},paymentActivity:{archive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_activitys/archive`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costAllocationPlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},paymentActivityDetail:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_activity_details`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},datasource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costAllocationDetail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costAllocationReport:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},paygroup:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},acctItem:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},OR=class extends wR{constructor(){super(...arguments),this.people_admin={}}},bR=class extends OR{constructor(){super(...arguments),this.people_ai={}}},MR=class extends bR{constructor(){super(...arguments),this.people_bytedance={}}},_R=class extends MR{constructor(){super(...arguments),this.performance={v1:{reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v1/review_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},stageTask:{findByUserList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_user_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),findByPage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_page`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},semester:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v1/semesters`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{reviewee:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/reviewees/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},additionalInformationsBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/additional_informations/batch`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricDetail:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_details/import`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_details/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},question:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},indicator:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},activity:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/activity/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricLib:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_libs/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/review_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricTemplate:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_templates/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/user_info/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reviewTemplate:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userGroupUserRel:{write:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/user_group_user_rels/write`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},additionalInformation:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/additional_informations/import`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},TR=class extends _R{constructor(){super(...arguments),this.personal_settings={systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},NR=class extends TR{constructor(){super(...arguments),this.profile={}}},RR=class extends NR{constructor(){super(...arguments),this.report={rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},kR=class extends RR{constructor(){super(...arguments),this.rule_engine={}}},vR=class extends kR{constructor(){super(...arguments),this.saasbi={}}},PR=class extends vR{constructor(){super(...arguments),this.scim={}}},GR=class extends PR{constructor(){super(...arguments),this.search_in_app={}}},FR=class extends GR{constructor(){super(...arguments),this.search={dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v2:{dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},LR=class extends FR{constructor(){super(...arguments),this.security_and_compliance={openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{deviceApplyRecord:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},deviceRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mine:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},UR=class extends LR{constructor(){super(...arguments),this.security_plugin={}}},HR=class extends UR{constructor(){super(...arguments),this.sheet_ai={}}},KR=class extends HR{constructor(){super(...arguments),this.sheets={spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v3:{spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},xR=class extends KR{constructor(){super(...arguments),this.slides_ai={}}},YR=class extends xR{constructor(){super(...arguments),this.slides={}}},jR=class extends YR{constructor(){super(...arguments),this.spark={v1:{appTable:{deleteTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),postTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patchTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdateTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTableDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTableList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTableRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appEnum:{getEnumDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums/:enum_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getEnumList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appView:{getViewRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/views/:view_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appStorage:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage`,A),method:"GET",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadInitialize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/initialize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadComplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{icon:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/icon`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadHtmlCodeAndRelease:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/upload_and_release_html_code`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),getAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/sql_commands`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},directoryUser:{idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/directory/user/id_convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},JR=class extends jR{constructor(){super(...arguments),this.speech_to_text={speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},qR=class extends JR{constructor(){super(...arguments),this.subscriptions={}}},zR=class extends qR{constructor(){super(...arguments),this.task={task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{task:{tasklists:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/tasklists`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_dependencies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_dependencies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setAncestorTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/set_ancestor_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_tasklist`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_tasklist`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},comment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},section:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tasksWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tasklist:{tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/add_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/remove_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customField:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tasklistActivitySubscription:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customFieldOption:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskV2:{taskSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/task_v2/task_subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listRelatedTaskWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listRelatedTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskSubtask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},VR=class extends zR{constructor(){super(...arguments),this.tenant={tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v2:{tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},WR=class extends VR{constructor(){super(...arguments),this.translation={text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},ZR=class extends WR{constructor(){super(...arguments),this.trust_layer={}}},XR=class extends ZR{constructor(){super(...arguments),this.trust_party={v1:{collaborationTenantCollaborationUser:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_users/:target_user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collaborationTenantCollaborationDepartment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_departments/:target_department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collaborationTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),visibleOrganization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/visible_organization`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},$R=class extends XR{constructor(){super(...arguments),this.unified_kms_log={}}},ek=class extends $R{constructor(){super(...arguments),this.unified_kms={}}},Ak=class extends ek{constructor(){super(...arguments),this.vault={}}},tk=class extends Ak{constructor(){super(...arguments),this.vc={material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},rk=class extends tk{constructor(){super(...arguments),this.verification={v1:{verification:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/verification/v1/verification`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},ak=class extends rk{constructor(){super(...arguments),this.wiki={spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{node:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return H(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=U(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},ik=class extends ak{constructor(){super(...arguments),this.workplace={workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},rg={error:(...n)=>{console.log("[error]:",...n)},warn:(...n)=>{console.warn("[warn]:",...n)},info:(...n)=>{console.info("[info]:",...n)},debug:(...n)=>{console.debug("[debug]:",...n)},trace:(...n)=>{console.trace("[trace]:",...n)}},rc=class{constructor(t,o){this.level=t,this.logger=o}error(...t){this.level>=zi.error&&this.logger.error(t)}warn(...t){this.level>=zi.warn&&this.logger.warn(t)}info(...t){this.level>=zi.info&&this.logger.info(t)}debug(...t){this.level>=zi.debug&&this.logger.debug(t)}trace(...t){this.level>=zi.trace&&this.logger.trace(t)}},ok=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.cache=t.cache,this.domain=t.domain,this.logger=t.logger,this.appType=t.appType,this.httpInstance=t.httpInstance,this.logger.debug("app ticket manager is ready"),this.checkAppTicket()}checkAppTicket(){var t;return h(this,void 0,void 0,function*(){this.appType===Zn.ISV&&((yield(t=this.cache)===null||t===void 0?void 0:t.get(bC,{namespace:this.appId}))||this.requestAppTicket())})}requestAppTicket(){return h(this,void 0,void 0,function*(){this.logger.debug("request app ticket"),yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,{app_id:this.appId,app_secret:this.appSecret}).catch(t=>{this.logger.error(t)})})}getAppTicket(){var t;return h(this,void 0,void 0,function*(){let o=yield(t=this.cache)===null||t===void 0?void 0:t.get(bC,{namespace:this.appId});if(o)return this.logger.debug("use cache app ticket"),o;yield this.requestAppTicket()})}},vy="/oauth/v3/token",Pbe="urn:ietf:params:oauth:grant-type:jwt-bearer",mz="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",Gbe="authorization_code",Fbe="refresh_token",Mk="X-Target-Service",Sz=7100,_k=7101,Dz=7102,Tk=7104,Lbe=Object.freeze({"open.feishu.cn":"https://accounts.feishu.cn","open.larksuite.com":"https://accounts.larksuite.com"}),xa=class extends Error{constructor(t,o){super(o),this.name="ClientAssertionError",this.code=t,this.msg=o}},Vp=class extends Error{constructor(t,o,i,e){super(e||i||"access token request failed"),this.name="AccessTokenError",this.statusCode=t,this.code=o,this.error=i,this.errorDescription=e}},Nk=n=>n.includes("://")?n:`https://${n}`;function Rk(n){let t=new URL(Nk(n));if(!t.host)throw new Error(`invalid url: ${n}`);return t.host}function kk(n){if(n.oauthBaseUrl)return Nk(n.oauthBaseUrl).replace(/\/+$/,"");let t=Rk(n.domain),o=Lbe[t];if(o)return o;throw new Error("oauthBaseUrl is not configured. When domain is a non-default value (neither open.feishu.cn nor open.larksuite.com), set oauthBaseUrl explicitly.")}function wz(n){return Rk(kk(n))}function vk(n,t){let o=new URL(Nk(n.targetService));if(o.protocol!=="https:")throw new Error("targetService must use https");if(o.username||o.password)throw new Error("targetService must not contain userinfo");let e=`${n.targetPrefix||""}${t}`.replace(/\/{2,}/g,"/");if(/(^|\/)\.\.(\/|$)/.test(e))throw new Error("targetPrefix must not contain path traversal");return`${o.protocol}//${o.host}${e}`}function Ube(n,t){var o,i;let e=(o=t?.code)!==null&&o!==void 0?o:"unknown",a=(i=t?.msg)!==null&&i!==void 0?i:"no message";return`failed to get ${n}, code: ${e}, msg: ${a}`}var nk=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.cache=t.cache,this.domain=t.domain,this.logger=t.logger,this.appType=t.appType,this.httpInstance=t.httpInstance,this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.appTicketManager=new ok({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance}),this.logger.debug("token manager is ready")}requestToken(t,o,i){return h(this,void 0,void 0,function*(){let e=yield this.httpInstance.post(t,o).catch(a=>{throw this.logger.error(a),a});if(!e||!e[i])throw new Error(Ube(i,e));return e})}getCustomTenantAccessToken(){var t,o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)return this.getTenantTokenByClientAssertion();let i=yield(t=this.cache)===null||t===void 0?void 0:t.get(mC,{namespace:this.appId});if(i)return this.logger.debug("use cache token"),i;this.logger.debug("request token");let{tenant_access_token:e,expire:a}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,{app_id:this.appId,app_secret:this.appSecret},"tenant_access_token");return yield(o=this.cache)===null||o===void 0?void 0:o.set(mC,e,new Date().getTime()+a*1e3-180*1e3,{namespace:this.appId}),e})}getTenantTokenByClientAssertion(){var t,o,i,e,a,A,r,s;return h(this,void 0,void 0,function*(){let g=kk({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),c=wz({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),I=yield(t=this.cache)===null||t===void 0?void 0:t.get(mC,{namespace:this.appId});if(I)return this.logger.debug("use cache token"),I;let d;try{d=yield this.clientAssertionProvider.retrieveToken(c)}catch(_){throw new xa(Dz,_?.message||"client assertion provider failed")}if(!d||!d.value)throw new xa(_k,"client assertion token is empty");let B=`${g}${vy}`,f={};d.targetInfo&&(B=vk(d.targetInfo,vy),f[Mk]=c),this.logger.debug("request token (client assertion)");let Q;try{Q=yield this.httpInstance.request({method:"post",url:B,headers:f,data:{grant_type:Pbe,client_assertion_type:mz,client_assertion:d.value,client_id:this.appId}})}catch(_){throw this.logger.error(_),new xa(((i=(o=_?.response)===null||o===void 0?void 0:o.data)===null||i===void 0?void 0:i.code)||0,((a=(e=_?.response)===null||e===void 0?void 0:e.data)===null||a===void 0?void 0:a.error_description)||((r=(A=_?.response)===null||A===void 0?void 0:A.data)===null||r===void 0?void 0:r.error)||"client assertion token exchange failed")}let y=Q?.access_token;if(!y)throw new xa(Q?.code||0,Q?.error_description||Q?.error||"oauth token response missing access token");let m=Number(Q?.expires_in)||0;return yield(s=this.cache)===null||s===void 0?void 0:s.set(mC,y,new Date().getTime()+Math.max(m-180,0)*1e3,{namespace:this.appId}),y})}getMarketTenantAccessToken(t){var o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)throw new xa(Sz,"ClientAssertion mode is not supported for ISV apps");if(!t){this.logger.error("market app request need tenant key");return}let i=yield(o=this.cache)===null||o===void 0?void 0:o.get(`larkMarketAccessToken${t}`,{namespace:this.appId});if(i)return this.logger.debug("use cache token"),i;this.logger.debug("get app ticket");let e=yield this.appTicketManager.getAppTicket();if(!e){this.logger.warn("no app ticket");return}this.logger.debug("get app access token");let{app_access_token:a}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/app_access_token`,{app_id:this.appId,app_secret:this.appSecret,app_ticket:e},"app_access_token");this.logger.debug("get tenant access token");let{tenant_access_token:A,expire:r}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token`,{app_access_token:a,tenant_key:t},"tenant_access_token");return yield this.cache.set(`larkMarketAccessToken${t}`,A,new Date().getTime()+r*1e3-180*1e3,{namespace:this.appId}),A})}getTenantAccessToken(t){return h(this,void 0,void 0,function*(){return ky(this.appType===Zn.SelfBuild,()=>h(this,void 0,void 0,function*(){this.logger.debug("get custom app token")})),ky(this.appType===Zn.ISV,()=>h(this,void 0,void 0,function*(){this.logger.debug("get market app token ")})),this.appType===Zn.SelfBuild?yield this.getCustomTenantAccessToken():yield this.getMarketTenantAccessToken(t?.[Ny])})}},Oz=(n,t)=>{let o=Object.assign({},n);for(let[i,e]of Object.entries(t))e!==void 0&&(o[i]=e);return o},sk=class{constructor(t){this.client=t.client}getCacheKey(t,o){return`${o?.namespace||this.client.appId}/${Rbe.toString()}/${t}`}calibrateTime(t){return new Date().getTime()+(t||0)*1e3-180*1e3}initWithCode(t,o){return h(this,void 0,void 0,function*(){let i={};for(let[e,a]of Object.entries(t)){let A=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:a}});if(A.code!==0){this.client.logger.error("init user access token error",e,A.msg||A.message);continue}if(!A.data){this.client.logger.error("user access code expired",e,a);continue}i[e]={code:a,token:A.data.access_token,refreshToken:A.data.refresh_token,expiredTime:this.calibrateTime(A.data.expires_in)}}return yield this.update(i,{namespace:o?.namespace}),i})}update(t,o){return h(this,void 0,void 0,function*(){for(let[i,e]of Object.entries(t)){let a=this.getCacheKey(i,{namespace:o?.namespace}),A=(yield this.client.cache.get(a))||{},{code:r,token:s,refreshToken:g,expiredTime:c}=e,I=Oz(A,{code:r,token:s,refreshToken:g,expiredTime:c});yield this.client.cache.set(a,I,1/0)}})}get(t,o){return h(this,void 0,void 0,function*(){let i=this.getCacheKey(t,{namespace:o?.namespace}),e=yield this.client.cache.get(i);if(!e){this.client.logger.error("user access token needs to be initialized or updated first");return}let{token:a,code:A,refreshToken:r,expiredTime:s}=e;if(a&&s&&s-new Date().getTime()>0)return a;if(r){let g=yield this.client.authen.oidcRefreshAccessToken.create({data:{grant_type:"refresh_token",refresh_token:r}});if(g.code===0&&g.data)return yield this.update({[t]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}),g.data.access_token;this.client.logger.error("get user access token by refresh token failed.",g.msg);return}if(A){let g=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:A}});g.code===0&&g.data?yield this.update({[t]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}):this.client.logger.error("get user access token by code failed.",g.msg)}})}},qp=n=>n===""||n===0||n===null||n===void 0?void 0:n,Hbe=n=>{if(!n||n.error)return!0;let{code:t}=n;return t!==void 0&&t!==0&&t!=="0"&&t!==""},gk=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.domain=t.domain,this.httpInstance=t.httpInstance,this.logger=t.logger}retrieveByAuthorizationCode(t){return h(this,void 0,void 0,function*(){return this.doRequest({grant_type:Gbe,code:t.code,redirect_uri:t.redirectUri,code_verifier:t.codeVerifier,scope:t.scope},t.headers)})}refresh(t){return h(this,void 0,void 0,function*(){return this.doRequest({grant_type:Fbe,refresh_token:t.refreshToken,scope:t.scope},t.headers)})}doRequest(t,o){return h(this,void 0,void 0,function*(){let i=kk({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),e=wz({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),a={client_id:this.appId};for(let[I,d]of Object.entries(t))d!=null&&(a[I]=d);let A=`${i}${vy}`,r=Object.assign({},o||{});if(this.clientAssertionProvider){let I;try{I=yield this.clientAssertionProvider.retrieveToken(e)}catch(d){throw new xa(Dz,d?.message||"client assertion provider failed")}if(!I||!I.value)throw new xa(_k,"client assertion token is empty");a.client_assertion_type=mz,a.client_assertion=I.value,I.targetInfo&&(A=vk(I.targetInfo,vy),r[Mk]=e)}else if(this.appSecret)a.client_secret=this.appSecret;else throw new xa(Tk,"appSecret and clientAssertionProvider cannot both be empty for accessToken APIs");let s=200,g;try{g=yield this.httpInstance.request({method:"post",url:A,headers:r,data:a})}catch(I){if(this.logger.error(I),I?.response)s=I.response.status,g=I.response.data;else throw new Vp(0,0,"",I?.message||"oauth token request failed")}if(s!==200||Hbe(g))throw new Vp(s,g?.code||0,g?.error||"",g?.error_description||g?.msg||"");let c=qp(g?.access_token);if(!c)throw new Vp(s,g?.code||0,g?.error||"",g?.error_description||"oauth token response missing access_token");return{accessToken:c,tokenType:qp(g.token_type),expiresIn:qp(g.expires_in),refreshToken:qp(g.refresh_token),refreshTokenExpiresIn:qp(g.refresh_token_expires_in),scope:qp(g.scope)}})}},Py=class extends ik{constructor(t){if(super(),this.appId="",this.appSecret="",this.helpDeskId="",this.helpDeskToken="",this.appType=Zn.SelfBuild,this.logger=new rc(t.loggerLevel||zi.info,t.logger||rg),this.appId=t.appId,this.appSecret=t.appSecret||"",this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.disableTokenCache=t.disableTokenCache,this.userAgent=bk(t.source,{extraTags:t.extraUaTags}),ky(!this.appId,()=>this.logger.error("appId is needed")),this.helpDeskId=t.helpDeskId,this.helpDeskToken=t.helpDeskToken,this.appType=t?.appType||Zn.SelfBuild,!this.appSecret&&!this.clientAssertionProvider)throw new xa(Tk,"appSecret or clientAssertionProvider is required");if(this.clientAssertionProvider&&this.appType===Zn.ISV)throw new xa(Sz,"ClientAssertion mode is not supported for ISV apps");this.domain=yz(t.domain||Xn.Feishu),this.logger.debug(`use domain url: ${this.domain}`),this.cache=t.cache||_C,this.httpInstance=t.httpInstance||Wp,this.tokenManager=new nk({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl}),this.userAccessToken=new sk({client:this}),this.accessToken=new gk({appId:this.appId,appSecret:this.appSecret,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl,domain:this.domain,httpInstance:this.httpInstance,logger:this.logger}),this.logger.info("client ready")}formatPayload(t,o){var i,e,a;return h(this,void 0,void 0,function*(){let A=["lark","params","data","headers","path"].reduce((g,c)=>(g[c]=o?.[c]||{},g),{}),r=(i=A?.lark)===null||i===void 0?void 0:i[Qz];if(r)this.logger.debug("use passed token"),A.headers.Authorization=`Bearer ${r}`;else if(!this.disableTokenCache){let g=yield this.tokenManager.getTenantAccessToken({[Ny]:(e=A?.lark)===null||e===void 0?void 0:e[Ny]});g?A.headers.Authorization=`Bearer ${g}`:this.logger.warn("failed to obtain token")}if((a=A?.lark)===null||a===void 0?void 0:a[fz]){this.logger.debug("generate help desk credential");let g=kbe(`${this.helpDeskId}:${this.helpDeskToken}`);A.headers["X-Lark-Helpdesk-Authorization"]=`Bearer ${g}`}return{params:Object.assign(Object.assign({},t?.params||{}),A.params),headers:Object.assign(Object.assign({"User-Agent":this.userAgent},t?.headers||{}),A.headers),data:Object.assign(Object.assign({},t?.data||{}),A.data),path:Object.assign(Object.assign({},t?.path||{}),A.path)}})}request(t,o){var i;return h(this,void 0,void 0,function*(){let{data:e,params:a,headers:A,url:r}=t,s=U(t,["data","params","headers","url"]),g=yield this.formatPayload({data:e,params:a,headers:A},o),c=((i=t.method)===null||i===void 0?void 0:i.toLowerCase())==="get"&&Object.keys(g.data).length===0?void 0:g.data;return this.logger.trace(`send request [${t.method}]: ${t.url}`),yield this.httpInstance.request(Object.assign(Object.assign({},s),{url:/^http/.test(r)?r:`${this.domain}/${vbe(r)}`,headers:g.headers,data:c,params:g.params})).catch(d=>{throw this.logger.error(d),d})})}},Kbe=n=>n.reduce((t,o)=>(0,uz.default)(t,o),{}),xbe=n=>({lark:{[Ny]:n}}),Ybe=()=>({lark:{[fz]:!0}}),jbe=n=>({headers:{Authorization:`Bearer ${n}`}}),Jbe=n=>({lark:{[Qz]:n}}),Gy=class{constructor(t){let{encryptKey:o,verificationToken:i,logger:e}=t;this.verificationToken=i,this.encryptKey=o,this.logger=e,o&&(this.aesCipher=new MC(o))}parse(t){var o,i;let e=(()=>{var r;let s=t||{},{encrypt:g}=s,c=U(s,["encrypt"]);if(g)try{return Object.assign(Object.assign({},JSON.parse((r=this.aesCipher)===null||r===void 0?void 0:r.decrypt(g))),c)}catch{return this.logger.error("parse encrypt data failed"),{}}return c})();if("schema"in e){let{header:r,event:s}=e,g=U(e,["header","event"]);return Object.assign(Object.assign(Object.assign({[Ty]:(o=e?.header)===null||o===void 0?void 0:o.event_type},g),r),s)}let{event:a}=e,A=U(e,["event"]);return Object.assign(Object.assign({[Ty]:(i=e?.event)===null||i===void 0?void 0:i.type},a),A)}checkIsCardEventValidated(t){if("encrypt"in t||"schema"in t)return this.checkIsEventValidated(t);let{"x-lark-request-timestamp":o,"x-lark-request-nonce":i,"x-lark-signature":e}=t.headers;return this.verificationToken?_y.createHash("sha1").update(o+i+this.verificationToken+JSON.stringify(t)).digest("hex")===e:!0}checkIsEventValidated(t){if(!this.encryptKey)return!0;let{"x-lark-request-timestamp":o,"x-lark-request-nonce":i,"x-lark-signature":e}=t.headers,a=o+i+this.encryptKey+JSON.stringify(t);return _y.createHash("sha256").update(a).digest("hex")===e}},qbe="app_ticket",Fy=class{constructor(t){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{encryptKey:o,verificationToken:i}=t;this.encryptKey=o||"",this.verificationToken=i||"",this.logger=new rc(t.loggerLevel||zi.info,t.logger||rg),this.requestHandle=new Gy({encryptKey:o,verificationToken:i,logger:this.logger}),this.cache=t.cache||_C,this.registerAppTicketHandle(),this.logger.info("event-dispatch is ready")}registerAppTicketHandle(){this.register({app_ticket:t=>h(this,void 0,void 0,function*(){let{app_ticket:o,app_id:i}=t;o?(yield this.cache.set(bC,o,void 0,{namespace:i}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(t){return Object.keys(t).forEach(o=>{this.handles.has(o)&&o!==qbe&&this.logger.error(`this ${o} handle is registered`),this.handles.set(o,t[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(t,o){var i,e;return h(this,void 0,void 0,function*(){if(o?.needCheck!==!1&&!(!((i=this.requestHandle)===null||i===void 0)&&i.checkIsEventValidated(t))){this.logger.warn("verification failed event");return}let A=(e=this.requestHandle)===null||e===void 0?void 0:e.parse(t),r=A[Ty];if(this.handles.has(r)){let s=yield this.handles.get(r)(A);return this.logger.debug(`execute ${r} handle`),s}return this.logger.warn(`no ${r} handle`),`no ${r} event handle`})}},ck=class{constructor(t,o){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{verificationToken:i,encryptKey:e}=t;this.encryptKey=e||"",this.verificationToken=i||"",this.cardHandler=o,this.logger=new rc(t.loggerLevel||zi.info,t.logger||rg),this.requestHandle=new Gy({encryptKey:e,verificationToken:i,logger:this.logger}),this.cache=t.cache||_C,this.registerAppTicketHandle(),this.logger.info("card-action-handle is ready")}registerAppTicketHandle(){this.register({app_ticket:t=>h(this,void 0,void 0,function*(){let{app_ticket:o,app_id:i}=t;o?(yield this.cache.set(bC,o,void 0,{namespace:i}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(t){return Object.keys(t).forEach(o=>{this.handles.set(o,t[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(t){var o,i;return h(this,void 0,void 0,function*(){if(!(!((o=this.requestHandle)===null||o===void 0)&&o.checkIsCardEventValidated(t))){this.logger.warn("verification failed event");return}let e=(i=this.requestHandle)===null||i===void 0?void 0:i.parse(t),a=e[Ty];if(this.handles.has(a))try{return yield this.handles.get(a)(e)}catch(A){this.logger.error(A);return}try{let A=yield this.cardHandler(e);return this.logger.debug("execute card handle"),A}catch(A){this.logger.error(A)}})}},jy=n=>new Promise(t=>{let o="";n.on("data",i=>{o+=i}),n.on("end",()=>{try{let i=JSON.parse(o);t(i)}catch{t("")}})}),TC=(n,t)=>{if("encrypt"in n&&!t.encryptKey)throw new Error("auto-challenge need encryptKey, please check for missing in dispatcher");let o="encrypt"in n?JSON.parse(new MC(t.encryptKey).decrypt(n.encrypt)):n;return{isChallenge:o.type==="url_verification",challenge:{challenge:o.challenge}}},zbe=(n,t,o)=>(i,e)=>h(void 0,void 0,void 0,function*(){if(i.url!==n)return;let a=Object.assign(Object.create({headers:i.headers}),yield jy(i));if(o?.autoChallenge||!1){let{isChallenge:s,challenge:g}=TC(a,{encryptKey:t.encryptKey});if(s){e.end(JSON.stringify(g));return}}let r=yield t.invoke(a);e.end(JSON.stringify(r))}),Vbe=(n,t)=>(o,i)=>h(void 0,void 0,void 0,function*(){let e=yield h(void 0,void 0,void 0,function*(){return o.body?o.body:o.complete?((t?.logger||rg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield jy(o)}),a=Object.assign(Object.create({headers:o.headers}),e);if(t?.autoChallenge||!1){let{isChallenge:s,challenge:g}=TC(a,{encryptKey:n.encryptKey});if(s){i.json(g);return}}let r=yield n.invoke(a);i.json(r)}),Wbe=(n,t,o)=>(i,e)=>h(void 0,void 0,void 0,function*(){let{originalUrl:a,req:A,request:r}=i;if(a===n){let s=yield h(void 0,void 0,void 0,function*(){return r.body?r.body:A.complete?((o?.logger||rg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield jy(A)}),g=Object.assign(Object.create({headers:A.headers}),s);if(o?.autoChallenge||!1){let{isChallenge:d,challenge:B}=TC(g,{encryptKey:t.encryptKey});if(d){i.body=B,yield e();return}}let I=yield t.invoke(g);i.body=JSON.stringify(I)}yield e()}),Zbe=(n,t)=>(o,i)=>h(void 0,void 0,void 0,function*(){let{req:e,request:a}=o,A=yield h(void 0,void 0,void 0,function*(){return a.body?a.body:e.complete?((t?.logger||rg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield jy(e)}),r=Object.assign(Object.create({headers:e.headers}),A);if(t?.autoChallenge||!1){let{isChallenge:c,challenge:I}=TC(r,{encryptKey:n.encryptKey});if(c){o.body=I,yield i();return}}let g=yield n.invoke(r);o.body=JSON.stringify(g),yield i()}),Xbe=n=>{let{title:t,content:o}=n;return JSON.stringify({config:{wide_screen_mode:!0},elements:[{tag:"markdown",content:o}],header:{template:"blue",title:{content:t,tag:"plain_text"}}})},$be=Object.freeze({__proto__:null,defaultCard:Xbe}),tg=Dy();tg.util.Long=void 0;tg.configure();var tc=tg.Reader,tz=tg.Writer,HA=tg.util,bo=tg.roots.default||(tg.roots.default={}),bz=bo.pbbp2=(()=>{let n={};return n.Header=(function(){function t(o){if(o)for(let i=Object.keys(o),e=0;e>>3){case 1:{A.key=i.string();break}case 2:{A.value=i.string();break}default:i.skipType(r&7);break}}if(!A.hasOwnProperty("key"))throw HA.ProtocolError("missing required 'key'",{instance:A});if(!A.hasOwnProperty("value"))throw HA.ProtocolError("missing required 'value'",{instance:A});return A},t.decodeDelimited=function(i){return i instanceof tc||(i=new tc(i)),this.decode(i,i.uint32())},t.verify=function(i){return typeof i!="object"||i===null?"object expected":HA.isString(i.key)?HA.isString(i.value)?null:"value: string expected":"key: string expected"},t.fromObject=function(i){if(i instanceof bo.pbbp2.Header)return i;let e=new bo.pbbp2.Header;return i.key!=null&&(e.key=String(i.key)),i.value!=null&&(e.value=String(i.value)),e},t.toObject=function(i,e){e||(e={});let a={};return e.defaults&&(a.key="",a.value=""),i.key!=null&&i.hasOwnProperty("key")&&(a.key=i.key),i.value!=null&&i.hasOwnProperty("value")&&(a.value=i.value),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,tg.util.toJSONOptions)},t.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/pbbp2.Header"},t})(),n.Frame=(function(){function t(o){if(this.headers=[],o)for(let i=Object.keys(o),e=0;e>>3){case 1:{A.SeqID=i.uint64();break}case 2:{A.LogID=i.uint64();break}case 3:{A.service=i.int32();break}case 4:{A.method=i.int32();break}case 5:{A.headers&&A.headers.length||(A.headers=[]),A.headers.push(bo.pbbp2.Header.decode(i,i.uint32()));break}case 6:{A.payloadEncoding=i.string();break}case 7:{A.payloadType=i.string();break}case 8:{A.payload=i.bytes();break}case 9:{A.LogIDNew=i.string();break}default:i.skipType(r&7);break}}if(!A.hasOwnProperty("SeqID"))throw HA.ProtocolError("missing required 'SeqID'",{instance:A});if(!A.hasOwnProperty("LogID"))throw HA.ProtocolError("missing required 'LogID'",{instance:A});if(!A.hasOwnProperty("service"))throw HA.ProtocolError("missing required 'service'",{instance:A});if(!A.hasOwnProperty("method"))throw HA.ProtocolError("missing required 'method'",{instance:A});return A},t.decodeDelimited=function(i){return i instanceof tc||(i=new tc(i)),this.decode(i,i.uint32())},t.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(!HA.isInteger(i.SeqID)&&!(i.SeqID&&HA.isInteger(i.SeqID.low)&&HA.isInteger(i.SeqID.high)))return"SeqID: integer|Long expected";if(!HA.isInteger(i.LogID)&&!(i.LogID&&HA.isInteger(i.LogID.low)&&HA.isInteger(i.LogID.high)))return"LogID: integer|Long expected";if(!HA.isInteger(i.service))return"service: integer expected";if(!HA.isInteger(i.method))return"method: integer expected";if(i.headers!=null&&i.hasOwnProperty("headers")){if(!Array.isArray(i.headers))return"headers: array expected";for(let e=0;e>>0,i.SeqID.high>>>0).toNumber(!0))),i.LogID!=null&&(HA.Long?(e.LogID=HA.Long.fromValue(i.LogID)).unsigned=!0:typeof i.LogID=="string"?e.LogID=parseInt(i.LogID,10):typeof i.LogID=="number"?e.LogID=i.LogID:typeof i.LogID=="object"&&(e.LogID=new HA.LongBits(i.LogID.low>>>0,i.LogID.high>>>0).toNumber(!0))),i.service!=null&&(e.service=i.service|0),i.method!=null&&(e.method=i.method|0),i.headers){if(!Array.isArray(i.headers))throw TypeError(".pbbp2.Frame.headers: array expected");e.headers=[];for(let a=0;a=0&&(e.payload=i.payload)),i.LogIDNew!=null&&(e.LogIDNew=String(i.LogIDNew)),e},t.toObject=function(i,e){e||(e={});let a={};if((e.arrays||e.defaults)&&(a.headers=[]),e.defaults){if(HA.Long){let A=new HA.Long(0,0,!0);a.SeqID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else a.SeqID=e.longs===String?"0":0;if(HA.Long){let A=new HA.Long(0,0,!0);a.LogID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else a.LogID=e.longs===String?"0":0;a.service=0,a.method=0,a.payloadEncoding="",a.payloadType="",e.bytes===String?a.payload="":(a.payload=[],e.bytes!==Array&&(a.payload=HA.newBuffer(a.payload))),a.LogIDNew=""}if(i.SeqID!=null&&i.hasOwnProperty("SeqID")&&(typeof i.SeqID=="number"?a.SeqID=e.longs===String?String(i.SeqID):i.SeqID:a.SeqID=e.longs===String?HA.Long.prototype.toString.call(i.SeqID):e.longs===Number?new HA.LongBits(i.SeqID.low>>>0,i.SeqID.high>>>0).toNumber(!0):i.SeqID),i.LogID!=null&&i.hasOwnProperty("LogID")&&(typeof i.LogID=="number"?a.LogID=e.longs===String?String(i.LogID):i.LogID:a.LogID=e.longs===String?HA.Long.prototype.toString.call(i.LogID):e.longs===Number?new HA.LongBits(i.LogID.low>>>0,i.LogID.high>>>0).toNumber(!0):i.LogID),i.service!=null&&i.hasOwnProperty("service")&&(a.service=i.service),i.method!=null&&i.hasOwnProperty("method")&&(a.method=i.method),i.headers&&i.headers.length){a.headers=[];for(let A=0;Abz.Frame.decode(n),Ik=class{constructor(){this.client={appId:"",appSecret:"",domain:Xn.Feishu},this.ws={connectUrl:"",pingInterval:120*1e3,reconnectCount:-1,reconnectInterval:120*1e3,reconnectNonce:30*1e3,deviceId:"",serviceId:"",autoReconnect:!0},this.wsInstance=null}updateClient(t){Object.assign(this.client,t)}updateWs(t){Object.assign(this.ws,t)}getClient(t){return t===void 0?this.client:this.client[t]}getWS(t){return t===void 0?this.ws:this.ws[t]}get wsConfigUrl(){return`${this.getClient("domain")}/callback/ws/endpoint`}setWSInstance(t){this.wsInstance=t}getWSInstance(){return this.wsInstance}},lk=class{constructor(t){this.cache=new Map,this.logger=t.logger,this.clearAtInterval()}mergeData(t){let{message_id:o,sum:i,seq:e,trace_id:a,data:A}=t,r=this.cache.get(o);if(r)r.buffer[e]=A;else{let g=new Array(i).fill(void 0);g[e]=A,this.cache.set(o,{buffer:g,trace_id:a,message_id:o,create_time:Date.now()})}let s=this.cache.get(o);if(s?.buffer.every(g=>!!g)){let g=s.buffer.reduce((d,B)=>{let f=new Uint8Array(d.byteLength+B.byteLength);return f.set(d,0),f.set(B,d.length),f},new Uint8Array([])),c=new TextDecoder("utf-8").decode(g),I=JSON.parse(c);return this.deleteCache(o),I}return null}deleteCache(t){this.cache.delete(t)}clearAtInterval(){if(this.timer)return;let t=1e4;this.timer=setInterval(()=>{let o=Date.now();this.cache.forEach((i,e)=>{var a;let{create_time:A,trace_id:r,message_id:s}=i;o-A>t&&((a=this.logger)===null||a===void 0||a.debug(`${s} event data is deleted as expired, trace_id: ${r}`),this.deleteCache(e))})},t),typeof this.timer.unref=="function"&&this.timer.unref()}destroy(){this.timer&&(clearInterval(this.timer),this.timer=void 0),this.cache.clear()}},DC;(function(n){n[n.ok=0]="ok",n[n.system_busy=1]="system_busy",n[n.forbidden=403]="forbidden",n[n.auth_failed=514]="auth_failed",n[n.internal_error=1000040343]="internal_error",n[n.exceed_conn_limit=1000040350]="exceed_conn_limit"})(DC||(DC={}));var wC;(function(n){n[n.control=0]="control",n[n.data=1]="data"})(wC||(wC={}));var OC;(function(n){n.type="type",n.message_id="message_id",n.sum="sum",n.seq="seq",n.trace_id="trace_id",n.biz_rt="biz_rt",n.handshake_status="handshake-status",n.handshake_msg="handshake-msg",n.handshake_autherrcode="handshake-autherrcode"})(OC||(OC={}));var zp;(function(n){n.event="event",n.card="card",n.ping="ping",n.pong="pong"})(zp||(zp={}));var Ly;(function(n){n[n.ok=200]="ok",n[n.internal_server_error=500]="internal_server_error"})(Ly||(Ly={}));var Uy=class{constructor(t){var o;this.wsConfig=new Ik,this.reconnectGeneration=0,this.pendingWsInstance=null,this.isConnecting=!1,this.reconnectInfo={lastConnectTime:0,nextConnectTime:0},this.hasEverConnected=!1,this.terminalError=!1,this.currentReconnectAttempts=0;let{appId:i,appSecret:e,clientAssertionProvider:a,agent:A,domain:r=Xn.Feishu,httpInstance:s=Wp,loggerLevel:g=zi.info,logger:c=rg,autoReconnect:I=!0,source:d,extraUaTags:B,onReady:f,onError:Q,onReconnecting:y,onReconnected:m,handshakeTimeoutMs:_,wsConfig:T}=t;if(this.userAgent=bk(d,{extraTags:B}),this.logger=new rc(g,c),ky(!i,()=>this.logger.error("appId is needed")),!e&&!a)throw new xa(Tk,"appSecret or clientAssertionProvider is required");this.agent=A,this.dataCache=new lk({logger:this.logger}),this.httpInstance=s,this.wsConfig.updateClient({appId:i,appSecret:e||"",clientAssertionProvider:a,domain:yz(r)}),this.wsConfig.updateWs({autoReconnect:I}),this.onReady=f,this.onError=Q,this.onReconnecting=y,this.onReconnected=m,this.handshakeTimeoutMs=_,this.pingTimeoutSec=(o=T?.pingTimeout)!==null&&o!==void 0?o:0}armLiveness(){this.pingTimeoutSec&&(this.livenessTimer&&clearTimeout(this.livenessTimer),this.livenessTimer=setTimeout(()=>{var t;this.livenessTimer=void 0,this.logger.warn("[ws]",`no pong/inbound within ${this.pingTimeoutSec}s of last ping, terminating to trigger reconnect`);try{(t=this.wsConfig.getWSInstance())===null||t===void 0||t.terminate()}catch{}},this.pingTimeoutSec*1e3))}clearLiveness(){this.livenessTimer&&(clearTimeout(this.livenessTimer),this.livenessTimer=void 0)}safeInvoke(t,o,...i){if(o)try{o(...i)}catch(e){this.logger.error(`[ws] ${t} callback threw`,e)}}pullConnectConfig(){return h(this,void 0,void 0,function*(){let{appId:t,appSecret:o,clientAssertionProvider:i,domain:e}=this.wsConfig.getClient(),a="/callback/ws/endpoint",A=this.wsConfig.wsConfigUrl,r={locale:"zh","User-Agent":this.userAgent},s={AppID:t};try{if(i){let Q=Rk(e),y=yield i.retrieveToken(Q);if(!y||!y.value)throw new xa(_k,"client assertion token is empty");s.AppSecret="",s.ClientAssertion=y.value,y.targetInfo&&(A=vk(y.targetInfo,a),r[Mk]=Q)}else s.AppSecret=o;let{code:g,data:{URL:c,ClientConfig:I},msg:d}=yield this.httpInstance.request({method:"post",url:A,data:s,headers:r,timeout:15e3});if(g!==DC.ok){let Q=g===DC.system_busy?"system busy":d;return this.logger.error("[ws]",`code: ${g}, ${Q}`),g===DC.internal_error?{ok:!1,retryable:!0}:{ok:!1,retryable:!1,error:`pullConnectConfig failed: code=${g}, msg=${Q}`}}let{device_id:B,service_id:f}=wbe.parse(c);return this.wsConfig.updateWs({connectUrl:c,deviceId:B,serviceId:f,pingInterval:I.PingInterval*1e3,reconnectCount:I.ReconnectCount,reconnectInterval:I.ReconnectInterval*1e3,reconnectNonce:I.ReconnectNonce*1e3}),this.logger.debug("[ws]",`get connect config success, ws url: ${c}`),{ok:!0}}catch(g){return this.logger.error("[ws]",g?.message||"system busy"),g instanceof xa?{ok:!1,retryable:!1,error:g.message}:{ok:!1,retryable:!0}}})}connect(){let t=this.wsConfig.getWS("connectUrl"),o;try{let{agent:i}=this;o=new Do(t,{agent:i})}catch{this.logger.error("[ws]","new WebSocket error")}return o?(this.pendingWsInstance=o,new Promise(i=>{let e=!1,a,A=r=>{e||(e=!0,a&&clearTimeout(a),this.pendingWsInstance===o&&(this.pendingWsInstance=null),i(r))};this.handshakeTimeoutMs&&this.handshakeTimeoutMs>0&&(a=setTimeout(()=>{this.logger.error("[ws]",`handshake timeout after ${this.handshakeTimeoutMs}ms`),o.removeAllListeners("open");try{o.terminate()}catch{}A(!1)},this.handshakeTimeoutMs)),o.on("open",()=>{this.logger.debug("[ws]","ws connect success"),this.wsConfig.setWSInstance(o),this.pingLoop(),A(!0)}),o.on("error",()=>{this.logger.error("[ws]","ws connect failed"),A(!1)})})):Promise.resolve(!1)}reConnect(t=!1){return h(this,void 0,void 0,function*(){if(this.isConnecting&&!t){this.logger.debug("[ws]","repeat connection");return}this.isConnecting=!0;let o=++this.reconnectGeneration,i=()=>h(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return{ok:!1,retryable:!1,cancelled:!0};this.reconnectInfo.lastConnectTime=Date.now();let c=yield this.pullConnectConfig();if(o!==this.reconnectGeneration)return{ok:!1,retryable:!1,cancelled:!0};if(!c.ok)return c;let I=yield this.connect();return o!==this.reconnectGeneration?{ok:!1,retryable:!1,cancelled:!0}:I?(this.communicate(),{ok:!0}):{ok:!1,retryable:!0}});this.pingInterval&&clearTimeout(this.pingInterval),this.reconnectInterval&&clearTimeout(this.reconnectInterval);let e=this.wsConfig.getWSInstance();if(t){e&&e?.terminate();let c={ok:!1,retryable:!0};try{c=yield i()}finally{o===this.reconnectGeneration&&(this.isConnecting=!1)}if(o!==this.reconnectGeneration||c.cancelled)return;if(c.ok)this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady);else if(c.retryable)this.logger.error("[ws]","connect failed"),yield this.reConnect();else{this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(c.error));return}this.logger.info("[ws]","ws client ready");return}let{autoReconnect:a,reconnectNonce:A,reconnectCount:r,reconnectInterval:s}=this.wsConfig.getWS();if(!a){this.hasEverConnected||(this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error("WebSocket connect failed and autoReconnect is disabled")));return}this.logger.info("[ws]","reconnect"),this.hasEverConnected&&this.safeInvoke("onReconnecting",this.onReconnecting),e&&e?.terminate(),this.wsConfig.setWSInstance(null);let g=A?A*Math.random():0;this.reconnectInterval=setTimeout(()=>h(this,void 0,void 0,function*(){(function c(I){return h(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return;I++,this.currentReconnectAttempts=I;let d=yield i();if(o===this.reconnectGeneration){if(d.ok){this.logger.debug("[ws]","reconnect success"),this.currentReconnectAttempts=0,this.hasEverConnected?this.safeInvoke("onReconnected",this.onReconnected):(this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady)),this.isConnecting=!1;return}if(!d.retryable){this.isConnecting=!1,this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(d.error));return}if(this.logger.info("ws",`unable to connect to the server after trying ${I} times")`),r>=0&&I>=r){this.isConnecting=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(`WebSocket reconnect exhausted after ${I} attempts`));return}this.reconnectInterval=setTimeout(()=>{c.bind(this)(I)},s),this.reconnectInfo.nextConnectTime=Date.now()+s}})}).bind(this)(0)}),g),this.reconnectInfo.nextConnectTime=Date.now()+g})}pingLoop(){let{serviceId:t,pingInterval:o}=this.wsConfig.getWS(),i=this.wsConfig.getWSInstance();if(i?.readyState===Do.OPEN){let e={headers:[{key:OC.type,value:zp.ping}],service:Number(t),method:wC.control,SeqID:0,LogID:0};this.sendMessage(e),this.armLiveness(),this.logger.trace("[ws]","ping success")}this.pingInterval=setTimeout(this.pingLoop.bind(this),o)}communicate(){let t=this.wsConfig.getWSInstance();t?.on("message",o=>h(this,void 0,void 0,function*(){this.clearLiveness();let i=eMe(o),{method:e}=i;e===wC.control&&(yield this.handleControlData(i)),e===wC.data&&(yield this.handleEventData(i))})),t?.on("error",o=>{this.logger.error("[ws]","ws error")}),t?.on("close",()=>{this.logger.debug("[ws]","client closed"),this.clearLiveness(),this.reConnect()})}handleControlData(t){var o;return h(this,void 0,void 0,function*(){let i=(o=t.headers.find(a=>a.key===OC.type))===null||o===void 0?void 0:o.value,e=t.payload;if(i!==zp.ping&&i===zp.pong&&e){this.logger.trace("[ws]","receive pong");let a=new TextDecoder("utf-8").decode(e),{PingInterval:A,ReconnectCount:r,ReconnectInterval:s,ReconnectNonce:g}=JSON.parse(a);this.wsConfig.updateWs({pingInterval:A*1e3,reconnectCount:r,reconnectInterval:s*1e3,reconnectNonce:g*1e3}),this.logger.trace("[ws]","update wsConfig with pong data")}})}handleEventData(t){var o;return h(this,void 0,void 0,function*(){let i=t.headers.reduce((f,Q)=>(f[Q.key]=Q.value,f),{}),{message_id:e,sum:a,seq:A,type:r,trace_id:s}=i,g=t.payload;if(r!==zp.event)return;let c=this.dataCache.mergeData({message_id:e,sum:Number(a),seq:Number(A),trace_id:s,data:g});if(!c)return;this.logger.debug("[ws]",`receive message, message_type: ${r}; message_id: ${e}; trace_id: ${s}; data: ${c.data}`);let I={code:Ly.ok},d=Date.now();try{let f=yield(o=this.eventDispatcher)===null||o===void 0?void 0:o.invoke(c,{needCheck:!1});f&&(I.data=Buffer.from(JSON.stringify(f)).toString("base64"))}catch(f){I.code=Ly.internal_server_error,this.logger.error("[ws]",`invoke event failed, message_type: ${r}; message_id: ${e}; trace_id: ${s}; error: ${f}`)}let B=Date.now();this.sendMessage(Object.assign(Object.assign({},t),{headers:[...t.headers,{key:OC.biz_rt,value:String(d-B)}],payload:new TextEncoder().encode(JSON.stringify(I))}))})}sendMessage(t){var o;let i=this.wsConfig.getWSInstance();if(i?.readyState===Do.OPEN){let e=bz.Frame.encode(t).finish();(o=this.wsConfig.getWSInstance())===null||o===void 0||o.send(e,a=>{a&&this.logger.error("[ws]","send data failed")})}}getReconnectInfo(){return this.reconnectInfo}getConnectionStatus(){return{state:this.computeState(),lastConnectTime:this.reconnectInfo.lastConnectTime||void 0,nextConnectTime:this.reconnectInfo.nextConnectTime||void 0,reconnectAttempts:this.currentReconnectAttempts}}computeState(){var t;return this.terminalError?"failed":this.isConnecting&&!this.hasEverConnected?"connecting":this.isConnecting&&this.hasEverConnected?"reconnecting":((t=this.wsConfig.getWSInstance())===null||t===void 0?void 0:t.readyState)===Do.OPEN?"connected":"idle"}close(t={}){let{force:o=!1}=t;this.reconnectGeneration++,this.pingInterval&&(clearTimeout(this.pingInterval),this.pingInterval=void 0),this.reconnectInterval&&(clearTimeout(this.reconnectInterval),this.reconnectInterval=void 0),this.clearLiveness(),this.dataCache.destroy(),this.isConnecting=!1,this.currentReconnectAttempts=0;let i=this.pendingWsInstance;if(i){this.pendingWsInstance=null,i.removeAllListeners("open");try{o?i.terminate():i.close()}catch{}}let e=this.wsConfig.getWSInstance();e&&(e.removeAllListeners(),o?e.terminate():e.close(),this.wsConfig.setWSInstance(null)),this.logger.info("[ws]",`ws client closed manually${o?" (force)":""}`)}start(t){return h(this,void 0,void 0,function*(){let{appId:o}=this.wsConfig.getClient();if(!/^cli_[0-9a-fA-F]{16}$/.test(o)){this.logger.error("[ws]",`invalid appId: ${o}`);return}let{eventDispatcher:i}=t;if(!i){this.logger.warn("[ws]","client need to start with a eventDispatcher");return}let e=this.wsConfig.getWSInstance();if(this.terminalError&&(this.isConnecting=!1),this.isConnecting||e&&e.readyState!==Do.CLOSED){this.logger.debug("[ws]","start ignored because client is already connecting or connected");return}this.terminalError=!1,this.currentReconnectAttempts=0,this.dataCache.clearAtInterval(),this.logger.info("[ws]",`receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in: +`+a)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=nn(this.defaults,o);let{transitional:i,paramsSerializer:e,headers:a}=o;i!==void 0&&VE.assertOptions(i,{silentJSONParsing:xa.transitional(xa.boolean),forcedJSONParsing:xa.transitional(xa.boolean),clarifyTimeoutError:xa.transitional(xa.boolean),legacyInterceptorReqResOrdering:xa.transitional(xa.boolean),advertiseZstdAcceptEncoding:xa.transitional(xa.boolean),validateStatusUndefinedResolves:xa.transitional(xa.boolean)},!1),e!=null&&(Z.isFunction(e)?o.paramsSerializer={serialize:e}:VE.assertOptions(e,{encode:xa.function,serialize:xa.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),VE.assertOptions(o,{baseUrl:xa.spelling("baseURL"),withXsrfToken:xa.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let A=a&&Z.merge(a.common,a[o.method]);a&&Z.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete a[f]}),o.headers=Lt.concat(A,a);let r=[],s=!0;this.interceptors.request.forEach(function(Q){if(typeof Q.runWhen=="function"&&Q.runWhen(o)===!1)return;s=s&&Q.synchronous;let y=o.transitional||Wg;y&&y.legacyInterceptorReqResOrdering?r.unshift(Q.fulfilled,Q.rejected):r.push(Q.fulfilled,Q.rejected)});let g=[];this.interceptors.response.forEach(function(Q){g.push(Q.fulfilled,Q.rejected)});let c,I=0,d;if(!s){let f=[zE.bind(this),void 0];for(f.unshift(...r),f.push(...g),d=f.length,c=Promise.resolve(o);IzE.call(this,B)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=zE.call(this,B)}catch(f){c=Promise.reject(f)}for(I=0,d=g.length;I{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](e);i._listeners=null}),this.promise.then=e=>{let a,A=new Promise(r=>{i.subscribe(r),a=r}).then(e);return A.cancel=function(){i.unsubscribe(a)},A},t(function(a,A,r){i.reason||(i.reason=new ji(a,A,r),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let t=new AbortController,o=i=>{t.abort(i)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new n(function(e){t=e}),cancel:t}}},gJ=TT;function NT(n){return function(o){return n.apply(null,o)}}function RT(n){return Z.isObject(n)&&n.isAxiosError===!0}var kT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(kT).forEach(([n,t])=>{kT[t]=n});var cJ=kT;function IJ(n){let t=new WE(n),o=SE(WE.prototype.request,t);return Z.extend(o,WE.prototype,t,{allOwnKeys:!0}),Z.extend(o,t,null,{allOwnKeys:!0}),o.create=function(e){return IJ(nn(n,e))},o}var Sr=IJ(Dp);Sr.Axios=WE;Sr.CanceledError=ji;Sr.CancelToken=gJ;Sr.isCancel=PE;Sr.VERSION=zs;Sr.toFormData=Vg;Sr.AxiosError=we;Sr.Cancel=Sr.CanceledError;Sr.all=function(t){return Promise.all(t)};Sr.spread=NT;Sr.isAxiosError=RT;Sr.mergeConfig=nn;Sr.AxiosHeaders=Lt;Sr.formToJSON=n=>bQ(Z.isHTMLForm(n)?new FormData(n):n);Sr.getAdapter=FQ.getAdapter;Sr.HttpStatusCode=cJ;Sr.default=Sr;var UQ=Sr;var{Axios:UaA,AxiosError:vT,CanceledError:HaA,isCancel:KaA,CancelToken:xaA,VERSION:YaA,all:jaA,Cancel:JaA,isAxiosError:qaA,spread:zaA,toFormData:VaA,AxiosHeaders:WaA,HttpStatusCode:ZaA,formToJSON:XaA,getAdapter:$aA,mergeConfig:eiA,create:AiA}=UQ;var E=qe(aq()),b=qe(oq()),M=qe(xq()),Uz=qe(u4());import tt from"fs";import _C from"path";import Ky from"crypto";import oMe from"querystring";var Ybe=qe(p8(),1),jbe=qe(Oy(),1),Jbe=qe(Jp(),1),qbe=qe(K0(),1),zbe=qe(j0(),1),Vbe=qe(Z0(),1),y8=qe(Ty(),1),Wbe=qe(Q8(),1);var wo=y8.default;import{gzipSync as nMe}from"zlib";import sMe from"http";import gMe from"https";import{promises as cMe}from"dns";import{isIP as Hz}from"net";function K(n,t){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,i=Object.getOwnPropertySymbols(n);e=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function S(n){return this instanceof S?(this.v=n,this):new S(n)}function Y(n,t,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o.apply(n,t||[]),e,a=[];return e={},A("next"),A("throw"),A("return"),e[Symbol.asyncIterator]=function(){return this},e;function A(d){i[d]&&(e[d]=function(B){return new Promise(function(f,Q){a.push([d,B,f,Q])>1||r(d,B)})})}function r(d,B){try{s(i[d](B))}catch(f){I(a[0][3],f)}}function s(d){d.value instanceof S?Promise.resolve(d.value.v).then(g,c):I(a[0][2],d)}function g(d){r("next",d)}function c(d){r("throw",d)}function I(d,B){d(B),a.shift(),a.length&&r(a[0][0],a[0][1])}}function Qz(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],o;return t?t.call(n):(n=typeof fz=="function"?fz(n):n[Symbol.iterator](),o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o);function i(a){o[a]=n[a]&&function(A){return new Promise(function(r,s){A=n[a](A),e(r,s,A.done,A.value)})}}function e(a,A,r,s){Promise.resolve(s).then(function(g){a({value:g,done:r})},A)}}var Fy;function IMe(){if(Fy!==void 0)return Fy;let n=[_C.resolve(__dirname,"..","package.json"),_C.resolve(__dirname,"..","..","package.json")];for(let t of n)try{let o=JSON.parse(tt.readFileSync(t,"utf-8"));if(o.name==="@larksuiteoapi/node-sdk"&&typeof o.version=="string")return Fy=o.version,o.version}catch{}return Fy="unknown","unknown"}function yz(n){return n.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,64)}function Yk(n,t){let o=`oapi-node-sdk/${IMe()}`;if(n){let i=yz(n);i&&(o+=` source/${i}`)}if(t?.extraTags)for(let i of t.extraTags){let e=yz(i);e&&(o+=` ${e}`)}return o}var td=UQ.create(),lMe=Yk();td.interceptors.request.use(n=>(n.headers&&!n.headers["User-Agent"]&&(n.headers["User-Agent"]=lMe),n),void 0,{synchronous:!0});td.interceptors.response.use(n=>n.config.$return_headers?{data:n.data,headers:n.headers}:n.data);var es;(function(n){n[n.SelfBuild=0]="SelfBuild",n[n.ISV=1]="ISV"})(es||(es={}));var As;(function(n){n[n.Feishu=0]="Feishu",n[n.Lark=1]="Lark"})(As||(As={}));var Vi;(function(n){n[n.fatal=0]="fatal",n[n.error=1]="error",n[n.warn=2]="warn",n[n.info=3]="info",n[n.debug=4]="debug",n[n.trace=5]="trace"})(Vi||(Vi={}));var xy=Symbol("event-type"),Yy=Symbol("tenant-key"),kC=Symbol("app-ticket"),MC=Symbol("tenant-access-token"),Kz=Symbol("with-helpdesk-authorization"),xz=Symbol("with-user-access-token"),pMe=Symbol("user-access-token"),mz=Symbol("aily-session-record"),dMe=n=>Buffer.from(n).toString("base64"),jy=class{constructor(){this.values=new Map}getCacheKey(t,o){return o?`${o}/${t.toString()}`:t}get(t,o){return h(this,void 0,void 0,function*(){let i=this.getCacheKey(t,o?.namespace),e=this.values.get(i);if(e){let{value:a,expiredTime:A}=e;if(!A||A-new Date().getTime()>0)return a}})}set(t,o,i,e){return h(this,void 0,void 0,function*(){let a=this.getCacheKey(t,e?.namespace);return this.values.set(a,{value:o,expiredTime:i}),!0})}},PC=new jy,vC=class{constructor(t){let o=Ky.createHash("sha256");o.update(t),this.key=o.digest()}decrypt(t){let o=Buffer.from(t,"base64"),i=Ky.createDecipheriv("aes-256-cbc",this.key,o.slice(0,16)),e=i.update(o.slice(16).toString("hex"),"hex","utf8");return e+=i.final("utf8"),e}},Yz=n=>{switch(n){case As.Feishu:return"https://open.feishu.cn";case As.Lark:return"https://open.larksuite.com";default:return n}},C=(n,t={})=>n.replace(/:([^/]+)/g,(o,i)=>{if(t[i]!==void 0)return t[i];throw new Error(`request miss ${i} path argument`)}),Jy=(n,t)=>h(void 0,void 0,void 0,function*(){(typeof n=="function"?n():n)&&(yield t())}),hMe=n=>n?n.replace(/^\//,""):"",Ly=(n,t=[])=>{let o={};return n&&t.forEach(i=>{Object.prototype.hasOwnProperty.call(n,i)&&(o[i]=n[i])}),o},u=n=>{var t;if(n instanceof vT){let{message:o,response:i,request:e,config:a}=Ly(n,["message","response","request","config"]),r=[{message:o,config:Ly(a,["data","url","params","method"]),request:Ly(e,["protocol","host","path","method"]),response:Ly(i,["data","status","statusText"])}],s=(t=n?.response)===null||t===void 0?void 0:t.data;return s&&(typeof s=="object"?r.push(Object.assign(Object.assign({},s),s.error?s.error:{})):r.push(s)),r}return[n]},hN=class{constructor(){this.acs={accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},EN=class extends hN{constructor(){super(...arguments),this.admin={badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},CN=class extends EN{constructor(){super(...arguments),this.aily_rag={}}},uN=class extends CN{constructor(){super(...arguments),this.aily={v1:{ailySession:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appDataAssetTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appSkill:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appKnowledge:{ask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appDataAsset:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadFile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/upload_file`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},ailySessionRun:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ailySessionAilyMessage:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentVisibility:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/agent_visibility/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentAttachment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},tenantAppStat:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentChat:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats/:agent_chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentChatSession:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentAgentArtifact:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/aily/v1/agents/:agent_id/artifacts/:agent_artifact_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},BN=class extends uN{constructor(){super(...arguments),this.apaas={v1:{approvalTask:{addAssignee:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),agree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationObjectRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationObject:{oqlQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/oql_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationFunction:{invoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationRoleMember:{batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationRecordPermissionMember:{batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationEnvironmentVariable:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTask:{expediting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/expediting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),chatGroup:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/chat_group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rollbackPoints:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback_points`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/user_task/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationFlow:{execute:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approvalInstance:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationAuditLog:{auditLogList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),dataChangeLogsList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),dataChangeLogDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},seatAssignment:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},seatActivity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workspaceTable:{recordsBatchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recordsDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recordsPatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recordsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recordsPost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tableGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workspace:{sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workspaceView:{viewsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workspaceEnum:{enumGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantAppMetrics:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/apaas/v1/tenant_app_metrics/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},fN=class extends BN{constructor(){super(...arguments),this.application={applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v5:{application:{favouriteWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),favourite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recommendWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),recommend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v6:{applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),underauditlist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v7:{applicationBase:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/applications/:app_id/base`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationPublish:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/applications/:app_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appAvatarUpload:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/app_avatar/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},applicationConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/applications/:app_id/config`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},applicationAbility:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/application/v7/applications/:app_id/ability`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},QN=class extends fN{constructor(){super(...arguments),this.approval={instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v4:{instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),initiated:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},yN=class extends QN{constructor(){super(...arguments),this.attendance_machine={}}},mN=class extends yN{constructor(){super(...arguments),this.attendance={file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},SN=class extends mN{constructor(){super(...arguments),this.audio_video_ai={}}},DN=class extends SN{constructor(){super(...arguments),this.auth={appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v3:{appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},wN=class extends DN{constructor(){super(...arguments),this.authen={userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},ON=class extends wN{constructor(){super(...arguments),this.authz={}}},bN=class extends ON{constructor(){super(...arguments),this.aweme_ecosystem={}}},MN=class extends bN{constructor(){super(...arguments),this.baike={entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},_N=class extends MN{constructor(){super(...arguments),this.base={v2:{appRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/base/v2/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},TN=class extends _N{constructor(){super(...arguments),this.bitable={appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},NN=class extends TN{constructor(){super(...arguments),this.block={entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v2:{entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},RN=class extends NN{constructor(){super(...arguments),this.board={v1:{whiteboardNode:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createPlantuml:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},whiteboard:{downloadAsImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),theme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateTheme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},kN=class extends RN{constructor(){super(...arguments),this.bot={v4:{bot:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},vN=class extends kN{constructor(){super(...arguments),this.c360={}}},PN=class extends vN{constructor(){super(...arguments),this.calendar={exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v4:{exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},GN=class extends PN{constructor(){super(...arguments),this.cardkit={v1:{card:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),settings:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/settings`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/id_convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},cardElement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),content:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id/content`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},FN=class extends GN{constructor(){super(...arguments),this.ccm_unified_resource={}}},LN=class extends FN{constructor(){super(...arguments),this.collab_plugins={}}},UN=class extends LN{constructor(){super(...arguments),this.comment_sdk={}}},HN=class extends UN{constructor(){super(...arguments),this.compensation={v1:{indicator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},socialPlan:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_plans/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},item:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},plan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},socialInsurance:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_insurances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},itemCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},changeReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},archive:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/archives`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/archives/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},recurringPayment:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},socialArchive:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_archive/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},socialArchiveAdjustRecord:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},lumpSumPayment:{batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryDetailWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},KN=class extends HN{constructor(){super(...arguments),this.contact={group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v3:{group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),parent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),children:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),findByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},xN=class extends KN{constructor(){super(...arguments),this.content_check={}}},YN=class extends xN{constructor(){super(...arguments),this.contract={}}},jN=class extends YN{constructor(){super(...arguments),this.corehr={contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{costCenter:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoCountryRegionSubdivision:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},probation:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/submit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),enableDisableAssessment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/edit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},probationAssessment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/probation/assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customOrg:{deleteOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/delete_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/:org_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateRule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/update_rule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_orgs/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},preHire:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transitTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),withdrawOnboarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),restoreFlowInstance:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transformOnboardingTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobGrade:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},position:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/del_position`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/positions/:position_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeesBp:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},bp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeesAdditionalJob:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoNationality:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoCountryRegion:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoCity:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoDistrict:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoBank:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoCurrency:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeeCustomOrg:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/create_emp_custom_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),editEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/edit_emp_custom_org`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),employmentCustomOrgRecord:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/employment_custom_org_record`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),querybyid:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/custom_org/querybyid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},signatureFile:{listByBizId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`,A),method:"POST",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},signatureNode:{listByFileId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},company:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/companies/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryOperationLogsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryOperationLogs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),parents:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/parents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/departments/tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},draft:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approvalGroups:{openQueryPositionChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approval_groups/:process_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),openQueryJobChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_job_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),openQueryDepartmentChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/:location_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},locationAddress:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoLanguage:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoTimeZone:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reportDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workforcePlanDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchDelete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchSave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offboarding:{submitV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/offboardings/edit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/offboardings/revoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},basicInfoBankBranch:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},enum:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/enums/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},process:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),flowVariableData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processApprover:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/approvers/:approver_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processWithdraw:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},approver:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processTransfer:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processExtra:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/extra`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobLevel:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFamily:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),queryRecentChange:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeesInternationalAssignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},pathway:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways/active`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processStart:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/process_start`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costAllocation:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_allocations/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_allocations/update_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_allocations/create_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_allocations/remove_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costCenterVersion:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processQueryFlowDataTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/query_flow_data_template`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},defaultCostCenter:{createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/default_cost_centers/create_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/default_cost_centers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/default_cost_centers/remove_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/default_cost_centers/update_version`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},processRevoke:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},signatureTemplateInfoWithThumbnail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobChange:{revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_changes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},contract:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workforcePlanDetail:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch_v2`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employee:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},signatureTemplate:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/signature_templates/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employeesJobData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/job_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/employees/job_datas/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},person:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/persons/:person_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/persons`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workforcePlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},JN=class extends jN{constructor(){super(...arguments),this.data_cube={}}},qN=class extends JN{constructor(){super(...arguments),this.device={}}},zN=class extends qN{constructor(){super(...arguments),this.directory={v1:{employee:{resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id/resurrect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),regular:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id/regular`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),toBeResigned:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id/to_be_resigned`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/employees/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collaborationTenant:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collaborationRule:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collborationShareEntity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},department:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/directory/v1/departments/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},VN=class extends zN{constructor(){super(...arguments),this.docs_ai={}}},WN=class extends VN{constructor(){super(...arguments),this.docs_tool={}}},ZN=class extends WN{constructor(){super(...arguments),this.docs={v1:{content:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docs/v1/content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},XN=class extends ZN{constructor(){super(...arguments),this.document_ai={v1:{businessCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},contract:{fieldExtraction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},businessLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},drivingLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},vehicleLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},foodManageLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},foodProduceLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},hkmMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},chinesePassport:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},twMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},healthCertificate:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/health_certificate/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},vehicleInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/vehicle_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},resume:{parse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/resume/parse`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},bankCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},trainInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},taxiInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},vatInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},idCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})}}}}},$N=class extends XN{constructor(){super(...arguments),this.docx={document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},eR=class extends $N{constructor(){super(...arguments),this.drive={file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{fileLike:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},commentReaction:{updateReaction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/files/:file_token/comments/reaction`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},permissionPublic:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},AR=class extends eR{constructor(){super(...arguments),this.ea_symphony={}}},tR=class extends AR{constructor(){super(...arguments),this.edu={}}},rR=class extends tR{constructor(){super(...arguments),this.ehr={attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},aR=class extends rR{constructor(){super(...arguments),this.elearning={}}},iR=class extends aR{constructor(){super(...arguments),this.event={outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},oR=class extends iR{constructor(){super(...arguments),this.exam={}}},nR=class extends oR{constructor(){super(...arguments),this.face_detection={}}},sR=class extends nR{constructor(){super(...arguments),this.financial_access_platform={}}},gR=class extends sR{constructor(){super(...arguments),this.grounding={}}},cR=class extends gR{constructor(){super(...arguments),this.gtm_ai={}}},IR=class extends cR{constructor(){super(...arguments),this.helpdesk={agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},lR=class extends IR{constructor(){super(...arguments),this.hire={websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{talent:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v2/talents/:talent_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},interviewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/hire/v2/interview_records/:interview_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},pR=class extends lR{constructor(){super(...arguments),this.human_authentication={identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},dR=class extends pR{constructor(){super(...arguments),this.im={message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=K(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=K(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=K(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=K(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=K(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=a,g=K(a,["template_id","template_variable"]),c=Object.assign({msg_type:"interactive",content:JSON.stringify({type:"template",data:{template_id:r,template_variable:s}})},g);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(u(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{bizEntityTagRelation:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},urlPreview:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/url_previews/batch_update`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appFeedCardBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},feedCard:{botTimeSentive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/feed_cards/:feed_card_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tag:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/tags`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/tags/:tag_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chatButton:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/chat_button`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appFeedCard:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/app_feed_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},chat:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},hR=class extends dR{constructor(){super(...arguments),this.inline_platform={}}},ER=class extends hR{constructor(){super(...arguments),this.laps={}}},CR=class extends ER{constructor(){super(...arguments),this.lingo={v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/files/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/match`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/highlight`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},repo:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/repos`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},uR=class extends CR{constructor(){super(...arguments),this.llpp={}}},BR=class extends uR{constructor(){super(...arguments),this.mail={mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},fR=class extends BR{constructor(){super(...arguments),this.mcp={}}},QR=class extends fR{constructor(){super(...arguments),this.mdm={userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v3:{countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v3/country_regions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},batchCountryRegion:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/mdm/v3/batch_country_region`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},yR=class extends QR{constructor(){super(...arguments),this.meeting_room={}}},mR=class extends yR{constructor(){super(...arguments),this.mindnote={}}},SR=class extends mR{constructor(){super(...arguments),this.minutes={v1:{minuteTranscript:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/transcript`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},minuteStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/statistics`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},minuteMedia:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/media`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},minute:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),artifacts:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/artifacts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},DR=class extends SR{constructor(){super(...arguments),this.moments={post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},wR=class extends DR{constructor(){super(...arguments),this.myai_ai_extension={}}},OR=class extends wR{constructor(){super(...arguments),this.myai_assistant={}}},bR=class extends OR{constructor(){super(...arguments),this.myai_base_ai={}}},MR=class extends bR{constructor(){super(...arguments),this.myai_ccm_extension={}}},_R=class extends MR{constructor(){super(...arguments),this.myai_data={}}},TR=class extends _R{constructor(){super(...arguments),this.myai_im_extension={}}},NR=class extends TR{constructor(){super(...arguments),this.myai_mail={}}},RR=class extends NR{constructor(){super(...arguments),this.myai_memory_reflection={}}},kR=class extends RR{constructor(){super(...arguments),this.myai_scenario_summary={}}},vR=class extends kR{constructor(){super(...arguments),this.myai_slides={}}},PR=class extends vR{constructor(){super(...arguments),this.myai_url_extension={}}},GR=class extends PR{constructor(){super(...arguments),this.myai={}}},FR=class extends GR{constructor(){super(...arguments),this.okr={review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})},v1:{review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null})}},v2:{okrAlignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjective:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),keyResultsPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_position`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),keyResultsWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_weight`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrKeyResult:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjectiveAlignment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrCycle:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),objectivesWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_weight`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),objectivesPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_position`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjectiveKeyResult:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrKeyResultIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjectiveIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/indicators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrCycleObjective:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrIndicator:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/indicators/:indicator_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrObjectiveProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},okrKeyResultProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},LR=class extends FR{constructor(){super(...arguments),this.optical_char_recognition={image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},UR=class extends LR{constructor(){super(...arguments),this.partner_ai={}}},HR=class extends UR{constructor(){super(...arguments),this.passport={session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},KR=class extends HR{constructor(){super(...arguments),this.payroll={v1:{datasourceRecord:{save:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasource_records/save`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},paymentDetail:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_detail/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},paymentActivity:{archive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_activitys/archive`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costAllocationPlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},paymentActivityDetail:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/payment_activity_details`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},datasource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costAllocationDetail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},costAllocationReport:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},paygroup:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},acctItem:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},xR=class extends KR{constructor(){super(...arguments),this.people_admin={}}},YR=class extends xR{constructor(){super(...arguments),this.people_ai={}}},jR=class extends YR{constructor(){super(...arguments),this.people_bytedance={}}},JR=class extends jR{constructor(){super(...arguments),this.performance={v1:{reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v1/review_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},stageTask:{findByUserList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_user_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),findByPage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_page`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},semester:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v1/semesters`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{reviewee:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/reviewees/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},additionalInformationsBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/additional_informations/batch`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricDetail:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_details/import`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_details/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},question:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},indicator:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},activity:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/activity/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_fields/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricLib:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_libs/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/review_datas/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},metricTemplate:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/metric_templates/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/user_info/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reviewTemplate:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userGroupUserRel:{write:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/user_group_user_rels/write`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},additionalInformation:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/additional_informations/import`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},qR=class extends JR{constructor(){super(...arguments),this.personal_settings={systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},zR=class extends qR{constructor(){super(...arguments),this.profile={}}},VR=class extends zR{constructor(){super(...arguments),this.report={rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},WR=class extends VR{constructor(){super(...arguments),this.rule_engine={}}},ZR=class extends WR{constructor(){super(...arguments),this.saasbi={}}},XR=class extends ZR{constructor(){super(...arguments),this.scim={}}},$R=class extends XR{constructor(){super(...arguments),this.search_in_app={}}},ek=class extends $R{constructor(){super(...arguments),this.search={dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v2:{dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},Ak=class extends ek{constructor(){super(...arguments),this.security_and_compliance={openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{deviceApplyRecord:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},deviceRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mine:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},tk=class extends Ak{constructor(){super(...arguments),this.security_plugin={}}},rk=class extends tk{constructor(){super(...arguments),this.sheet_ai={}}},ak=class extends rk{constructor(){super(...arguments),this.sheets={spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v3:{spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},ik=class extends ak{constructor(){super(...arguments),this.slides_ai={}}},ok=class extends ik{constructor(){super(...arguments),this.slides={}}},nk=class extends ok{constructor(){super(...arguments),this.spark={v1:{appTable:{deleteTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),postTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patchTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchUpdateTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTableDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTableList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTableRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appEnum:{getEnumDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums/:enum_name`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getEnumList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appView:{getViewRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/views/:view_name/records`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},appStorage:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage`,A),method:"GET",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadInitialize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/initialize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/part`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadComplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},app:{icon:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/icon`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),uploadHtmlCodeAndRelease:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/upload_and_release_html_code`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),getAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),updateAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id/sql_commands`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps/:app_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/apps`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},directoryUser:{idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/spark/v1/directory/user/id_convert`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},sk=class extends nk{constructor(){super(...arguments),this.speech_to_text={speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},gk=class extends sk{constructor(){super(...arguments),this.subscriptions={}}},ck=class extends gk{constructor(){super(...arguments),this.task={task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{task:{tasklists:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/tasklists`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_dependencies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_dependencies`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setAncestorTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/set_ancestor_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_reminders`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_tasklist`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_tasklist`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},comment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/comments`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},section:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),tasksWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/sections`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tasklist:{tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/tasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/add_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/remove_members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customField:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/add`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tasklistActivitySubscription:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments/upload`,A),method:"POST",data:a,params:e,headers:Object.assign(Object.assign({},i),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(u(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customFieldOption:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskV2:{taskSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/task_v2/task_subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listRelatedTaskWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listRelatedTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},taskSubtask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},Ik=class extends ck{constructor(){super(...arguments),this.tenant={tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v2:{tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},lk=class extends Ik{constructor(){super(...arguments),this.translation={text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},pk=class extends lk{constructor(){super(...arguments),this.trust_layer={}}},dk=class extends pk{constructor(){super(...arguments),this.trust_party={v1:{collaborationTenantCollaborationUser:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_users/:target_user_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collaborationTenantCollaborationDepartment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_departments/:target_department_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},collaborationTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),visibleOrganization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/visible_organization`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},hk=class extends dk{constructor(){super(...arguments),this.unified_kms_log={}}},Ek=class extends hk{constructor(){super(...arguments),this.unified_kms={}}},Ck=class extends Ek{constructor(){super(...arguments),this.vault={}}},uk=class extends Ck{constructor(){super(...arguments),this.vc={material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),listByNo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:i,data:a,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(u(g)),g}),s=()=>{let g="The stream has already been consumed";if(!r.data.readable)throw this.logger.error(g),new Error(g)};return{writeFile:g=>h(this,void 0,void 0,function*(){return s(),new Promise((c,I)=>{let d=tt.createWriteStream(g);d.on("finish",()=>{c(g)}),d.on("error",B=>{I(B)}),r.data.pipe(d)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),unifiedNoteTranscript:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),events:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},Bk=class extends uk{constructor(){super(...arguments),this.verification={v1:{verification:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/verification/v1/verification`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},fk=class extends Bk{constructor(){super(...arguments),this.wiki={spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{node:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}},v2:{spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",headers:(0,M.default)(g.headers,b.default),params:(0,M.default)(g.params,b.default),data:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(u(I))})});return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=K(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},Qk=class extends fk{constructor(){super(...arguments),this.workplace={workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},v1:{workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:C(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:a,params:e,headers:i,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(u(r)),r})})}}}}},ng={error:(...n)=>{console.log("[error]:",...n)},warn:(...n)=>{console.warn("[warn]:",...n)},info:(...n)=>{console.info("[info]:",...n)},debug:(...n)=>{console.debug("[debug]:",...n)},trace:(...n)=>{console.trace("[trace]:",...n)}},sc=class{constructor(t,o){this.level=t,this.logger=o}error(...t){this.level>=Vi.error&&this.logger.error(t)}warn(...t){this.level>=Vi.warn&&this.logger.warn(t)}info(...t){this.level>=Vi.info&&this.logger.info(t)}debug(...t){this.level>=Vi.debug&&this.logger.debug(t)}trace(...t){this.level>=Vi.trace&&this.logger.trace(t)}},yk=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.cache=t.cache,this.domain=t.domain,this.logger=t.logger,this.appType=t.appType,this.httpInstance=t.httpInstance,this.logger.debug("app ticket manager is ready"),this.checkAppTicket()}checkAppTicket(){var t;return h(this,void 0,void 0,function*(){this.appType===es.ISV&&((yield(t=this.cache)===null||t===void 0?void 0:t.get(kC,{namespace:this.appId}))||this.requestAppTicket())})}requestAppTicket(){return h(this,void 0,void 0,function*(){this.logger.debug("request app ticket"),yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,{app_id:this.appId,app_secret:this.appSecret}).catch(t=>{this.logger.error(t)})})}getAppTicket(){var t;return h(this,void 0,void 0,function*(){let o=yield(t=this.cache)===null||t===void 0?void 0:t.get(kC,{namespace:this.appId});if(o)return this.logger.debug("use cache app ticket"),o;yield this.requestAppTicket()})}},qy="/oauth/v3/token",EMe="urn:ietf:params:oauth:grant-type:jwt-bearer",jz="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",CMe="authorization_code",uMe="refresh_token",jk="X-Target-Service",Jz=7100,Jk=7101,qz=7102,qk=7104,BMe=Object.freeze({"open.feishu.cn":"https://accounts.feishu.cn","open.larksuite.com":"https://accounts.larksuite.com"}),Ya=class extends Error{constructor(t,o){super(o),this.name="ClientAssertionError",this.code=t,this.msg=o}},Ad=class extends Error{constructor(t,o,i,e){super(e||i||"access token request failed"),this.name="AccessTokenError",this.statusCode=t,this.code=o,this.error=i,this.errorDescription=e}},zk=n=>n.includes("://")?n:`https://${n}`;function Vk(n){let t=new URL(zk(n));if(!t.host)throw new Error(`invalid url: ${n}`);return t.host}function Wk(n){if(n.oauthBaseUrl)return zk(n.oauthBaseUrl).replace(/\/+$/,"");let t=Vk(n.domain),o=BMe[t];if(o)return o;throw new Error("oauthBaseUrl is not configured. When domain is a non-default value (neither open.feishu.cn nor open.larksuite.com), set oauthBaseUrl explicitly.")}function zz(n){return Vk(Wk(n))}function Zk(n,t){let o=new URL(zk(n.targetService));if(o.protocol!=="https:")throw new Error("targetService must use https");if(o.username||o.password)throw new Error("targetService must not contain userinfo");let e=`${n.targetPrefix||""}${t}`.replace(/\/{2,}/g,"/");if(/(^|\/)\.\.(\/|$)/.test(e))throw new Error("targetPrefix must not contain path traversal");return`${o.protocol}//${o.host}${e}`}function fMe(n,t){var o,i;let e=(o=t?.code)!==null&&o!==void 0?o:"unknown",a=(i=t?.msg)!==null&&i!==void 0?i:"no message";return`failed to get ${n}, code: ${e}, msg: ${a}`}var mk=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.cache=t.cache,this.domain=t.domain,this.logger=t.logger,this.appType=t.appType,this.httpInstance=t.httpInstance,this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.appTicketManager=new yk({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance}),this.logger.debug("token manager is ready")}requestToken(t,o,i){return h(this,void 0,void 0,function*(){let e=yield this.httpInstance.post(t,o).catch(a=>{throw this.logger.error(a),a});if(!e||!e[i])throw new Error(fMe(i,e));return e})}getCustomTenantAccessToken(){var t,o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)return this.getTenantTokenByClientAssertion();let i=yield(t=this.cache)===null||t===void 0?void 0:t.get(MC,{namespace:this.appId});if(i)return this.logger.debug("use cache token"),i;this.logger.debug("request token");let{tenant_access_token:e,expire:a}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,{app_id:this.appId,app_secret:this.appSecret},"tenant_access_token");return yield(o=this.cache)===null||o===void 0?void 0:o.set(MC,e,new Date().getTime()+a*1e3-180*1e3,{namespace:this.appId}),e})}getTenantTokenByClientAssertion(){var t,o,i,e,a,A,r,s;return h(this,void 0,void 0,function*(){let g=Wk({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),c=zz({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),I=yield(t=this.cache)===null||t===void 0?void 0:t.get(MC,{namespace:this.appId});if(I)return this.logger.debug("use cache token"),I;let d;try{d=yield this.clientAssertionProvider.retrieveToken(c)}catch(_){throw new Ya(qz,_?.message||"client assertion provider failed")}if(!d||!d.value)throw new Ya(Jk,"client assertion token is empty");let B=`${g}${qy}`,f={};d.targetInfo&&(B=Zk(d.targetInfo,qy),f[jk]=c),this.logger.debug("request token (client assertion)");let Q;try{Q=yield this.httpInstance.request({method:"post",url:B,headers:f,data:{grant_type:EMe,client_assertion_type:jz,client_assertion:d.value,client_id:this.appId}})}catch(_){throw this.logger.error(_),new Ya(((i=(o=_?.response)===null||o===void 0?void 0:o.data)===null||i===void 0?void 0:i.code)||0,((a=(e=_?.response)===null||e===void 0?void 0:e.data)===null||a===void 0?void 0:a.error_description)||((r=(A=_?.response)===null||A===void 0?void 0:A.data)===null||r===void 0?void 0:r.error)||"client assertion token exchange failed")}let y=Q?.access_token;if(!y)throw new Ya(Q?.code||0,Q?.error_description||Q?.error||"oauth token response missing access token");let m=Number(Q?.expires_in)||0;return yield(s=this.cache)===null||s===void 0?void 0:s.set(MC,y,new Date().getTime()+Math.max(m-180,0)*1e3,{namespace:this.appId}),y})}getMarketTenantAccessToken(t){var o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)throw new Ya(Jz,"ClientAssertion mode is not supported for ISV apps");if(!t){this.logger.error("market app request need tenant key");return}let i=yield(o=this.cache)===null||o===void 0?void 0:o.get(`larkMarketAccessToken${t}`,{namespace:this.appId});if(i)return this.logger.debug("use cache token"),i;this.logger.debug("get app ticket");let e=yield this.appTicketManager.getAppTicket();if(!e){this.logger.warn("no app ticket");return}this.logger.debug("get app access token");let{app_access_token:a}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/app_access_token`,{app_id:this.appId,app_secret:this.appSecret,app_ticket:e},"app_access_token");this.logger.debug("get tenant access token");let{tenant_access_token:A,expire:r}=yield this.requestToken(`${this.domain}/open-apis/auth/v3/tenant_access_token`,{app_access_token:a,tenant_key:t},"tenant_access_token");return yield this.cache.set(`larkMarketAccessToken${t}`,A,new Date().getTime()+r*1e3-180*1e3,{namespace:this.appId}),A})}getTenantAccessToken(t){return h(this,void 0,void 0,function*(){return Jy(this.appType===es.SelfBuild,()=>h(this,void 0,void 0,function*(){this.logger.debug("get custom app token")})),Jy(this.appType===es.ISV,()=>h(this,void 0,void 0,function*(){this.logger.debug("get market app token ")})),this.appType===es.SelfBuild?yield this.getCustomTenantAccessToken():yield this.getMarketTenantAccessToken(t?.[Yy])})}},Vz=(n,t)=>{let o=Object.assign({},n);for(let[i,e]of Object.entries(t))e!==void 0&&(o[i]=e);return o},Sk=class{constructor(t){this.client=t.client}getCacheKey(t,o){return`${o?.namespace||this.client.appId}/${pMe.toString()}/${t}`}calibrateTime(t){return new Date().getTime()+(t||0)*1e3-180*1e3}initWithCode(t,o){return h(this,void 0,void 0,function*(){let i={};for(let[e,a]of Object.entries(t)){let A=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:a}});if(A.code!==0){this.client.logger.error("init user access token error",e,A.msg||A.message);continue}if(!A.data){this.client.logger.error("user access code expired",e,a);continue}i[e]={code:a,token:A.data.access_token,refreshToken:A.data.refresh_token,expiredTime:this.calibrateTime(A.data.expires_in)}}return yield this.update(i,{namespace:o?.namespace}),i})}update(t,o){return h(this,void 0,void 0,function*(){for(let[i,e]of Object.entries(t)){let a=this.getCacheKey(i,{namespace:o?.namespace}),A=(yield this.client.cache.get(a))||{},{code:r,token:s,refreshToken:g,expiredTime:c}=e,I=Vz(A,{code:r,token:s,refreshToken:g,expiredTime:c});yield this.client.cache.set(a,I,1/0)}})}get(t,o){return h(this,void 0,void 0,function*(){let i=this.getCacheKey(t,{namespace:o?.namespace}),e=yield this.client.cache.get(i);if(!e){this.client.logger.error("user access token needs to be initialized or updated first");return}let{token:a,code:A,refreshToken:r,expiredTime:s}=e;if(a&&s&&s-new Date().getTime()>0)return a;if(r){let g=yield this.client.authen.oidcRefreshAccessToken.create({data:{grant_type:"refresh_token",refresh_token:r}});if(g.code===0&&g.data)return yield this.update({[t]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}),g.data.access_token;this.client.logger.error("get user access token by refresh token failed.",g.msg);return}if(A){let g=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:A}});g.code===0&&g.data?yield this.update({[t]:{token:g.data.access_token,refreshToken:g.data.refresh_token,expiredTime:this.calibrateTime(g.data.expires_in)}}):this.client.logger.error("get user access token by code failed.",g.msg)}})}},$p=n=>n===""||n===0||n===null||n===void 0?void 0:n,QMe=n=>{if(!n||n.error)return!0;let{code:t}=n;return t!==void 0&&t!==0&&t!=="0"&&t!==""},Dk=class{constructor(t){this.appId=t.appId,this.appSecret=t.appSecret,this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.domain=t.domain,this.httpInstance=t.httpInstance,this.logger=t.logger}retrieveByAuthorizationCode(t){return h(this,void 0,void 0,function*(){return this.doRequest({grant_type:CMe,code:t.code,redirect_uri:t.redirectUri,code_verifier:t.codeVerifier,scope:t.scope},t.headers)})}refresh(t){return h(this,void 0,void 0,function*(){return this.doRequest({grant_type:uMe,refresh_token:t.refreshToken,scope:t.scope},t.headers)})}doRequest(t,o){return h(this,void 0,void 0,function*(){let i=Wk({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),e=zz({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),a={client_id:this.appId};for(let[I,d]of Object.entries(t))d!=null&&(a[I]=d);let A=`${i}${qy}`,r=Object.assign({},o||{});if(this.clientAssertionProvider){let I;try{I=yield this.clientAssertionProvider.retrieveToken(e)}catch(d){throw new Ya(qz,d?.message||"client assertion provider failed")}if(!I||!I.value)throw new Ya(Jk,"client assertion token is empty");a.client_assertion_type=jz,a.client_assertion=I.value,I.targetInfo&&(A=Zk(I.targetInfo,qy),r[jk]=e)}else if(this.appSecret)a.client_secret=this.appSecret;else throw new Ya(qk,"appSecret and clientAssertionProvider cannot both be empty for accessToken APIs");let s=200,g;try{g=yield this.httpInstance.request({method:"post",url:A,headers:r,data:a})}catch(I){if(this.logger.error(I),I?.response)s=I.response.status,g=I.response.data;else throw new Ad(0,0,"",I?.message||"oauth token request failed")}if(s!==200||QMe(g))throw new Ad(s,g?.code||0,g?.error||"",g?.error_description||g?.msg||"");let c=$p(g?.access_token);if(!c)throw new Ad(s,g?.code||0,g?.error||"",g?.error_description||"oauth token response missing access_token");return{accessToken:c,tokenType:$p(g.token_type),expiresIn:$p(g.expires_in),refreshToken:$p(g.refresh_token),refreshTokenExpiresIn:$p(g.refresh_token_expires_in),scope:$p(g.scope)}})}},zy=class extends Qk{constructor(t){if(super(),this.appId="",this.appSecret="",this.helpDeskId="",this.helpDeskToken="",this.appType=es.SelfBuild,this.logger=new sc(t.loggerLevel||Vi.info,t.logger||ng),this.appId=t.appId,this.appSecret=t.appSecret||"",this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.disableTokenCache=t.disableTokenCache,this.userAgent=Yk(t.source,{extraTags:t.extraUaTags}),Jy(!this.appId,()=>this.logger.error("appId is needed")),this.helpDeskId=t.helpDeskId,this.helpDeskToken=t.helpDeskToken,this.appType=t?.appType||es.SelfBuild,!this.appSecret&&!this.clientAssertionProvider)throw new Ya(qk,"appSecret or clientAssertionProvider is required");if(this.clientAssertionProvider&&this.appType===es.ISV)throw new Ya(Jz,"ClientAssertion mode is not supported for ISV apps");this.domain=Yz(t.domain||As.Feishu),this.logger.debug(`use domain url: ${this.domain}`),this.cache=t.cache||PC,this.httpInstance=t.httpInstance||td,this.tokenManager=new mk({appId:this.appId,appSecret:this.appSecret,cache:this.cache,domain:this.domain,logger:this.logger,appType:this.appType,httpInstance:this.httpInstance,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl}),this.userAccessToken=new Sk({client:this}),this.accessToken=new Dk({appId:this.appId,appSecret:this.appSecret,clientAssertionProvider:this.clientAssertionProvider,oauthBaseUrl:this.oauthBaseUrl,domain:this.domain,httpInstance:this.httpInstance,logger:this.logger}),this.logger.info("client ready")}formatPayload(t,o){var i,e,a;return h(this,void 0,void 0,function*(){let A=["lark","params","data","headers","path"].reduce((g,c)=>(g[c]=o?.[c]||{},g),{}),r=(i=A?.lark)===null||i===void 0?void 0:i[xz];if(r)this.logger.debug("use passed token"),A.headers.Authorization=`Bearer ${r}`;else if(!this.disableTokenCache){let g=yield this.tokenManager.getTenantAccessToken({[Yy]:(e=A?.lark)===null||e===void 0?void 0:e[Yy]});g?A.headers.Authorization=`Bearer ${g}`:this.logger.warn("failed to obtain token")}if((a=A?.lark)===null||a===void 0?void 0:a[Kz]){this.logger.debug("generate help desk credential");let g=dMe(`${this.helpDeskId}:${this.helpDeskToken}`);A.headers["X-Lark-Helpdesk-Authorization"]=`Bearer ${g}`}return{params:Object.assign(Object.assign({},t?.params||{}),A.params),headers:Object.assign(Object.assign({"User-Agent":this.userAgent},t?.headers||{}),A.headers),data:Object.assign(Object.assign({},t?.data||{}),A.data),path:Object.assign(Object.assign({},t?.path||{}),A.path)}})}request(t,o){var i;return h(this,void 0,void 0,function*(){let{data:e,params:a,headers:A,url:r}=t,s=K(t,["data","params","headers","url"]),g=yield this.formatPayload({data:e,params:a,headers:A},o),c=((i=t.method)===null||i===void 0?void 0:i.toLowerCase())==="get"&&Object.keys(g.data).length===0?void 0:g.data;return this.logger.trace(`send request [${t.method}]: ${t.url}`),yield this.httpInstance.request(Object.assign(Object.assign({},s),{url:/^http/.test(r)?r:`${this.domain}/${hMe(r)}`,headers:g.headers,data:c,params:g.params})).catch(d=>{throw this.logger.error(d),d})})}},yMe=n=>n.reduce((t,o)=>(0,Uz.default)(t,o),{}),mMe=n=>({lark:{[Yy]:n}}),SMe=()=>({lark:{[Kz]:!0}}),DMe=n=>({headers:{Authorization:`Bearer ${n}`}}),wMe=n=>({lark:{[xz]:n}}),Vy=class{constructor(t){let{encryptKey:o,verificationToken:i,logger:e}=t;this.verificationToken=i,this.encryptKey=o,this.logger=e,o&&(this.aesCipher=new vC(o))}parse(t){var o,i;let e=(()=>{var r;let s=t||{},{encrypt:g}=s,c=K(s,["encrypt"]);if(g)try{return Object.assign(Object.assign({},JSON.parse((r=this.aesCipher)===null||r===void 0?void 0:r.decrypt(g))),c)}catch{return this.logger.error("parse encrypt data failed"),{}}return c})();if("schema"in e){let{header:r,event:s}=e,g=K(e,["header","event"]);return Object.assign(Object.assign(Object.assign({[xy]:(o=e?.header)===null||o===void 0?void 0:o.event_type},g),r),s)}let{event:a}=e,A=K(e,["event"]);return Object.assign(Object.assign({[xy]:(i=e?.event)===null||i===void 0?void 0:i.type},a),A)}checkIsCardEventValidated(t){if("encrypt"in t||"schema"in t)return this.checkIsEventValidated(t);let{"x-lark-request-timestamp":o,"x-lark-request-nonce":i,"x-lark-signature":e}=t.headers;return this.verificationToken?Ky.createHash("sha1").update(o+i+this.verificationToken+JSON.stringify(t)).digest("hex")===e:!0}checkIsEventValidated(t){if(!this.encryptKey)return!0;let{"x-lark-request-timestamp":o,"x-lark-request-nonce":i,"x-lark-signature":e}=t.headers,a=o+i+this.encryptKey+JSON.stringify(t);return Ky.createHash("sha256").update(a).digest("hex")===e}},OMe="app_ticket",Wy=class{constructor(t){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{encryptKey:o,verificationToken:i}=t;this.encryptKey=o||"",this.verificationToken=i||"",this.logger=new sc(t.loggerLevel||Vi.info,t.logger||ng),this.requestHandle=new Vy({encryptKey:o,verificationToken:i,logger:this.logger}),this.cache=t.cache||PC,this.registerAppTicketHandle(),this.logger.info("event-dispatch is ready")}registerAppTicketHandle(){this.register({app_ticket:t=>h(this,void 0,void 0,function*(){let{app_ticket:o,app_id:i}=t;o?(yield this.cache.set(kC,o,void 0,{namespace:i}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(t){return Object.keys(t).forEach(o=>{this.handles.has(o)&&o!==OMe&&this.logger.error(`this ${o} handle is registered`),this.handles.set(o,t[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(t,o){var i,e;return h(this,void 0,void 0,function*(){if(o?.needCheck!==!1&&!(!((i=this.requestHandle)===null||i===void 0)&&i.checkIsEventValidated(t))){this.logger.warn("verification failed event");return}let A=(e=this.requestHandle)===null||e===void 0?void 0:e.parse(t),r=A[xy];if(this.handles.has(r)){let s=yield this.handles.get(r)(A);return this.logger.debug(`execute ${r} handle`),s}return this.logger.warn(`no ${r} handle`),`no ${r} event handle`})}},wk=class{constructor(t,o){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{verificationToken:i,encryptKey:e}=t;this.encryptKey=e||"",this.verificationToken=i||"",this.cardHandler=o,this.logger=new sc(t.loggerLevel||Vi.info,t.logger||ng),this.requestHandle=new Vy({encryptKey:e,verificationToken:i,logger:this.logger}),this.cache=t.cache||PC,this.registerAppTicketHandle(),this.logger.info("card-action-handle is ready")}registerAppTicketHandle(){this.register({app_ticket:t=>h(this,void 0,void 0,function*(){let{app_ticket:o,app_id:i}=t;o?(yield this.cache.set(kC,o,void 0,{namespace:i}),this.logger.debug("set app ticket")):this.logger.warn("response not include app ticket")})})}register(t){return Object.keys(t).forEach(o=>{this.handles.set(o,t[o]),this.logger.debug(`register ${o} handle`)}),this}invoke(t){var o,i;return h(this,void 0,void 0,function*(){if(!(!((o=this.requestHandle)===null||o===void 0)&&o.checkIsCardEventValidated(t))){this.logger.warn("verification failed event");return}let e=(i=this.requestHandle)===null||i===void 0?void 0:i.parse(t),a=e[xy];if(this.handles.has(a))try{return yield this.handles.get(a)(e)}catch(A){this.logger.error(A);return}try{let A=yield this.cardHandler(e);return this.logger.debug("execute card handle"),A}catch(A){this.logger.error(A)}})}},rm=n=>new Promise(t=>{let o="";n.on("data",i=>{o+=i}),n.on("end",()=>{try{let i=JSON.parse(o);t(i)}catch{t("")}})}),GC=(n,t)=>{if("encrypt"in n&&!t.encryptKey)throw new Error("auto-challenge need encryptKey, please check for missing in dispatcher");let o="encrypt"in n?JSON.parse(new vC(t.encryptKey).decrypt(n.encrypt)):n;return{isChallenge:o.type==="url_verification",challenge:{challenge:o.challenge}}},bMe=(n,t,o)=>(i,e)=>h(void 0,void 0,void 0,function*(){if(i.url!==n)return;let a=Object.assign(Object.create({headers:i.headers}),yield rm(i));if(o?.autoChallenge||!1){let{isChallenge:s,challenge:g}=GC(a,{encryptKey:t.encryptKey});if(s){e.end(JSON.stringify(g));return}}let r=yield t.invoke(a);e.end(JSON.stringify(r))}),MMe=(n,t)=>(o,i)=>h(void 0,void 0,void 0,function*(){let e=yield h(void 0,void 0,void 0,function*(){return o.body?o.body:o.complete?((t?.logger||ng).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield rm(o)}),a=Object.assign(Object.create({headers:o.headers}),e);if(t?.autoChallenge||!1){let{isChallenge:s,challenge:g}=GC(a,{encryptKey:n.encryptKey});if(s){i.json(g);return}}let r=yield n.invoke(a);i.json(r)}),_Me=(n,t,o)=>(i,e)=>h(void 0,void 0,void 0,function*(){let{originalUrl:a,req:A,request:r}=i;if(a===n){let s=yield h(void 0,void 0,void 0,function*(){return r.body?r.body:A.complete?((o?.logger||ng).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield rm(A)}),g=Object.assign(Object.create({headers:A.headers}),s);if(o?.autoChallenge||!1){let{isChallenge:d,challenge:B}=GC(g,{encryptKey:t.encryptKey});if(d){i.body=B,yield e();return}}let I=yield t.invoke(g);i.body=JSON.stringify(I)}yield e()}),TMe=(n,t)=>(o,i)=>h(void 0,void 0,void 0,function*(){let{req:e,request:a}=o,A=yield h(void 0,void 0,void 0,function*(){return a.body?a.body:e.complete?((t?.logger||ng).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield rm(e)}),r=Object.assign(Object.create({headers:e.headers}),A);if(t?.autoChallenge||!1){let{isChallenge:c,challenge:I}=GC(r,{encryptKey:n.encryptKey});if(c){o.body=I,yield i();return}}let g=yield n.invoke(r);o.body=JSON.stringify(g),yield i()}),NMe=n=>{let{title:t,content:o}=n;return JSON.stringify({config:{wide_screen_mode:!0},elements:[{tag:"markdown",content:o}],header:{template:"blue",title:{content:t,tag:"plain_text"}}})},RMe=Object.freeze({__proto__:null,defaultCard:NMe}),og=Gy();og.util.Long=void 0;og.configure();var nc=og.Reader,Sz=og.Writer,HA=og.util,Mo=og.roots.default||(og.roots.default={}),Wz=Mo.pbbp2=(()=>{let n={};return n.Header=(function(){function t(o){if(o)for(let i=Object.keys(o),e=0;e>>3){case 1:{A.key=i.string();break}case 2:{A.value=i.string();break}default:i.skipType(r&7);break}}if(!A.hasOwnProperty("key"))throw HA.ProtocolError("missing required 'key'",{instance:A});if(!A.hasOwnProperty("value"))throw HA.ProtocolError("missing required 'value'",{instance:A});return A},t.decodeDelimited=function(i){return i instanceof nc||(i=new nc(i)),this.decode(i,i.uint32())},t.verify=function(i){return typeof i!="object"||i===null?"object expected":HA.isString(i.key)?HA.isString(i.value)?null:"value: string expected":"key: string expected"},t.fromObject=function(i){if(i instanceof Mo.pbbp2.Header)return i;let e=new Mo.pbbp2.Header;return i.key!=null&&(e.key=String(i.key)),i.value!=null&&(e.value=String(i.value)),e},t.toObject=function(i,e){e||(e={});let a={};return e.defaults&&(a.key="",a.value=""),i.key!=null&&i.hasOwnProperty("key")&&(a.key=i.key),i.value!=null&&i.hasOwnProperty("value")&&(a.value=i.value),a},t.prototype.toJSON=function(){return this.constructor.toObject(this,og.util.toJSONOptions)},t.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/pbbp2.Header"},t})(),n.Frame=(function(){function t(o){if(this.headers=[],o)for(let i=Object.keys(o),e=0;e>>3){case 1:{A.SeqID=i.uint64();break}case 2:{A.LogID=i.uint64();break}case 3:{A.service=i.int32();break}case 4:{A.method=i.int32();break}case 5:{A.headers&&A.headers.length||(A.headers=[]),A.headers.push(Mo.pbbp2.Header.decode(i,i.uint32()));break}case 6:{A.payloadEncoding=i.string();break}case 7:{A.payloadType=i.string();break}case 8:{A.payload=i.bytes();break}case 9:{A.LogIDNew=i.string();break}default:i.skipType(r&7);break}}if(!A.hasOwnProperty("SeqID"))throw HA.ProtocolError("missing required 'SeqID'",{instance:A});if(!A.hasOwnProperty("LogID"))throw HA.ProtocolError("missing required 'LogID'",{instance:A});if(!A.hasOwnProperty("service"))throw HA.ProtocolError("missing required 'service'",{instance:A});if(!A.hasOwnProperty("method"))throw HA.ProtocolError("missing required 'method'",{instance:A});return A},t.decodeDelimited=function(i){return i instanceof nc||(i=new nc(i)),this.decode(i,i.uint32())},t.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(!HA.isInteger(i.SeqID)&&!(i.SeqID&&HA.isInteger(i.SeqID.low)&&HA.isInteger(i.SeqID.high)))return"SeqID: integer|Long expected";if(!HA.isInteger(i.LogID)&&!(i.LogID&&HA.isInteger(i.LogID.low)&&HA.isInteger(i.LogID.high)))return"LogID: integer|Long expected";if(!HA.isInteger(i.service))return"service: integer expected";if(!HA.isInteger(i.method))return"method: integer expected";if(i.headers!=null&&i.hasOwnProperty("headers")){if(!Array.isArray(i.headers))return"headers: array expected";for(let e=0;e>>0,i.SeqID.high>>>0).toNumber(!0))),i.LogID!=null&&(HA.Long?(e.LogID=HA.Long.fromValue(i.LogID)).unsigned=!0:typeof i.LogID=="string"?e.LogID=parseInt(i.LogID,10):typeof i.LogID=="number"?e.LogID=i.LogID:typeof i.LogID=="object"&&(e.LogID=new HA.LongBits(i.LogID.low>>>0,i.LogID.high>>>0).toNumber(!0))),i.service!=null&&(e.service=i.service|0),i.method!=null&&(e.method=i.method|0),i.headers){if(!Array.isArray(i.headers))throw TypeError(".pbbp2.Frame.headers: array expected");e.headers=[];for(let a=0;a=0&&(e.payload=i.payload)),i.LogIDNew!=null&&(e.LogIDNew=String(i.LogIDNew)),e},t.toObject=function(i,e){e||(e={});let a={};if((e.arrays||e.defaults)&&(a.headers=[]),e.defaults){if(HA.Long){let A=new HA.Long(0,0,!0);a.SeqID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else a.SeqID=e.longs===String?"0":0;if(HA.Long){let A=new HA.Long(0,0,!0);a.LogID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else a.LogID=e.longs===String?"0":0;a.service=0,a.method=0,a.payloadEncoding="",a.payloadType="",e.bytes===String?a.payload="":(a.payload=[],e.bytes!==Array&&(a.payload=HA.newBuffer(a.payload))),a.LogIDNew=""}if(i.SeqID!=null&&i.hasOwnProperty("SeqID")&&(typeof i.SeqID=="number"?a.SeqID=e.longs===String?String(i.SeqID):i.SeqID:a.SeqID=e.longs===String?HA.Long.prototype.toString.call(i.SeqID):e.longs===Number?new HA.LongBits(i.SeqID.low>>>0,i.SeqID.high>>>0).toNumber(!0):i.SeqID),i.LogID!=null&&i.hasOwnProperty("LogID")&&(typeof i.LogID=="number"?a.LogID=e.longs===String?String(i.LogID):i.LogID:a.LogID=e.longs===String?HA.Long.prototype.toString.call(i.LogID):e.longs===Number?new HA.LongBits(i.LogID.low>>>0,i.LogID.high>>>0).toNumber(!0):i.LogID),i.service!=null&&i.hasOwnProperty("service")&&(a.service=i.service),i.method!=null&&i.hasOwnProperty("method")&&(a.method=i.method),i.headers&&i.headers.length){a.headers=[];for(let A=0;AWz.Frame.decode(n),Ok=class{constructor(){this.client={appId:"",appSecret:"",domain:As.Feishu},this.ws={connectUrl:"",pingInterval:120*1e3,reconnectCount:-1,reconnectInterval:120*1e3,reconnectNonce:30*1e3,deviceId:"",serviceId:"",autoReconnect:!0},this.wsInstance=null}updateClient(t){Object.assign(this.client,t)}updateWs(t){Object.assign(this.ws,t)}getClient(t){return t===void 0?this.client:this.client[t]}getWS(t){return t===void 0?this.ws:this.ws[t]}get wsConfigUrl(){return`${this.getClient("domain")}/callback/ws/endpoint`}setWSInstance(t){this.wsInstance=t}getWSInstance(){return this.wsInstance}},bk=class{constructor(t){this.cache=new Map,this.logger=t.logger,this.clearAtInterval()}mergeData(t){let{message_id:o,sum:i,seq:e,trace_id:a,data:A}=t,r=this.cache.get(o);if(r)r.buffer[e]=A;else{let g=new Array(i).fill(void 0);g[e]=A,this.cache.set(o,{buffer:g,trace_id:a,message_id:o,create_time:Date.now()})}let s=this.cache.get(o);if(s?.buffer.every(g=>!!g)){let g=s.buffer.reduce((d,B)=>{let f=new Uint8Array(d.byteLength+B.byteLength);return f.set(d,0),f.set(B,d.length),f},new Uint8Array([])),c=new TextDecoder("utf-8").decode(g),I=JSON.parse(c);return this.deleteCache(o),I}return null}deleteCache(t){this.cache.delete(t)}clearAtInterval(){if(this.timer)return;let t=1e4;this.timer=setInterval(()=>{let o=Date.now();this.cache.forEach((i,e)=>{var a;let{create_time:A,trace_id:r,message_id:s}=i;o-A>t&&((a=this.logger)===null||a===void 0||a.debug(`${s} event data is deleted as expired, trace_id: ${r}`),this.deleteCache(e))})},t),typeof this.timer.unref=="function"&&this.timer.unref()}destroy(){this.timer&&(clearInterval(this.timer),this.timer=void 0),this.cache.clear()}},TC;(function(n){n[n.ok=0]="ok",n[n.system_busy=1]="system_busy",n[n.forbidden=403]="forbidden",n[n.auth_failed=514]="auth_failed",n[n.internal_error=1000040343]="internal_error",n[n.exceed_conn_limit=1000040350]="exceed_conn_limit"})(TC||(TC={}));var NC;(function(n){n[n.control=0]="control",n[n.data=1]="data"})(NC||(NC={}));var RC;(function(n){n.type="type",n.message_id="message_id",n.sum="sum",n.seq="seq",n.trace_id="trace_id",n.biz_rt="biz_rt",n.handshake_status="handshake-status",n.handshake_msg="handshake-msg",n.handshake_autherrcode="handshake-autherrcode"})(RC||(RC={}));var ed;(function(n){n.event="event",n.card="card",n.ping="ping",n.pong="pong"})(ed||(ed={}));var Zy;(function(n){n[n.ok=200]="ok",n[n.internal_server_error=500]="internal_server_error"})(Zy||(Zy={}));var Xy=class{constructor(t){var o;this.wsConfig=new Ok,this.reconnectGeneration=0,this.pendingWsInstance=null,this.isConnecting=!1,this.reconnectInfo={lastConnectTime:0,nextConnectTime:0},this.hasEverConnected=!1,this.terminalError=!1,this.currentReconnectAttempts=0;let{appId:i,appSecret:e,clientAssertionProvider:a,agent:A,domain:r=As.Feishu,httpInstance:s=td,loggerLevel:g=Vi.info,logger:c=ng,autoReconnect:I=!0,source:d,extraUaTags:B,onReady:f,onError:Q,onReconnecting:y,onReconnected:m,handshakeTimeoutMs:_,wsConfig:T}=t;if(this.userAgent=Yk(d,{extraTags:B}),this.logger=new sc(g,c),Jy(!i,()=>this.logger.error("appId is needed")),!e&&!a)throw new Ya(qk,"appSecret or clientAssertionProvider is required");this.agent=A,this.dataCache=new bk({logger:this.logger}),this.httpInstance=s,this.wsConfig.updateClient({appId:i,appSecret:e||"",clientAssertionProvider:a,domain:Yz(r)}),this.wsConfig.updateWs({autoReconnect:I}),this.onReady=f,this.onError=Q,this.onReconnecting=y,this.onReconnected=m,this.handshakeTimeoutMs=_,this.pingTimeoutSec=(o=T?.pingTimeout)!==null&&o!==void 0?o:0}armLiveness(){this.pingTimeoutSec&&(this.livenessTimer&&clearTimeout(this.livenessTimer),this.livenessTimer=setTimeout(()=>{var t;this.livenessTimer=void 0,this.logger.warn("[ws]",`no pong/inbound within ${this.pingTimeoutSec}s of last ping, terminating to trigger reconnect`);try{(t=this.wsConfig.getWSInstance())===null||t===void 0||t.terminate()}catch{}},this.pingTimeoutSec*1e3))}clearLiveness(){this.livenessTimer&&(clearTimeout(this.livenessTimer),this.livenessTimer=void 0)}safeInvoke(t,o,...i){if(o)try{o(...i)}catch(e){this.logger.error(`[ws] ${t} callback threw`,e)}}pullConnectConfig(){return h(this,void 0,void 0,function*(){let{appId:t,appSecret:o,clientAssertionProvider:i,domain:e}=this.wsConfig.getClient(),a="/callback/ws/endpoint",A=this.wsConfig.wsConfigUrl,r={locale:"zh","User-Agent":this.userAgent},s={AppID:t};try{if(i){let Q=Vk(e),y=yield i.retrieveToken(Q);if(!y||!y.value)throw new Ya(Jk,"client assertion token is empty");s.AppSecret="",s.ClientAssertion=y.value,y.targetInfo&&(A=Zk(y.targetInfo,a),r[jk]=Q)}else s.AppSecret=o;let{code:g,data:{URL:c,ClientConfig:I},msg:d}=yield this.httpInstance.request({method:"post",url:A,data:s,headers:r,timeout:15e3});if(g!==TC.ok){let Q=g===TC.system_busy?"system busy":d;return this.logger.error("[ws]",`code: ${g}, ${Q}`),g===TC.internal_error?{ok:!1,retryable:!0}:{ok:!1,retryable:!1,error:`pullConnectConfig failed: code=${g}, msg=${Q}`}}let{device_id:B,service_id:f}=oMe.parse(c);return this.wsConfig.updateWs({connectUrl:c,deviceId:B,serviceId:f,pingInterval:I.PingInterval*1e3,reconnectCount:I.ReconnectCount,reconnectInterval:I.ReconnectInterval*1e3,reconnectNonce:I.ReconnectNonce*1e3}),this.logger.debug("[ws]",`get connect config success, ws url: ${c}`),{ok:!0}}catch(g){return this.logger.error("[ws]",g?.message||"system busy"),g instanceof Ya?{ok:!1,retryable:!1,error:g.message}:{ok:!1,retryable:!0}}})}connect(){let t=this.wsConfig.getWS("connectUrl"),o;try{let{agent:i}=this;o=new wo(t,{agent:i})}catch{this.logger.error("[ws]","new WebSocket error")}return o?(this.pendingWsInstance=o,new Promise(i=>{let e=!1,a,A=r=>{e||(e=!0,a&&clearTimeout(a),this.pendingWsInstance===o&&(this.pendingWsInstance=null),i(r))};this.handshakeTimeoutMs&&this.handshakeTimeoutMs>0&&(a=setTimeout(()=>{this.logger.error("[ws]",`handshake timeout after ${this.handshakeTimeoutMs}ms`),o.removeAllListeners("open");try{o.terminate()}catch{}A(!1)},this.handshakeTimeoutMs)),o.on("open",()=>{this.logger.debug("[ws]","ws connect success"),this.wsConfig.setWSInstance(o),this.pingLoop(),A(!0)}),o.on("error",()=>{this.logger.error("[ws]","ws connect failed"),A(!1)})})):Promise.resolve(!1)}reConnect(t=!1){return h(this,void 0,void 0,function*(){if(this.isConnecting&&!t){this.logger.debug("[ws]","repeat connection");return}this.isConnecting=!0;let o=++this.reconnectGeneration,i=()=>h(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return{ok:!1,retryable:!1,cancelled:!0};this.reconnectInfo.lastConnectTime=Date.now();let c=yield this.pullConnectConfig();if(o!==this.reconnectGeneration)return{ok:!1,retryable:!1,cancelled:!0};if(!c.ok)return c;let I=yield this.connect();return o!==this.reconnectGeneration?{ok:!1,retryable:!1,cancelled:!0}:I?(this.communicate(),{ok:!0}):{ok:!1,retryable:!0}});this.pingInterval&&clearTimeout(this.pingInterval),this.reconnectInterval&&clearTimeout(this.reconnectInterval);let e=this.wsConfig.getWSInstance();if(t){e&&e?.terminate();let c={ok:!1,retryable:!0};try{c=yield i()}finally{o===this.reconnectGeneration&&(this.isConnecting=!1)}if(o!==this.reconnectGeneration||c.cancelled)return;if(c.ok)this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady);else if(c.retryable)this.logger.error("[ws]","connect failed"),yield this.reConnect();else{this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(c.error));return}this.logger.info("[ws]","ws client ready");return}let{autoReconnect:a,reconnectNonce:A,reconnectCount:r,reconnectInterval:s}=this.wsConfig.getWS();if(!a){this.hasEverConnected||(this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error("WebSocket connect failed and autoReconnect is disabled")));return}this.logger.info("[ws]","reconnect"),this.hasEverConnected&&this.safeInvoke("onReconnecting",this.onReconnecting),e&&e?.terminate(),this.wsConfig.setWSInstance(null);let g=A?A*Math.random():0;this.reconnectInterval=setTimeout(()=>h(this,void 0,void 0,function*(){(function c(I){return h(this,void 0,void 0,function*(){if(o!==this.reconnectGeneration)return;I++,this.currentReconnectAttempts=I;let d=yield i();if(o===this.reconnectGeneration){if(d.ok){this.logger.debug("[ws]","reconnect success"),this.currentReconnectAttempts=0,this.hasEverConnected?this.safeInvoke("onReconnected",this.onReconnected):(this.hasEverConnected=!0,this.safeInvoke("onReady",this.onReady)),this.isConnecting=!1;return}if(!d.retryable){this.isConnecting=!1,this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(d.error));return}if(this.logger.info("ws",`unable to connect to the server after trying ${I} times")`),r>=0&&I>=r){this.isConnecting=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(`WebSocket reconnect exhausted after ${I} attempts`));return}this.reconnectInterval=setTimeout(()=>{c.bind(this)(I)},s),this.reconnectInfo.nextConnectTime=Date.now()+s}})}).bind(this)(0)}),g),this.reconnectInfo.nextConnectTime=Date.now()+g})}pingLoop(){let{serviceId:t,pingInterval:o}=this.wsConfig.getWS(),i=this.wsConfig.getWSInstance();if(i?.readyState===wo.OPEN){let e={headers:[{key:RC.type,value:ed.ping}],service:Number(t),method:NC.control,SeqID:0,LogID:0};this.sendMessage(e),this.armLiveness(),this.logger.trace("[ws]","ping success")}this.pingInterval=setTimeout(this.pingLoop.bind(this),o)}communicate(){let t=this.wsConfig.getWSInstance();t?.on("message",o=>h(this,void 0,void 0,function*(){this.clearLiveness();let i=kMe(o),{method:e}=i;e===NC.control&&(yield this.handleControlData(i)),e===NC.data&&(yield this.handleEventData(i))})),t?.on("error",o=>{this.logger.error("[ws]","ws error")}),t?.on("close",()=>{this.logger.debug("[ws]","client closed"),this.clearLiveness(),this.reConnect()})}handleControlData(t){var o;return h(this,void 0,void 0,function*(){let i=(o=t.headers.find(a=>a.key===RC.type))===null||o===void 0?void 0:o.value,e=t.payload;if(i!==ed.ping&&i===ed.pong&&e){this.logger.trace("[ws]","receive pong");let a=new TextDecoder("utf-8").decode(e),{PingInterval:A,ReconnectCount:r,ReconnectInterval:s,ReconnectNonce:g}=JSON.parse(a);this.wsConfig.updateWs({pingInterval:A*1e3,reconnectCount:r,reconnectInterval:s*1e3,reconnectNonce:g*1e3}),this.logger.trace("[ws]","update wsConfig with pong data")}})}handleEventData(t){var o;return h(this,void 0,void 0,function*(){let i=t.headers.reduce((f,Q)=>(f[Q.key]=Q.value,f),{}),{message_id:e,sum:a,seq:A,type:r,trace_id:s}=i,g=t.payload;if(r!==ed.event)return;let c=this.dataCache.mergeData({message_id:e,sum:Number(a),seq:Number(A),trace_id:s,data:g});if(!c)return;this.logger.debug("[ws]",`receive message, message_type: ${r}; message_id: ${e}; trace_id: ${s}; data: ${c.data}`);let I={code:Zy.ok},d=Date.now();try{let f=yield(o=this.eventDispatcher)===null||o===void 0?void 0:o.invoke(c,{needCheck:!1});f&&(I.data=Buffer.from(JSON.stringify(f)).toString("base64"))}catch(f){I.code=Zy.internal_server_error,this.logger.error("[ws]",`invoke event failed, message_type: ${r}; message_id: ${e}; trace_id: ${s}; error: ${f}`)}let B=Date.now();this.sendMessage(Object.assign(Object.assign({},t),{headers:[...t.headers,{key:RC.biz_rt,value:String(d-B)}],payload:new TextEncoder().encode(JSON.stringify(I))}))})}sendMessage(t){var o;let i=this.wsConfig.getWSInstance();if(i?.readyState===wo.OPEN){let e=Wz.Frame.encode(t).finish();(o=this.wsConfig.getWSInstance())===null||o===void 0||o.send(e,a=>{a&&this.logger.error("[ws]","send data failed")})}}getReconnectInfo(){return this.reconnectInfo}getConnectionStatus(){return{state:this.computeState(),lastConnectTime:this.reconnectInfo.lastConnectTime||void 0,nextConnectTime:this.reconnectInfo.nextConnectTime||void 0,reconnectAttempts:this.currentReconnectAttempts}}computeState(){var t;return this.terminalError?"failed":this.isConnecting&&!this.hasEverConnected?"connecting":this.isConnecting&&this.hasEverConnected?"reconnecting":((t=this.wsConfig.getWSInstance())===null||t===void 0?void 0:t.readyState)===wo.OPEN?"connected":"idle"}close(t={}){let{force:o=!1}=t;this.reconnectGeneration++,this.pingInterval&&(clearTimeout(this.pingInterval),this.pingInterval=void 0),this.reconnectInterval&&(clearTimeout(this.reconnectInterval),this.reconnectInterval=void 0),this.clearLiveness(),this.dataCache.destroy(),this.isConnecting=!1,this.currentReconnectAttempts=0;let i=this.pendingWsInstance;if(i){this.pendingWsInstance=null,i.removeAllListeners("open");try{o?i.terminate():i.close()}catch{}}let e=this.wsConfig.getWSInstance();e&&(e.removeAllListeners(),o?e.terminate():e.close(),this.wsConfig.setWSInstance(null)),this.logger.info("[ws]",`ws client closed manually${o?" (force)":""}`)}start(t){return h(this,void 0,void 0,function*(){let{appId:o}=this.wsConfig.getClient();if(!/^cli_[0-9a-fA-F]{16}$/.test(o)){this.logger.error("[ws]",`invalid appId: ${o}`);return}let{eventDispatcher:i}=t;if(!i){this.logger.warn("[ws]","client need to start with a eventDispatcher");return}let e=this.wsConfig.getWSInstance();if(this.terminalError&&(this.isConnecting=!1),this.isConnecting||e&&e.readyState!==wo.CLOSED){this.logger.debug("[ws]","start ignored because client is already connecting or connected");return}this.terminalError=!1,this.currentReconnectAttempts=0,this.dataCache.clearAtInterval(),this.logger.info("[ws]",`receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in: Developer Console(\u5F00\u53D1\u8005\u540E\u53F0) -> Events and Callbacks(\u4E8B\u4EF6\u4E0E\u56DE\u8C03) -> Mode of event/callback subscription(\u8BA2\u9605\u65B9\u5F0F) -> - Receive events/callbacks through persistent connection(\u4F7F\u7528 \u957F\u8FDE\u63A5 \u63A5\u6536\u4E8B\u4EF6/\u56DE\u8C03)`),this.eventDispatcher=i,this.reConnect(!0)})}},pk=class{constructor(){this.sessions=new Map}set(t,o){return h(this,void 0,void 0,function*(){let i=this.sessions.get(t.toString())||{},e=Oz(i,o);return this.sessions.set(t.toString(),e),!0})}get(t){return h(this,void 0,void 0,function*(){return this.sessions.get(t.toString())})}},qi;(function(n){n[n.ERROR=-1]="ERROR",n[n.SUCCESS=0]="SUCCESS",n[n.EXPIRED=1]="EXPIRED",n[n.CANCELLED=2]="CANCELLED",n[n.FAILED=3]="FAILED",n[n.OTHER=4]="OTHER"})(qi||(qi={}));var dk=class{constructor(t){this.completions={create:this.create.bind(this),createWithStream:this.createWithStream.bind(this),sessionRecords:{get:this.getRecords.bind(this),update:this.updateRecords.bind(this)}},this.client=t.client,this.logger=t.client.logger,this.cache=t.cache||new pk}getSessionId(t){var o;return h(this,void 0,void 0,function*(){let{sessionId:i,payload:e,options:a}=t,A=yield this.getRecords();if(i&&i in A)return A[i];let r=yield this.client.aily.v1.ailySession.create({data:e},a);if(r.code===0&&r.data){let s=(o=r.data.session)===null||o===void 0?void 0:o.id;return i&&(yield this.updateRecords({[i]:s})),s}else{this.logger.error("get aily session id error",r.msg);return}})}waitReply(t,o){var i,e;return h(this,void 0,void 0,function*(){let{sessionId:a,ailyAppId:A,message:r,sessionInfo:s,messageInfo:g,runInfo:c,skillId:I}=t,d=yield this.getSessionId({sessionId:a,payload:s,options:o});if(!d)throw qi.ERROR;let B=yield this.client.aily.v1.ailySessionAilyMessage.create({path:{aily_session_id:d},data:Object.assign(Object.assign({},g),{content:r,idempotent_id:`${Date.now()}`,content_type:"MDX"})},o);if(!(B.code===0&&B.data))throw this.logger.error("create aily message error",B.msg),qi.ERROR;let f=(i=B.data.message)===null||i===void 0?void 0:i.id,Q=yield this.client.aily.v1.ailySessionRun.create({path:{aily_session_id:d},data:Object.assign({app_id:A,skill_id:I},c)},o);if(!(Q.code===0&&Q.data))throw this.logger.error("create aily session run error",Q.msg),qi.ERROR;let y=(e=Q.data.run)===null||e===void 0?void 0:e.id;if(!y)throw this.logger.error("run id is empty"),qi.ERROR;let m=()=>h(this,void 0,void 0,function*(){return new Promise(T=>{setTimeout(()=>h(this,void 0,void 0,function*(){var G,x;let J=yield this.client.aily.v1.ailySessionRun.get({path:{aily_session_id:d,run_id:y}},o);if(!(J.code===0&&J.data)){T(3);return}switch((x=(G=J.data)===null||G===void 0?void 0:G.run)===null||x===void 0?void 0:x.status){case"QUEUED":case"IN_PROGRESS":yield h(this,void 0,void 0,function*(){let q=yield m();T(q)});case"COMPLETED":T(qi.SUCCESS);case"EXPIRED":T(qi.EXPIRED);case"CANCELLED":T(qi.CANCELLED);case"FAILED":T(qi.FAILED);default:T(qi.OTHER)}}),500)})}),_=yield m();if(_!==qi.SUCCESS)throw this.logger.error("aily run error"),_;return{ailySessionId:d,runId:y,messageId:f}})}create(t,o){var i,e,a,A,r;return h(this,void 0,void 0,function*(){let{ailySessionId:s,runId:g}=yield this.waitReply(t,o),c;try{for(var I=!0,d=$8(yield this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:s},params:{run_id:g,with_partial_message:!1}},o)),B;B=yield d.next(),i=B.done,!i;){A=B.value,I=!1;try{let f=A;if(!f)continue;(r=f?.messages)===null||r===void 0||r.forEach(Q=>{var y;((y=Q.sender)===null||y===void 0?void 0:y.sender_type)==="ASSISTANT"&&(c=Q)})}finally{I=!0}}}catch(f){e={error:f}}finally{try{!I&&!i&&(a=d.return)&&(yield a.call(d))}finally{if(e)throw e.error}}if(!c)throw this.logger.error("no aily reply"),qi.ERROR;return c})}createWithStream(t,o){return h(this,void 0,void 0,function*(){let{ailySessionId:i,runId:e,messageId:a}=yield this.waitReply(t,o),A=()=>this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:i},params:{run_id:e,with_partial_message:!0}},o),r=!1;return{[Symbol.asyncIterator](){return H(this,arguments,function*(){var c,I,d,B;try{for(var f=!0,Q=$8(yield S(A())),y;y=yield S(Q.next()),c=y.done,!c;){B=y.value,f=!1;try{let m=B;if(!m)continue;for(let _ of m.messages||[])if(r){if(yield yield S(_),_.status==="COMPLETED")return yield S(void 0)}else _.id===a&&_.status==="COMPLETED"&&(r=!0)}finally{f=!0}}}catch(m){I={error:m}}finally{try{!f&&!c&&(d=Q.return)&&(yield S(d.call(Q)))}finally{if(I)throw I.error}}})}}})}getRecords(){return h(this,void 0,void 0,function*(){return(yield this.cache.get(Az))||{}})}updateRecords(t){return h(this,void 0,void 0,function*(){yield this.cache.set(Az,t)})}};function BC(n,t){if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${t} must be an object`)}function fC(n,t,o){for(let i of Object.keys(n))if(!t.includes(i))throw new Error(`${o}.${i} is not allowed; allowed keys: ${t.join(", ")}`)}function AMe(n,t){if(n!==void 0){if(!Array.isArray(n))throw new Error(`${t} must be an array of strings`);return n.forEach((o,i)=>{if(typeof o!="string"||o==="")throw new Error(`${t}[${i}] must be a non-empty string`)}),n}}function tMe(n){BC(n,"addons"),fC(n,["preset","scopes","events","callbacks"],"addons");let t=0,o=(e,a)=>{var A;let r=AMe(e,a);return t+=(A=r?.length)!==null&&A!==void 0?A:0,r},i={};if(n.preset!==void 0){if(typeof n.preset!="boolean")throw new Error("addons.preset must be a boolean");i.preset=n.preset}if(n.scopes!==void 0&&(BC(n.scopes,"addons.scopes"),fC(n.scopes,["tenant","user"],"addons.scopes"),i.scopes={tenant:o(n.scopes.tenant,"addons.scopes.tenant"),user:o(n.scopes.user,"addons.scopes.user")}),n.events!==void 0&&(BC(n.events,"addons.events"),fC(n.events,["items"],"addons.events"),n.events.items!==void 0&&(BC(n.events.items,"addons.events.items"),fC(n.events.items,["tenant","user"],"addons.events.items"),i.events={items:{tenant:o(n.events.items.tenant,"addons.events.items.tenant"),user:o(n.events.items.user,"addons.events.items.user")}})),n.callbacks!==void 0&&(BC(n.callbacks,"addons.callbacks"),fC(n.callbacks,["items"],"addons.callbacks"),i.callbacks={items:o(n.callbacks.items,"addons.callbacks.items")}),t===0&&n.preset!==!1)throw new Error("addons must contain at least one scope, event or callback");return i}function rMe(n){let t=JSON.stringify(tMe(n));return Obe(Buffer.from(t,"utf8")).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function QC(n,t){return{code:n,description:t}}var rz="node-sdk",aMe="accounts.feishu.cn",iMe="accounts.larksuite.com",oMe="/oauth/v1/app/registration",az=6;function nMe(n,t){let{avatar:o,name:i,desc:e}=t;if(o!==void 0){let a=Array.isArray(o)?o:[o];if(a.length===0)throw new Error("appPreset.avatar must contain at least 1 URL");if(a.length>az)throw new Error(`appPreset.avatar supports at most ${az} URLs, got ${a.length}`);a.forEach((A,r)=>{if(typeof A!="string"||A==="")throw new Error(`appPreset.avatar[${r}] must be a non-empty string`);n.searchParams.append("avatar",A)})}i!==void 0&&n.searchParams.set("name",i),e!==void 0&&n.searchParams.set("desc",e)}function Mz(n,t){var o;return h(this,void 0,void 0,function*(){try{return yield Wp.post(`${n}${oMe}`,new URLSearchParams(t).toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(i){if(i instanceof BT&&(!((o=i.response)===null||o===void 0)&&o.data))return i.response.data;throw i}})}function sMe(n){return Mz(n,{action:"begin",archetype:"PersonalAgent",auth_method:"client_secret",request_user_info:"open_id"})}function gMe(n){return new Promise((t,o)=>{var i,e;let{baseUrl:a,interval:A}=n,r=!1,s=null,g=null,c=()=>{var B;s!==null&&(clearTimeout(s),s=null),g!==null&&(clearTimeout(g),g=null),(B=n.signal)===null||B===void 0||B.removeEventListener("abort",I)},I=()=>{c(),o(QC("abort","Registration was aborted"))};if(!((i=n.signal)===null||i===void 0)&&i.aborted)return o(QC("abort","Registration was aborted"));(e=n.signal)===null||e===void 0||e.addEventListener("abort",I,{once:!0}),g=setTimeout(()=>{c(),o(QC("expired_token","Polling timed out"))},n.expireIn);let d=()=>h(this,void 0,void 0,function*(){var B,f,Q,y,m,_;try{let T=yield Mz(a,{action:"poll",device_code:n.deviceCode});if(((B=T.user_info)===null||B===void 0?void 0:B.tenant_brand)==="lark"&&!r){a=n.larkBaseUrl,r=!0,(f=n.onStatusChange)===null||f===void 0||f.call(n,{status:"domain_switched"}),d();return}if(T.client_id&&T.client_secret){c(),t({client_id:T.client_id,client_secret:T.client_secret,user_info:T.user_info});return}switch(T.error){case"authorization_pending":(Q=n.onStatusChange)===null||Q===void 0||Q.call(n,{status:"polling"});break;case"slow_down":A+=5e3,(y=n.onStatusChange)===null||y===void 0||y.call(n,{status:"slow_down",interval:A/1e3});break;case"access_denied":case"expired_token":c(),o(QC(T.error,(m=T.error_description)!==null&&m!==void 0?m:"Unknown error"));return;default:if(T.error){c(),o(QC(T.error,(_=T.error_description)!==null&&_!==void 0?_:"Unknown error"));return}break}s=setTimeout(d,A)}catch(T){c(),o(T)}});d()})}function cMe(n){var t,o,i,e;return h(this,void 0,void 0,function*(){let{domain:a,source:A,signal:r,onQRCodeReady:s,onStatusChange:g,appPreset:c,addons:I,createOnly:d,appId:B}=n;if(B!==void 0&&(typeof B!="string"||B===""))throw new Error("appId must be a non-empty string");let f=`https://${a??aMe}`,Q=yield sMe(f),y=new URL(Q.verification_uri_complete);return y.searchParams.set("from","sdk"),y.searchParams.set("source",A?`${rz}/${A}`:rz),y.searchParams.set("tp","sdk"),c&&nMe(y,c),I&&y.searchParams.set("addons",rMe(I)),d===!0&&y.searchParams.set("createOnly","true"),B&&y.searchParams.set("clientID",B),s({url:y.toString(),expireIn:(t=Q.expires_in)!==null&&t!==void 0?t:600}),gMe({baseUrl:f,deviceCode:Q.device_code,interval:((o=Q.interval)!==null&&o!==void 0?o:5)*1e3,expireIn:((i=Q.expires_in)!==null&&i!==void 0?i:600)*1e3,larkBaseUrl:`https://${(e=n.larkDomain)!==null&&e!==void 0?e:iMe}`,signal:r,onStatusChange:g})})}var Rt=class extends Error{constructor(t,o,i){super(o),this.name="LarkChannelError",this.code=t,this.cause=i?.cause,this.context=i?.context}},Hy=class{constructor(t,o){this.opts=t,this.fire=o,this.pendingChars=0,this.lastFireAt=0}note(t){if(this.pendingChars+=t,this.pendingChars>=this.opts.chars){this.fireSoon(0);return}if(!this.timer){let o=Date.now()-this.lastFireAt,i=Math.max(0,this.opts.ms-o);this.fireSoon(i)}}fireSoon(t){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=void 0,this.doFire()},t)}flushNow(){return h(this,void 0,void 0,function*(){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.inFlight&&(yield this.inFlight),yield this.doFire()})}doFire(){return h(this,void 0,void 0,function*(){if(this.inFlight){this.fireSoon(this.opts.ms);return}let t=h(this,void 0,void 0,function*(){this.pendingChars=0,this.lastFireAt=Date.now(),yield this.fire()});this.inFlight=t;try{yield t}finally{this.inFlight=void 0}})}dispose(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}},Ky=class{constructor(){this.tail=Promise.resolve()}enqueue(t){let o=this.tail.then(t,t);return this.tail=o.then(()=>{},()=>{}),o}drain(){return this.tail}};function IMe(n,t){if(!n)return t;if(!t)return n;if(t.startsWith(n))return t;if(n.startsWith(t))return n;let o=Math.min(n.length,t.length);for(let i=o;i>0;i--)if(n.endsWith(t.substring(0,i)))return n+t.substring(i);return n+t}function _z(n,t){if(n.length<=t)return[n];let o=n.split(` + Receive events/callbacks through persistent connection(\u4F7F\u7528 \u957F\u8FDE\u63A5 \u63A5\u6536\u4E8B\u4EF6/\u56DE\u8C03)`),this.eventDispatcher=i,this.reConnect(!0)})}},Mk=class{constructor(){this.sessions=new Map}set(t,o){return h(this,void 0,void 0,function*(){let i=this.sessions.get(t.toString())||{},e=Vz(i,o);return this.sessions.set(t.toString(),e),!0})}get(t){return h(this,void 0,void 0,function*(){return this.sessions.get(t.toString())})}},zi;(function(n){n[n.ERROR=-1]="ERROR",n[n.SUCCESS=0]="SUCCESS",n[n.EXPIRED=1]="EXPIRED",n[n.CANCELLED=2]="CANCELLED",n[n.FAILED=3]="FAILED",n[n.OTHER=4]="OTHER"})(zi||(zi={}));var _k=class{constructor(t){this.completions={create:this.create.bind(this),createWithStream:this.createWithStream.bind(this),sessionRecords:{get:this.getRecords.bind(this),update:this.updateRecords.bind(this)}},this.client=t.client,this.logger=t.client.logger,this.cache=t.cache||new Mk}getSessionId(t){var o;return h(this,void 0,void 0,function*(){let{sessionId:i,payload:e,options:a}=t,A=yield this.getRecords();if(i&&i in A)return A[i];let r=yield this.client.aily.v1.ailySession.create({data:e},a);if(r.code===0&&r.data){let s=(o=r.data.session)===null||o===void 0?void 0:o.id;return i&&(yield this.updateRecords({[i]:s})),s}else{this.logger.error("get aily session id error",r.msg);return}})}waitReply(t,o){var i,e;return h(this,void 0,void 0,function*(){let{sessionId:a,ailyAppId:A,message:r,sessionInfo:s,messageInfo:g,runInfo:c,skillId:I}=t,d=yield this.getSessionId({sessionId:a,payload:s,options:o});if(!d)throw zi.ERROR;let B=yield this.client.aily.v1.ailySessionAilyMessage.create({path:{aily_session_id:d},data:Object.assign(Object.assign({},g),{content:r,idempotent_id:`${Date.now()}`,content_type:"MDX"})},o);if(!(B.code===0&&B.data))throw this.logger.error("create aily message error",B.msg),zi.ERROR;let f=(i=B.data.message)===null||i===void 0?void 0:i.id,Q=yield this.client.aily.v1.ailySessionRun.create({path:{aily_session_id:d},data:Object.assign({app_id:A,skill_id:I},c)},o);if(!(Q.code===0&&Q.data))throw this.logger.error("create aily session run error",Q.msg),zi.ERROR;let y=(e=Q.data.run)===null||e===void 0?void 0:e.id;if(!y)throw this.logger.error("run id is empty"),zi.ERROR;let m=()=>h(this,void 0,void 0,function*(){return new Promise(T=>{setTimeout(()=>h(this,void 0,void 0,function*(){var R,H;let j=yield this.client.aily.v1.ailySessionRun.get({path:{aily_session_id:d,run_id:y}},o);if(!(j.code===0&&j.data)){T(3);return}switch((H=(R=j.data)===null||R===void 0?void 0:R.run)===null||H===void 0?void 0:H.status){case"QUEUED":case"IN_PROGRESS":yield h(this,void 0,void 0,function*(){let q=yield m();T(q)});case"COMPLETED":T(zi.SUCCESS);case"EXPIRED":T(zi.EXPIRED);case"CANCELLED":T(zi.CANCELLED);case"FAILED":T(zi.FAILED);default:T(zi.OTHER)}}),500)})}),_=yield m();if(_!==zi.SUCCESS)throw this.logger.error("aily run error"),_;return{ailySessionId:d,runId:y,messageId:f}})}create(t,o){var i,e,a,A,r;return h(this,void 0,void 0,function*(){let{ailySessionId:s,runId:g}=yield this.waitReply(t,o),c;try{for(var I=!0,d=Qz(yield this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:s},params:{run_id:g,with_partial_message:!1}},o)),B;B=yield d.next(),i=B.done,!i;){A=B.value,I=!1;try{let f=A;if(!f)continue;(r=f?.messages)===null||r===void 0||r.forEach(Q=>{var y;((y=Q.sender)===null||y===void 0?void 0:y.sender_type)==="ASSISTANT"&&(c=Q)})}finally{I=!0}}}catch(f){e={error:f}}finally{try{!I&&!i&&(a=d.return)&&(yield a.call(d))}finally{if(e)throw e.error}}if(!c)throw this.logger.error("no aily reply"),zi.ERROR;return c})}createWithStream(t,o){return h(this,void 0,void 0,function*(){let{ailySessionId:i,runId:e,messageId:a}=yield this.waitReply(t,o),A=()=>this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:i},params:{run_id:e,with_partial_message:!0}},o),r=!1;return{[Symbol.asyncIterator](){return Y(this,arguments,function*(){var c,I,d,B;try{for(var f=!0,Q=Qz(yield S(A())),y;y=yield S(Q.next()),c=y.done,!c;){B=y.value,f=!1;try{let m=B;if(!m)continue;for(let _ of m.messages||[])if(r){if(yield yield S(_),_.status==="COMPLETED")return yield S(void 0)}else _.id===a&&_.status==="COMPLETED"&&(r=!0)}finally{f=!0}}}catch(m){I={error:m}}finally{try{!f&&!c&&(d=Q.return)&&(yield S(d.call(Q)))}finally{if(I)throw I.error}}})}}})}getRecords(){return h(this,void 0,void 0,function*(){return(yield this.cache.get(mz))||{}})}updateRecords(t){return h(this,void 0,void 0,function*(){yield this.cache.set(mz,t)})}};function DC(n,t){if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${t} must be an object`)}function wC(n,t,o){for(let i of Object.keys(n))if(!t.includes(i))throw new Error(`${o}.${i} is not allowed; allowed keys: ${t.join(", ")}`)}function vMe(n,t){if(n!==void 0){if(!Array.isArray(n))throw new Error(`${t} must be an array of strings`);return n.forEach((o,i)=>{if(typeof o!="string"||o==="")throw new Error(`${t}[${i}] must be a non-empty string`)}),n}}function PMe(n){DC(n,"addons"),wC(n,["preset","scopes","events","callbacks"],"addons");let t=0,o=(e,a)=>{var A;let r=vMe(e,a);return t+=(A=r?.length)!==null&&A!==void 0?A:0,r},i={};if(n.preset!==void 0){if(typeof n.preset!="boolean")throw new Error("addons.preset must be a boolean");i.preset=n.preset}if(n.scopes!==void 0&&(DC(n.scopes,"addons.scopes"),wC(n.scopes,["tenant","user"],"addons.scopes"),i.scopes={tenant:o(n.scopes.tenant,"addons.scopes.tenant"),user:o(n.scopes.user,"addons.scopes.user")}),n.events!==void 0&&(DC(n.events,"addons.events"),wC(n.events,["items"],"addons.events"),n.events.items!==void 0&&(DC(n.events.items,"addons.events.items"),wC(n.events.items,["tenant","user"],"addons.events.items"),i.events={items:{tenant:o(n.events.items.tenant,"addons.events.items.tenant"),user:o(n.events.items.user,"addons.events.items.user")}})),n.callbacks!==void 0&&(DC(n.callbacks,"addons.callbacks"),wC(n.callbacks,["items"],"addons.callbacks"),i.callbacks={items:o(n.callbacks.items,"addons.callbacks.items")}),t===0&&n.preset!==!1)throw new Error("addons must contain at least one scope, event or callback");return i}function GMe(n){let t=JSON.stringify(PMe(n));return nMe(Buffer.from(t,"utf8")).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function OC(n,t){return{code:n,description:t}}var Dz="node-sdk",FMe="accounts.feishu.cn",LMe="accounts.larksuite.com",UMe="/oauth/v1/app/registration",wz=6;function HMe(n,t){let{avatar:o,name:i,desc:e}=t;if(o!==void 0){let a=Array.isArray(o)?o:[o];if(a.length===0)throw new Error("appPreset.avatar must contain at least 1 URL");if(a.length>wz)throw new Error(`appPreset.avatar supports at most ${wz} URLs, got ${a.length}`);a.forEach((A,r)=>{if(typeof A!="string"||A==="")throw new Error(`appPreset.avatar[${r}] must be a non-empty string`);n.searchParams.append("avatar",A)})}i!==void 0&&n.searchParams.set("name",i),e!==void 0&&n.searchParams.set("desc",e)}function Zz(n,t){var o;return h(this,void 0,void 0,function*(){try{return yield td.post(`${n}${UMe}`,new URLSearchParams(t).toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(i){if(i instanceof vT&&(!((o=i.response)===null||o===void 0)&&o.data))return i.response.data;throw i}})}function KMe(n){return Zz(n,{action:"begin",archetype:"PersonalAgent",auth_method:"client_secret",request_user_info:"open_id"})}function xMe(n){return new Promise((t,o)=>{var i,e;let{baseUrl:a,interval:A}=n,r=!1,s=null,g=null,c=()=>{var B;s!==null&&(clearTimeout(s),s=null),g!==null&&(clearTimeout(g),g=null),(B=n.signal)===null||B===void 0||B.removeEventListener("abort",I)},I=()=>{c(),o(OC("abort","Registration was aborted"))};if(!((i=n.signal)===null||i===void 0)&&i.aborted)return o(OC("abort","Registration was aborted"));(e=n.signal)===null||e===void 0||e.addEventListener("abort",I,{once:!0}),g=setTimeout(()=>{c(),o(OC("expired_token","Polling timed out"))},n.expireIn);let d=()=>h(this,void 0,void 0,function*(){var B,f,Q,y,m,_;try{let T=yield Zz(a,{action:"poll",device_code:n.deviceCode});if(((B=T.user_info)===null||B===void 0?void 0:B.tenant_brand)==="lark"&&!r){a=n.larkBaseUrl,r=!0,(f=n.onStatusChange)===null||f===void 0||f.call(n,{status:"domain_switched"}),d();return}if(T.client_id&&T.client_secret){c(),t({client_id:T.client_id,client_secret:T.client_secret,user_info:T.user_info});return}switch(T.error){case"authorization_pending":(Q=n.onStatusChange)===null||Q===void 0||Q.call(n,{status:"polling"});break;case"slow_down":A+=5e3,(y=n.onStatusChange)===null||y===void 0||y.call(n,{status:"slow_down",interval:A/1e3});break;case"access_denied":case"expired_token":c(),o(OC(T.error,(m=T.error_description)!==null&&m!==void 0?m:"Unknown error"));return;default:if(T.error){c(),o(OC(T.error,(_=T.error_description)!==null&&_!==void 0?_:"Unknown error"));return}break}s=setTimeout(d,A)}catch(T){c(),o(T)}});d()})}function YMe(n){var t,o,i,e;return h(this,void 0,void 0,function*(){let{domain:a,source:A,signal:r,onQRCodeReady:s,onStatusChange:g,appPreset:c,addons:I,createOnly:d,appId:B}=n;if(B!==void 0&&(typeof B!="string"||B===""))throw new Error("appId must be a non-empty string");let f=`https://${a??FMe}`,Q=yield KMe(f),y=new URL(Q.verification_uri_complete);return y.searchParams.set("from","sdk"),y.searchParams.set("source",A?`${Dz}/${A}`:Dz),y.searchParams.set("tp","sdk"),c&&HMe(y,c),I&&y.searchParams.set("addons",GMe(I)),d===!0&&y.searchParams.set("createOnly","true"),B&&y.searchParams.set("clientID",B),s({url:y.toString(),expireIn:(t=Q.expires_in)!==null&&t!==void 0?t:600}),xMe({baseUrl:f,deviceCode:Q.device_code,interval:((o=Q.interval)!==null&&o!==void 0?o:5)*1e3,expireIn:((i=Q.expires_in)!==null&&i!==void 0?i:600)*1e3,larkBaseUrl:`https://${(e=n.larkDomain)!==null&&e!==void 0?e:LMe}`,signal:r,onStatusChange:g})})}var kt=class extends Error{constructor(t,o,i){super(o),this.name="LarkChannelError",this.code=t,this.cause=i?.cause,this.context=i?.context}},$y=class{constructor(t,o){this.opts=t,this.fire=o,this.pendingChars=0,this.lastFireAt=0}note(t){if(this.pendingChars+=t,this.pendingChars>=this.opts.chars){this.fireSoon(0);return}if(!this.timer){let o=Date.now()-this.lastFireAt,i=Math.max(0,this.opts.ms-o);this.fireSoon(i)}}fireSoon(t){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=void 0,this.doFire()},t)}flushNow(){return h(this,void 0,void 0,function*(){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.inFlight&&(yield this.inFlight),yield this.doFire()})}doFire(){return h(this,void 0,void 0,function*(){if(this.inFlight){this.fireSoon(this.opts.ms);return}let t=h(this,void 0,void 0,function*(){this.pendingChars=0,this.lastFireAt=Date.now(),yield this.fire()});this.inFlight=t;try{yield t}finally{this.inFlight=void 0}})}dispose(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}},em=class{constructor(){this.tail=Promise.resolve()}enqueue(t){let o=this.tail.then(t,t);return this.tail=o.then(()=>{},()=>{}),o}drain(){return this.tail}};function jMe(n,t){if(!n)return t;if(!t)return n;if(t.startsWith(n))return t;if(n.startsWith(t))return n;let o=Math.min(n.length,t.length);for(let i=o;i>0;i--)if(n.endsWith(t.substring(0,i)))return n+t.substring(i);return n+t}function Xz(n,t){if(n.length<=t)return[n];let o=n.split(` `),i=[],e=[],a=0,A=null,r=()=>{if(e.length===0)return;let s=e.join(` -`);A!==null&&(s+="\n```"),i.push(s),e=[],a=0,A!==null&&(e.push("```"+A),a=e[0].length)};for(let s of o){let g=s.match(/^```(\w*)$/),c=s.length+(e.length>0?1:0),I=/^#{1,6}\s/.test(s),d=a>t*.75;(a+c>t||I&&d&&e.length>0)&&r(),e.push(s),a+=c,g&&(A=A===null?g[1]||"":null)}return r(),i}var lMe=100,pMe=50,dMe="Thinking...",iz="(no content)",hMe="[Generating...]",EMe=50,CMe=` +`);A!==null&&(s+="\n```"),i.push(s),e=[],a=0,A!==null&&(e.push("```"+A),a=e[0].length)};for(let s of o){let g=s.match(/^```(\w*)$/),c=s.length+(e.length>0?1:0),I=/^#{1,6}\s/.test(s),d=a>t*.75;(a+c>t||I&&d&&e.length>0)&&r(),e.push(s),a+=c,g&&(A=A===null?g[1]||"":null)}return r(),i}var JMe=100,qMe=50,zMe="Thinking...",Oz="(no content)",VMe="[Generating...]",WMe=50,ZMe=` -\u2014 _(Generation interrupted)_`,uMe=3e4,My="stream_md";function X0(n,t=EMe){if(!n)return"";let o=n.replace(/\s+/g," ").trim();return o.length<=t?o:o.slice(0,t-1)+"\u2026"}function oz(n){return{schema:"2.0",config:{streaming_mode:!0,summary:{content:hMe},streaming_config:{print_frequency_ms:{default:70},print_step:{default:1},print_strategy:"fast"}},body:{elements:[{tag:"markdown",element_id:My,content:n}]}}}var hk=class{constructor(t,o,i,e){var a,A,r;this.sender=t,this.to=o,this.idType=i,this.opts=e,this.content="",this.fullAccumulated="",this._messageId="",this.cardId="",this.sequence=0,this.queue=new Ky,this.started=!1,this.streamingFailed=!1,this.rolloverMessageIds=[];let s=this.sender.config;this.throttle=new Hy({ms:(a=s.streamThrottleMs)!==null&&a!==void 0?a:lMe,chars:(A=s.streamThrottleChars)!==null&&A!==void 0?A:pMe},()=>this.pushContent()),this.maxChars=(r=s.streamMaxElementChars)!==null&&r!==void 0?r:uMe}get messageId(){return this._messageId}append(t){return h(this,void 0,void 0,function*(){if(!t)return;yield this.ensureStarted();let o=IMe(this.fullAccumulated,t),i=o.slice(this.fullAccumulated.length);this.fullAccumulated=o,this.content+=i,this.throttle.note(t.length)})}setContent(t){return h(this,void 0,void 0,function*(){yield this.ensureStarted(),this.fullAccumulated=t??"",this.content=t??"",this.throttle.note(Number.MAX_SAFE_INTEGER)})}run(t){return h(this,void 0,void 0,function*(){yield this.ensureStarted();try{yield t(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}ensureStarted(){var t;return h(this,void 0,void 0,function*(){if(this.started)return;this.started=!0;let o=(t=this.sender.config.streamInitialText)!==null&&t!==void 0?t:dMe,i=oz(o||"...");this.cardId=yield this.sender.createCardInstance(i),this._messageId=yield this.sender.sendCardByReference(this.to,this.idType,this.cardId,this.opts)})}pushContent(){return h(this,void 0,void 0,function*(){!this.cardId||this.streamingFailed||(yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){var t,o;if(!this.streamingFailed)try{yield this.pushSnapshot()}catch(i){this.streamingFailed=!0,(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] update failed",i)}})))})}pushSnapshot(){return h(this,void 0,void 0,function*(){for(;this.content.length>this.maxChars;)yield this.rollover();let t=this.content||"...";yield this.sender.updateCardElementContent(this.cardId,My,t,++this.sequence)})}rollover(){return h(this,void 0,void 0,function*(){let t=_z(this.content,this.maxChars);if(t.length<2)throw new Error("rollover: content not splittable below limit");let o=t[0],i=t.slice(1).join(` -`);yield this.sender.updateCardElementContent(this.cardId,My,o,++this.sequence);try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,X0(o))}catch{}let e=oz(i||"..."),a=yield this.sender.createCardInstance(e),A=yield this.sender.sendCardByReference(this.to,this.idType,a,this.opts);this.cardId=a,this.content=i,this.sequence=0,this.rolloverMessageIds.push(A)})}completeTerminal(){var t,o;return h(this,void 0,void 0,function*(){if(yield this.throttle.flushNow(),yield this.queue.drain(),!!this.cardId){!this.content&&!this.streamingFailed&&(yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.sender.updateCardElementContent(this.cardId,My,iz,++this.sequence)}catch{}})),yield this.queue.drain());try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,X0(this.content||iz))}catch(i){(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] finishStreamingCard failed",i)}}})}failTerminal(t){return h(this,void 0,void 0,function*(){if(this.throttle.dispose(),!!this.cardId){this.content=(this.content||"")+CMe,yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.pushSnapshot()}catch{}})),yield this.queue.drain();try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,X0(this.content))}catch{}}})}},Ek=class{constructor(t,o,i,e){this.impl=new hk(t,o,i,e)}run(t){return this.impl.run(t)}},BMe=100,fMe=50,Ck=class{constructor(t,o,i,e,a){var A,r;this.sender=t,this.to=o,this.idType=i,this.opts=e,this._messageId="",this.queue=new Ky,this._current=a;let s=t.config;this.throttle=new Hy({ms:(A=s.streamThrottleMs)!==null&&A!==void 0?A:BMe,chars:(r=s.streamThrottleChars)!==null&&r!==void 0?r:fMe},()=>this.patch())}get messageId(){return this._messageId}get current(){return this._current}update(t){return h(this,void 0,void 0,function*(){let o=typeof t=="function"?t(this._current):t;this._current=o,this.throttle.note(JSON.stringify(o).length)})}run(t){return h(this,void 0,void 0,function*(){yield this.sendInitial();try{yield t(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}sendInitial(){return h(this,void 0,void 0,function*(){let t=yield this.sender.sendOneWithFallback({to:this.to,idType:this.idType,msgType:"interactive",content:this._current,replyTo:this.opts.replyTo,replyInThread:this.opts.replyInThread});this._messageId=t})}patch(){return h(this,void 0,void 0,function*(){if(!this._messageId)return;let t=this._current;yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){yield this.sender.patchCard(this._messageId,t)}))})}completeTerminal(){return h(this,void 0,void 0,function*(){yield this.throttle.flushNow(),yield this.queue.drain()})}failTerminal(t){return h(this,void 0,void 0,function*(){this.throttle.dispose();let o=QMe(this._current);yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.sender.patchCard(this._messageId,o)}catch{}})),yield this.queue.drain()})}};function QMe(n){let t=n,o=Array.isArray(t?.elements)?[...t.elements]:[];return o.push({tag:"note",elements:[{tag:"plain_text",content:"\u26A0\uFE0F \u751F\u6210\u4E2D\u65AD"}]}),Object.assign(Object.assign({},n),{elements:o})}var uk=class{constructor(t,o,i,e,a){this.impl=new Ck(t,o,i,e,a)}run(t){return this.impl.run(t)}};function yMe(n){if(!(!n||n.length<27)){for(let t=n.length-27;t>=0;t--)if(n[t]===79&&n[t+1]===103&&n[t+2]===103&&n[t+3]===83){let o=n.readBigInt64LE(t+6);if(on.length)return;let e=n.readUInt8(i),a=i+4,A,r;if(e===1){if(a+28>n.length)return;A=n.readUInt32BE(a+16),r=Number(n.readBigUInt64BE(a+20))}else{if(a+16>n.length)return;A=n.readUInt32BE(a+8),r=n.readUInt32BE(a+12)}if(!(!A||!Number.isFinite(A)||!Number.isFinite(r)))return Math.round(r/A*1e3)}function nz(n,t,o,i){let e=t;for(;e+8<=o&&e+8<=n.length;){let a=n.readUInt32BE(e),A=n.slice(e+4,e+8).toString("ascii"),r=a===1?e+Number(n.readBigUInt64BE(e+8)):a===0?o:e+a;if(r<=e||r>o)return;if(A===i)return{start:a===1?e+16:e+8,end:r};e=r}}var SMe=[[0,8],[167772160,8],[2130706432,8],[2851995648,16],[2886729728,12],[3232235520,16],[1681915904,10],[3221225472,24],[3221225984,24],[3323068416,15],[3325256704,24],[3405803776,24],[3758096384,4],[4026531840,4]];function DMe(n,t={}){var o,i;return h(this,void 0,void 0,function*(){let e=new URL(n);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error(`ssrf_blocked: protocol ${e.protocol}`);let a=e.hostname,A=a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a,r=(i=(o=t.allowlist)===null||o===void 0?void 0:o.includes(A))!==null&&i!==void 0?i:!1,s;if(Bz(A))s=A,r||sz(s);else{let g=yield _be.lookup(A,{all:!0});if(g.length===0)throw new Error(`ssrf_blocked: no DNS records for ${A}`);if(!r)for(let c of g)sz(c.address);s=g[0].address}return{resolvedIp:s,originalHost:A}})}function sz(n){let t=Bz(n);if(t===4&&Tz(n))throw new Error(`ssrf_blocked: ${n}`);if(t===6&&NMe(n))throw new Error(`ssrf_blocked: ${n}`);if(t===0)throw new Error(`ssrf_blocked: not a valid IP: ${n}`)}function Tz(n){let t=n.split(".").map(Number);if(t.length!==4||t.some(i=>i<0||i>255))return!0;let o=(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0;return SMe.some(([i,e])=>{let a=e===0?0:-1<<32-e>>>0;return(o&a)===(i&a)})}var wMe=[[BigInt("0xfe800000000000000000000000000000"),10],[BigInt("0xfc000000000000000000000000000000"),7],[BigInt("0xff000000000000000000000000000000"),8],[BigInt("0x01000000000000000000000000000000"),64],[BigInt("0x20010db8000000000000000000000000"),32],[BigInt("0x20010000000000000000000000000000"),32]],OMe=BigInt("0xffffffffffffffffffffffff00000000"),bMe=BigInt("0x00000000000000000000ffff00000000"),MMe=BigInt(0),_Me=BigInt("0x0064ff9b000000000000000000000000"),TMe=BigInt("0xffffffff");function NMe(n){let t;try{t=RMe(n)}catch{return!0}let o=t&OMe;if(o===bMe||o===_Me||o===MMe){let i=Number(t&TMe),e=[i>>>24&255,i>>>16&255,i>>>8&255,i&255].join(".");return Tz(e)}return wMe.some(([i,e])=>{let a=BigInt(128-e),r=(BigInt(1)<>a<!Number.isFinite(g)||g<0||g>255))throw new Error("bad v4 suffix");let r=(A[0]<<8|A[1]).toString(16),s=(A[2]<<8|A[3]).toString(16);t=t.slice(0,t.length-o[1].length)+`${r}:${s}`}let i=t.split("::");if(i.length>2)throw new Error('multiple "::"');let e;if(i.length===2){let A=i[0]?i[0].split(":"):[],r=i[1]?i[1].split(":"):[],s=8-A.length-r.length;if(s<0)throw new Error("too many groups");e=[...A,...Array(s).fill("0"),...r]}else e=t.split(":");if(e.length!==8)throw new Error("wrong group count");let a=BigInt(0);for(let A of e){if(!/^[0-9a-f]{0,4}$/.test(A))throw new Error("bad group");a=a<0&&!(yield Promise.all(r.map(d=>h(this,void 0,void 0,function*(){let B=SC.resolve(d);try{return yield tt.promises.realpath(B)}catch{return B}})))).some(d=>g===d||g.startsWith(d+SC.sep)))throw new Rt("upload_failed",`file path is outside allowed directories: ${g}`);return yield tt.promises.readFile(g)}catch(g){throw g instanceof Rt?g:new Rt("upload_failed",`source is neither an http(s) URL nor a readable local file: ${t}`,{cause:g})}}let e=(i=this.config)===null||i===void 0?void 0:i.ssrfGuard,a=e!==!1,A;if(a){let r=typeof e=="object"&&e?{allowlist:e.allowlist}:{};try{({resolvedIp:A}=yield DMe(t,r))}catch(s){throw new Rt("ssrf_blocked",`URL blocked: ${String(s)}`,{cause:s})}}try{let r={url:t,method:"GET",responseType:"arraybuffer",timeout:15e3,maxContentLength:gz,maxBodyLength:gz};if(A){let g=vMe(t,A);r.httpAgent=g,r.httpsAgent=g}let s=yield this.client.httpInstance.request(r);return Buffer.from(s)}catch(r){throw new Rt("upload_failed","fetch source URL failed",{cause:r})}})}assertNotOnPosixBlocklist(t){if(process.platform!=="win32"&&kMe.some(o=>t===o.slice(0,-1)||t.startsWith(o)))throw new Rt("upload_failed",`file path is not allowed: ${t}`)}resolveDuration(t,o){if(t.duration!=null&&t.duration>0)return t.duration;let i=t.kind==="audio"?yMe(o):t.kind==="video"?mMe(o):void 0;if(i!=null)return i;throw new Rt("upload_failed",`duration could not be determined for ${t.kind}; pass it explicitly`)}uploadImage(t){var o,i;return h(this,void 0,void 0,function*(){try{let e=yield this.client.im.v1.image.create({data:{image_type:"message",image:t}}),a=(o=e?.image_key)!==null&&o!==void 0?o:(i=e?.data)===null||i===void 0?void 0:i.image_key;if(!a)throw new Error("image_key missing in upload response");return{kind:"image",fileKey:a}}catch(e){throw new Rt("upload_failed","image upload failed",{cause:e})}})}uploadFile(t,o,i,e){var a,A;return h(this,void 0,void 0,function*(){try{let r={file_type:o,file_name:i,file:t};e!=null&&(r.duration=e);let s=yield this.client.im.v1.file.create({data:r}),g=(a=s?.file_key)!==null&&a!==void 0?a:(A=s?.data)===null||A===void 0?void 0:A.file_key;if(!g)throw new Error("file_key missing in upload response");return{kind:o==="opus"?"audio":o==="mp4"?"video":"file",fileKey:g,durationMs:e}}catch(r){throw r instanceof Rt?r:new Rt("upload_failed","file upload failed",{cause:r})}})}};function vMe(n,t){let o=n.startsWith("https:")?Mbe.Agent:bbe.Agent,i=new o,e=t.includes(":")?6:4,a=(r,s,g)=>{g(null,t,e)},A=i.createConnection.bind(i);return i.createConnection=(r,s)=>A(Object.assign(Object.assign({},r),{lookup:a}),s),i}function Nz(n){var t;if(!n?.length)return"";let o=[];for(let i of n){if(!i.openId)continue;let e=(t=i.name)!==null&&t!==void 0?t:"";o.push(`${e}`)}return o.length>0?o.join(" ")+" ":""}function PMe(n,t=1){try{return GMe(n,t)}catch{return n}}function GMe(n,t){let o="___CB_",i=[],e=n.replace(/(^|\n)(`{3,})([^\n]*)\n[\s\S]*?\n\2(?=\n|$)/g,(A,r="")=>{let s=A.slice(String(r).length);return`${r}${o}${i.push(s)-1}___`});return/^#{1,3} /m.test(n)&&(e=e.replace(/^#{2,6} (.+)$/gm,"##### $1"),e=e.replace(/^# (.+)$/gm,"#### $1")),t>=2?(e=e.replace(/^(#{4,5} .+)\n{1,2}(#{4,5} )/gm,`$1 +\u2014 _(Generation interrupted)_`,XMe=3e4,Hy="stream_md";function dN(n,t=WMe){if(!n)return"";let o=n.replace(/\s+/g," ").trim();return o.length<=t?o:o.slice(0,t-1)+"\u2026"}function bz(n){return{schema:"2.0",config:{streaming_mode:!0,summary:{content:VMe},streaming_config:{print_frequency_ms:{default:70},print_step:{default:1},print_strategy:"fast"}},body:{elements:[{tag:"markdown",element_id:Hy,content:n}]}}}var Tk=class{constructor(t,o,i,e){var a,A,r;this.sender=t,this.to=o,this.idType=i,this.opts=e,this.content="",this.fullAccumulated="",this._messageId="",this.cardId="",this.sequence=0,this.queue=new em,this.started=!1,this.streamingFailed=!1,this.rolloverMessageIds=[];let s=this.sender.config;this.throttle=new $y({ms:(a=s.streamThrottleMs)!==null&&a!==void 0?a:JMe,chars:(A=s.streamThrottleChars)!==null&&A!==void 0?A:qMe},()=>this.pushContent()),this.maxChars=(r=s.streamMaxElementChars)!==null&&r!==void 0?r:XMe}get messageId(){return this._messageId}append(t){return h(this,void 0,void 0,function*(){if(!t)return;yield this.ensureStarted();let o=jMe(this.fullAccumulated,t),i=o.slice(this.fullAccumulated.length);this.fullAccumulated=o,this.content+=i,this.throttle.note(t.length)})}setContent(t){return h(this,void 0,void 0,function*(){yield this.ensureStarted(),this.fullAccumulated=t??"",this.content=t??"",this.throttle.note(Number.MAX_SAFE_INTEGER)})}run(t){return h(this,void 0,void 0,function*(){yield this.ensureStarted();try{yield t(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}ensureStarted(){var t;return h(this,void 0,void 0,function*(){if(this.started)return;this.started=!0;let o=(t=this.sender.config.streamInitialText)!==null&&t!==void 0?t:zMe,i=bz(o||"...");this.cardId=yield this.sender.createCardInstance(i),this._messageId=yield this.sender.sendCardByReference(this.to,this.idType,this.cardId,this.opts)})}pushContent(){return h(this,void 0,void 0,function*(){!this.cardId||this.streamingFailed||(yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){var t,o;if(!this.streamingFailed)try{yield this.pushSnapshot()}catch(i){this.streamingFailed=!0,(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] update failed",i)}})))})}pushSnapshot(){return h(this,void 0,void 0,function*(){for(;this.content.length>this.maxChars;)yield this.rollover();let t=this.content||"...";yield this.sender.updateCardElementContent(this.cardId,Hy,t,++this.sequence)})}rollover(){return h(this,void 0,void 0,function*(){let t=Xz(this.content,this.maxChars);if(t.length<2)throw new Error("rollover: content not splittable below limit");let o=t[0],i=t.slice(1).join(` +`);yield this.sender.updateCardElementContent(this.cardId,Hy,o,++this.sequence);try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,dN(o))}catch{}let e=bz(i||"..."),a=yield this.sender.createCardInstance(e),A=yield this.sender.sendCardByReference(this.to,this.idType,a,this.opts);this.cardId=a,this.content=i,this.sequence=0,this.rolloverMessageIds.push(A)})}completeTerminal(){var t,o;return h(this,void 0,void 0,function*(){if(yield this.throttle.flushNow(),yield this.queue.drain(),!!this.cardId){!this.content&&!this.streamingFailed&&(yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.sender.updateCardElementContent(this.cardId,Hy,Oz,++this.sequence)}catch{}})),yield this.queue.drain());try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,dN(this.content||Oz))}catch(i){(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] finishStreamingCard failed",i)}}})}failTerminal(t){return h(this,void 0,void 0,function*(){if(this.throttle.dispose(),!!this.cardId){this.content=(this.content||"")+ZMe,yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.pushSnapshot()}catch{}})),yield this.queue.drain();try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,dN(this.content))}catch{}}})}},Nk=class{constructor(t,o,i,e){this.impl=new Tk(t,o,i,e)}run(t){return this.impl.run(t)}},$Me=100,e_e=50,Rk=class{constructor(t,o,i,e,a){var A,r;this.sender=t,this.to=o,this.idType=i,this.opts=e,this._messageId="",this.queue=new em,this._current=a;let s=t.config;this.throttle=new $y({ms:(A=s.streamThrottleMs)!==null&&A!==void 0?A:$Me,chars:(r=s.streamThrottleChars)!==null&&r!==void 0?r:e_e},()=>this.patch())}get messageId(){return this._messageId}get current(){return this._current}update(t){return h(this,void 0,void 0,function*(){let o=typeof t=="function"?t(this._current):t;this._current=o,this.throttle.note(JSON.stringify(o).length)})}run(t){return h(this,void 0,void 0,function*(){yield this.sendInitial();try{yield t(this)}catch(o){throw yield this.failTerminal(o),o}return yield this.completeTerminal(),{messageId:this._messageId}})}sendInitial(){return h(this,void 0,void 0,function*(){let t=yield this.sender.sendOneWithFallback({to:this.to,idType:this.idType,msgType:"interactive",content:this._current,replyTo:this.opts.replyTo,replyInThread:this.opts.replyInThread});this._messageId=t})}patch(){return h(this,void 0,void 0,function*(){if(!this._messageId)return;let t=this._current;yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){yield this.sender.patchCard(this._messageId,t)}))})}completeTerminal(){return h(this,void 0,void 0,function*(){yield this.throttle.flushNow(),yield this.queue.drain()})}failTerminal(t){return h(this,void 0,void 0,function*(){this.throttle.dispose();let o=A_e(this._current);yield this.queue.enqueue(()=>h(this,void 0,void 0,function*(){try{yield this.sender.patchCard(this._messageId,o)}catch{}})),yield this.queue.drain()})}};function A_e(n){let t=n,o=Array.isArray(t?.elements)?[...t.elements]:[];return o.push({tag:"note",elements:[{tag:"plain_text",content:"\u26A0\uFE0F \u751F\u6210\u4E2D\u65AD"}]}),Object.assign(Object.assign({},n),{elements:o})}var kk=class{constructor(t,o,i,e,a){this.impl=new Rk(t,o,i,e,a)}run(t){return this.impl.run(t)}};function t_e(n){if(!(!n||n.length<27)){for(let t=n.length-27;t>=0;t--)if(n[t]===79&&n[t+1]===103&&n[t+2]===103&&n[t+3]===83){let o=n.readBigInt64LE(t+6);if(on.length)return;let e=n.readUInt8(i),a=i+4,A,r;if(e===1){if(a+28>n.length)return;A=n.readUInt32BE(a+16),r=Number(n.readBigUInt64BE(a+20))}else{if(a+16>n.length)return;A=n.readUInt32BE(a+8),r=n.readUInt32BE(a+12)}if(!(!A||!Number.isFinite(A)||!Number.isFinite(r)))return Math.round(r/A*1e3)}function Mz(n,t,o,i){let e=t;for(;e+8<=o&&e+8<=n.length;){let a=n.readUInt32BE(e),A=n.slice(e+4,e+8).toString("ascii"),r=a===1?e+Number(n.readBigUInt64BE(e+8)):a===0?o:e+a;if(r<=e||r>o)return;if(A===i)return{start:a===1?e+16:e+8,end:r};e=r}}var a_e=[[0,8],[167772160,8],[2130706432,8],[2851995648,16],[2886729728,12],[3232235520,16],[1681915904,10],[3221225472,24],[3221225984,24],[3323068416,15],[3325256704,24],[3405803776,24],[3758096384,4],[4026531840,4]];function i_e(n,t={}){var o,i;return h(this,void 0,void 0,function*(){let e=new URL(n);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error(`ssrf_blocked: protocol ${e.protocol}`);let a=e.hostname,A=a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a,r=(i=(o=t.allowlist)===null||o===void 0?void 0:o.includes(A))!==null&&i!==void 0?i:!1,s;if(Hz(A))s=A,r||_z(s);else{let g=yield cMe.lookup(A,{all:!0});if(g.length===0)throw new Error(`ssrf_blocked: no DNS records for ${A}`);if(!r)for(let c of g)_z(c.address);s=g[0].address}return{resolvedIp:s,originalHost:A}})}function _z(n){let t=Hz(n);if(t===4&&$z(n))throw new Error(`ssrf_blocked: ${n}`);if(t===6&&l_e(n))throw new Error(`ssrf_blocked: ${n}`);if(t===0)throw new Error(`ssrf_blocked: not a valid IP: ${n}`)}function $z(n){let t=n.split(".").map(Number);if(t.length!==4||t.some(i=>i<0||i>255))return!0;let o=(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0;return a_e.some(([i,e])=>{let a=e===0?0:-1<<32-e>>>0;return(o&a)===(i&a)})}var o_e=[[BigInt("0xfe800000000000000000000000000000"),10],[BigInt("0xfc000000000000000000000000000000"),7],[BigInt("0xff000000000000000000000000000000"),8],[BigInt("0x01000000000000000000000000000000"),64],[BigInt("0x20010db8000000000000000000000000"),32],[BigInt("0x20010000000000000000000000000000"),32]],n_e=BigInt("0xffffffffffffffffffffffff00000000"),s_e=BigInt("0x00000000000000000000ffff00000000"),g_e=BigInt(0),c_e=BigInt("0x0064ff9b000000000000000000000000"),I_e=BigInt("0xffffffff");function l_e(n){let t;try{t=p_e(n)}catch{return!0}let o=t&n_e;if(o===s_e||o===c_e||o===g_e){let i=Number(t&I_e),e=[i>>>24&255,i>>>16&255,i>>>8&255,i&255].join(".");return $z(e)}return o_e.some(([i,e])=>{let a=BigInt(128-e),r=(BigInt(1)<>a<!Number.isFinite(g)||g<0||g>255))throw new Error("bad v4 suffix");let r=(A[0]<<8|A[1]).toString(16),s=(A[2]<<8|A[3]).toString(16);t=t.slice(0,t.length-o[1].length)+`${r}:${s}`}let i=t.split("::");if(i.length>2)throw new Error('multiple "::"');let e;if(i.length===2){let A=i[0]?i[0].split(":"):[],r=i[1]?i[1].split(":"):[],s=8-A.length-r.length;if(s<0)throw new Error("too many groups");e=[...A,...Array(s).fill("0"),...r]}else e=t.split(":");if(e.length!==8)throw new Error("wrong group count");let a=BigInt(0);for(let A of e){if(!/^[0-9a-f]{0,4}$/.test(A))throw new Error("bad group");a=a<0&&!(yield Promise.all(r.map(d=>h(this,void 0,void 0,function*(){let B=_C.resolve(d);try{return yield tt.promises.realpath(B)}catch{return B}})))).some(d=>g===d||g.startsWith(d+_C.sep)))throw new kt("upload_failed",`file path is outside allowed directories: ${g}`);return yield tt.promises.readFile(g)}catch(g){throw g instanceof kt?g:new kt("upload_failed",`source is neither an http(s) URL nor a readable local file: ${t}`,{cause:g})}}let e=(i=this.config)===null||i===void 0?void 0:i.ssrfGuard,a=e!==!1,A;if(a){let r=typeof e=="object"&&e?{allowlist:e.allowlist}:{};try{({resolvedIp:A}=yield i_e(t,r))}catch(s){throw new kt("ssrf_blocked",`URL blocked: ${String(s)}`,{cause:s})}}try{let r={url:t,method:"GET",responseType:"arraybuffer",timeout:15e3,maxContentLength:Tz,maxBodyLength:Tz};if(A){let g=h_e(t,A);r.httpAgent=g,r.httpsAgent=g}let s=yield this.client.httpInstance.request(r);return Buffer.from(s)}catch(r){throw new kt("upload_failed","fetch source URL failed",{cause:r})}})}assertNotOnPosixBlocklist(t){if(process.platform!=="win32"&&d_e.some(o=>t===o.slice(0,-1)||t.startsWith(o)))throw new kt("upload_failed",`file path is not allowed: ${t}`)}resolveDuration(t,o){if(t.duration!=null&&t.duration>0)return t.duration;let i=t.kind==="audio"?t_e(o):t.kind==="video"?r_e(o):void 0;if(i!=null)return i;throw new kt("upload_failed",`duration could not be determined for ${t.kind}; pass it explicitly`)}uploadImage(t){var o,i;return h(this,void 0,void 0,function*(){try{let e=yield this.client.im.v1.image.create({data:{image_type:"message",image:t}}),a=(o=e?.image_key)!==null&&o!==void 0?o:(i=e?.data)===null||i===void 0?void 0:i.image_key;if(!a)throw new Error("image_key missing in upload response");return{kind:"image",fileKey:a}}catch(e){throw new kt("upload_failed","image upload failed",{cause:e})}})}uploadFile(t,o,i,e){var a,A;return h(this,void 0,void 0,function*(){try{let r={file_type:o,file_name:i,file:t};e!=null&&(r.duration=e);let s=yield this.client.im.v1.file.create({data:r}),g=(a=s?.file_key)!==null&&a!==void 0?a:(A=s?.data)===null||A===void 0?void 0:A.file_key;if(!g)throw new Error("file_key missing in upload response");return{kind:o==="opus"?"audio":o==="mp4"?"video":"file",fileKey:g,durationMs:e}}catch(r){throw r instanceof kt?r:new kt("upload_failed","file upload failed",{cause:r})}})}};function h_e(n,t){let o=n.startsWith("https:")?gMe.Agent:sMe.Agent,i=new o,e=t.includes(":")?6:4,a=(r,s,g)=>{g(null,t,e)},A=i.createConnection.bind(i);return i.createConnection=(r,s)=>A(Object.assign(Object.assign({},r),{lookup:a}),s),i}function eV(n){var t;if(!n?.length)return"";let o=[];for(let i of n){if(!i.openId)continue;let e=(t=i.name)!==null&&t!==void 0?t:"";o.push(`${e}`)}return o.length>0?o.join(" ")+" ":""}function E_e(n,t=1){try{return C_e(n,t)}catch{return n}}function C_e(n,t){let o="___CB_",i=[],e=n.replace(/(^|\n)(`{3,})([^\n]*)\n[\s\S]*?\n\2(?=\n|$)/g,(A,r="")=>{let s=A.slice(String(r).length);return`${r}${o}${i.push(s)-1}___`});return/^#{1,3} /m.test(n)&&(e=e.replace(/^#{2,6} (.+)$/gm,"##### $1"),e=e.replace(/^# (.+)$/gm,"#### $1")),t>=2?(e=e.replace(/^(#{4,5} .+)\n{1,2}(#{4,5} )/gm,`$1
$2`),e=e.replace(/^([^|\n].*)\n(\|.+\|)/gm,`$1 @@ -280,130 +280,131 @@ ${A}
`)})):i.forEach((A,r)=>{e=e.replace(`${o}${r}___`,A)}),e=e.replace(/\n{3,}/g,` -`),e}function FMe(n,t){var o,i;let e=Nz((o=t?.mentions)!==null&&o!==void 0?o:[]),a=PMe(e+n,1);return{zh_cn:{title:(i=t?.title)!==null&&i!==void 0?i:"",content:[[{tag:"md",text:a}]]}}}function LMe(n){var t;let o=n?.zh_cn;if(!o?.content)return"";let i=[];for(let e of o.content){if(!Array.isArray(e))continue;let a=[];for(let A of e)switch(A.tag){case"md":case"text":case"a":a.push((t=A.text)!==null&&t!==void 0?t:"");break;case"at":a.push(A.user_name?`@${A.user_name}`:"");break;case"img":a.push(A.image_key?"[image]":"");break}i.push(a.join(""))}return i.join(` -`).trim()}function cz(n){if(!n)throw new Error("empty receive_id");return n.startsWith("oc_")?"chat_id":n.startsWith("ou_")?"open_id":n.startsWith("on_")?"union_id":n.includes("@")?"email":"user_id"}function Pk(n,t){if(n instanceof Rt)return n;let o=UMe(n),i=HMe(n);return new Rt(o,i,{cause:n,context:t})}function UMe(n){var t,o,i,e,a,A,r,s;let g=n,c=(o=(t=g?.response)===null||t===void 0?void 0:t.status)!==null&&o!==void 0?o:g?.status,I=(r=(a=(e=(i=g?.response)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.code)!==null&&a!==void 0?a:(A=g?.data)===null||A===void 0?void 0:A.code)!==null&&r!==void 0?r:g?.code,d=String((s=g?.message)!==null&&s!==void 0?s:"").toLowerCase();if(typeof I=="number"){if(I===230020||I===230017)return"target_revoked";if(I===99991400||I===99991401)return"permission_denied";if(I===230002||I===230001)return"format_error"}return c===429?"rate_limited":c===401||c===403?"permission_denied":c===400?"format_error":c===404?"target_revoked":d.startsWith("ssrf_blocked")?"ssrf_blocked":d.includes("timeout")||g?.code==="ETIMEDOUT"||g?.code==="ECONNABORTED"?"send_timeout":"unknown"}function HMe(n){var t,o,i,e;let a=n;return((o=(t=a?.response)===null||t===void 0?void 0:t.data)===null||o===void 0?void 0:o.msg)||((e=(i=a?.response)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.message)||a?.message||String(n)}function KMe(n){return n.code==="rate_limited"||n.code==="unknown"}function xMe(n){return n.code==="format_error"}function YMe(n){return n.code==="target_revoked"}function jMe(n,t={}){var o,i;return h(this,void 0,void 0,function*(){let e=(o=t.maxAttempts)!==null&&o!==void 0?o:3,a=(i=t.baseDelayMs)!==null&&i!==void 0?i:500,A;for(let r=1;r<=e;r++)try{return yield n(r)}catch(s){let g=Pk(s,{attempt:r});if(A=g,r>=e||!KMe(g))throw g;let c=a*Math.pow(3,r-1);yield JMe(c)}throw A})}function JMe(n){return new Promise(t=>setTimeout(t,n))}var qMe=3500,fk=class{constructor(t,o,i){var e;this.client=t,this.config=o,this.logger=i,this.uploader=new Bk(t,o),this.chunkLimit=(e=o.textChunkLimit)!==null&&e!==void 0?e:qMe}send(t,o,i={}){return h(this,void 0,void 0,function*(){let e=cz(t);if("markdown"in o)return this.sendMarkdown(t,e,o.markdown,i);if("text"in o)return this.sendText(t,e,o.text,i);if("post"in o)return this.sendPost(t,e,o.post,i);if("image"in o)return this.sendImage(t,e,o.image,i);if("file"in o)return this.sendFile(t,e,o.file,i);if("audio"in o)return this.sendAudio(t,e,o.audio,i);if("video"in o)return this.sendVideo(t,e,o.video,i);if("card"in o)return this.sendCard(t,e,o.card,i);if("shareChat"in o)return this.sendShareChat(t,e,o.shareChat.chatId,i);if("shareUser"in o)return this.sendShareUser(t,e,o.shareUser.userId,i);if("sticker"in o)return this.sendSticker(t,e,o.sticker.fileKey,i);throw new Rt("format_error","unrecognized SendInput shape")})}stream(t,o,i={}){return h(this,void 0,void 0,function*(){let e=cz(t);if("markdown"in o)return new Ek(this,t,e,i).run(o.markdown);if("card"in o)return new uk(this,t,e,i,o.card.initial).run(o.card.producer);throw new Rt("format_error","unrecognized StreamInput shape")})}sendMarkdown(t,o,i,e){return h(this,void 0,void 0,function*(){let a=_z(i,this.chunkLimit),A=[];for(let r=0;rthis.rawSend(t),this.config.retry)})}rawSend(t){var o,i;return h(this,void 0,void 0,function*(){let e={receive_id:t.to,msg_type:t.msgType,content:JSON.stringify(t.content)};if(t.replyTo){let s=(o=(yield this.client.im.v1.message.reply({path:{message_id:t.replyTo},data:{content:e.content,msg_type:t.msgType,reply_in_thread:t.replyInThread}})).data)===null||o===void 0?void 0:o.message_id;if(!s)throw new Rt("unknown","message_id missing from reply response");return s}let A=(i=(yield this.client.im.v1.message.create({params:{receive_id_type:t.idType},data:e})).data)===null||i===void 0?void 0:i.message_id;if(!A)throw new Rt("unknown","message_id missing from create response");return A})}patchCard(t,o){return h(this,void 0,void 0,function*(){yield this.client.im.v1.message.patch({path:{message_id:t},data:{content:JSON.stringify(o)}})})}createCardInstance(t){var o;return h(this,void 0,void 0,function*(){let e=(o=(yield this.client.cardkit.v1.card.create({data:{type:"card_json",data:JSON.stringify(t)}})).data)===null||o===void 0?void 0:o.card_id;if(!e)throw new Rt("unknown","cardkit.card.create returned no card_id");return e})}sendCardByReference(t,o,i,e){return h(this,void 0,void 0,function*(){return this.rawSendWithRetry({to:t,idType:o,msgType:"interactive",content:{type:"card",data:{card_id:i}},replyTo:e.replyTo,replyInThread:e.replyInThread})})}updateCardElementContent(t,o,i,e){return h(this,void 0,void 0,function*(){yield this.client.cardkit.v1.cardElement.content({path:{card_id:t,element_id:o},data:{content:i,sequence:e,uuid:`c_${t}_${e}`}})})}finishStreamingCard(t,o,i){return h(this,void 0,void 0,function*(){let e={streaming_mode:!1};i!==void 0&&(e.summary={content:i}),yield this.client.cardkit.v1.card.settings({path:{card_id:t},data:{settings:JSON.stringify({config:e}),sequence:o,uuid:`s_${t}_${o}`}})})}makeResult(t){return{messageId:t[0],chunkIds:t.length>1?t:void 0}}};function zMe(n,t){if(n.length<=t)return[n];let o=[];for(let i=0;i=this.config.maxMessages||this.bufferChars>=this.config.maxChars){this.clearTimer(),this.enqueueFlush();return}if(this.config.delayMs<=0||this.serialOnly){this.clearTimer(),this.enqueueFlush();return}this.clearTimer();let e=this.bufferChars>=this.config.longThresholdChars?this.config.longDelayMs:this.config.delayMs;this.timer=setTimeout(()=>{this.timer=void 0,this.enqueueFlush()},e)}run(t){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush());let o=this.tail.then(t,t);return this.tail=o.then(()=>{},()=>{}),o}flushNow(){return h(this,void 0,void 0,function*(){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush()),yield this.tail})}isIdle(){return this.buffer.length===0&&!this.timer}dispose(){this.clearTimer(),this.buffer=[],this.pendingHandler=void 0}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}enqueueFlush(){if(this.buffer.length===0)return;let t=this.buffer,o=this.pendingHandler;if(this.buffer=[],this.bufferChars=0,this.pendingHandler=void 0,!o)return;let i={message:VMe(t),sourceIds:t.map(A=>A.messageId)},e=()=>o(i),a=this.tail.then(e,e);this.tail=a.then(()=>{},()=>{})}},yk=class{constructor(t){this.config=t,this.pipelines=new Map}push(t,o,i){this.getOrCreate(t,!1).push(o,i)}run(t,o){return this.getOrCreate(t,!0).run(o)}getOrCreate(t,o){let i=this.pipelines.get(t);return i||(i=new Qk(this.config,o),this.pipelines.set(t,i)),i}flushAll(){return h(this,void 0,void 0,function*(){yield Promise.all([...this.pipelines.values()].map(t=>t.flushNow()))})}dispose(){return h(this,void 0,void 0,function*(){yield this.flushAll();for(let t of this.pipelines.values())t.dispose();this.pipelines.clear()})}};function VMe(n){if(n.length===1)return n[0];let t=n[n.length-1],o=n.map(a=>a.content).filter(a=>a&&a.length>0).join(` +`),e}function u_e(n,t){var o,i;let e=eV((o=t?.mentions)!==null&&o!==void 0?o:[]),a=E_e(e+n,1);return{zh_cn:{title:(i=t?.title)!==null&&i!==void 0?i:"",content:[[{tag:"md",text:a}]]}}}function B_e(n){var t;let o=n?.zh_cn;if(!o?.content)return"";let i=[];for(let e of o.content){if(!Array.isArray(e))continue;let a=[];for(let A of e)switch(A.tag){case"md":case"text":case"a":a.push((t=A.text)!==null&&t!==void 0?t:"");break;case"at":a.push(A.user_name?`@${A.user_name}`:"");break;case"img":a.push(A.image_key?"[image]":"");break}i.push(a.join(""))}return i.join(` +`).trim()}function Nz(n){if(!n)throw new Error("empty receive_id");return n.startsWith("oc_")?"chat_id":n.startsWith("ou_")?"open_id":n.startsWith("on_")?"union_id":n.includes("@")?"email":"user_id"}function Xk(n,t){if(n instanceof kt)return n;let o=f_e(n),i=Q_e(n);return new kt(o,i,{cause:n,context:t})}function f_e(n){var t,o,i,e,a,A,r,s;let g=n,c=(o=(t=g?.response)===null||t===void 0?void 0:t.status)!==null&&o!==void 0?o:g?.status,I=(r=(a=(e=(i=g?.response)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.code)!==null&&a!==void 0?a:(A=g?.data)===null||A===void 0?void 0:A.code)!==null&&r!==void 0?r:g?.code,d=String((s=g?.message)!==null&&s!==void 0?s:"").toLowerCase();if(typeof I=="number"){if(I===230020||I===230017)return"target_revoked";if(I===99991400||I===99991401)return"permission_denied";if(I===230002||I===230001)return"format_error"}return c===429?"rate_limited":c===401||c===403?"permission_denied":c===400?"format_error":c===404?"target_revoked":d.startsWith("ssrf_blocked")?"ssrf_blocked":d.includes("timeout")||g?.code==="ETIMEDOUT"||g?.code==="ECONNABORTED"?"send_timeout":"unknown"}function Q_e(n){var t,o,i,e;let a=n;return((o=(t=a?.response)===null||t===void 0?void 0:t.data)===null||o===void 0?void 0:o.msg)||((e=(i=a?.response)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.message)||a?.message||String(n)}function y_e(n){return n.code==="rate_limited"||n.code==="unknown"}function m_e(n){return n.code==="format_error"}function S_e(n){return n.code==="target_revoked"}function D_e(n,t={}){var o,i;return h(this,void 0,void 0,function*(){let e=(o=t.maxAttempts)!==null&&o!==void 0?o:3,a=(i=t.baseDelayMs)!==null&&i!==void 0?i:500,A;for(let r=1;r<=e;r++)try{return yield n(r)}catch(s){let g=Xk(s,{attempt:r});if(A=g,r>=e||!y_e(g))throw g;let c=a*Math.pow(3,r-1);yield w_e(c)}throw A})}function w_e(n){return new Promise(t=>setTimeout(t,n))}var O_e=3500,Pk=class{constructor(t,o,i){var e;this.client=t,this.config=o,this.logger=i,this.uploader=new vk(t,o),this.chunkLimit=(e=o.textChunkLimit)!==null&&e!==void 0?e:O_e}send(t,o,i={}){return h(this,void 0,void 0,function*(){let e=Nz(t);if("markdown"in o)return this.sendMarkdown(t,e,o.markdown,i);if("text"in o)return this.sendText(t,e,o.text,i);if("post"in o)return this.sendPost(t,e,o.post,i);if("image"in o)return this.sendImage(t,e,o.image,i);if("file"in o)return this.sendFile(t,e,o.file,i);if("audio"in o)return this.sendAudio(t,e,o.audio,i);if("video"in o)return this.sendVideo(t,e,o.video,i);if("card"in o)return this.sendCard(t,e,o.card,i);if("shareChat"in o)return this.sendShareChat(t,e,o.shareChat.chatId,i);if("shareUser"in o)return this.sendShareUser(t,e,o.shareUser.userId,i);if("sticker"in o)return this.sendSticker(t,e,o.sticker.fileKey,i);throw new kt("format_error","unrecognized SendInput shape")})}stream(t,o,i={}){return h(this,void 0,void 0,function*(){let e=Nz(t);if("markdown"in o)return new Nk(this,t,e,i).run(o.markdown);if("card"in o)return new kk(this,t,e,i,o.card.initial).run(o.card.producer);throw new kt("format_error","unrecognized StreamInput shape")})}sendMarkdown(t,o,i,e){return h(this,void 0,void 0,function*(){let a=Xz(i,this.chunkLimit),A=[];for(let r=0;rthis.rawSend(t),this.config.retry)})}rawSend(t){var o,i;return h(this,void 0,void 0,function*(){let e={receive_id:t.to,msg_type:t.msgType,content:JSON.stringify(t.content)};if(t.replyTo){let s=(o=(yield this.client.im.v1.message.reply({path:{message_id:t.replyTo},data:{content:e.content,msg_type:t.msgType,reply_in_thread:t.replyInThread}})).data)===null||o===void 0?void 0:o.message_id;if(!s)throw new kt("unknown","message_id missing from reply response");return s}let A=(i=(yield this.client.im.v1.message.create({params:{receive_id_type:t.idType},data:e})).data)===null||i===void 0?void 0:i.message_id;if(!A)throw new kt("unknown","message_id missing from create response");return A})}patchCard(t,o){return h(this,void 0,void 0,function*(){yield this.client.im.v1.message.patch({path:{message_id:t},data:{content:JSON.stringify(o)}})})}createCardInstance(t){var o;return h(this,void 0,void 0,function*(){let e=(o=(yield this.client.cardkit.v1.card.create({data:{type:"card_json",data:JSON.stringify(t)}})).data)===null||o===void 0?void 0:o.card_id;if(!e)throw new kt("unknown","cardkit.card.create returned no card_id");return e})}sendCardByReference(t,o,i,e){return h(this,void 0,void 0,function*(){return this.rawSendWithRetry({to:t,idType:o,msgType:"interactive",content:{type:"card",data:{card_id:i}},replyTo:e.replyTo,replyInThread:e.replyInThread})})}updateCardElementContent(t,o,i,e){return h(this,void 0,void 0,function*(){yield this.client.cardkit.v1.cardElement.content({path:{card_id:t,element_id:o},data:{content:i,sequence:e,uuid:`c_${t}_${e}`}})})}finishStreamingCard(t,o,i){return h(this,void 0,void 0,function*(){let e={streaming_mode:!1};i!==void 0&&(e.summary={content:i}),yield this.client.cardkit.v1.card.settings({path:{card_id:t},data:{settings:JSON.stringify({config:e}),sequence:o,uuid:`s_${t}_${o}`}})})}makeResult(t){return{messageId:t[0],chunkIds:t.length>1?t:void 0}}};function b_e(n,t){if(n.length<=t)return[n];let o=[];for(let i=0;i=this.config.maxMessages||this.bufferChars>=this.config.maxChars){this.clearTimer(),this.enqueueFlush();return}if(this.config.delayMs<=0||this.serialOnly){this.clearTimer(),this.enqueueFlush();return}this.clearTimer();let e=this.bufferChars>=this.config.longThresholdChars?this.config.longDelayMs:this.config.delayMs;this.timer=setTimeout(()=>{this.timer=void 0,this.enqueueFlush()},e)}run(t){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush());let o=this.tail.then(t,t);return this.tail=o.then(()=>{},()=>{}),o}flushNow(){return h(this,void 0,void 0,function*(){this.buffer.length>0&&(this.clearTimer(),this.enqueueFlush()),yield this.tail})}isIdle(){return this.buffer.length===0&&!this.timer}dispose(){this.clearTimer(),this.buffer=[],this.pendingHandler=void 0}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}enqueueFlush(){if(this.buffer.length===0)return;let t=this.buffer,o=this.pendingHandler;if(this.buffer=[],this.bufferChars=0,this.pendingHandler=void 0,!o)return;let i={message:M_e(t),sourceIds:t.map(A=>A.messageId)},e=()=>o(i),a=this.tail.then(e,e);this.tail=a.then(()=>{},()=>{})}},Fk=class{constructor(t){this.config=t,this.pipelines=new Map}push(t,o,i){this.getOrCreate(t,!1).push(o,i)}run(t,o){return this.getOrCreate(t,!0).run(o)}getOrCreate(t,o){let i=this.pipelines.get(t);return i||(i=new Gk(this.config,o),this.pipelines.set(t,i)),i}flushAll(){return h(this,void 0,void 0,function*(){yield Promise.all([...this.pipelines.values()].map(t=>t.flushNow()))})}dispose(){return h(this,void 0,void 0,function*(){yield this.flushAll();for(let t of this.pipelines.values())t.dispose();this.pipelines.clear()})}};function M_e(n){if(n.length===1)return n[0];let t=n[n.length-1],o=n.map(a=>a.content).filter(a=>a&&a.length>0).join(` -`),i=Iz(n.flatMap(a=>a.resources),a=>a.fileKey),e=Iz(n.flatMap(a=>a.mentions),a=>{var A;return(A=a.openId)!==null&&A!==void 0?A:a.key});return Object.assign(Object.assign({},t),{content:o,resources:i,mentions:e,mentionAll:n.some(a=>a.mentionAll),mentionedBot:n.some(a=>a.mentionedBot)})}function Iz(n,t){let o=new Set,i=[];for(let e of n){let a=t(e);if(a==null){i.push(e);continue}o.has(a)||(o.add(a),i.push(e))}return i}var yC={delayMs:600,longThresholdChars:1e3,longDelayMs:2e3,maxMessages:8,maxChars:4e3},by={ttl:12*36e5,maxEntries:5e3,sweepIntervalMs:5*6e4,namespace:"channel:seen"},Rz=30*6e4,WMe=5*6e4;function ZMe(n){var t,o,i,e,a,A,r;let s=(o=(t=n?.batch)===null||t===void 0?void 0:t.text)!==null&&o!==void 0?o:{};return{delayMs:(i=s.delayMs)!==null&&i!==void 0?i:yC.delayMs,longThresholdChars:(e=s.longThresholdChars)!==null&&e!==void 0?e:yC.longThresholdChars,longDelayMs:(a=s.longDelayMs)!==null&&a!==void 0?a:yC.longDelayMs,maxMessages:(A=s.maxMessages)!==null&&A!==void 0?A:yC.maxMessages,maxChars:(r=s.maxChars)!==null&&r!==void 0?r:yC.maxChars}}var mk=class{constructor(t,o={}){var i,e,a,A,r,s;this.cache=t,this.memory=new Map,this.ttlMs=(i=o.ttlMs)!==null&&i!==void 0?i:by.ttl,this.maxMem=(e=o.maxMemEntries)!==null&&e!==void 0?e:by.maxEntries,this.ns=(a=o.namespace)!==null&&a!==void 0?a:by.namespace;let g=(A=o.sweepMs)!==null&&A!==void 0?A:by.sweepIntervalMs;this.sweeper=setInterval(()=>this.sweep(),g),(s=(r=this.sweeper).unref)===null||s===void 0||s.call(r)}has(t){return h(this,void 0,void 0,function*(){let o=Date.now(),i=this.memory.get(t);return i&&i>o?(this.memory.delete(t),this.memory.set(t,i),!0):(yield this.cache.get(t,{namespace:this.ns}))?(this.memory.set(t,o+this.ttlMs),this.evictIfNeeded(),!0):!1})}add(t){return h(this,void 0,void 0,function*(){let o=Date.now()+this.ttlMs;this.memory.set(t,o),this.evictIfNeeded();try{yield this.cache.set(t,"1",o,{namespace:this.ns})}catch{}})}evictIfNeeded(){for(;this.memory.size>this.maxMem;){let t=this.memory.keys().next().value;if(t===void 0)break;this.memory.delete(t)}}sweep(){let t=Date.now();for(let[o,i]of this.memory)i<=t&&this.memory.delete(o)}dispose(){clearInterval(this.sweeper),this.memory.clear()}},Sk=class{constructor(t,o){this.cfg=Object.assign({},t??{}),this.bot=o}evaluate(t){return t.chatType==="group"?this.evaluateGroup(t):this.evaluateDm(t)}evaluateGroup(t){var o,i;let e=this.cfg.groupAllowlist;return e&&e.length>0&&!e.includes(t.chatId)?{allowed:!1,reason:"group_not_allowed"}:((o=this.cfg.requireMention)!==null&&o!==void 0?o:!0)&&!t.mentionedBot?{allowed:!1,reason:"no_mention"}:t.mentionAll&&!((i=this.cfg.respondToMentionAll)!==null&&i!==void 0&&i)?{allowed:!1,reason:"mention_all_blocked"}:{allowed:!0}}evaluateDm(t){var o,i;let e=(o=this.cfg.dmMode)!==null&&o!==void 0?o:"open";return e==="disabled"?{allowed:!1,reason:"dm_disabled"}:e==="allowlist"&&!((i=this.cfg.dmAllowlist)!==null&&i!==void 0?i:[]).includes(t.senderId)?{allowed:!1,reason:"sender_not_allowed"}:{allowed:!0}}updateConfig(t){this.cfg=Object.assign(Object.assign({},this.cfg),t)}getConfig(){return this.cfg}setBotIdentity(t){this.bot=t}getBotIdentity(){return this.bot}},Dk=class{constructor(t=WMe,o=6e4){var i,e;this.ttlMs=t,this.locks=new Map,this.sweeper=setInterval(()=>this.sweep(),o),(e=(i=this.sweeper).unref)===null||e===void 0||e.call(i)}acquire(t){let o=Date.now(),i=this.locks.get(t);return i&&i>o?!1:(this.locks.set(t,o+this.ttlMs),!0)}release(t){this.locks.delete(t)}sweep(){let t=Date.now();for(let[o,i]of this.locks)i<=t&&this.locks.delete(o)}dispose(){clearInterval(this.sweeper),this.locks.clear()}};function XMe(n,t=Rz){return!n||!Number.isFinite(n)?!1:Date.now()-n>t}var wk=class{constructor(t){var o,i,e,a,A,r,s,g,c,I,d;this.logger=t.logger,this.onReject=t.onReject,this.onMessage=t.onMessage,this.staleWindow=(i=(o=t.config)===null||o===void 0?void 0:o.staleMessageWindowMs)!==null&&i!==void 0?i:Rz,this.queueEnabled=(A=(a=(e=t.config)===null||e===void 0?void 0:e.chatQueue)===null||a===void 0?void 0:a.enabled)!==null&&A!==void 0?A:!0,this.seenCache=new mk(t.cache,{ttlMs:(s=(r=t.config)===null||r===void 0?void 0:r.dedup)===null||s===void 0?void 0:s.ttl,maxMemEntries:(c=(g=t.config)===null||g===void 0?void 0:g.dedup)===null||c===void 0?void 0:c.maxEntries,sweepMs:(d=(I=t.config)===null||I===void 0?void 0:I.dedup)===null||d===void 0?void 0:d.sweepIntervalMs}),this.lock=new Dk,this.policy=new Sk(t.policy,t.botIdentity),this.manager=new yk(ZMe(t.config))}pushMessage(t){var o,i,e,a,A,r,s;return h(this,void 0,void 0,function*(){if(XMe(t.createTime,this.staleWindow)){(i=(o=this.logger).debug)===null||i===void 0||i.call(o,`safety: drop stale message ${t.messageId}`);return}if(yield this.seenCache.has(t.messageId)){(a=(e=this.logger).debug)===null||a===void 0||a.call(e,`safety: drop duplicate message ${t.messageId}`);return}let g=this.policy.evaluate(t);if(!g.allowed){this.onReject({messageId:t.messageId,chatId:t.chatId,senderId:t.senderId,reason:(A=g.reason)!==null&&A!==void 0?A:"group_not_allowed"});return}if(!this.lock.acquire(t.messageId)){(s=(r=this.logger).debug)===null||s===void 0||s.call(r,`safety: drop in-flight message ${t.messageId}`);return}let c=I=>h(this,void 0,void 0,function*(){var d,B;try{yield this.onMessage(I.message)}catch(f){(B=(d=this.logger).error)===null||B===void 0||B.call(d,"safety: message handler threw",f)}finally{for(let f of I.sourceIds){try{yield this.seenCache.add(f)}catch{}this.lock.release(f)}}});this.queueEnabled?this.manager.push(t.chatId,t,c):c({message:t,sourceIds:[t.messageId]})})}pushAction(t,o,i){var e,a,A,r;return h(this,void 0,void 0,function*(){if(yield this.seenCache.has(t)){(a=(e=this.logger).debug)===null||a===void 0||a.call(e,`safety: drop duplicate action ${t}`);return}if(!this.lock.acquire(t)){(r=(A=this.logger).debug)===null||r===void 0||r.call(A,`safety: drop in-flight action ${t}`);return}let s=()=>h(this,void 0,void 0,function*(){var g,c;try{yield i()}catch(I){(c=(g=this.logger).error)===null||c===void 0||c.call(g,"safety: action handler threw",I)}finally{try{yield this.seenCache.add(t)}catch{}this.lock.release(t)}});this.queueEnabled?yield this.manager.run(o,s):yield s()})}pushLight(t,o){var i,e;return h(this,void 0,void 0,function*(){if(!(yield this.seenCache.has(t))){yield this.seenCache.add(t);try{yield o()}catch(a){(e=(i=this.logger).warn)===null||e===void 0||e.call(i,"safety: light handler threw",a)}}})}updatePolicy(t){this.policy.updateConfig(t)}getPolicy(){return this.policy.getConfig()}setBotIdentity(t){this.policy.setBotIdentity(t)}dispose(){return h(this,void 0,void 0,function*(){yield this.manager.dispose(),this.seenCache.dispose(),this.lock.dispose()})}};function $Me(n){return n.key==="@_all"}function e_e(n,t){var o,i,e;let a=new Map,A=new Map,r=[],s=!1,g=!1;for(let c of n??[]){if($Me(c)){s=!0,a.set(c.key,{key:c.key,name:c.name,isBot:!1});continue}let I=(i=(o=c.id)===null||o===void 0?void 0:o.open_id)!==null&&i!==void 0?i:"",d=(e=c.id)===null||e===void 0?void 0:e.user_id,B=!!(t&&I===t);B&&(g=!0);let f={key:c.key,openId:I||void 0,userId:d,name:c.name,isBot:B};a.set(c.key,f),I&&A.set(I,f),r.push(f)}return{mentions:a,mentionsByOpenId:A,mentionList:r,mentionAll:s,mentionedBot:g}}function A_e(n,t){if(!n||t.mentions.size===0)return n;let o=n;for(let[i,e]of t.mentions){if(e.isBot&&t.stripBotMentions){let A=new RegExp(`\\s?${t_e(i)}\\s?`,"g");o=o.replace(A," ");continue}let a=e.name?`@${e.name}`:i;o=o.split(i).join(a)}return o.replace(/[ \t]{2,}/g," ").trim()}function t_e(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Tr(n){if(n)try{return JSON.parse(n)}catch{return}}function r_e(n,t){if(!t||t.length===0)return n;let o=n;return t.includes("bold")&&(o=`**${o}**`),t.includes("italic")&&(o=`*${o}*`),t.includes("underline")&&(o=`${o}`),(t.includes("lineThrough")||t.includes("strikethrough"))&&(o=`~~${o}~~`),(t.includes("codeInline")||t.includes("code"))&&(o=`\`${o}\``),o}var a_e=["zh_cn","en_us","ja_jp"];function i_e(n){if("title"in n||"content"in n)return n;for(let o of a_e){let i=n[o];if(i!=null&&typeof i=="object")return i}let t=Object.keys(n)[0];if(t){let o=n[t];if(o!=null&&typeof o=="object")return o}}function kz(n){if(!(n==null||!Number.isFinite(n)||n<0))return n<1e3?`${Math.round(n)}ms`:n%1e3===0?`${n/1e3}s`:`${(n/1e3).toFixed(1)}s`}function xy(n){if(n==null)return;let t=typeof n=="string"?parseInt(n,10):n;if(!Number.isFinite(t)||t<=0)return;let o=new Date(t+8*36e5),i=o.getUTCFullYear(),e=String(o.getUTCMonth()+1).padStart(2,"0"),a=String(o.getUTCDate()).padStart(2,"0"),A=String(o.getUTCHours()).padStart(2,"0"),r=String(o.getUTCMinutes()).padStart(2,"0");return`${i}-${e}-${a} ${A}:${r}`}function o_e(n){let t=new Date(n+288e5),o=t.getUTCFullYear(),i=String(t.getUTCMonth()+1).padStart(2,"0"),e=String(t.getUTCDate()).padStart(2,"0"),a=String(t.getUTCHours()).padStart(2,"0"),A=String(t.getUTCMinutes()).padStart(2,"0"),r=String(t.getUTCSeconds()).padStart(2,"0");return`${o}-${i}-${e}T${a}:${A}:${r}+08:00`}function n_e(n,t){return n.split(` +`),i=Rz(n.flatMap(a=>a.resources),a=>a.fileKey),e=Rz(n.flatMap(a=>a.mentions),a=>{var A;return(A=a.openId)!==null&&A!==void 0?A:a.key});return Object.assign(Object.assign({},t),{content:o,resources:i,mentions:e,mentionAll:n.some(a=>a.mentionAll),mentionedBot:n.some(a=>a.mentionedBot)})}function Rz(n,t){let o=new Set,i=[];for(let e of n){let a=t(e);if(a==null){i.push(e);continue}o.has(a)||(o.add(a),i.push(e))}return i}var bC={delayMs:600,longThresholdChars:1e3,longDelayMs:2e3,maxMessages:8,maxChars:4e3},Uy={ttl:12*36e5,maxEntries:5e3,sweepIntervalMs:5*6e4,namespace:"channel:seen"},AV=30*6e4,__e=5*6e4;function T_e(n){var t,o,i,e,a,A,r;let s=(o=(t=n?.batch)===null||t===void 0?void 0:t.text)!==null&&o!==void 0?o:{};return{delayMs:(i=s.delayMs)!==null&&i!==void 0?i:bC.delayMs,longThresholdChars:(e=s.longThresholdChars)!==null&&e!==void 0?e:bC.longThresholdChars,longDelayMs:(a=s.longDelayMs)!==null&&a!==void 0?a:bC.longDelayMs,maxMessages:(A=s.maxMessages)!==null&&A!==void 0?A:bC.maxMessages,maxChars:(r=s.maxChars)!==null&&r!==void 0?r:bC.maxChars}}var Lk=class{constructor(t,o={}){var i,e,a,A,r,s;this.cache=t,this.memory=new Map,this.ttlMs=(i=o.ttlMs)!==null&&i!==void 0?i:Uy.ttl,this.maxMem=(e=o.maxMemEntries)!==null&&e!==void 0?e:Uy.maxEntries,this.ns=(a=o.namespace)!==null&&a!==void 0?a:Uy.namespace;let g=(A=o.sweepMs)!==null&&A!==void 0?A:Uy.sweepIntervalMs;this.sweeper=setInterval(()=>this.sweep(),g),(s=(r=this.sweeper).unref)===null||s===void 0||s.call(r)}has(t){return h(this,void 0,void 0,function*(){let o=Date.now(),i=this.memory.get(t);return i&&i>o?(this.memory.delete(t),this.memory.set(t,i),!0):(yield this.cache.get(t,{namespace:this.ns}))?(this.memory.set(t,o+this.ttlMs),this.evictIfNeeded(),!0):!1})}add(t){return h(this,void 0,void 0,function*(){let o=Date.now()+this.ttlMs;this.memory.set(t,o),this.evictIfNeeded();try{yield this.cache.set(t,"1",o,{namespace:this.ns})}catch{}})}evictIfNeeded(){for(;this.memory.size>this.maxMem;){let t=this.memory.keys().next().value;if(t===void 0)break;this.memory.delete(t)}}sweep(){let t=Date.now();for(let[o,i]of this.memory)i<=t&&this.memory.delete(o)}dispose(){clearInterval(this.sweeper),this.memory.clear()}},Uk=class{constructor(t,o){this.cfg=Object.assign({},t??{}),this.bot=o}evaluate(t){return t.chatType==="group"?this.evaluateGroup(t):this.evaluateDm(t)}evaluateGroup(t){var o,i;let e=this.cfg.groupAllowlist;return e&&e.length>0&&!e.includes(t.chatId)?{allowed:!1,reason:"group_not_allowed"}:((o=this.cfg.requireMention)!==null&&o!==void 0?o:!0)&&!t.mentionedBot?{allowed:!1,reason:"no_mention"}:t.mentionAll&&!((i=this.cfg.respondToMentionAll)!==null&&i!==void 0&&i)?{allowed:!1,reason:"mention_all_blocked"}:{allowed:!0}}evaluateDm(t){var o,i;let e=(o=this.cfg.dmMode)!==null&&o!==void 0?o:"open";return e==="disabled"?{allowed:!1,reason:"dm_disabled"}:e==="allowlist"&&!((i=this.cfg.dmAllowlist)!==null&&i!==void 0?i:[]).includes(t.senderId)?{allowed:!1,reason:"sender_not_allowed"}:{allowed:!0}}updateConfig(t){this.cfg=Object.assign(Object.assign({},this.cfg),t)}getConfig(){return this.cfg}setBotIdentity(t){this.bot=t}getBotIdentity(){return this.bot}},Hk=class{constructor(t=__e,o=6e4){var i,e;this.ttlMs=t,this.locks=new Map,this.sweeper=setInterval(()=>this.sweep(),o),(e=(i=this.sweeper).unref)===null||e===void 0||e.call(i)}acquire(t){let o=Date.now(),i=this.locks.get(t);return i&&i>o?!1:(this.locks.set(t,o+this.ttlMs),!0)}release(t){this.locks.delete(t)}sweep(){let t=Date.now();for(let[o,i]of this.locks)i<=t&&this.locks.delete(o)}dispose(){clearInterval(this.sweeper),this.locks.clear()}};function N_e(n,t=AV){return!n||!Number.isFinite(n)?!1:Date.now()-n>t}var Kk=class{constructor(t){var o,i,e,a,A,r,s,g,c,I,d;this.logger=t.logger,this.onReject=t.onReject,this.onMessage=t.onMessage,this.staleWindow=(i=(o=t.config)===null||o===void 0?void 0:o.staleMessageWindowMs)!==null&&i!==void 0?i:AV,this.queueEnabled=(A=(a=(e=t.config)===null||e===void 0?void 0:e.chatQueue)===null||a===void 0?void 0:a.enabled)!==null&&A!==void 0?A:!0,this.seenCache=new Lk(t.cache,{ttlMs:(s=(r=t.config)===null||r===void 0?void 0:r.dedup)===null||s===void 0?void 0:s.ttl,maxMemEntries:(c=(g=t.config)===null||g===void 0?void 0:g.dedup)===null||c===void 0?void 0:c.maxEntries,sweepMs:(d=(I=t.config)===null||I===void 0?void 0:I.dedup)===null||d===void 0?void 0:d.sweepIntervalMs}),this.lock=new Hk,this.policy=new Uk(t.policy,t.botIdentity),this.manager=new Fk(T_e(t.config))}pushMessage(t){var o,i,e,a,A,r,s;return h(this,void 0,void 0,function*(){if(N_e(t.createTime,this.staleWindow)){(i=(o=this.logger).debug)===null||i===void 0||i.call(o,`safety: drop stale message ${t.messageId}`);return}if(yield this.seenCache.has(t.messageId)){(a=(e=this.logger).debug)===null||a===void 0||a.call(e,`safety: drop duplicate message ${t.messageId}`);return}let g=this.policy.evaluate(t);if(!g.allowed){this.onReject({messageId:t.messageId,chatId:t.chatId,senderId:t.senderId,reason:(A=g.reason)!==null&&A!==void 0?A:"group_not_allowed"});return}if(!this.lock.acquire(t.messageId)){(s=(r=this.logger).debug)===null||s===void 0||s.call(r,`safety: drop in-flight message ${t.messageId}`);return}let c=I=>h(this,void 0,void 0,function*(){var d,B;try{yield this.onMessage(I.message)}catch(f){(B=(d=this.logger).error)===null||B===void 0||B.call(d,"safety: message handler threw",f)}finally{for(let f of I.sourceIds){try{yield this.seenCache.add(f)}catch{}this.lock.release(f)}}});this.queueEnabled?this.manager.push(t.chatId,t,c):c({message:t,sourceIds:[t.messageId]})})}pushAction(t,o,i){var e,a,A,r;return h(this,void 0,void 0,function*(){if(yield this.seenCache.has(t)){(a=(e=this.logger).debug)===null||a===void 0||a.call(e,`safety: drop duplicate action ${t}`);return}if(!this.lock.acquire(t)){(r=(A=this.logger).debug)===null||r===void 0||r.call(A,`safety: drop in-flight action ${t}`);return}let s=()=>h(this,void 0,void 0,function*(){var g,c;try{yield i()}catch(I){(c=(g=this.logger).error)===null||c===void 0||c.call(g,"safety: action handler threw",I)}finally{try{yield this.seenCache.add(t)}catch{}this.lock.release(t)}});this.queueEnabled?yield this.manager.run(o,s):yield s()})}pushLight(t,o){var i,e;return h(this,void 0,void 0,function*(){if(!(yield this.seenCache.has(t))){yield this.seenCache.add(t);try{yield o()}catch(a){(e=(i=this.logger).warn)===null||e===void 0||e.call(i,"safety: light handler threw",a)}}})}updatePolicy(t){this.policy.updateConfig(t)}getPolicy(){return this.policy.getConfig()}setBotIdentity(t){this.policy.setBotIdentity(t)}dispose(){return h(this,void 0,void 0,function*(){yield this.manager.dispose(),this.seenCache.dispose(),this.lock.dispose()})}};function R_e(n){return n.key==="@_all"}function k_e(n,t){var o,i,e;let a=new Map,A=new Map,r=[],s=!1,g=!1;for(let c of n??[]){if(R_e(c)){s=!0,a.set(c.key,{key:c.key,name:c.name,isBot:!1});continue}let I=(i=(o=c.id)===null||o===void 0?void 0:o.open_id)!==null&&i!==void 0?i:"",d=(e=c.id)===null||e===void 0?void 0:e.user_id,B=!!(t&&I===t);B&&(g=!0);let f={key:c.key,openId:I||void 0,userId:d,name:c.name,isBot:B};a.set(c.key,f),I&&A.set(I,f),r.push(f)}return{mentions:a,mentionsByOpenId:A,mentionList:r,mentionAll:s,mentionedBot:g}}function v_e(n,t){if(!n||t.mentions.size===0)return n;let o=n;for(let[i,e]of t.mentions){if(e.isBot&&t.stripBotMentions){let A=new RegExp(`\\s?${P_e(i)}\\s?`,"g");o=o.replace(A," ");continue}let a=e.name?`@${e.name}`:i;o=o.split(i).join(a)}return o.replace(/[ \t]{2,}/g," ").trim()}function P_e(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nr(n){if(n)try{return JSON.parse(n)}catch{return}}function G_e(n,t){if(!t||t.length===0)return n;let o=n;return t.includes("bold")&&(o=`**${o}**`),t.includes("italic")&&(o=`*${o}*`),t.includes("underline")&&(o=`${o}`),(t.includes("lineThrough")||t.includes("strikethrough"))&&(o=`~~${o}~~`),(t.includes("codeInline")||t.includes("code"))&&(o=`\`${o}\``),o}var F_e=["zh_cn","en_us","ja_jp"];function L_e(n){if("title"in n||"content"in n)return n;for(let o of F_e){let i=n[o];if(i!=null&&typeof i=="object")return i}let t=Object.keys(n)[0];if(t){let o=n[t];if(o!=null&&typeof o=="object")return o}}function tV(n){if(!(n==null||!Number.isFinite(n)||n<0))return n<1e3?`${Math.round(n)}ms`:n%1e3===0?`${n/1e3}s`:`${(n/1e3).toFixed(1)}s`}function Am(n){if(n==null)return;let t=typeof n=="string"?parseInt(n,10):n;if(!Number.isFinite(t)||t<=0)return;let o=new Date(t+8*36e5),i=o.getUTCFullYear(),e=String(o.getUTCMonth()+1).padStart(2,"0"),a=String(o.getUTCDate()).padStart(2,"0"),A=String(o.getUTCHours()).padStart(2,"0"),r=String(o.getUTCMinutes()).padStart(2,"0");return`${i}-${e}-${a} ${A}:${r}`}function U_e(n){let t=new Date(n+288e5),o=t.getUTCFullYear(),i=String(t.getUTCMonth()+1).padStart(2,"0"),e=String(t.getUTCDate()).padStart(2,"0"),a=String(t.getUTCHours()).padStart(2,"0"),A=String(t.getUTCMinutes()).padStart(2,"0"),r=String(t.getUTCSeconds()).padStart(2,"0");return`${o}-${i}-${e}T${a}:${A}:${r}+08:00`}function H_e(n,t){return n.split(` `).map(o=>`${t}${o}`).join(` -`)}function NC(n){return n.replace(/"/g,""")}var s_e=(n,t)=>h(void 0,void 0,void 0,function*(){let o=Tr(n),i=o?.file_key;if(!i)return{content:"[audio]",resources:[]};let e=o?.duration,a=kz(e),A=a?` duration="${a}"`:"";return{content:`