From 7f1b9bd4808ca4300dea9dc1461da9afbeb02eb0 Mon Sep 17 00:00:00 2001 From: oliver Date: Sat, 5 Sep 2026 15:39:28 +0800 Subject: [PATCH] Add configurable group session scope (default user_in_chat). Ops bots now isolate per-speaker Harness sessions in groups, with a settings/RPC toggle to restore shared chat sessions when needed. Co-authored-by: Cursor --- FORK.md | 23 +- lib/client.js | 97 +++- lib/index.js | 524 +++++++++--------- package.json | 2 +- plugin-src/client/access-policy-settings.js | 62 ++- .../host/channels/dingtalk/production.mjs | 1 + plugin-src/host/channels/dingtalk/rpc.mjs | 11 + .../host/channels/feishu/production.mjs | 1 + plugin-src/host/channels/feishu/rpc.mjs | 11 + plugin-src/host/channels/qq/production.mjs | 1 + plugin-src/host/channels/qq/rpc.mjs | 11 + .../shared/group-session-scope-rpc.mjs | 17 + .../host/channels/shared/production.mjs | 1 + plugin-src/host/channels/shared/rpc.mjs | 9 + plugin-src/host/channels/slack/production.mjs | 1 + plugin-src/host/channels/slack/rpc.mjs | 10 + plugin-src/host/channels/wecom/production.mjs | 1 + plugin-src/host/channels/wecom/rpc.mjs | 11 + .../host/channels/weixin/production.mjs | 1 + plugin-src/host/channels/weixin/rpc.mjs | 11 + .../host/channels/whatsapp/production.mjs | 1 + plugin-src/host/channels/whatsapp/rpc.mjs | 13 + src/channels/discord/discord-runtime.mjs | 4 + src/channels/shared/bot-workspace-store.mjs | 97 +++- src/channels/shared/session-scope.mjs | 61 ++ src/channels/shared/text-harness-bridge.mjs | 25 +- src/channels/slack/slack-runtime.mjs | 4 + src/channels/telegram/telegram-runtime.mjs | 4 + src/channels/whatsapp/whatsapp-runtime.mjs | 4 + test/channels/shared/session-scope.test.mjs | 61 ++ 30 files changed, 798 insertions(+), 282 deletions(-) create mode 100644 plugin-src/host/channels/shared/group-session-scope-rpc.mjs create mode 100644 src/channels/shared/session-scope.mjs create mode 100644 test/channels/shared/session-scope.test.mjs diff --git a/FORK.md b/FORK.md index 954a35d..5a5854b 100644 --- a/FORK.md +++ b/FORK.md @@ -3,7 +3,7 @@ 本仓库是 [`@xmanrui/dsh-im@4.9.1`](https://github.com/xmanrui/dsh-im) 的 **完整 fork**(九渠道 + AI Office 均保留),用于 Netx / 运维场景下自控: - 访问控制(入站白名单 / 群策略) -- 会话策略(例如群聊拆个人 Session) +- 会话策略(群聊按发言人拆分 Session,可配置) - 通告 / 投递默认与文案 上游 remote 名为 `upstream`。不要与社区包 `@xmanrui/dsh-im` 同时装进同一 profile。 @@ -19,21 +19,26 @@ cd D:\project\chatgpt\dsh-im-ops npm install npm run build -dsh plugin --profile web add -w "D:\project\chatgpt\dsh-im-ops" +dsh plugin --profile web add -w "github:hansjone/dsh-im-ops" +# 或本地:dsh plugin --profile web add -w "D:\project\chatgpt\dsh-im-ops" # 重启 dsh web ``` -包名:`dsh-im-ops@4.9.1-ops.0`(cordis id:`dsh-im-ops`)。 +包名:`dsh-im-ops@4.9.1-ops.1`(cordis id:`dsh-im-ops`)。 扫码态一般仍在 `~/.dsh/integrations/…`;换包后若异常,在 IM 设置里重新关联设备。 -## 第一刀改动方向(尚未改业务逻辑) +## 已落地的运维改动 -1. WhatsApp / 通用 access mode:运维友好的默认与设置文案 -2. 群 Session key:对齐 oclaw `user_in_chat`(可配置) -3. 投递默认目标 / 与 netxops 协作说明 +1. **群 Session 策略**(对齐 oclaw `user_in_chat`) + - 默认:`user_in_chat` → 群会话 key 为 `group::user:` + - 可选:`chat` → 整群共享 `group:`(上游行为) + - 在「访问设置」页可改;RPC:`bot.group-session-scope.set` + - 当前对 **WhatsApp / Telegram / Slack / Discord**(TextHarness 路径)生效;其它渠道的同策略接线后续补齐 -业务改动前先 `npm run build` 冒烟扫码与私聊。 +2. **访问控制**仍由本 fork 持久化(`workspaces.json` 的 `accessPolicies`),设置 UI 与上游同构,运维可直接改白名单 / open 模式 + +3. **主动群通告**继续用既有 delivery(`botId + targetId`),与入站 Session 策略独立 ## 同步上游 @@ -41,3 +46,5 @@ dsh plugin --profile web add -w "D:\project\chatgpt\dsh-im-ops" git fetch upstream --tags git merge v4.9.x # 或 cherry-pick;冲突自行解决后再 build ``` + +改源码后务必 `npm run build` 并推送含 `lib/` 的提交,否则 GitHub 安装会加载过期 bundle。 diff --git a/lib/client.js b/lib/client.js index e4d49a3..f3fe6b0 100644 --- a/lib/client.js +++ b/lib/client.js @@ -571,7 +571,7 @@ var React23 = __toESM(require("react"), 1); // package.json var package_default = { name: "dsh-im-ops", - version: "4.9.1-ops.0", + version: "4.9.1-ops.1", description: "Ops fork of dsh-im (all channels kept). Based on @xmanrui/dsh-im@4.9.1 \u2014 access/session policies owned here.", keywords: [ "deepseek-harness", @@ -11797,7 +11797,29 @@ var React21 = __toESM(require("react"), 1); // plugin-src/client/access-policy-settings.js var React20 = __toESM(require("react"), 1); + +// src/channels/shared/session-scope.mjs +var GROUP_SESSION_SCOPES = Object.freeze(["chat", "user_in_chat"]); +var DEFAULT_GROUP_SESSION_SCOPE = "user_in_chat"; +function normalizeGroupSessionScope(value) { + const scope = String(value ?? "").trim().toLowerCase(); + if (scope === "chat" || scope === "shared" || scope === "shared_chat") return "chat"; + if (scope === "user_in_chat" || scope === "user" || scope === "per_user" || scope === "member") { + return "user_in_chat"; + } + return DEFAULT_GROUP_SESSION_SCOPE; +} +function validateGroupSessionScope(value) { + const scope = String(value ?? "").trim().toLowerCase(); + if (scope === "chat" || scope === "user_in_chat") return scope; + const error = new TypeError(`Invalid group session scope: ${String(value)}`); + error.code = "invalid-group-session-scope"; + throw error; +} + +// plugin-src/client/access-policy-settings.js var ACCESS_POLICY_ENDPOINT = "bot.access-policy.set"; +var GROUP_SESSION_SCOPE_ENDPOINT = "bot.group-session-scope.set"; var ACCESS_CHANNEL_DEFINITIONS = Object.freeze({ weixin: Object.freeze({ directUserLabel: "\u5FAE\u4FE1\u7528\u6237 ID", @@ -12092,15 +12114,18 @@ function AccessPolicySettingsPage({ channel: channel4, account, rpcCall, onSaved const definition = ACCESS_CHANNEL_DEFINITIONS[channel4]; const initialPolicy = normalizeAccessPolicy(account?.accessPolicy); const initialKey = JSON.stringify(initialPolicy); + const initialScope = normalizeGroupSessionScope(account?.groupSessionScope); const [draft, setDraft] = React20.useState(() => clonePolicy( initialPolicy ?? DEFAULT_ACCESS_POLICY )); + const [groupSessionScope, setGroupSessionScope] = React20.useState(initialScope); const [saving, setSaving] = React20.useState(false); const [feedback, setFeedback] = React20.useState(null); React20.useEffect(() => { const next = normalizeAccessPolicy(account?.accessPolicy); setDraft(clonePolicy(next ?? DEFAULT_ACCESS_POLICY)); - }, [account?.botId, initialKey]); + setGroupSessionScope(normalizeGroupSessionScope(account?.groupSessionScope)); + }, [account?.botId, initialKey, account?.groupSessionScope]); React20.useEffect(() => { setFeedback(null); }, [account?.botId]); @@ -12117,16 +12142,25 @@ function AccessPolicySettingsPage({ channel: channel4, account, rpcCall, onSaved setSaving(true); try { const policy = validateAccessPolicy(draft); + const scope = validateGroupSessionScope(groupSessionScope); if (typeof rpcCall !== "function") throw new Error("\u8BBF\u95EE\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002"); const value = unwrapRpcResult10(await rpcCall(ACCESS_POLICY_ENDPOINT, { botId: account.botId, policy })); + const scopeValue = unwrapRpcResult10(await rpcCall(GROUP_SESSION_SCOPE_ENDPOINT, { + botId: account.botId, + groupSessionScope: scope + })); const saved = policyFromSnapshot(value, account.botId); if (!saved) throw new Error("\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u5DF2\u4FDD\u5B58\u7684\u8BBF\u95EE\u7B56\u7565\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002"); + const savedScope = normalizeGroupSessionScope( + scopeValue?.snapshot?.bots?.find?.((bot) => bot?.botId === account.botId)?.groupSessionScope ?? scopeValue?.bots?.find?.((bot) => bot?.botId === account.botId)?.groupSessionScope ?? scope + ); setDraft(clonePolicy(saved)); - onSaved?.(saved); - setFeedback({ tone: "success", message: "\u8BBF\u95EE\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\u3002" }); + setGroupSessionScope(savedScope); + onSaved?.({ ...saved, groupSessionScope: savedScope }); + setFeedback({ tone: "success", message: "\u8BBF\u95EE\u4E0E\u7FA4\u4F1A\u8BDD\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\u3002" }); } catch (error) { setFeedback({ tone: "error", @@ -12172,6 +12206,59 @@ function AccessPolicySettingsPage({ channel: channel4, account, rpcCall, onSaved setFeedback(null); } }), + definition.groupSupported === false ? null : h2( + "fieldset", + { + className: "dim-accessScene", + disabled: saving, + "data-scene": "group-session", + "aria-label": localizeText("\u7FA4\u4F1A\u8BDD\u7B56\u7565") + }, + h2( + "legend", + null, + h2( + "span", + { className: "dim-accessLegendContent" }, + h2("span", null, "\u7FA4\u4F1A\u8BDD\u7B56\u7565"), + h2( + "span", + { className: "dim-channelHelp dim-accessLegendHelp" }, + h2("button", { + type: "button", + className: "dim-channelHelpButton", + "aria-label": localizeText("\u67E5\u770B\u7FA4\u4F1A\u8BDD\u7B56\u7565\u8BF4\u660E") + }, h2("span", { "aria-hidden": true }, "?")), + h2("span", { + className: "dim-channelTooltip dim-accessHelpTooltip", + role: "tooltip" + }, "\u8FD0\u7EF4\u9ED8\u8BA4\u6309\u53D1\u8A00\u4EBA\u62C6\u5206 Session\uFF0C\u907F\u514D\u540C\u7FA4\u591A\u4EBA\u4E92\u76F8\u6253\u65AD\uFF1B\u53EF\u9009\u6539\u56DE\u6574\u7FA4\u5171\u4EAB Session\u3002") + ) + ) + ), + h2( + "div", + { className: "dim-accessControls" }, + h2( + "label", + { className: "dim-accessField" }, + h2("span", null, "\u7FA4\u5185 Session \u7ED1\u5B9A"), + h2( + "select", + { + value: groupSessionScope || DEFAULT_GROUP_SESSION_SCOPE, + "aria-label": localizeText("\u7FA4\u5185 Session \u7ED1\u5B9A"), + onChange: (event) => { + setGroupSessionScope(event.target.value); + setFeedback(null); + } + }, + h2("option", { value: "user_in_chat" }, "\u6309\u53D1\u8A00\u4EBA\u62C6\u5206\uFF08\u63A8\u8350\uFF09"), + h2("option", { value: "chat" }, "\u6574\u7FA4\u5171\u4EAB\u4E00\u4E2A Session") + ) + ) + ) + ), feedback ? h2("p", { className: "dim-accessFeedback", "data-tone": feedback.tone, @@ -12186,7 +12273,7 @@ function AccessPolicySettingsPage({ channel: channel4, account, rpcCall, onSaved className: "dim-deliveryButton", "data-kind": "primary", disabled: saving || !initialPolicy - }, saving ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u4FDD\u5B58\u8BBF\u95EE\u8BBE\u7F6E") + }, saving ? "\u6B63\u5728\u4FDD\u5B58\u2026" : "\u4FDD\u5B58\u8BBF\u95EE\u4E0E\u4F1A\u8BDD\u8BBE\u7F6E") ) ); } diff --git a/lib/index.js b/lib/index.js index 31e98ad..03c953f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,28 +4,28 @@ import { fileURLToPath as __dshFileURLToPath } from 'node:url'; const require = __dshCreateRequire(import.meta.url); const __filename = __dshFileURLToPath(import.meta.url); const __dirname = __dshDirname(__filename); -var tde=Object.create;var o_=Object.defineProperty;var rde=Object.getOwnPropertyDescriptor;var ade=Object.getOwnPropertyNames;var ide=Object.getPrototypeOf,ode=Object.prototype.hasOwnProperty;var $e=(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 ee=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Lr=(n,t)=>{for(var o in t)o_(n,o,{get:t[o],enumerable:!0})},nde=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of ade(t))!ode.call(n,e)&&e!==o&&o_(n,e,{get:()=>t[e],enumerable:!(i=rde(t,e))||i.enumerable});return n};var ze=(n,t,o)=>(o=n!=null?tde(ide(n)):{},nde(t||!n||!n.__esModule?o_(o,"default",{value:n,enumerable:!0}):o,n));var yj=ee((PoA,Qj)=>{var fj=$e("stream").Stream,Uye=$e("util");Qj.exports=Dn;function Dn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}Uye.inherits(Dn,fj);Dn.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(Dn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Dn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Dn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Dn.prototype.pause=function(){this.source.pause()};Dn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};Dn.prototype.pipe=function(){var n=fj.prototype.pipe.apply(this,arguments);return this.resume(),n};Dn.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)};Dn.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 Dj=ee((GoA,wj)=>{var Hye=$e("util"),Sj=$e("stream").Stream,mj=yj();wj.exports=mr;function mr(){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}Hye.inherits(mr,Sj);mr.create=function(n){var t=new this;n=n||{};for(var o in n)t[o]=n[o];return t};mr.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};mr.prototype.append=function(n){var t=mr.isStreamLike(n);if(t){if(!(n instanceof mj)){var o=mj.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};mr.prototype.pipe=function(n,t){return Sj.prototype.pipe.call(this,n,t),this.resume(),n};mr.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}};mr.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=mr.isStreamLike(o);i&&(o.on("data",this._checkDataSize.bind(this)),this._handleErrors(o)),this._pipeNext(o)}.bind(this))};mr.prototype._pipeNext=function(n){this._currentStream=n;var t=mr.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()};mr.prototype._handleErrors=function(n){var t=this;n.on("error",function(o){t._emitError(o)})};mr.prototype.write=function(n){this.emit("data",n)};mr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};mr.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")};mr.prototype.end=function(){this._reset(),this.emit("end")};mr.prototype.destroy=function(){this._reset(),this.emit("close")};mr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};mr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};mr.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)};mr.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var Oj=ee((FoA,Kye)=>{Kye.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 Mj=ee((LoA,bj)=>{bj.exports=Oj()});var Nj=ee(Ui=>{"use strict";var Ty=Mj(),xye=$e("path").extname,_j=/^\s*([^;\s]*)(?:;|\s|$)/,Yye=/^text\//i;Ui.charset=Tj;Ui.charsets={lookup:Tj};Ui.contentType=jye;Ui.extension=Jye;Ui.extensions=Object.create(null);Ui.lookup=qye;Ui.types=Object.create(null);zye(Ui.extensions,Ui.types);function Tj(n){if(!n||typeof n!="string")return!1;var t=_j.exec(n),o=t&&Ty[t[1].toLowerCase()];return o&&o.charset?o.charset:t&&Yye.test(t[1])?"UTF-8":!1}function jye(n){if(!n||typeof n!="string")return!1;var t=n.indexOf("/")===-1?Ui.lookup(n):n;if(!t)return!1;if(t.indexOf("charset")===-1){var o=Ui.charset(t);o&&(t+="; charset="+o.toLowerCase())}return t}function Jye(n){if(!n||typeof n!="string")return!1;var t=_j.exec(n),o=t&&Ui.extensions[t[1].toLowerCase()];return!o||!o.length?!1:o[0]}function qye(n){if(!n||typeof n!="string")return!1;var t=xye("x."+n).toLowerCase().substr(1);return t&&Ui.types[t]||!1}function zye(n,t){var o=["nginx","apache",void 0,"iana"];Object.keys(Ty).forEach(function(e){var a=Ty[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 kj=ee((HoA,Rj)=>{Rj.exports=Vye;function Vye(n){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(n):setTimeout(n,0)}});var jT=ee((KoA,Pj)=>{var vj=kj();Pj.exports=Wye;function Wye(n){var t=!1;return vj(function(){t=!0}),function(i,e){t?n(i,e):vj(function(){n(i,e)})}}});var JT=ee((xoA,Gj)=>{Gj.exports=Zye;function Zye(n){Object.keys(n.jobs).forEach(Xye.bind(n)),n.jobs={}}function Xye(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var qT=ee((YoA,Lj)=>{var Fj=jT(),$ye=JT();Lj.exports=eme;function eme(n,t,o,i){var e=o.keyedList?o.keyedList[o.index]:o.index;o.jobs[e]=Ame(t,e,n[e],function(a,A){e in o.jobs&&(delete o.jobs[e],a?$ye(o):o.results[e]=A,i(a,o.results))})}function Ame(n,t,o,i){var e;return n.length==2?e=n(o,Fj(i)):e=n(o,t,Fj(i)),e}});var zT=ee((joA,Uj)=>{Uj.exports=tme;function tme(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 VT=ee((JoA,Hj)=>{var rme=JT(),ame=jT();Hj.exports=ime;function ime(n){Object.keys(this.jobs).length&&(this.index=this.size,rme(this),ame(n)(null,this.results))}});var xj=ee((qoA,Kj)=>{var ome=qT(),nme=zT(),sme=VT();Kj.exports=gme;function gme(n,t,o){for(var i=nme(n);i.index<(i.keyedList||n).length;)ome(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 sme.bind(i,o)}});var WT=ee((zoA,Ny)=>{var Yj=qT(),cme=zT(),Ime=VT();Ny.exports=lme;Ny.exports.ascending=jj;Ny.exports.descending=dme;function lme(n,t,o,i){var e=cme(n,o);return Yj(n,t,e,function a(A,r){if(A){i(A,r);return}if(e.index++,e.index<(e.keyedList||n).length){Yj(n,t,e,a);return}i(null,e.results)}),Ime.bind(e,i)}function jj(n,t){return nt?1:0}function dme(n,t){return-1*jj(n,t)}});var qj=ee((VoA,Jj)=>{var pme=WT();Jj.exports=hme;function hme(n,t,o){return pme(n,t,null,o)}});var Vj=ee((WoA,zj)=>{zj.exports={parallel:xj(),serial:qj(),serialOrdered:WT()}});var ZT=ee((ZoA,Wj)=>{"use strict";Wj.exports=Object});var Xj=ee((XoA,Zj)=>{"use strict";Zj.exports=Error});var eJ=ee(($oA,$j)=>{"use strict";$j.exports=EvalError});var tJ=ee((enA,AJ)=>{"use strict";AJ.exports=RangeError});var aJ=ee((AnA,rJ)=>{"use strict";rJ.exports=ReferenceError});var oJ=ee((tnA,iJ)=>{"use strict";iJ.exports=SyntaxError});var Qc=ee((rnA,nJ)=>{"use strict";nJ.exports=TypeError});var gJ=ee((anA,sJ)=>{"use strict";sJ.exports=URIError});var IJ=ee((inA,cJ)=>{"use strict";cJ.exports=Math.abs});var dJ=ee((onA,lJ)=>{"use strict";lJ.exports=Math.floor});var hJ=ee((nnA,pJ)=>{"use strict";pJ.exports=Math.max});var uJ=ee((snA,EJ)=>{"use strict";EJ.exports=Math.min});var BJ=ee((gnA,CJ)=>{"use strict";CJ.exports=Math.pow});var QJ=ee((cnA,fJ)=>{"use strict";fJ.exports=Math.round});var mJ=ee((InA,yJ)=>{"use strict";yJ.exports=Number.isNaN||function(t){return t!==t}});var wJ=ee((lnA,SJ)=>{"use strict";var Eme=mJ();SJ.exports=function(t){return Eme(t)||t===0?t:t<0?-1:1}});var OJ=ee((dnA,DJ)=>{"use strict";DJ.exports=Object.getOwnPropertyDescriptor});var XT=ee((pnA,bJ)=>{"use strict";var Ry=OJ();if(Ry)try{Ry([],"length")}catch{Ry=null}bJ.exports=Ry});var $T=ee((hnA,MJ)=>{"use strict";var ky=Object.defineProperty||!1;if(ky)try{ky({},"a",{value:1})}catch{ky=!1}MJ.exports=ky});var e0=ee((EnA,_J)=>{"use strict";_J.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 RJ=ee((unA,NJ)=>{"use strict";var TJ=typeof Symbol<"u"&&Symbol,ume=e0();NJ.exports=function(){return typeof TJ!="function"||typeof Symbol!="function"||typeof TJ("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ume()}});var A0=ee((CnA,kJ)=>{"use strict";kJ.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var t0=ee((BnA,vJ)=>{"use strict";var Cme=ZT();vJ.exports=Cme.getPrototypeOf||null});var FJ=ee((fnA,GJ)=>{"use strict";var Bme="Function.prototype.bind called on incompatible ",fme=Object.prototype.toString,Qme=Math.max,yme="[object Function]",PJ=function(t,o){for(var i=[],e=0;e{"use strict";var wme=FJ();LJ.exports=Function.prototype.bind||wme});var vy=ee((ynA,UJ)=>{"use strict";UJ.exports=Function.prototype.call});var r0=ee((mnA,HJ)=>{"use strict";HJ.exports=Function.prototype.apply});var xJ=ee((SnA,KJ)=>{"use strict";KJ.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var jJ=ee((wnA,YJ)=>{"use strict";var Dme=wu(),Ome=r0(),bme=vy(),Mme=xJ();YJ.exports=Mme||Dme.call(bme,Ome)});var a0=ee((DnA,JJ)=>{"use strict";var _me=wu(),Tme=Qc(),Nme=vy(),Rme=jJ();JJ.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new Tme("a function is required");return Rme(_me,Nme,t)}});var XJ=ee((OnA,ZJ)=>{"use strict";var kme=a0(),qJ=XT(),VJ;try{VJ=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var i0=!!VJ&&qJ&&qJ(Object.prototype,"__proto__"),WJ=Object,zJ=WJ.getPrototypeOf;ZJ.exports=i0&&typeof i0.get=="function"?kme([i0.get]):typeof zJ=="function"?function(t){return zJ(t==null?t:WJ(t))}:!1});var rq=ee((bnA,tq)=>{"use strict";var $J=A0(),eq=t0(),Aq=XJ();tq.exports=$J?function(t){return $J(t)}:eq?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return eq(t)}:Aq?function(t){return Aq(t)}:null});var Py=ee((MnA,aq)=>{"use strict";var vme=Function.prototype.call,Pme=Object.prototype.hasOwnProperty,Gme=wu();aq.exports=Gme.call(vme,Pme)});var Mu=ee((_nA,cq)=>{"use strict";var nt,Fme=ZT(),Lme=Xj(),Ume=eJ(),Hme=tJ(),Kme=aJ(),hp=oJ(),pp=Qc(),xme=gJ(),Yme=IJ(),jme=dJ(),Jme=hJ(),qme=uJ(),zme=BJ(),Vme=QJ(),Wme=wJ(),sq=Function,o0=function(n){try{return sq('"use strict"; return ('+n+").constructor;")()}catch{}},Du=XT(),Zme=$T(),n0=function(){throw new pp},Xme=Du?(function(){try{return arguments.callee,n0}catch{try{return Du(arguments,"callee").get}catch{return n0}}})():n0,lp=RJ()(),ga=rq(),$me=t0(),eSe=A0(),gq=r0(),Ou=vy(),dp={},ASe=typeof Uint8Array>"u"||!ga?nt:ga(Uint8Array),XI={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?nt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nt:ArrayBuffer,"%ArrayIteratorPrototype%":lp&&ga?ga([][Symbol.iterator]()):nt,"%AsyncFromSyncIteratorPrototype%":nt,"%AsyncFunction%":dp,"%AsyncGenerator%":dp,"%AsyncGeneratorFunction%":dp,"%AsyncIteratorPrototype%":dp,"%Atomics%":typeof Atomics>"u"?nt:Atomics,"%BigInt%":typeof BigInt>"u"?nt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?nt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?nt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?nt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Lme,"%eval%":eval,"%EvalError%":Ume,"%Float16Array%":typeof Float16Array>"u"?nt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?nt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?nt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?nt:FinalizationRegistry,"%Function%":sq,"%GeneratorFunction%":dp,"%Int8Array%":typeof Int8Array>"u"?nt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lp&&ga?ga(ga([][Symbol.iterator]())):nt,"%JSON%":typeof JSON=="object"?JSON:nt,"%Map%":typeof Map>"u"?nt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!lp||!ga?nt:ga(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Fme,"%Object.getOwnPropertyDescriptor%":Du,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?nt:Promise,"%Proxy%":typeof Proxy>"u"?nt:Proxy,"%RangeError%":Hme,"%ReferenceError%":Kme,"%Reflect%":typeof Reflect>"u"?nt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?nt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!lp||!ga?nt:ga(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lp&&ga?ga(""[Symbol.iterator]()):nt,"%Symbol%":lp?Symbol:nt,"%SyntaxError%":hp,"%ThrowTypeError%":Xme,"%TypedArray%":ASe,"%TypeError%":pp,"%Uint8Array%":typeof Uint8Array>"u"?nt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?nt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?nt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?nt:Uint32Array,"%URIError%":xme,"%WeakMap%":typeof WeakMap>"u"?nt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?nt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?nt:WeakSet,"%Function.prototype.call%":Ou,"%Function.prototype.apply%":gq,"%Object.defineProperty%":Zme,"%Object.getPrototypeOf%":$me,"%Math.abs%":Yme,"%Math.floor%":jme,"%Math.max%":Jme,"%Math.min%":qme,"%Math.pow%":zme,"%Math.round%":Vme,"%Math.sign%":Wme,"%Reflect.getPrototypeOf%":eSe};if(ga)try{null.error}catch(n){iq=ga(ga(n)),XI["%Error.prototype%"]=iq}var iq,tSe=function n(t){var o;if(t==="%AsyncFunction%")o=o0("async function () {}");else if(t==="%GeneratorFunction%")o=o0("function* () {}");else if(t==="%AsyncGeneratorFunction%")o=o0("async function* () {}");else if(t==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(o=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var e=n("%AsyncGenerator%");e&&ga&&(o=ga(e.prototype))}return XI[t]=o,o},oq={__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"]},bu=wu(),Gy=Py(),rSe=bu.call(Ou,Array.prototype.concat),aSe=bu.call(gq,Array.prototype.splice),nq=bu.call(Ou,String.prototype.replace),Fy=bu.call(Ou,String.prototype.slice),iSe=bu.call(Ou,RegExp.prototype.exec),oSe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,nSe=/\\(\\)?/g,sSe=function(t){var o=Fy(t,0,1),i=Fy(t,-1);if(o==="%"&&i!=="%")throw new hp("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&o!=="%")throw new hp("invalid intrinsic syntax, expected opening `%`");var e=[];return nq(t,oSe,function(a,A,r,s){e[e.length]=r?nq(s,nSe,"$1"):A||a}),e},gSe=function(t,o){var i=t,e;if(Gy(oq,i)&&(e=oq[i],i="%"+e[0]+"%"),Gy(XI,i)){var a=XI[i];if(a===dp&&(a=tSe(i)),typeof a>"u"&&!o)throw new pp("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:e,name:i,value:a}}throw new hp("intrinsic "+t+" does not exist!")};cq.exports=function(t,o){if(typeof t!="string"||t.length===0)throw new pp("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new pp('"allowMissing" argument must be a boolean');if(iSe(/^%?[^%]*%?$/,t)===null)throw new hp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=sSe(t),e=i.length>0?i[0]:"",a=gSe("%"+e+"%",o),A=a.name,r=a.value,s=!1,g=a.alias;g&&(e=g[0],aSe(i,rSe([0,1],g)));for(var c=1,I=!0;c=i.length){var Q=Du(r,d);I=!!Q,I&&"get"in Q&&!("originalValue"in Q.get)?r=Q.get:r=r[d]}else I=Gy(r,d),r=r[d];I&&!s&&(XI[A]=r)}}return r}});var lq=ee((TnA,Iq)=>{"use strict";var cSe=e0();Iq.exports=function(){return cSe()&&!!Symbol.toStringTag}});var hq=ee((NnA,pq)=>{"use strict";var ISe=Mu(),dq=ISe("%Object.defineProperty%",!0),lSe=lq()(),dSe=Py(),pSe=Qc(),Ly=lSe?Symbol.toStringTag:null;pq.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 pSe("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Ly&&(i||!dSe(t,Ly))&&(dq?dq(t,Ly,{configurable:!e,enumerable:!1,value:o,writable:!1}):t[Ly]=o)}});var uq=ee((RnA,Eq)=>{"use strict";Eq.exports=function(n,t){return Object.keys(t).forEach(function(o){n[o]=n[o]||t[o]}),n}});var fq=ee((knA,Bq)=>{"use strict";var I0=Dj(),hSe=$e("util"),s0=$e("path"),ESe=$e("http"),uSe=$e("https"),CSe=$e("url").parse,BSe=$e("fs"),fSe=$e("stream").Stream,QSe=$e("crypto"),g0=Nj(),ySe=Vj(),mSe=hq(),yc=Py(),c0=uq();function Cq(n){return String(n).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Bt(n){if(!(this instanceof Bt))return new Bt(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],I0.call(this),n=n||{};for(var t in n)this[t]=n[t]}hSe.inherits(Bt,I0);Bt.LINE_BREAK=`\r -`;Bt.DEFAULT_CONTENT_TYPE="application/octet-stream";Bt.prototype.append=function(n,t,o){o=o||{},typeof o=="string"&&(o={filename:o});var i=I0.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)};Bt.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)+Bt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&yc(t,"httpVersion"))&&!(t instanceof fSe))&&(o.knownLength||this._valuesToMeasure.push(t))};Bt.prototype._lengthRetriever=function(n,t){yc(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?t(null,n.end+1-(n.start?n.start:0)):BSe.stat(n.path,function(o,i){if(o){t(o);return}var e=i.size-(n.start?n.start:0);t(null,e)}):yc(n,"httpVersion")?t(null,Number(n.headers["content-length"])):yc(n,"httpModule")?(n.on("response",function(o){n.pause(),t(null,Number(o.headers["content-length"]))}),n.resume()):t("Unknown stream")};Bt.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="'+Cq(n)+'"'].concat(i||[]),"Content-Type":[].concat(e||[])};typeof o.header=="object"&&c0(A,o.header);var r;for(var s in A)if(yc(A,s)){if(r=A[s],r==null)continue;Array.isArray(r)||(r=[r]),r.length&&(a+=s+": "+r.join("; ")+Bt.LINE_BREAK)}return"--"+this.getBoundary()+Bt.LINE_BREAK+a+Bt.LINE_BREAK};Bt.prototype._getContentDisposition=function(n,t){var o;if(typeof t.filepath=="string"?o=s0.normalize(t.filepath).replace(/\\/g,"/"):t.filename||n&&(n.name||n.path)?o=s0.basename(t.filename||n&&(n.name||n.path)):n&&n.readable&&yc(n,"httpVersion")&&(o=s0.basename(n.client._httpMessage.path||"")),o)return'filename="'+Cq(o)+'"'};Bt.prototype._getContentType=function(n,t){var o=t.contentType;return!o&&n&&n.name&&(o=g0.lookup(n.name)),!o&&n&&n.path&&(o=g0.lookup(n.path)),!o&&n&&n.readable&&yc(n,"httpVersion")&&(o=n.headers["content-type"]),!o&&(t.filepath||t.filename)&&(o=g0.lookup(t.filepath||t.filename)),!o&&n&&typeof n=="object"&&(o=Bt.DEFAULT_CONTENT_TYPE),o};Bt.prototype._multiPartFooter=function(){return function(n){var t=Bt.LINE_BREAK,o=this._streams.length===0;o&&(t+=this._lastBoundary()),n(t)}.bind(this)};Bt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Bt.LINE_BREAK};Bt.prototype.getHeaders=function(n){var t,o={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in n)yc(n,t)&&(o[t.toLowerCase()]=n[t]);return o};Bt.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};Bt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Bt.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),t=this.getBoundary(),o=0,i=this._streams.length;o{var Cp=1e3,Bp=Cp*60,fp=Bp*60,Al=fp*24,qSe=Al*7,zSe=Al*365.25;vq.exports=function(n,t){t=t||{};var o=typeof n;if(o==="string"&&n.length>0)return VSe(n);if(o==="number"&&isFinite(n))return t.long?ZSe(n):WSe(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function VSe(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*zSe;case"weeks":case"week":case"w":return o*qSe;case"days":case"day":case"d":return o*Al;case"hours":case"hour":case"hrs":case"hr":case"h":return o*fp;case"minutes":case"minute":case"mins":case"min":case"m":return o*Bp;case"seconds":case"second":case"secs":case"sec":case"s":return o*Cp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function WSe(n){var t=Math.abs(n);return t>=Al?Math.round(n/Al)+"d":t>=fp?Math.round(n/fp)+"h":t>=Bp?Math.round(n/Bp)+"m":t>=Cp?Math.round(n/Cp)+"s":n+"ms"}function ZSe(n){var t=Math.abs(n);return t>=Al?xy(n,t,Al,"day"):t>=fp?xy(n,t,fp,"hour"):t>=Bp?xy(n,t,Bp,"minute"):t>=Cp?xy(n,t,Cp,"second"):n+" ms"}function xy(n,t,o,i){var e=t>=o*1.5;return Math.round(n/o)+" "+i+(e?"s":"")}});var O0=ee((GsA,Gq)=>{function XSe(n){o.debug=o,o.default=o,o.coerce=s,o.disable=A,o.enable=e,o.enabled=r,o.humanize=Pq(),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(F==="%%")return"%";R++;let q=o.formatters[L];if(typeof q=="function"){let z=y[R];F=q.call(m,z),y.splice(R,1),R--}return F}),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}Gq.exports=XSe});var Fq=ee((Hi,Yy)=>{Hi.formatArgs=ewe;Hi.save=Awe;Hi.load=twe;Hi.useColors=$Se;Hi.storage=rwe();Hi.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`."))}})();Hi.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 $Se(){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 ewe(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+Yy.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)}Hi.log=console.debug||console.log||(()=>{});function Awe(n){try{n?Hi.storage.setItem("debug",n):Hi.storage.removeItem("debug")}catch{}}function twe(){let n;try{n=Hi.storage.getItem("debug")||Hi.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function rwe(){try{return localStorage}catch{}}Yy.exports=O0()(Hi);var{formatters:awe}=Yy.exports;awe.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Uq=ee((ca,Jy)=>{var iwe=$e("tty"),jy=$e("util");ca.init=lwe;ca.log=gwe;ca.formatArgs=nwe;ca.save=cwe;ca.load=Iwe;ca.useColors=owe;ca.destroy=jy.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ca.colors=[6,2,3,4,5,1];try{let n=$e("supports-color");n&&(n.stderr||n).level>=2&&(ca.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{}ca.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 owe(){return"colors"in ca.inspectOpts?!!ca.inspectOpts.colors:iwe.isatty(process.stderr.fd)}function nwe(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 spe=Object.create;var I_=Object.defineProperty;var gpe=Object.getOwnPropertyDescriptor;var cpe=Object.getOwnPropertyNames;var Ipe=Object.getPrototypeOf,lpe=Object.prototype.hasOwnProperty;var $e=(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 ee=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Lr=(n,t)=>{for(var o in t)I_(n,o,{get:t[o],enumerable:!0})},ppe=(n,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of cpe(t))!lpe.call(n,e)&&e!==o&&I_(n,e,{get:()=>t[e],enumerable:!(a=gpe(t,e))||a.enumerable});return n};var ze=(n,t,o)=>(o=n!=null?spe(Ipe(n)):{},ppe(t||!n||!n.__esModule?I_(o,"default",{value:n,enumerable:!0}):o,n));var bj=ee((WoA,Oj)=>{var Dj=$e("stream").Stream,Jye=$e("util");Oj.exports=Mn;function Mn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}Jye.inherits(Mn,Dj);Mn.create=function(n,t){var o=new this;t=t||{};for(var a in t)o[a]=t[a];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(Mn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Mn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Mn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Mn.prototype.pause=function(){this.source.pause()};Mn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(n){this.emit.apply(this,n)}.bind(this)),this._bufferedEvents=[]};Mn.prototype.pipe=function(){var n=Dj.prototype.pipe.apply(this,arguments);return this.resume(),n};Mn.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)};Mn.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 Nj=ee((ZoA,Tj)=>{var qye=$e("util"),_j=$e("stream").Stream,Mj=bj();Tj.exports=wr;function wr(){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}qye.inherits(wr,_j);wr.create=function(n){var t=new this;n=n||{};for(var o in n)t[o]=n[o];return t};wr.isStreamLike=function(n){return typeof n!="function"&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&!Buffer.isBuffer(n)};wr.prototype.append=function(n){var t=wr.isStreamLike(n);if(t){if(!(n instanceof Mj)){var o=Mj.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};wr.prototype.pipe=function(n,t){return _j.prototype.pipe.call(this,n,t),this.resume(),n};wr.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}};wr.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 a=wr.isStreamLike(o);a&&(o.on("data",this._checkDataSize.bind(this)),this._handleErrors(o)),this._pipeNext(o)}.bind(this))};wr.prototype._pipeNext=function(n){this._currentStream=n;var t=wr.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()};wr.prototype._handleErrors=function(n){var t=this;n.on("error",function(o){t._emitError(o)})};wr.prototype.write=function(n){this.emit("data",n)};wr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};wr.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")};wr.prototype.end=function(){this._reset(),this.emit("end")};wr.prototype.destroy=function(){this._reset(),this.emit("close")};wr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};wr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var n="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(n))}};wr.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)};wr.prototype._emitError=function(n){this._reset(),this.emit("error",n)}});var Rj=ee((XoA,zye)=>{zye.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 vj=ee(($oA,kj)=>{kj.exports=Rj()});var Fj=ee(Ka=>{"use strict";var Py=vj(),Vye=$e("path").extname,Pj=/^\s*([^;\s]*)(?:;|\s|$)/,Wye=/^text\//i;Ka.charset=Gj;Ka.charsets={lookup:Gj};Ka.contentType=Zye;Ka.extension=Xye;Ka.extensions=Object.create(null);Ka.lookup=$ye;Ka.types=Object.create(null);eme(Ka.extensions,Ka.types);function Gj(n){if(!n||typeof n!="string")return!1;var t=Pj.exec(n),o=t&&Py[t[1].toLowerCase()];return o&&o.charset?o.charset:t&&Wye.test(t[1])?"UTF-8":!1}function Zye(n){if(!n||typeof n!="string")return!1;var t=n.indexOf("/")===-1?Ka.lookup(n):n;if(!t)return!1;if(t.indexOf("charset")===-1){var o=Ka.charset(t);o&&(t+="; charset="+o.toLowerCase())}return t}function Xye(n){if(!n||typeof n!="string")return!1;var t=Pj.exec(n),o=t&&Ka.extensions[t[1].toLowerCase()];return!o||!o.length?!1:o[0]}function $ye(n){if(!n||typeof n!="string")return!1;var t=Vye("x."+n).toLowerCase().substr(1);return t&&Ka.types[t]||!1}function eme(n,t){var o=["nginx","apache",void 0,"iana"];Object.keys(Py).forEach(function(e){var i=Py[e],A=i.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 Uj=ee((AnA,Lj)=>{Lj.exports=Ame;function Ame(n){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(n):setTimeout(n,0)}});var WT=ee((tnA,Kj)=>{var Hj=Uj();Kj.exports=tme;function tme(n){var t=!1;return Hj(function(){t=!0}),function(a,e){t?n(a,e):Hj(function(){n(a,e)})}}});var ZT=ee((rnA,xj)=>{xj.exports=rme;function rme(n){Object.keys(n.jobs).forEach(ime.bind(n)),n.jobs={}}function ime(n){typeof this.jobs[n]=="function"&&this.jobs[n]()}});var XT=ee((inA,jj)=>{var Yj=WT(),ame=ZT();jj.exports=ome;function ome(n,t,o,a){var e=o.keyedList?o.keyedList[o.index]:o.index;o.jobs[e]=nme(t,e,n[e],function(i,A){e in o.jobs&&(delete o.jobs[e],i?ame(o):o.results[e]=A,a(i,o.results))})}function nme(n,t,o,a){var e;return n.length==2?e=n(o,Yj(a)):e=n(o,t,Yj(a)),e}});var $T=ee((anA,Jj)=>{Jj.exports=sme;function sme(n,t){var o=!Array.isArray(n),a={index:0,keyedList:o||t?Object.keys(n):null,jobs:{},results:o?{}:[],size:o?Object.keys(n).length:n.length};return t&&a.keyedList.sort(o?t:function(e,i){return t(n[e],n[i])}),a}});var e0=ee((onA,qj)=>{var gme=ZT(),cme=WT();qj.exports=Ime;function Ime(n){Object.keys(this.jobs).length&&(this.index=this.size,gme(this),cme(n)(null,this.results))}});var Vj=ee((nnA,zj)=>{var lme=XT(),pme=$T(),dme=e0();zj.exports=hme;function hme(n,t,o){for(var a=pme(n);a.index<(a.keyedList||n).length;)lme(n,t,a,function(e,i){if(e){o(e,i);return}if(Object.keys(a.jobs).length===0){o(null,a.results);return}}),a.index++;return dme.bind(a,o)}});var A0=ee((snA,Gy)=>{var Wj=XT(),Eme=$T(),ume=e0();Gy.exports=Cme;Gy.exports.ascending=Zj;Gy.exports.descending=Bme;function Cme(n,t,o,a){var e=Eme(n,o);return Wj(n,t,e,function i(A,r){if(A){a(A,r);return}if(e.index++,e.index<(e.keyedList||n).length){Wj(n,t,e,i);return}a(null,e.results)}),ume.bind(e,a)}function Zj(n,t){return nt?1:0}function Bme(n,t){return-1*Zj(n,t)}});var $j=ee((gnA,Xj)=>{var fme=A0();Xj.exports=Qme;function Qme(n,t,o){return fme(n,t,null,o)}});var AJ=ee((cnA,eJ)=>{eJ.exports={parallel:Vj(),serial:$j(),serialOrdered:A0()}});var t0=ee((InA,tJ)=>{"use strict";tJ.exports=Object});var iJ=ee((lnA,rJ)=>{"use strict";rJ.exports=Error});var oJ=ee((pnA,aJ)=>{"use strict";aJ.exports=EvalError});var sJ=ee((dnA,nJ)=>{"use strict";nJ.exports=RangeError});var cJ=ee((hnA,gJ)=>{"use strict";gJ.exports=ReferenceError});var lJ=ee((EnA,IJ)=>{"use strict";IJ.exports=SyntaxError});var wc=ee((unA,pJ)=>{"use strict";pJ.exports=TypeError});var hJ=ee((CnA,dJ)=>{"use strict";dJ.exports=URIError});var uJ=ee((BnA,EJ)=>{"use strict";EJ.exports=Math.abs});var BJ=ee((fnA,CJ)=>{"use strict";CJ.exports=Math.floor});var QJ=ee((QnA,fJ)=>{"use strict";fJ.exports=Math.max});var mJ=ee((ynA,yJ)=>{"use strict";yJ.exports=Math.min});var wJ=ee((mnA,SJ)=>{"use strict";SJ.exports=Math.pow});var OJ=ee((SnA,DJ)=>{"use strict";DJ.exports=Math.round});var MJ=ee((wnA,bJ)=>{"use strict";bJ.exports=Number.isNaN||function(t){return t!==t}});var TJ=ee((DnA,_J)=>{"use strict";var yme=MJ();_J.exports=function(t){return yme(t)||t===0?t:t<0?-1:1}});var RJ=ee((OnA,NJ)=>{"use strict";NJ.exports=Object.getOwnPropertyDescriptor});var r0=ee((bnA,kJ)=>{"use strict";var Fy=RJ();if(Fy)try{Fy([],"length")}catch{Fy=null}kJ.exports=Fy});var i0=ee((MnA,vJ)=>{"use strict";var Ly=Object.defineProperty||!1;if(Ly)try{Ly({},"a",{value:1})}catch{Ly=!1}vJ.exports=Ly});var a0=ee((_nA,PJ)=>{"use strict";PJ.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},o=Symbol("test"),a=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var e=42;t[o]=e;for(var i 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 LJ=ee((TnA,FJ)=>{"use strict";var GJ=typeof Symbol<"u"&&Symbol,mme=a0();FJ.exports=function(){return typeof GJ!="function"||typeof Symbol!="function"||typeof GJ("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:mme()}});var o0=ee((NnA,UJ)=>{"use strict";UJ.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var n0=ee((RnA,HJ)=>{"use strict";var Sme=t0();HJ.exports=Sme.getPrototypeOf||null});var YJ=ee((knA,xJ)=>{"use strict";var wme="Function.prototype.bind called on incompatible ",Dme=Object.prototype.toString,Ome=Math.max,bme="[object Function]",KJ=function(t,o){for(var a=[],e=0;e{"use strict";var Tme=YJ();jJ.exports=Function.prototype.bind||Tme});var Uy=ee((PnA,JJ)=>{"use strict";JJ.exports=Function.prototype.call});var s0=ee((GnA,qJ)=>{"use strict";qJ.exports=Function.prototype.apply});var VJ=ee((FnA,zJ)=>{"use strict";zJ.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ZJ=ee((LnA,WJ)=>{"use strict";var Nme=_u(),Rme=s0(),kme=Uy(),vme=VJ();WJ.exports=vme||Nme.call(kme,Rme)});var g0=ee((UnA,XJ)=>{"use strict";var Pme=_u(),Gme=wc(),Fme=Uy(),Lme=ZJ();XJ.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new Gme("a function is required");return Lme(Pme,Fme,t)}});var iq=ee((HnA,rq)=>{"use strict";var Ume=g0(),$J=r0(),Aq;try{Aq=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var c0=!!Aq&&$J&&$J(Object.prototype,"__proto__"),tq=Object,eq=tq.getPrototypeOf;rq.exports=c0&&typeof c0.get=="function"?Ume([c0.get]):typeof eq=="function"?function(t){return eq(t==null?t:tq(t))}:!1});var gq=ee((KnA,sq)=>{"use strict";var aq=o0(),oq=n0(),nq=iq();sq.exports=aq?function(t){return aq(t)}:oq?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return oq(t)}:nq?function(t){return nq(t)}:null});var Hy=ee((xnA,cq)=>{"use strict";var Hme=Function.prototype.call,Kme=Object.prototype.hasOwnProperty,xme=_u();cq.exports=xme.call(Hme,Kme)});var ku=ee((YnA,Eq)=>{"use strict";var nt,Yme=t0(),jme=iJ(),Jme=oJ(),qme=sJ(),zme=cJ(),Qd=lJ(),fd=wc(),Vme=hJ(),Wme=uJ(),Zme=BJ(),Xme=QJ(),$me=mJ(),eSe=wJ(),ASe=OJ(),tSe=TJ(),dq=Function,I0=function(n){try{return dq('"use strict"; return ('+n+").constructor;")()}catch{}},Tu=r0(),rSe=i0(),l0=function(){throw new fd},iSe=Tu?(function(){try{return arguments.callee,l0}catch{try{return Tu(arguments,"callee").get}catch{return l0}}})():l0,Cd=LJ()(),ci=gq(),aSe=n0(),oSe=o0(),hq=s0(),Nu=Uy(),Bd={},nSe=typeof Uint8Array>"u"||!ci?nt:ci(Uint8Array),tl={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?nt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nt:ArrayBuffer,"%ArrayIteratorPrototype%":Cd&&ci?ci([][Symbol.iterator]()):nt,"%AsyncFromSyncIteratorPrototype%":nt,"%AsyncFunction%":Bd,"%AsyncGenerator%":Bd,"%AsyncGeneratorFunction%":Bd,"%AsyncIteratorPrototype%":Bd,"%Atomics%":typeof Atomics>"u"?nt:Atomics,"%BigInt%":typeof BigInt>"u"?nt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?nt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?nt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?nt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":jme,"%eval%":eval,"%EvalError%":Jme,"%Float16Array%":typeof Float16Array>"u"?nt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?nt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?nt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?nt:FinalizationRegistry,"%Function%":dq,"%GeneratorFunction%":Bd,"%Int8Array%":typeof Int8Array>"u"?nt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Cd&&ci?ci(ci([][Symbol.iterator]())):nt,"%JSON%":typeof JSON=="object"?JSON:nt,"%Map%":typeof Map>"u"?nt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Cd||!ci?nt:ci(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Yme,"%Object.getOwnPropertyDescriptor%":Tu,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?nt:Promise,"%Proxy%":typeof Proxy>"u"?nt:Proxy,"%RangeError%":qme,"%ReferenceError%":zme,"%Reflect%":typeof Reflect>"u"?nt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?nt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Cd||!ci?nt:ci(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Cd&&ci?ci(""[Symbol.iterator]()):nt,"%Symbol%":Cd?Symbol:nt,"%SyntaxError%":Qd,"%ThrowTypeError%":iSe,"%TypedArray%":nSe,"%TypeError%":fd,"%Uint8Array%":typeof Uint8Array>"u"?nt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?nt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?nt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?nt:Uint32Array,"%URIError%":Vme,"%WeakMap%":typeof WeakMap>"u"?nt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?nt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?nt:WeakSet,"%Function.prototype.call%":Nu,"%Function.prototype.apply%":hq,"%Object.defineProperty%":rSe,"%Object.getPrototypeOf%":aSe,"%Math.abs%":Wme,"%Math.floor%":Zme,"%Math.max%":Xme,"%Math.min%":$me,"%Math.pow%":eSe,"%Math.round%":ASe,"%Math.sign%":tSe,"%Reflect.getPrototypeOf%":oSe};if(ci)try{null.error}catch(n){Iq=ci(ci(n)),tl["%Error.prototype%"]=Iq}var Iq,sSe=function n(t){var o;if(t==="%AsyncFunction%")o=I0("async function () {}");else if(t==="%GeneratorFunction%")o=I0("function* () {}");else if(t==="%AsyncGeneratorFunction%")o=I0("async function* () {}");else if(t==="%AsyncGenerator%"){var a=n("%AsyncGeneratorFunction%");a&&(o=a.prototype)}else if(t==="%AsyncIteratorPrototype%"){var e=n("%AsyncGenerator%");e&&ci&&(o=ci(e.prototype))}return tl[t]=o,o},lq={__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"]},Ru=_u(),Ky=Hy(),gSe=Ru.call(Nu,Array.prototype.concat),cSe=Ru.call(hq,Array.prototype.splice),pq=Ru.call(Nu,String.prototype.replace),xy=Ru.call(Nu,String.prototype.slice),ISe=Ru.call(Nu,RegExp.prototype.exec),lSe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pSe=/\\(\\)?/g,dSe=function(t){var o=xy(t,0,1),a=xy(t,-1);if(o==="%"&&a!=="%")throw new Qd("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&o!=="%")throw new Qd("invalid intrinsic syntax, expected opening `%`");var e=[];return pq(t,lSe,function(i,A,r,s){e[e.length]=r?pq(s,pSe,"$1"):A||i}),e},hSe=function(t,o){var a=t,e;if(Ky(lq,a)&&(e=lq[a],a="%"+e[0]+"%"),Ky(tl,a)){var i=tl[a];if(i===Bd&&(i=sSe(a)),typeof i>"u"&&!o)throw new fd("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:e,name:a,value:i}}throw new Qd("intrinsic "+t+" does not exist!")};Eq.exports=function(t,o){if(typeof t!="string"||t.length===0)throw new fd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new fd('"allowMissing" argument must be a boolean');if(ISe(/^%?[^%]*%?$/,t)===null)throw new Qd("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=dSe(t),e=a.length>0?a[0]:"",i=hSe("%"+e+"%",o),A=i.name,r=i.value,s=!1,g=i.alias;g&&(e=g[0],cSe(a,gSe([0,1],g)));for(var c=1,I=!0;c=a.length){var Q=Tu(r,p);I=!!Q,I&&"get"in Q&&!("originalValue"in Q.get)?r=Q.get:r=r[p]}else I=Ky(r,p),r=r[p];I&&!s&&(tl[A]=r)}}return r}});var Cq=ee((jnA,uq)=>{"use strict";var ESe=a0();uq.exports=function(){return ESe()&&!!Symbol.toStringTag}});var Qq=ee((JnA,fq)=>{"use strict";var uSe=ku(),Bq=uSe("%Object.defineProperty%",!0),CSe=Cq()(),BSe=Hy(),fSe=wc(),Yy=CSe?Symbol.toStringTag:null;fq.exports=function(t,o){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force,e=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof a<"u"&&typeof a!="boolean"||typeof e<"u"&&typeof e!="boolean")throw new fSe("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Yy&&(a||!BSe(t,Yy))&&(Bq?Bq(t,Yy,{configurable:!e,enumerable:!1,value:o,writable:!1}):t[Yy]=o)}});var mq=ee((qnA,yq)=>{"use strict";yq.exports=function(n,t){return Object.keys(t).forEach(function(o){n[o]=n[o]||t[o]}),n}});var Dq=ee((znA,wq)=>{"use strict";var E0=Nj(),QSe=$e("util"),p0=$e("path"),ySe=$e("http"),mSe=$e("https"),SSe=$e("url").parse,wSe=$e("fs"),DSe=$e("stream").Stream,OSe=$e("crypto"),d0=Fj(),bSe=AJ(),MSe=Qq(),Dc=Hy(),h0=mq();function Sq(n){return String(n).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Bt(n){if(!(this instanceof Bt))return new Bt(n);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],E0.call(this),n=n||{};for(var t in n)this[t]=n[t]}QSe.inherits(Bt,E0);Bt.LINE_BREAK=`\r +`;Bt.DEFAULT_CONTENT_TYPE="application/octet-stream";Bt.prototype.append=function(n,t,o){o=o||{},typeof o=="string"&&(o={filename:o});var a=E0.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),i=this._multiPartFooter();a(e),a(t),a(i),this._trackLength(e,t,o)};Bt.prototype._trackLength=function(n,t,o){var a=0;o.knownLength!=null?a+=Number(o.knownLength):Buffer.isBuffer(t)?a=t.length:typeof t=="string"&&(a=Buffer.byteLength(t)),this._valueLength+=a,this._overheadLength+=Buffer.byteLength(n)+Bt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Dc(t,"httpVersion"))&&!(t instanceof DSe))&&(o.knownLength||this._valuesToMeasure.push(t))};Bt.prototype._lengthRetriever=function(n,t){Dc(n,"fd")?n.end!=null&&n.end!=1/0&&n.start!=null?t(null,n.end+1-(n.start?n.start:0)):wSe.stat(n.path,function(o,a){if(o){t(o);return}var e=a.size-(n.start?n.start:0);t(null,e)}):Dc(n,"httpVersion")?t(null,Number(n.headers["content-length"])):Dc(n,"httpModule")?(n.on("response",function(o){n.pause(),t(null,Number(o.headers["content-length"]))}),n.resume()):t("Unknown stream")};Bt.prototype._multiPartHeader=function(n,t,o){if(typeof o.header=="string")return o.header;var a=this._getContentDisposition(t,o),e=this._getContentType(t,o),i="",A={"Content-Disposition":["form-data",'name="'+Sq(n)+'"'].concat(a||[]),"Content-Type":[].concat(e||[])};typeof o.header=="object"&&h0(A,o.header);var r;for(var s in A)if(Dc(A,s)){if(r=A[s],r==null)continue;Array.isArray(r)||(r=[r]),r.length&&(i+=s+": "+r.join("; ")+Bt.LINE_BREAK)}return"--"+this.getBoundary()+Bt.LINE_BREAK+i+Bt.LINE_BREAK};Bt.prototype._getContentDisposition=function(n,t){var o;if(typeof t.filepath=="string"?o=p0.normalize(t.filepath).replace(/\\/g,"/"):t.filename||n&&(n.name||n.path)?o=p0.basename(t.filename||n&&(n.name||n.path)):n&&n.readable&&Dc(n,"httpVersion")&&(o=p0.basename(n.client._httpMessage.path||"")),o)return'filename="'+Sq(o)+'"'};Bt.prototype._getContentType=function(n,t){var o=t.contentType;return!o&&n&&n.name&&(o=d0.lookup(n.name)),!o&&n&&n.path&&(o=d0.lookup(n.path)),!o&&n&&n.readable&&Dc(n,"httpVersion")&&(o=n.headers["content-type"]),!o&&(t.filepath||t.filename)&&(o=d0.lookup(t.filepath||t.filename)),!o&&n&&typeof n=="object"&&(o=Bt.DEFAULT_CONTENT_TYPE),o};Bt.prototype._multiPartFooter=function(){return function(n){var t=Bt.LINE_BREAK,o=this._streams.length===0;o&&(t+=this._lastBoundary()),n(t)}.bind(this)};Bt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Bt.LINE_BREAK};Bt.prototype.getHeaders=function(n){var t,o={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in n)Dc(n,t)&&(o[t.toLowerCase()]=n[t]);return o};Bt.prototype.setBoundary=function(n){if(typeof n!="string")throw new TypeError("FormData boundary must be a string");this._boundary=n};Bt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Bt.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),t=this.getBoundary(),o=0,a=this._streams.length;o{var Sd=1e3,wd=Sd*60,Dd=wd*60,al=Dd*24,$Se=al*7,ewe=al*365.25;Hq.exports=function(n,t){t=t||{};var o=typeof n;if(o==="string"&&n.length>0)return Awe(n);if(o==="number"&&isFinite(n))return t.long?rwe(n):twe(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function Awe(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]),a=(t[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return o*ewe;case"weeks":case"week":case"w":return o*$Se;case"days":case"day":case"d":return o*al;case"hours":case"hour":case"hrs":case"hr":case"h":return o*Dd;case"minutes":case"minute":case"mins":case"min":case"m":return o*wd;case"seconds":case"second":case"secs":case"sec":case"s":return o*Sd;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function twe(n){var t=Math.abs(n);return t>=al?Math.round(n/al)+"d":t>=Dd?Math.round(n/Dd)+"h":t>=wd?Math.round(n/wd)+"m":t>=Sd?Math.round(n/Sd)+"s":n+"ms"}function rwe(n){var t=Math.abs(n);return t>=al?zy(n,t,al,"day"):t>=Dd?zy(n,t,Dd,"hour"):t>=wd?zy(n,t,wd,"minute"):t>=Sd?zy(n,t,Sd,"second"):n+" ms"}function zy(n,t,o,a){var e=t>=o*1.5;return Math.round(n/o)+" "+a+(e?"s":"")}});var N0=ee((ZsA,xq)=>{function iwe(n){o.debug=o,o.default=o,o.coerce=s,o.disable=A,o.enable=e,o.enabled=r,o.humanize=Kq(),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 p=0;p{if(U==="%%")return"%";R++;let q=o.formatters[F];if(typeof q=="function"){let z=y[R];U=q.call(m,z),y.splice(R,1),R--}return U}),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=a,Q.destroy=o.destroy,Object.defineProperty(Q,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(B!==o.namespaces&&(B=o.namespaces,f=o.enabled(c)),f),set:y=>{p=y}}),typeof o.init=="function"&&o.init(Q),Q}function a(c,I){let p=o(this.namespace+(typeof I>"u"?":":I)+c);return p.log=this.log,p}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 p of I)p[0]==="-"?o.skips.push(p.slice(1)):o.names.push(p)}function i(c,I){let p=0,B=0,f=-1,Q=0;for(;p"-"+I)].join(",");return o.enable(""),c}function r(c){for(let I of o.skips)if(i(c,I))return!1;for(let I of o.names)if(i(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}xq.exports=iwe});var Yq=ee((xa,Vy)=>{xa.formatArgs=owe;xa.save=nwe;xa.load=swe;xa.useColors=awe;xa.storage=gwe();xa.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`."))}})();xa.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 awe(){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 owe(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+Vy.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;n.splice(1,0,t,"color: inherit");let o=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{e!=="%%"&&(o++,e==="%c"&&(a=o))}),n.splice(a,0,t)}xa.log=console.debug||console.log||(()=>{});function nwe(n){try{n?xa.storage.setItem("debug",n):xa.storage.removeItem("debug")}catch{}}function swe(){let n;try{n=xa.storage.getItem("debug")||xa.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function gwe(){try{return localStorage}catch{}}Vy.exports=N0()(xa);var{formatters:cwe}=Vy.exports;cwe.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Jq=ee((Ii,Zy)=>{var Iwe=$e("tty"),Wy=$e("util");Ii.init=Cwe;Ii.log=hwe;Ii.formatArgs=pwe;Ii.save=Ewe;Ii.load=uwe;Ii.useColors=lwe;Ii.destroy=Wy.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ii.colors=[6,2,3,4,5,1];try{let n=$e("supports-color");n&&(n.stderr||n).level>=2&&(Ii.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{}Ii.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,i)=>i.toUpperCase()),a=process.env[t];return/^(yes|on|true|enabled)$/i.test(a)?a=!0:/^(no|off|false|disabled)$/i.test(a)?a=!1:a==="null"?a=null:a=Number(a),n[o]=a,n},{});function lwe(){return"colors"in Ii.inspectOpts?!!Ii.inspectOpts.colors:Iwe.isatty(process.stderr.fd)}function pwe(n){let{namespace:t,useColors:o}=this;if(o){let a=this.color,e="\x1B[3"+(a<8?a:"8;5;"+a),i=` ${e};1m${t} \x1B[0m`;n[0]=i+n[0].split(` `).join(` -`+a),n.push(e+"m+"+Jy.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=swe()+t+" "+n[0]}function swe(){return ca.inspectOpts.hideDate?"":new Date().toISOString()+" "}function gwe(...n){return process.stderr.write(jy.formatWithOptions(ca.inspectOpts,...n)+` -`)}function cwe(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function Iwe(){return process.env.DEBUG}function lwe(n){n.inspectOpts={};let t=Object.keys(ca.inspectOpts);for(let o=0;ot.trim()).join(" ")};Lq.O=function(n){return this.inspectOpts.colors=this.useColors,jy.inspect(n,this.inspectOpts)}});var lt=ee((FsA,b0)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?b0.exports=Fq():b0.exports=Uq()});var Hq=ee(M0=>{"use strict";Object.defineProperty(M0,"__esModule",{value:!0});function dwe(n){return function(t,o){return new Promise((i,e)=>{n.call(this,t,o,(a,A)=>{a?e(a):i(A)})})}}M0.default=dwe});var Yq=ee((T0,xq)=>{"use strict";var Kq=T0&&T0.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},pwe=$e("events"),hwe=Kq(lt()),Ewe=Kq(Hq()),Nu=hwe.default("agent-base");function uwe(n){return!!n&&typeof n.addRequest=="function"}function _0(){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 qy(n,t){return new qy.Agent(n,t)}(function(n){class t extends pwe.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:_0()?443:80}set defaultPort(i){this.explicitDefaultPort=i}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:_0()?"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=_0()),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),uwe(B)){Nu("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?(Nu("Converting legacy callback function to promise"),this.promisifiedCallback=Ewe.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{Nu("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){Nu("Freeing socket %o %o",i.constructor.name,e),i.destroy()}destroy(){Nu("Destroying agent %o",this.constructor.name)}}n.Agent=t,n.prototype=n.Agent.prototype})(qy||(qy={}));xq.exports=qy});var jq=ee(ku=>{"use strict";var Cwe=ku&&ku.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ku,"__esModule",{value:!0});var Bwe=Cwe(lt()),Ru=Bwe.default("https-proxy-agent:parse-proxy-response");function fwe(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){Ru("onclose had error %o",I)}function s(){Ru("onend")}function g(I){A(),Ru("onerror %o",I),o(I)}function c(I){e.push(I),i+=I.length;let d=Buffer.concat(e,i);if(d.indexOf(`\r +`+i),n.push(e+"m+"+Zy.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=dwe()+t+" "+n[0]}function dwe(){return Ii.inspectOpts.hideDate?"":new Date().toISOString()+" "}function hwe(...n){return process.stderr.write(Wy.formatWithOptions(Ii.inspectOpts,...n)+` +`)}function Ewe(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function uwe(){return process.env.DEBUG}function Cwe(n){n.inspectOpts={};let t=Object.keys(Ii.inspectOpts);for(let o=0;ot.trim()).join(" ")};jq.O=function(n){return this.inspectOpts.colors=this.useColors,Wy.inspect(n,this.inspectOpts)}});var lt=ee((XsA,R0)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?R0.exports=Yq():R0.exports=Jq()});var qq=ee(k0=>{"use strict";Object.defineProperty(k0,"__esModule",{value:!0});function Bwe(n){return function(t,o){return new Promise((a,e)=>{n.call(this,t,o,(i,A)=>{i?e(i):a(A)})})}}k0.default=Bwe});var Wq=ee((P0,Vq)=>{"use strict";var zq=P0&&P0.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},fwe=$e("events"),Qwe=zq(lt()),ywe=zq(qq()),Gu=Qwe.default("agent-base");function mwe(n){return!!n&&typeof n.addRequest=="function"}function v0(){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 Xy(n,t){return new Xy.Agent(n,t)}(function(n){class t extends fwe.EventEmitter{constructor(a,e){super();let i=e;typeof a=="function"?this.callback=a:a&&(i=a),this.timeout=null,i&&typeof i.timeout=="number"&&(this.timeout=i.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:v0()?443:80}set defaultPort(a){this.explicitDefaultPort=a}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:v0()?"https:":"http:"}set protocol(a){this.explicitProtocol=a}callback(a,e,i){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(a,e){let i=Object.assign({},e);typeof i.secureEndpoint!="boolean"&&(i.secureEndpoint=v0()),i.host==null&&(i.host="localhost"),i.port==null&&(i.port=i.secureEndpoint?443:80),i.protocol==null&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,a._last=!0,a.shouldKeepAlive=!1;let A=!1,r=null,s=i.timeout||this.timeout,g=B=>{a._hadError||(a.emit("error",B),a._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))},p=B=>{if(A)return;if(r!=null&&(clearTimeout(r),r=null),mwe(B)){Gu("Callback returned another Agent instance %o",B.constructor.name),B.addRequest(a,i);return}if(B){B.once("free",()=>{this.freeSocket(B,i)}),a.onSocket(B);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${a.method} ${a.path}\``);g(f)};if(typeof this.callback!="function"){g(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(Gu("Converting legacy callback function to promise"),this.promisifiedCallback=ywe.default(this.callback)):this.promisifiedCallback=this.callback),typeof s=="number"&&s>0&&(r=setTimeout(c,s)),"port"in i&&typeof i.port!="number"&&(i.port=Number(i.port));try{Gu("Resolving socket for %o request: %o",i.protocol,`${a.method} ${a.path}`),Promise.resolve(this.promisifiedCallback(a,i)).then(p,I)}catch(B){Promise.reject(B).catch(I)}}freeSocket(a,e){Gu("Freeing socket %o %o",a.constructor.name,e),a.destroy()}destroy(){Gu("Destroying agent %o",this.constructor.name)}}n.Agent=t,n.prototype=n.Agent.prototype})(Xy||(Xy={}));Vq.exports=Xy});var Zq=ee(Lu=>{"use strict";var Swe=Lu&&Lu.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Lu,"__esModule",{value:!0});var wwe=Swe(lt()),Fu=wwe.default("https-proxy-agent:parse-proxy-response");function Dwe(n){return new Promise((t,o)=>{let a=0,e=[];function i(){let I=n.read();I?c(I):n.once("readable",i)}function A(){n.removeListener("end",s),n.removeListener("error",g),n.removeListener("close",r),n.removeListener("readable",i)}function r(I){Fu("onclose had error %o",I)}function s(){Fu("onend")}function g(I){A(),Fu("onerror %o",I),o(I)}function c(I){e.push(I),a+=I.length;let p=Buffer.concat(e,a);if(p.indexOf(`\r \r -`)===-1){Ru("have not received end of HTTP headers yet..."),a();return}let f=d.toString("ascii",0,d.indexOf(`\r -`)),Q=+f.split(" ")[1];Ru("got proxy server response: %o",f),t({statusCode:Q,buffered:d})}n.on("error",g),n.on("close",r),n.on("end",s),a()})}ku.default=fwe});var zq=ee(tl=>{"use strict";var Qwe=tl&&tl.__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())})},Qp=tl&&tl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(tl,"__esModule",{value:!0});var Jq=Qp($e("net")),qq=Qp($e("tls")),ywe=Qp($e("url")),mwe=Qp($e("assert")),Swe=Qp(lt()),wwe=Yq(),Dwe=Qp(jq()),vu=Swe.default("https-proxy-agent:agent"),N0=class extends wwe.Agent{constructor(t){let o;if(typeof t=="string"?o=ywe.default.parse(t):o=t,!o)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");vu("creating new HttpsProxyAgent instance: %o",o),super(o);let i=Object.assign({},o);this.secureProxy=o.secureProxy||Mwe(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 Qwe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:e}=this,a;e?(vu("Creating `tls.Socket`: %o",i),a=qq.default.connect(i)):(vu("Creating `net.Socket`: %o",i),a=Jq.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;bwe(c,I)||(g+=`:${c}`),A.Host=g,A.Connection="close";for(let y of Object.keys(A))s+=`${y}: ${A[y]}\r -`;let d=Dwe.default(a);a.write(`${s}\r -`);let{statusCode:B,buffered:f}=yield d;if(B===200){if(t.once("socket",Owe),o.secureEndpoint){vu("Upgrading socket connection to TLS");let y=o.servername||o.host;return qq.default.connect(Object.assign(Object.assign({},_we(o,"host","hostname","path","port")),{socket:a,servername:y}))}return a}a.destroy();let Q=new Jq.default.Socket({writable:!1});return Q.readable=!0,t.once("socket",y=>{vu("replaying proxy buffer for failed request"),mwe.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),Q})}};tl.default=N0;function Owe(n){n.resume()}function bwe(n,t){return!!(!t&&n===80||t&&n===443)}function Mwe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function _we(n,...t){let o={},i;for(i in n)t.includes(i)||(o[i]=n[i]);return o}});var P0=ee((v0,Vq)=>{"use strict";var Twe=v0&&v0.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},R0=Twe(zq());function k0(n){return new R0.default(n)}(function(n){n.HttpsProxyAgent=R0.default,n.prototype=R0.default.prototype})(k0||(k0={}));Vq.exports=k0});var Zq=ee((KsA,Wq)=>{var Pu;Wq.exports=function(){if(!Pu){try{Pu=lt()("follow-redirects")}catch{}typeof Pu!="function"&&(Pu=function(){})}Pu.apply(null,arguments)}});var t4=ee((xsA,z0)=>{var Fu=$e("url"),Gu=Fu.URL,Nwe=$e("http"),Rwe=$e("https"),H0=$e("stream").Writable,K0=$e("assert"),Xq=Zq();(function(){var t=typeof process<"u",o=typeof window<"u"&&typeof document<"u",i=al(Error.captureStackTrace);!t&&(o||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var x0=!1;try{K0(new Gu(""))}catch(n){x0=n.code==="ERR_INVALID_URL"}var kwe=["Authorization","Proxy-Authorization","Cookie"],vwe=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Y0=["abort","aborted","connect","error","socket","timeout"],j0=Object.create(null);Y0.forEach(function(n){j0[n]=function(t,o,i){this._redirectable.emit(n,t,o,i)}});var F0=Lu("ERR_INVALID_URL","Invalid URL",TypeError),L0=Lu("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Pwe=Lu("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",L0),Gwe=Lu("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Fwe=Lu("ERR_STREAM_WRITE_AFTER_END","write after end"),Lwe=H0.prototype.destroy||e4;function Ki(n,t){H0.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 L0?e:new L0({cause:e}))}},this._headerFilter=new RegExp("^(?:"+kwe.concat(n.sensitiveHeaders).map(jwe).join("|")+")$","i"),this._performRequest()}Ki.prototype=Object.create(H0.prototype);Ki.prototype.abort=function(){q0(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Ki.prototype.destroy=function(n){return q0(this._currentRequest,n),Lwe.call(this,n),this};Ki.prototype.write=function(n,t,o){if(this._ending)throw new Fwe;if(!rl(n)&&!xwe(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(al(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 Gwe),this.abort())};Ki.prototype.end=function(n,t,o){if(al(n)?(o=n,n=t=null):al(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}};Ki.prototype.setHeader=function(n,t){this._options.headers[n]=t,this._currentRequest.setHeader(n,t)};Ki.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};Ki.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){Ki.prototype[n]=function(t,o){return this._currentRequest[n](t,o)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(Ki.prototype,n,{get:function(){return this._currentRequest[n]}})});Ki.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),Kwe(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))}};Ki.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 Y0)i.on(e,j0[e]);if(this._currentUrl=/^\//.test(this._options.path)?Fu.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(q0(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Pwe;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=[],G0(/^content-/i,this._options.headers));var A=G0(/^host$/i,this._options.headers),r=J0(this._currentUrl),s=A||r.host,g=/^\w+:/.test(o)?this._currentUrl:Fu.format(Object.assign(r,{host:s})),c=Uwe(o,g);if(Xq("redirecting to",c.href),this._isRedirect=!0,U0(c,this._options),(c.protocol!==r.protocol&&c.protocol!=="https:"||c.host!==s&&!Hwe(c.host,s))&&G0(this._headerFilter,this._options.headers),al(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 $q(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 Ywe(g)?g=U0(g):rl(g)?g=U0(J0(g)):(I=c,c=A4(g),g={protocol:e}),al(c)&&(I=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},g,c),c.nativeProtocols=o,!rl(c.host)&&!rl(c.hostname)&&(c.hostname="::1"),K0.equal(c.protocol,e,"protocol mismatch"),Xq("options",c),new Ki(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 e4(){}function J0(n){var t;if(x0)t=new Gu(n);else if(t=A4(Fu.parse(n)),!rl(t.protocol))throw new F0({input:n});return t}function Uwe(n,t){return x0?new Gu(n,t):J0(Fu.resolve(t,n))}function A4(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new F0({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new F0({input:n.href||n});return n}function U0(n,t){var o=t||{};for(var i of vwe)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 G0(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 Lu(n,t,o){function i(e){al(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 q0(n,t){for(var o of Y0)n.removeListener(o,j0[o]);n.on("error",e4),n.destroy(t)}function Hwe(n,t){K0(rl(n)&&rl(t));var o=n.length-t.length-1;return o>0&&n[o]==="."&&n.endsWith(t)}function Kwe(n){return n instanceof Array}function rl(n){return typeof n=="string"||n instanceof String}function al(n){return typeof n=="function"}function xwe(n){return typeof n=="object"&&"length"in n}function Ywe(n){return Gu&&n instanceof Gu}function jwe(n){return n.replace(/[\]\\/()*+?.$]/g,"\\$&")}z0.exports=$q({http:Nwe,https:Rwe});z0.exports.wrap=$q});var X4=ee((slA,Z4)=>{Z4.exports=$e("util").inspect});var Wu=ee((glA,C8)=>{var DN=typeof Map=="function"&&Map.prototype,uN=Object.getOwnPropertyDescriptor&&DN?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,tm=DN&&uN&&typeof uN.get=="function"?uN.get:null,$4=DN&&Map.prototype.forEach,ON=typeof Set=="function"&&Set.prototype,CN=Object.getOwnPropertyDescriptor&&ON?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,rm=ON&&CN&&typeof CN.get=="function"?CN.get:null,e8=ON&&Set.prototype.forEach,aOe=typeof WeakMap=="function"&&WeakMap.prototype,qu=aOe?WeakMap.prototype.has:null,iOe=typeof WeakSet=="function"&&WeakSet.prototype,zu=iOe?WeakSet.prototype.has:null,oOe=typeof WeakRef=="function"&&WeakRef.prototype,A8=oOe?WeakRef.prototype.deref:null,nOe=Boolean.prototype.valueOf,sOe=Object.prototype.toString,gOe=Function.prototype.toString,cOe=String.prototype.match,bN=String.prototype.slice,wc=String.prototype.replace,IOe=String.prototype.toUpperCase,t8=String.prototype.toLowerCase,I8=RegExp.prototype.test,r8=Array.prototype.concat,Cs=Array.prototype.join,lOe=Array.prototype.slice,a8=Math.floor,QN=typeof BigInt=="function"?BigInt.prototype.valueOf:null,BN=Object.getOwnPropertySymbols,yN=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,wp=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Vu=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===wp||!0)?Symbol.toStringTag:null,l8=Object.prototype.propertyIsEnumerable,i8=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function o8(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||I8.call(/e/,t))return t;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-a8(-n):a8(n);if(i!==n){var e=String(i),a=bN.call(t,e.length+1);return wc.call(e,o,"$&_")+"."+wc.call(wc.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return wc.call(t,o,"$&_")}var mN=X4(),n8=mN.custom,s8=h8(n8)?n8:null,d8={__proto__:null,double:'"',single:"'"},dOe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};C8.exports=function n(t,o,i,e){var a=o||{};if(mg(a,"quoteStyle")&&!mg(d8,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(mg(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=mg(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(mg(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(mg(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 u8(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return r?o8(t,s):s}if(typeof t=="bigint"){var g=String(t)+"n";return r?o8(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 SN(t)?"[Array]":"[Object]";var I=TOe(a,i);if(typeof e>"u")e=[];else if(E8(e,t)>=0)return"[Circular]";function d(U,N,k){if(N&&(e=lOe.call(e),e.push(N)),k){var J={depth:a.depth};return mg(a,"quoteStyle")&&(J.quoteStyle=a.quoteStyle),n(U,J,i+1,e)}return n(U,a,i+1,e)}if(typeof t=="function"&&!g8(t)){var B=yOe(t),f=Am(t,d);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(f.length>0?" { "+Cs.call(f,", ")+" }":"")}if(h8(t)){var Q=wp?wc.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):yN.call(t);return typeof t=="object"&&!wp?Ju(Q):Q}if(bOe(t)){for(var y="<"+t8.call(String(t.nodeName)),m=t.attributes||[],T=0;T",y}if(SN(t)){if(t.length===0)return"[]";var _=Am(t,d);return I&&!_Oe(_)?"["+wN(_,I)+"]":"[ "+Cs.call(_,", ")+" ]"}if(EOe(t)){var R=Am(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!l8.call(t,"cause")?"{ ["+String(t)+"] "+Cs.call(r8.call("[cause]: "+d(t.cause),R),", ")+" }":R.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Cs.call(R,", ")+" }"}if(typeof t=="object"&&A){if(s8&&typeof t[s8]=="function"&&mN)return mN(t,{depth:c-i});if(A!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(mOe(t)){var H=[];return $4&&$4.call(t,function(U,N){H.push(d(N,t,!0)+" => "+d(U,t))}),c8("Map",tm.call(t),H,I)}if(DOe(t)){var F=[];return e8&&e8.call(t,function(U){F.push(d(U,t))}),c8("Set",rm.call(t),F,I)}if(SOe(t))return fN("WeakMap");if(OOe(t))return fN("WeakSet");if(wOe(t))return fN("WeakRef");if(COe(t))return Ju(d(Number(t)));if(fOe(t))return Ju(d(QN.call(t)));if(BOe(t))return Ju(nOe.call(t));if(uOe(t))return Ju(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(!hOe(t)&&!g8(t)){var L=Am(t,d),q=i8?i8(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",K=!q&&Vu&&Object(t)===t&&Vu in t?bN.call(Dc(t),8,-1):z?"Object":"",G=q||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",V=G+(K||z?"["+Cs.call(r8.call([],K||[],z||[]),": ")+"] ":"");return L.length===0?V+"{}":I?V+"{"+wN(L,I)+"}":V+"{ "+Cs.call(L,", ")+" }"}return String(t)};function p8(n,t,o){var i=o.quoteStyle||t,e=d8[i];return e+n+e}function pOe(n){return wc.call(String(n),/"/g,""")}function ol(n){return!Vu||!(typeof n=="object"&&(Vu in n||typeof n[Vu]<"u"))}function SN(n){return Dc(n)==="[object Array]"&&ol(n)}function hOe(n){return Dc(n)==="[object Date]"&&ol(n)}function g8(n){return Dc(n)==="[object RegExp]"&&ol(n)}function EOe(n){return Dc(n)==="[object Error]"&&ol(n)}function uOe(n){return Dc(n)==="[object String]"&&ol(n)}function COe(n){return Dc(n)==="[object Number]"&&ol(n)}function BOe(n){return Dc(n)==="[object Boolean]"&&ol(n)}function h8(n){if(wp)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!yN)return!1;try{return yN.call(n),!0}catch{}return!1}function fOe(n){if(!n||typeof n!="object"||!QN)return!1;try{return QN.call(n),!0}catch{}return!1}var QOe=Object.prototype.hasOwnProperty||function(n){return n in this};function mg(n,t){return QOe.call(n,t)}function Dc(n){return sOe.call(n)}function yOe(n){if(n.name)return n.name;var t=cOe.call(gOe.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function E8(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 u8(bN.call(n,0,t.maxStringLength),t)+i}var e=dOe[t.quoteStyle||"single"];e.lastIndex=0;var a=wc.call(wc.call(n,e,"\\$1"),/[\x00-\x1f]/g,MOe);return p8(a,"single",t)}function MOe(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":"")+IOe.call(t.toString(16))}function Ju(n){return"Object("+n+")"}function fN(n){return n+" { ? }"}function c8(n,t,o,i){var e=i?wN(o,i):Cs.call(o,", ");return n+" ("+t+") {"+e+"}"}function _Oe(n){for(var t=0;t=0)return!1;return!0}function TOe(n,t){var o;if(n.indent===" ")o=" ";else if(typeof n.indent=="number"&&n.indent>0)o=Cs.call(Array(n.indent+1)," ");else return null;return{base:o,prev:Cs.call(Array(t+1),o)}}function wN(n,t){if(n.length===0)return"";var o=` -`+t.prev+t.base;return o+Cs.call(n,","+o)+` -`+t.prev}function Am(n,t){var o=SN(n),i=[];if(o){i.length=n.length;for(var e=0;e{"use strict";var NOe=Wu(),ROe=Qc(),am=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},kOe=function(n,t){if(n){var o=am(n,t);return o&&o.value}},vOe=function(n,t,o){var i=am(n,t);i?i.value=o:n.next={key:t,next:n.next,value:o}},POe=function(n,t){return n?!!am(n,t):!1},GOe=function(n,t){if(n)return am(n,t,!0)};B8.exports=function(){var t,o={assert:function(i){if(!o.has(i))throw new ROe("Side channel does not contain "+NOe(i))},delete:function(i){var e=GOe(t,i);return e&&t&&!t.next&&(t=void 0),!!e},get:function(i){return kOe(t,i)},has:function(i){return POe(t,i)},set:function(i,e){t||(t={next:void 0}),vOe(t,i,e)}};return o}});var MN=ee((IlA,m8)=>{"use strict";var Q8=Mu(),y8=a0(),FOe=y8([Q8("%String.prototype.indexOf%")]);m8.exports=function(t,o){var i=Q8(t,!!o);return typeof i=="function"&&FOe(t,".prototype.")>-1?y8([i]):i}});var _N=ee((llA,w8)=>{"use strict";var LOe=Mu(),Zu=MN(),UOe=Wu(),HOe=Qc(),S8=LOe("%Map%",!0),KOe=Zu("Map.prototype.get",!0),xOe=Zu("Map.prototype.set",!0),YOe=Zu("Map.prototype.has",!0),jOe=Zu("Map.prototype.delete",!0),JOe=Zu("Map.prototype.size",!0);w8.exports=!!S8&&function(){var t,o={assert:function(i){if(!o.has(i))throw new HOe("Side channel does not contain "+UOe(i))},delete:function(i){if(t){var e=jOe(t,i);return JOe(t)===0&&(t=void 0),e}return!1},get:function(i){if(t)return KOe(t,i)},has:function(i){return t?YOe(t,i):!1},set:function(i,e){t||(t=new S8),xOe(t,i,e)}};return o}});var O8=ee((dlA,D8)=>{"use strict";var qOe=Mu(),om=MN(),zOe=Wu(),im=_N(),VOe=Qc(),Dp=qOe("%WeakMap%",!0),WOe=om("WeakMap.prototype.get",!0),ZOe=om("WeakMap.prototype.set",!0),XOe=om("WeakMap.prototype.has",!0),$Oe=om("WeakMap.prototype.delete",!0);D8.exports=Dp?function(){var t,o,i={assert:function(e){if(!i.has(e))throw new VOe("Side channel does not contain "+zOe(e))},delete:function(e){if(Dp&&e&&(typeof e=="object"||typeof e=="function")){if(t)return $Oe(t,e)}else if(im&&o)return o.delete(e);return!1},get:function(e){return Dp&&e&&(typeof e=="object"||typeof e=="function")&&t?WOe(t,e):o&&o.get(e)},has:function(e){return Dp&&e&&(typeof e=="object"||typeof e=="function")&&t?XOe(t,e):!!o&&o.has(e)},set:function(e,a){Dp&&e&&(typeof e=="object"||typeof e=="function")?(t||(t=new Dp),ZOe(t,e,a)):im&&(o||(o=im()),o.set(e,a))}};return i}:im});var TN=ee((plA,b8)=>{"use strict";var ebe=Qc(),Abe=Wu(),tbe=f8(),rbe=_N(),abe=O8(),ibe=abe||rbe||tbe;b8.exports=function(){var t,o={assert:function(i){if(!o.has(i)){var e=i&&Object(i)===i?"the given object key":Abe(i);throw new ebe("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=ibe()),t.set(i,e)}};return o}});var nm=ee((hlA,M8)=>{"use strict";var obe=String.prototype.replace,nbe=/%20/g,NN={RFC1738:"RFC1738",RFC3986:"RFC3986"};M8.exports={default:NN.RFC3986,formatters:{RFC1738:function(n){return obe.call(n,nbe,"+")},RFC3986:function(n){return String(n)}},RFC1738:NN.RFC1738,RFC3986:NN.RFC3986}});var PN=ee((ElA,N8)=>{"use strict";var sbe=nm(),T8=TN(),_8=$T(),RN=Object.prototype.hasOwnProperty,nl=Array.isArray,gm=T8(),sl=function(t,o){return gm.set(t,o),t},gl=function(t){return gm.has(t)},Xu=function(t){return gm.get(t)},kN=function(t,o){gm.set(t,o)},Bs=(function(){for(var n=[],t=0;t<256;++t)n[n.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return n})(),gbe=function(t){for(;t.length>1;){var o=t.pop(),i=o.obj[o.prop];if(nl(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 sl(Op(t.concat(o),i),e)}t[e]=o}else if(t&&typeof t=="object")if(gl(t)){var a=Xu(t)+1;t[a]=o,kN(t,a)}else{if(i&&i.strictMerge)return[t,o];(i&&(i.plainObjects||i.allowPrototypes)||!RN.call(Object.prototype,o))&&(t[o]=!0)}else return[t,o];return t}if(!t||typeof t!="object"){if(gl(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 sl(Op(c,i),c.length-1)}return c}var I=t;if(nl(t)&&!nl(o)&&(I=Op(t,i)),nl(t)&&nl(o)){if(o.forEach(function(d,B){if(RN.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 sl(Op(t,i),t.length-1)}return t}return Object.keys(o).reduce(function(d,B){var f=o[B];if(RN.call(d,B)?vN(d,B,n(d[B],f,i)):vN(d,B,f),gl(o)&&!gl(d)&&sl(d,Xu(o)),gl(d)){var Q=parseInt(B,10);String(Q)===B&&Q>=0&&Q>Xu(d)&&kN(d,Q)}return d},I)},Ibe=function(t,o){return Object.keys(o).reduce(function(i,e){return vN(i,e,o[e]),i},t)},lbe=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}},sm=1024,dbe=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=sm?A.slice(s,s+sm):A;if(s+sm=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===sbe.RFC1738&&(B===40||B===41)){I[I.length]=g.charAt(d);continue}if(B<128){I[I.length]=Bs[B];continue}if(B<2048){I[I.length]=Bs[192|B>>6]+Bs[128|B&63];continue}if(B<55296||B>=57344){I[I.length]=Bs[224|B>>12]+Bs[128|B>>6&63]+Bs[128|B&63];continue}d+=1,B=65536+((B&1023)<<10|g.charCodeAt(d)&1023),I[I.length]=Bs[240|B>>18]+Bs[128|B>>12&63]+Bs[128|B>>6&63]+Bs[128|B&63]}r+=I.join("")}return r},pbe=function(t){for(var o=[{obj:{o:t},prop:"o"}],i=T8(),e=0;ei){if(a)throw new RangeError("Array limit exceeded. Only "+i+" element"+(i===1?"":"s")+" allowed in an array.");return sl(Op(r,{plainObjects:e}),r.length-1)}return r},Cbe=function(t,o){if(nl(t)){for(var i=[],e=0;e{"use strict";var k8=TN(),cm=PN(),$u=nm(),Bbe=Object.prototype.hasOwnProperty,v8={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,o){return t+"["+o+"]"},repeat:function(t){return t}},fs=Array.isArray,fbe=Array.prototype.push,P8=function(n,t){fbe.apply(n,fs(t)?t:[t])},Qbe=Date.prototype.toISOString,R8=$u.default,xr={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:cm.encode,encodeValuesOnly:!1,filter:void 0,format:R8,formatter:$u.formatters[R8],indices:!1,serializeDate:function(t){return Qbe.call(t)},skipNulls:!1,strictNullHandling:!1},ybe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},GN={},mbe=function n(t,o,i,e,a,A,r,s,g,c,I,d,B,f,Q,y,m,T){for(var _=t,R=T,H=0,F=!1;(R=R.get(GN))!==void 0&&!F;){var L=R.get(t);if(H+=1,typeof L<"u"){if(L===H)throw new RangeError("Cyclic object value");F=!0}typeof R.get(GN)>"u"&&(H=0)}if(typeof c=="function"?_=c(o,_):_ instanceof Date?_=B(_):i==="comma"&&fs(_)&&(_=cm.maybeMap(_,function(oe){return oe instanceof Date?B(oe):oe})),_===null){if(A)return Q(g&&!y?g(o,xr.encoder,m,"key",f):o);_=""}if(ybe(_)||cm.isBuffer(_)){if(g){var q=y?o:g(o,xr.encoder,m,"key",f);return[Q(q)+"="+Q(g(_,xr.encoder,m,"value",f))]}return[Q(o)+"="+Q(String(_))]}var z=[];if(typeof _>"u")return z;var K;if(i==="comma"&&fs(_))y&&g&&(_=cm.maybeMap(_,function(oe){return oe==null?oe:g(oe)})),K=[{value:_.length>0?_.join(",")||null:void 0}];else if(fs(c))K=c;else{var G=Object.keys(_);K=I?G.sort(I):G}var V=s?String(o).replace(/\./g,"%2E"):String(o),U=e&&fs(_)&&_.length===1?V+"[]":V;if(a&&fs(_)&&_.length===0)return U+"[]";for(var N=0;N"u"?t.encodeDotInKeys===!0?!0:xr.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:xr.addQueryPrefix,allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:xr.allowEmptyArrays,arrayFormat:A,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:xr.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?xr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:xr.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:xr.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:xr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:xr.encodeValuesOnly,filter:a,format:i,formatter:e,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:xr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:xr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:xr.strictNullHandling}};G8.exports=function(n,t){var o=n,i=Sbe(t),e,a;typeof i.filter=="function"?(a=i.filter,o=a("",o)):fs(i.filter)&&(a=i.filter,e=a);var A=[];if(typeof o!="object"||o===null)return"";var r=v8[i.arrayFormat],s=r==="comma"&&i.commaRoundTrip;e||(e=Object.keys(o)),i.sort&&e.sort(i.sort);for(var g=k8(),c=0;c"u"||I===null)){var d=o[I];i.skipNulls&&d===null||P8(A,mbe(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 H8=ee((ClA,U8)=>{"use strict";var Qs=PN(),Im=Object.prototype.hasOwnProperty,FN=Array.isArray,Ir={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Qs.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},wbe=function(n){return n.replace(/&#(\d+);/g,function(t,o){return String.fromCharCode(parseInt(o,10))})},L8=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},Dbe="utf8=%26%2310003%3B",Obe="utf8=%E2%9C%93",bbe=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=FN(f)?[f]:f),o.comma&&FN(f)&&f.length>o.arrayLimit&&(f=Qs.combine([],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded)),B!==null){var Q=Im.call(i,B);Q&&(o.duplicates==="combine"||c.indexOf("[]=")>-1)?i[B]=Qs.combine(i[B],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded):(!Q||o.duplicates==="last")&&(i[B]=f)}}return i},Mbe=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:L8(t,o,e),r=n.length-1;r>=0;--r){var s,g=n[r];if(g==="[]"&&o.parseArrays)Qs.isOverflow(A)?s=A:s=o.allowEmptyArrays&&(A===""||o.strictNullHandling&&A===null)?[]:Qs.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&&Im.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},Tbe=function(t,o,i,e){if(t){var a=_be(t,i);if(a)return Mbe(a,o,i,e)}},Nbe=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"||Qs.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}};U8.exports=function(n,t){var o=Nbe(t);if(n===""||n===null||typeof n>"u")return o.plainObjects?{__proto__:null}:{};for(var i=typeof n=="string"?bbe(n,o):n,e=o.plainObjects?{__proto__:null}:{},a=Object.keys(i),A=0;A{"use strict";var Rbe=F8(),kbe=H8(),vbe=nm();K8.exports={formats:vbe,parse:kbe,stringify:Rbe}});var j8=ee((flA,Y8)=>{function Pbe(n){return n}Y8.exports=Pbe});var bz=ee((eC,Mp)=>{var Gbe=200,Fbe="Expected a function",WN="__lodash_hash_undefined__",Cm=1,_p=2,Az=1/0,tz=9007199254740991,lm="[object Arguments]",HN="[object Array]",rz="[object Boolean]",az="[object Date]",iz="[object Error]",oz="[object Function]",Lbe="[object GeneratorFunction]",dm="[object Map]",nz="[object Number]",bp="[object Object]",J8="[object Promise]",sz="[object RegExp]",pm="[object Set]",gz="[object String]",cz="[object Symbol]",KN="[object WeakMap]",Iz="[object ArrayBuffer]",hm="[object DataView]",Ube="[object Float32Array]",Hbe="[object Float64Array]",Kbe="[object Int8Array]",xbe="[object Int16Array]",Ybe="[object Int32Array]",jbe="[object Uint8Array]",Jbe="[object Uint8ClampedArray]",qbe="[object Uint16Array]",zbe="[object Uint32Array]",Vbe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wbe=/^\w*$/,Zbe=/^\./,Xbe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$be=/[\\^$.*+?()[\]{}|]/g,eMe=/\\(\\)?/g,AMe=/^\[object .+?Constructor\]$/,tMe=/^(?:0|[1-9]\d*)$/,Jt={};Jt[Ube]=Jt[Hbe]=Jt[Kbe]=Jt[xbe]=Jt[Ybe]=Jt[jbe]=Jt[Jbe]=Jt[qbe]=Jt[zbe]=!0;Jt[lm]=Jt[HN]=Jt[Iz]=Jt[rz]=Jt[hm]=Jt[az]=Jt[iz]=Jt[oz]=Jt[dm]=Jt[nz]=Jt[bp]=Jt[sz]=Jt[pm]=Jt[gz]=Jt[KN]=!1;var lz=typeof global=="object"&&global&&global.Object===Object&&global,rMe=typeof self=="object"&&self&&self.Object===Object&&self,Mc=lz||rMe||Function("return this")(),dz=typeof eC=="object"&&eC&&!eC.nodeType&&eC,q8=dz&&typeof Mp=="object"&&Mp&&!Mp.nodeType&&Mp,aMe=q8&&q8.exports===dz,z8=aMe&&lz.process,V8=(function(){try{return z8&&z8.binding("util")}catch{}})(),W8=V8&&V8.isTypedArray;function pz(n,t){for(var o=-1,i=t.length,e=n.length;++o-1}function RMe(n,t){var o=this.__data__,i=fm(o,n);return i<0?o.push([n,t]):o[i][1]=t,this}wg.prototype.clear=MMe;wg.prototype.delete=_Me;wg.prototype.get=TMe;wg.prototype.has=NMe;wg.prototype.set=RMe;function Dg(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&Cm?new um:void 0;for(a.set(n,t),a.set(t,n);++c-1&&n%1==0&&n-1&&n%1==0&&n<=tz}function rC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Sm(n){return!!n&&typeof n=="object"}function tR(n){return typeof n=="symbol"||Sm(n)&&Tp.call(n)==cz}var B_e=W8?sMe(W8):XMe;function f_e(n){return n==null?"":o_e(n)}function Q_e(n,t,o){var i=n==null?void 0:uz(n,t);return i===void 0?o:i}function y_e(n,t){return n!=null&&d_e(n,t,zMe)}function VN(n){return eR(n)?Ez(n):e_e(n)}function m_e(n){return eR(n)?Ez(n,!0):A_e(n)}function S_e(n,t){return n==null?{}:a_e(n,g_e(n),$Me(t))}function w_e(n){return n}function D_e(n){return ym(n)?oMe(mm(n)):i_e(n)}function Oz(){return[]}Mp.exports=S_e});var rV=ee((aC,Rp)=>{var O_e=200,Fz="__lodash_hash_undefined__",b_e=800,M_e=16,Lz=9007199254740991,Uz="[object Arguments]",__e="[object Array]",T_e="[object AsyncFunction]",N_e="[object Boolean]",R_e="[object Date]",k_e="[object Error]",Hz="[object Function]",v_e="[object GeneratorFunction]",P_e="[object Map]",G_e="[object Number]",F_e="[object Null]",Kz="[object Object]",L_e="[object Proxy]",U_e="[object RegExp]",H_e="[object Set]",K_e="[object String]",x_e="[object Undefined]",Y_e="[object WeakMap]",j_e="[object ArrayBuffer]",J_e="[object DataView]",q_e="[object Float32Array]",z_e="[object Float64Array]",V_e="[object Int8Array]",W_e="[object Int16Array]",Z_e="[object Int32Array]",X_e="[object Uint8Array]",$_e="[object Uint8ClampedArray]",eTe="[object Uint16Array]",ATe="[object Uint32Array]",tTe=/[\\^$.*+?()[\]{}|]/g,rTe=/^\[object .+?Constructor\]$/,aTe=/^(?:0|[1-9]\d*)$/,qt={};qt[q_e]=qt[z_e]=qt[V_e]=qt[W_e]=qt[Z_e]=qt[X_e]=qt[$_e]=qt[eTe]=qt[ATe]=!0;qt[Uz]=qt[__e]=qt[j_e]=qt[N_e]=qt[J_e]=qt[R_e]=qt[k_e]=qt[Hz]=qt[P_e]=qt[G_e]=qt[Kz]=qt[U_e]=qt[H_e]=qt[K_e]=qt[Y_e]=!1;var xz=typeof global=="object"&&global&&global.Object===Object&&global,iTe=typeof self=="object"&&self&&self.Object===Object&&self,nC=xz||iTe||Function("return this")(),Yz=typeof aC=="object"&&aC&&!aC.nodeType&&aC,iC=Yz&&typeof Rp=="object"&&Rp&&!Rp.nodeType&&Rp,jz=iC&&iC.exports===Yz,rR=jz&&xz.process,Mz=(function(){try{var n=iC&&iC.require&&iC.require("util").types;return n||rR&&rR.binding&&rR.binding("util")}catch{}})(),_z=Mz&&Mz.isTypedArray;function oTe(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 nTe(n,t){for(var o=-1,i=Array(n);++o-1}function MTe(n,t){var o=this.__data__,i=Mm(o,n);return i<0?(++this.size,o.push([n,t])):o[i][1]=t,this}bg.prototype.clear=wTe;bg.prototype.delete=DTe;bg.prototype.get=OTe;bg.prototype.has=bTe;bg.prototype.set=MTe;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&&a0e(o[0],o[1],A)&&(a=e<3?void 0:a,e=1),t=Object(t);++i-1&&n%1==0&&n0){if(++t>=b_e)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function l0e(n){if(n!=null){try{return bm.call(n)}catch{}try{return n+""}catch{}}return""}function Nm(n,t){return n===t||n!==n&&t!==t}var nR=Gz((function(){return arguments})())?Gz:function(n){return sC(n)&&Og.call(n,"callee")&&!hTe.call(n,"callee")},sR=Array.isArray;function IR(n){return n!=null&&$z(n.length)&&!lR(n)}function d0e(n){return sC(n)&&IR(n)}var Xz=uTe||C0e;function lR(n){if(!pl(n))return!1;var t=_m(n);return t==Hz||t==v_e||t==T_e||t==L_e}function $z(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Lz}function pl(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function sC(n){return n!=null&&typeof n=="object"}function p0e(n){if(!sC(n)||_m(n)!=Kz)return!1;var t=qz(n);if(t===null)return!0;var o=Og.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&bm.call(o)==dTe}var eV=_z?sTe(_z):YTe;function h0e(n){return $Te(n,AV(n))}function AV(n){return IR(n)?UTe(n,!0):jTe(n)}var E0e=e0e(function(n,t,o){Vz(n,t,o)});function u0e(n){return function(){return n}}function tV(n){return n}function C0e(){return!1}Rp.exports=E0e});var Mg=ee((QlA,oV)=>{"use strict";var aV=["nodebuffer","arraybuffer","fragments"],iV=typeof Blob<"u";iV&&aV.push("blob");oV.exports={BINARY_TYPES:aV,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:iV,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var gC=ee((ylA,Rm)=>{"use strict";var{EMPTY_BUFFER:B0e}=Mg(),dR=Buffer[Symbol.species];function f0e(n,t){if(n.length===0)return B0e;if(n.length===1)return n[0];let o=Buffer.allocUnsafe(t),i=0;for(let e=0;e{"use strict";var gV=Symbol("kDone"),hR=Symbol("kRun"),ER=class{constructor(t){this[gV]=()=>{this.pending--,this[hR]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[hR]()}[hR](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[gV])}}};cV.exports=ER});var Fp=ee((SlA,hV)=>{"use strict";var cC=$e("zlib"),lV=gC(),y0e=IV(),{kStatusCode:dV}=Mg(),m0e=Buffer[Symbol.species],S0e=Buffer.from([0,0,255,255]),vm=Symbol("permessage-deflate"),_g=Symbol("total-length"),Pp=Symbol("callback"),_c=Symbol("buffers"),Gp=Symbol("error"),km,uR=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,!km){let o=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;km=new y0e(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[Pp];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){km.add(e=>{this._decompress(t,o,(a,A)=>{e(),i(a,A)})})}compress(t,o,i){km.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"?cC.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=cC.createInflateRaw({...this._options.zlibInflateOptions,windowBits:A}),this._inflate[vm]=this,this._inflate[_g]=0,this._inflate[_c]=[],this._inflate.on("error",D0e),this._inflate.on("data",pV)}this._inflate[Pp]=i,this._inflate.write(t),o&&this._inflate.write(S0e),this._inflate.flush(()=>{let a=this._inflate[Gp];if(a){this._inflate.close(),this._inflate=null,i(a);return}let A=lV.concat(this._inflate[_c],this._inflate[_g]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[_g]=0,this._inflate[_c]=[],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"?cC.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=cC.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:A}),this._deflate[_g]=0,this._deflate[_c]=[],this._deflate.on("data",w0e)}this._deflate[Pp]=i,this._deflate.write(t),this._deflate.flush(cC.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=lV.concat(this._deflate[_c],this._deflate[_g]);o&&(a=new m0e(a.buffer,a.byteOffset,a.length-4)),this._deflate[Pp]=null,this._deflate[_g]=0,this._deflate[_c]=[],o&&this.params[`${e}_no_context_takeover`]&&this._deflate.reset(),i(null,a)})}};hV.exports=uR;function w0e(n){this[_c].push(n),this[_g]+=n.length}function pV(n){if(this[_g]+=n.length,this[vm]._maxPayload<1||this[_g]<=this[vm]._maxPayload){this[_c].push(n);return}this[Gp]=new RangeError("Max payload size exceeded"),this[Gp].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Gp][dV]=1009,this.removeListener("data",pV),this.reset()}function D0e(n){if(this[vm]._inflate=null,this[Gp]){this[Pp](this[Gp]);return}n[dV]=1007,this[Pp](n)}});var Lp=ee((wlA,Pm)=>{"use strict";var{isUtf8:EV}=$e("buffer"),{hasBlob:O0e}=Mg(),b0e=[0,0,0,0,0,0,0,0,0,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 M0e(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function CR(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 _0e(n){return O0e&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&(n[Symbol.toStringTag]==="Blob"||n[Symbol.toStringTag]==="File")}Pm.exports={isBlob:_0e,isValidStatusCode:M0e,isValidUTF8:CR,tokenChars:b0e};if(EV)Pm.exports.isValidUTF8=function(n){return n.length<24?CR(n):EV(n)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let n=$e("utf-8-validate");Pm.exports.isValidUTF8=function(t){return t.length<32?CR(t):n(t)}}catch{}});var mR=ee((DlA,mV)=>{"use strict";var{Writable:T0e}=$e("stream"),uV=Fp(),{BINARY_TYPES:N0e,EMPTY_BUFFER:CV,kStatusCode:R0e,kWebSocket:k0e}=Mg(),{concat:BR,toArrayBuffer:v0e,unmask:P0e}=gC(),{isValidStatusCode:G0e,isValidUTF8:BV}=Lp(),Gm=Buffer[Symbol.species],Ko=0,fV=1,QV=2,yV=3,fR=4,QR=5,Fm=6,yR=class extends T0e{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||N0e[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[k0e]=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=Ko}_write(t,o,i){if(this._opcode===8&&this._state==Ko)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 Gm(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 Ko:this.getInfo(t);break;case fV:this.getPayloadLength16(t);break;case QV:this.getPayloadLength64(t);break;case yV:this.getMask();break;case fR:this.getData(t);break;case QR:case Fm: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[uV.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=fV:this._payloadLength===127?this._state=QV: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=yV:this._state=fR}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=fR}getData(t){let o=CV;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=QR,this.decompress(o,t);return}o.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(o)),this.dataMessage(t)}decompress(t,o){this._extensions[uV.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===Ko&&this.startLoop(o)})}dataMessage(t){if(!this._fin){this._state=Ko;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=BR(i,o):this._binaryType==="arraybuffer"?e=v0e(BR(i,o)):this._binaryType==="blob"?e=new Blob(i):e=i,this._allowSynchronousEvents?(this.emit("message",e,!0),this._state=Ko):(this._state=Fm,setImmediate(()=>{this.emit("message",e,!0),this._state=Ko,this.startLoop(t)}))}else{let e=BR(i,o);if(!this._skipUTF8Validation&&!BV(e)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(a);return}this._state===QR||this._allowSynchronousEvents?(this.emit("message",e,!1),this._state=Ko):(this._state=Fm,setImmediate(()=>{this.emit("message",e,!1),this._state=Ko,this.startLoop(t)}))}}controlMessage(t,o){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,CV),this.end();else{let i=t.readUInt16BE(0);if(!G0e(i)){let a=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");o(a);return}let e=new Gm(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!BV(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=Ko;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=Ko):(this._state=Fm,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=Ko,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[R0e]=e,A}};mV.exports=yR});var DR=ee((blA,DV)=>{"use strict";var{Duplex:OlA}=$e("stream"),{randomFillSync:F0e}=$e("crypto"),{types:{isUint8Array:L0e}}=$e("util"),SV=Fp(),{EMPTY_BUFFER:U0e,kWebSocket:H0e,NOOP:K0e}=Mg(),{isBlob:Up,isValidStatusCode:x0e}=Lp(),{mask:wV,toBuffer:hl}=gC(),xo=Symbol("kByteLength"),Y0e=Buffer.alloc(4),Lm=8*1024,El,Hp=Lm,Mn=0,j0e=1,J0e=2,SR=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=Mn,this.onerror=K0e,this[H0e]=void 0}static frame(t,o){let i,e=!1,a=2,A=!1;o.mask&&(i=o.maskBuffer||Y0e,o.generateMask?o.generateMask(i):(Hp===Lm&&(El===void 0&&(El=Buffer.alloc(Lm)),F0e(El,0,Lm),Hp=0),i[0]=El[Hp++],i[1]=El[Hp++],i[2]=El[Hp++],i[3]=El[Hp++]),A=(i[0]|i[1]|i[2]|i[3])===0,a=6);let r;typeof t=="string"?(!o.mask||A)&&o[xo]!==void 0?r=o[xo]:(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?(wV(t,i,g,a,r),[g]):(wV(t,i,t,0,r),[g,t])):[g,t]}close(t,o,i,e){let a;if(t===void 0)a=U0e;else{if(typeof t!="number"||!x0e(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(L0e(o))a.set(o,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let A={[xo]:a.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==Mn?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):Up(t)?(e=t.size,a=!1):(t=hl(t),e=t.length,a=hl.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[xo]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};Up(t)?this._state!==Mn?this.enqueue([this.getBlobData,t,!1,A,i]):this.getBlobData(t,!1,A,i):this._state!==Mn?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):Up(t)?(e=t.size,a=!1):(t=hl(t),e=t.length,a=hl.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[xo]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};Up(t)?this._state!==Mn?this.enqueue([this.getBlobData,t,!1,A,i]):this.getBlobData(t,!1,A,i):this._state!==Mn?this.enqueue([this.dispatch,t,!1,A,i]):this.sendFrame(n.frame(t,A),i)}send(t,o,i){let e=this._extensions[SV.extensionName],a=o.binary?2:1,A=o.compress,r,s;typeof t=="string"?(r=Buffer.byteLength(t),s=!1):Up(t)?(r=t.size,s=!1):(t=hl(t),r=t.length,s=hl.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={[xo]:r,fin:o.fin,generateMask:this._generateMask,mask:o.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:s,rsv1:A};Up(t)?this._state!==Mn?this.enqueue([this.getBlobData,t,this._compress,g,i]):this.getBlobData(t,this._compress,g,i):this._state!==Mn?this.enqueue([this.dispatch,t,this._compress,g,i]):this.dispatch(t,this._compress,g,i)}getBlobData(t,o,i,e){this._bufferedBytes+=i[xo],this._state=J0e,t.arrayBuffer().then(a=>{if(this._socket.destroyed){let r=new Error("The socket was closed while the blob was being read");process.nextTick(wR,this,r,e);return}this._bufferedBytes-=i[xo];let A=hl(a);o?this.dispatch(A,o,i,e):(this._state=Mn,this.sendFrame(n.frame(A,i),e),this.dequeue())}).catch(a=>{process.nextTick(q0e,this,a,e)})}dispatch(t,o,i,e){if(!o){this.sendFrame(n.frame(t,i),e);return}let a=this._extensions[SV.extensionName];this._bufferedBytes+=i[xo],this._state=j0e,a.compress(t,i.fin,(A,r)=>{if(this._socket.destroyed){let s=new Error("The socket was closed while data was being compressed");wR(this,s,e);return}this._bufferedBytes-=i[xo],this._state=Mn,i.readOnly=!1,this.sendFrame(n.frame(r,i),e),this.dequeue()})}dequeue(){for(;this._state===Mn&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][xo],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][xo],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)}};DV.exports=SR;function wR(n,t,o){typeof o=="function"&&o(t);for(let i=0;i{"use strict";var{kForOnEventAttribute:IC,kListener:OR}=Mg(),OV=Symbol("kCode"),bV=Symbol("kData"),MV=Symbol("kError"),_V=Symbol("kMessage"),TV=Symbol("kReason"),Kp=Symbol("kTarget"),NV=Symbol("kType"),RV=Symbol("kWasClean"),Tg=class{constructor(t){this[Kp]=null,this[NV]=t}get target(){return this[Kp]}get type(){return this[NV]}};Object.defineProperty(Tg.prototype,"target",{enumerable:!0});Object.defineProperty(Tg.prototype,"type",{enumerable:!0});var ul=class extends Tg{constructor(t,o={}){super(t),this[OV]=o.code===void 0?0:o.code,this[TV]=o.reason===void 0?"":o.reason,this[RV]=o.wasClean===void 0?!1:o.wasClean}get code(){return this[OV]}get reason(){return this[TV]}get wasClean(){return this[RV]}};Object.defineProperty(ul.prototype,"code",{enumerable:!0});Object.defineProperty(ul.prototype,"reason",{enumerable:!0});Object.defineProperty(ul.prototype,"wasClean",{enumerable:!0});var xp=class extends Tg{constructor(t,o={}){super(t),this[MV]=o.error===void 0?null:o.error,this[_V]=o.message===void 0?"":o.message}get error(){return this[MV]}get message(){return this[_V]}};Object.defineProperty(xp.prototype,"error",{enumerable:!0});Object.defineProperty(xp.prototype,"message",{enumerable:!0});var lC=class extends Tg{constructor(t,o={}){super(t),this[bV]=o.data===void 0?null:o.data}get data(){return this[bV]}};Object.defineProperty(lC.prototype,"data",{enumerable:!0});var z0e={addEventListener(n,t,o={}){for(let e of this.listeners(n))if(!o[IC]&&e[OR]===t&&!e[IC])return;let i;if(n==="message")i=function(a,A){let r=new lC("message",{data:A?a:a.toString()});r[Kp]=this,Um(t,this,r)};else if(n==="close")i=function(a,A){let r=new ul("close",{code:a,reason:A.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Kp]=this,Um(t,this,r)};else if(n==="error")i=function(a){let A=new xp("error",{error:a,message:a.message});A[Kp]=this,Um(t,this,A)};else if(n==="open")i=function(){let a=new Tg("open");a[Kp]=this,Um(t,this,a)};else return;i[IC]=!!o[IC],i[OR]=t,o.once?this.once(n,i):this.on(n,i)},removeEventListener(n,t){for(let o of this.listeners(n))if(o[OR]===t&&!o[IC]){this.removeListener(n,o);break}}};kV.exports={CloseEvent:ul,ErrorEvent:xp,Event:Tg,EventTarget:z0e,MessageEvent:lC};function Um(n,t,o){typeof n=="object"&&n.handleEvent?n.handleEvent.call(n,o):n.call(t,o)}});var Hm=ee((_lA,PV)=>{"use strict";var{tokenChars:dC}=Lp();function ms(n,t,o){n[t]===void 0?n[t]=[o]:n[t].push(o)}function V0e(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(", ")}PV.exports={format:W0e,parse:V0e}});var jm=ee((RlA,zV)=>{"use strict";var Z0e=$e("events"),X0e=$e("https"),$0e=$e("http"),LV=$e("net"),eNe=$e("tls"),{randomBytes:ANe,createHash:tNe}=$e("crypto"),{Duplex:TlA,Readable:NlA}=$e("stream"),{URL:bR}=$e("url"),Tc=Fp(),rNe=mR(),aNe=DR(),{isBlob:iNe}=Lp(),{BINARY_TYPES:GV,CLOSE_TIMEOUT:oNe,EMPTY_BUFFER:Km,GUID:nNe,kForOnEventAttribute:MR,kListener:sNe,kStatusCode:gNe,kWebSocket:Ia,NOOP:UV}=Mg(),{EventTarget:{addEventListener:cNe,removeEventListener:INe}}=vV(),{format:lNe,parse:dNe}=Hm(),{toBuffer:pNe}=gC(),HV=Symbol("kAborted"),_R=[8,13],Ng=["CONNECTING","OPEN","CLOSING","CLOSED"],hNe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,er=class n extends Z0e{constructor(t,o,i){super(),this._binaryType=GV[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Km,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]),KV(this,t,o,i)):(this._autoPong=i.autoPong,this._closeTimeout=i.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){GV.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 rNe({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 aNe(t,this._extensions,i.generateMask);this._receiver=e,this._sender=a,this._socket=t,e[Ia]=this,a[Ia]=this,t[Ia]=this,e.on("conclude",CNe),e.on("drain",BNe),e.on("error",fNe),e.on("message",QNe),e.on("ping",yNe),e.on("pong",mNe),a.onerror=SNe,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),o.length>0&&t.unshift(o),t.on("close",jV),t.on("data",Ym),t.on("end",JV),t.on("error",qV),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[Tc.extensionName]&&this._extensions[Tc.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){co(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())}),YV(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){TR(this,t,i);return}o===void 0&&(o=!this._isServer),this._sender.ping(t||Km,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){TR(this,t,i);return}o===void 0&&(o=!this._isServer),this._sender.pong(t||Km,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){TR(this,t,i);return}let e={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...o};this._extensions[Tc.extensionName]||(e.compress=!1),this._sender.send(t||Km,e,i)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){co(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(er,"CONNECTING",{enumerable:!0,value:Ng.indexOf("CONNECTING")});Object.defineProperty(er.prototype,"CONNECTING",{enumerable:!0,value:Ng.indexOf("CONNECTING")});Object.defineProperty(er,"OPEN",{enumerable:!0,value:Ng.indexOf("OPEN")});Object.defineProperty(er.prototype,"OPEN",{enumerable:!0,value:Ng.indexOf("OPEN")});Object.defineProperty(er,"CLOSING",{enumerable:!0,value:Ng.indexOf("CLOSING")});Object.defineProperty(er.prototype,"CLOSING",{enumerable:!0,value:Ng.indexOf("CLOSING")});Object.defineProperty(er,"CLOSED",{enumerable:!0,value:Ng.indexOf("CLOSED")});Object.defineProperty(er.prototype,"CLOSED",{enumerable:!0,value:Ng.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(n=>{Object.defineProperty(er.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(er.prototype,`on${n}`,{enumerable:!0,get(){for(let t of this.listeners(n))if(t[MR])return t[sNe];return null},set(t){for(let o of this.listeners(n))if(o[MR]){this.removeListener(n,o);break}typeof t=="function"&&this.addEventListener(n,t,{[MR]:!0})}})});er.prototype.addEventListener=cNe;er.prototype.removeEventListener=INe;zV.exports=er;function KV(n,t,o,i){let e={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:oNe,protocolVersion:_R[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,!_R.includes(e.protocolVersion))throw new RangeError(`Unsupported protocol version: ${e.protocolVersion} (supported versions: ${_R.join(", ")})`);let a;if(t instanceof bR)a=t;else try{a=new bR(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;xm(n,Q);return}let g=A?443:80,c=ANe(16).toString("base64"),I=A?X0e.request:$0e.request,d=new Set,B;if(e.createConnection=e.createConnection||(A?uNe:ENe),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 Tc({...e.perMessageDeflate,isServer:!1,maxPayload:e.maxPayload}),e.headers["Sec-WebSocket-Extensions"]=lNe({[Tc.extensionName]:B.offer()})),o.length){for(let Q of o){if(typeof Q!="string"||!hNe.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",()=>{co(n,f,"Opening handshake has timed out")}),f.on("error",Q=>{f===null||f[HV]||(f=n._req=null,xm(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){co(n,f,"Maximum redirects exceeded");return}f.abort();let T;try{T=new bR(y,t)}catch{let R=new SyntaxError(`Invalid URL: ${y}`);xm(n,R);return}KV(n,T,o,i)}else n.emit("unexpected-response",f,Q)||co(n,f,`Unexpected server response: ${Q.statusCode}`)}),f.on("upgrade",(Q,y,m)=>{if(n.emit("upgrade",Q),n.readyState!==er.CONNECTING)return;f=n._req=null;let T=Q.headers.upgrade;if(T===void 0||T.toLowerCase()!=="websocket"){co(n,y,"Invalid Upgrade header");return}let _=tNe("sha1").update(c+nNe).digest("base64");if(Q.headers["sec-websocket-accept"]!==_){co(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){co(n,y,H);return}R&&(n._protocol=R);let F=Q.headers["sec-websocket-extensions"];if(F!==void 0){if(!B){co(n,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let L;try{L=dNe(F)}catch{co(n,y,"Invalid Sec-WebSocket-Extensions header");return}let q=Object.keys(L);if(q.length!==1||q[0]!==Tc.extensionName){co(n,y,"Server indicated an extension that was not requested");return}try{B.accept(L[Tc.extensionName])}catch{co(n,y,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[Tc.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 xm(n,t){n._readyState=er.CLOSING,n._errorEmitted=!0,n.emit("error",t),n.emitClose()}function ENe(n){return n.path=n.socketPath,LV.connect(n)}function uNe(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=LV.isIP(n.host)?"":n.host),eNe.connect(n)}function co(n,t,o){n._readyState=er.CLOSING;let i=new Error(o);Error.captureStackTrace(i,co),t.setHeader?(t[HV]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(xm,n,i)):(t.destroy(i),t.once("error",n.emit.bind(n,"error")),t.once("close",n.emitClose.bind(n)))}function TR(n,t,o){if(t){let i=iNe(t)?t.size:pNe(t).length;n._socket?n._sender._bufferedBytes+=i:n._bufferedAmount+=i}if(o){let i=new Error(`WebSocket is not open: readyState ${n.readyState} (${Ng[n.readyState]})`);process.nextTick(o,i)}}function CNe(n,t){let o=this[Ia];o._closeFrameReceived=!0,o._closeMessage=t,o._closeCode=n,o._socket[Ia]!==void 0&&(o._socket.removeListener("data",Ym),process.nextTick(xV,o._socket),n===1005?o.close():o.close(n,t))}function BNe(){let n=this[Ia];n.isPaused||n._socket.resume()}function fNe(n){let t=this[Ia];t._socket[Ia]!==void 0&&(t._socket.removeListener("data",Ym),process.nextTick(xV,t._socket),t.close(n[gNe])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n))}function FV(){this[Ia].emitClose()}function QNe(n,t){this[Ia].emit("message",n,t)}function yNe(n){let t=this[Ia];t._autoPong&&t.pong(n,!this._isServer,UV),t.emit("ping",n)}function mNe(n){this[Ia].emit("pong",n)}function xV(n){n.resume()}function SNe(n){let t=this[Ia];t.readyState!==er.CLOSED&&(t.readyState===er.OPEN&&(t._readyState=er.CLOSING,YV(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n)))}function YV(n){n._closeTimer=setTimeout(n._socket.destroy.bind(n._socket),n._closeTimeout)}function jV(){let n=this[Ia];if(this.removeListener("close",jV),this.removeListener("data",Ym),this.removeListener("end",JV),n._readyState=er.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[Ia]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",FV),n._receiver.on("finish",FV))}function Ym(n){this[Ia]._receiver.write(n)||this.pause()}function JV(){let n=this[Ia];n._readyState=er.CLOSING,n._receiver.end(),this.end()}function qV(){let n=this[Ia];this.removeListener("error",qV),this.on("error",UV),n&&(n._readyState=er.CLOSING,this.destroy())}});var XV=ee((vlA,ZV)=>{"use strict";var klA=jm(),{Duplex:wNe}=$e("stream");function VV(n){n.emit("close")}function DNe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function WV(n){this.removeListener("error",WV),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function ONe(n,t){let o=!0,i=new wNe({...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(VV,i);return}let A=!1;n.once("error",function(s){A=!0,a(s)}),n.once("close",function(){A||a(e),process.nextTick(VV,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",DNe),i.on("error",WV),i}ZV.exports=ONe});var NR=ee((PlA,$V)=>{"use strict";var{tokenChars:bNe}=Lp();function MNe(n){let t=new Set,o=-1,i=-1,e=0;for(e;e{"use strict";var _Ne=$e("events"),Jm=$e("http"),{Duplex:GlA}=$e("stream"),{createHash:TNe}=$e("crypto"),eW=Hm(),Cl=Fp(),NNe=NR(),RNe=jm(),{CLOSE_TIMEOUT:kNe,GUID:vNe,kWebSocket:PNe}=Mg(),GNe=/^[+/0-9A-Za-z]{22}==$/,AW=0,tW=1,aW=2,RR=class extends _Ne{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:kNe,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:RNe,...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=Jm.createServer((i,e)=>{let a=Jm.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=FNe(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=AW}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===aW){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!==tW)if(this._state=tW,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",rW);let a=t.headers["sec-websocket-key"],A=t.headers.upgrade,r=+t.headers["sec-websocket-version"];if(t.method!=="GET"){Bl(this,t,o,405,"Invalid HTTP method");return}if(A===void 0||A.toLowerCase()!=="websocket"){Bl(this,t,o,400,"Invalid Upgrade header");return}if(a===void 0||!GNe.test(a)){Bl(this,t,o,400,"Missing or invalid Sec-WebSocket-Key header");return}if(r!==13&&r!==8){Bl(this,t,o,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(t)){hC(o,400);return}let s=t.headers["sec-websocket-protocol"],g=new Set;if(s!==void 0)try{g=NNe.parse(s)}catch{Bl(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 Cl({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let B=eW.parse(c);B[Cl.extensionName]&&(d.accept(B[Cl.extensionName]),I[Cl.extensionName]=d)}catch{Bl(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 hC(o,f||401,Q,y);this.completeUpgrade(I,a,g,t,o,i,e)});return}if(!this.options.verifyClient(d))return hC(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[PNe])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>AW)return hC(a,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${TNe("sha1").update(o+vNe).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[Cl.extensionName]){let I=t[Cl.extensionName].params,d=eW.format({[Cl.extensionName]:[I]});g.push(`Sec-WebSocket-Extensions: ${d}`),c._extensions=t}this.emit("headers",g,e),a.write(g.concat(`\r +`)===-1){Fu("have not received end of HTTP headers yet..."),i();return}let f=p.toString("ascii",0,p.indexOf(`\r +`)),Q=+f.split(" ")[1];Fu("got proxy server response: %o",f),t({statusCode:Q,buffered:p})}n.on("error",g),n.on("close",r),n.on("end",s),i()})}Lu.default=Dwe});var e4=ee(ol=>{"use strict";var Owe=ol&&ol.__awaiter||function(n,t,o,a){function e(i){return i instanceof o?i:new o(function(A){A(i)})}return new(o||(o=Promise))(function(i,A){function r(c){try{g(a.next(c))}catch(I){A(I)}}function s(c){try{g(a.throw(c))}catch(I){A(I)}}function g(c){c.done?i(c.value):e(c.value).then(r,s)}g((a=a.apply(n,t||[])).next())})},Od=ol&&ol.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ol,"__esModule",{value:!0});var Xq=Od($e("net")),$q=Od($e("tls")),bwe=Od($e("url")),Mwe=Od($e("assert")),_we=Od(lt()),Twe=Wq(),Nwe=Od(Zq()),Uu=_we.default("https-proxy-agent:agent"),G0=class extends Twe.Agent{constructor(t){let o;if(typeof t=="string"?o=bwe.default.parse(t):o=t,!o)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Uu("creating new HttpsProxyAgent instance: %o",o),super(o);let a=Object.assign({},o);this.secureProxy=o.secureProxy||vwe(a.protocol),a.host=a.hostname||a.host,typeof a.port=="string"&&(a.port=parseInt(a.port,10)),!a.port&&a.host&&(a.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in a)&&(a.ALPNProtocols=["http 1.1"]),a.host&&a.path&&(delete a.path,delete a.pathname),this.proxy=a}callback(t,o){return Owe(this,void 0,void 0,function*(){let{proxy:a,secureProxy:e}=this,i;e?(Uu("Creating `tls.Socket`: %o",a),i=$q.default.connect(a)):(Uu("Creating `net.Socket`: %o",a),i=Xq.default.connect(a));let A=Object.assign({},a.headers),s=`CONNECT ${`${o.host}:${o.port}`} HTTP/1.1\r +`;a.auth&&(A["Proxy-Authorization"]=`Basic ${Buffer.from(a.auth).toString("base64")}`);let{host:g,port:c,secureEndpoint:I}=o;kwe(c,I)||(g+=`:${c}`),A.Host=g,A.Connection="close";for(let y of Object.keys(A))s+=`${y}: ${A[y]}\r +`;let p=Nwe.default(i);i.write(`${s}\r +`);let{statusCode:B,buffered:f}=yield p;if(B===200){if(t.once("socket",Rwe),o.secureEndpoint){Uu("Upgrading socket connection to TLS");let y=o.servername||o.host;return $q.default.connect(Object.assign(Object.assign({},Pwe(o,"host","hostname","path","port")),{socket:i,servername:y}))}return i}i.destroy();let Q=new Xq.default.Socket({writable:!1});return Q.readable=!0,t.once("socket",y=>{Uu("replaying proxy buffer for failed request"),Mwe.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),Q})}};ol.default=G0;function Rwe(n){n.resume()}function kwe(n,t){return!!(!t&&n===80||t&&n===443)}function vwe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function Pwe(n,...t){let o={},a;for(a in n)t.includes(a)||(o[a]=n[a]);return o}});var H0=ee((U0,A4)=>{"use strict";var Gwe=U0&&U0.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},F0=Gwe(e4());function L0(n){return new F0.default(n)}(function(n){n.HttpsProxyAgent=F0.default,n.prototype=F0.default.prototype})(L0||(L0={}));A4.exports=L0});var r4=ee((tgA,t4)=>{var Hu;t4.exports=function(){if(!Hu){try{Hu=lt()("follow-redirects")}catch{}typeof Hu!="function"&&(Hu=function(){})}Hu.apply(null,arguments)}});var s4=ee((rgA,$0)=>{var xu=$e("url"),Ku=xu.URL,Fwe=$e("http"),Lwe=$e("https"),J0=$e("stream").Writable,q0=$e("assert"),i4=r4();(function(){var t=typeof process<"u",o=typeof window<"u"&&typeof document<"u",a=sl(Error.captureStackTrace);!t&&(o||!a)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var z0=!1;try{q0(new Ku(""))}catch(n){z0=n.code==="ERR_INVALID_URL"}var Uwe=["Authorization","Proxy-Authorization","Cookie"],Hwe=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],V0=["abort","aborted","connect","error","socket","timeout"],W0=Object.create(null);V0.forEach(function(n){W0[n]=function(t,o,a){this._redirectable.emit(n,t,o,a)}});var x0=Yu("ERR_INVALID_URL","Invalid URL",TypeError),Y0=Yu("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Kwe=Yu("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Y0),xwe=Yu("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ywe=Yu("ERR_STREAM_WRITE_AFTER_END","write after end"),jwe=J0.prototype.destroy||o4;function Ya(n,t){J0.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(a){try{o._processResponse(a)}catch(e){o.emit("error",e instanceof Y0?e:new Y0({cause:e}))}},this._headerFilter=new RegExp("^(?:"+Uwe.concat(n.sensitiveHeaders).map(Zwe).join("|")+")$","i"),this._performRequest()}Ya.prototype=Object.create(J0.prototype);Ya.prototype.abort=function(){X0(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Ya.prototype.destroy=function(n){return X0(this._currentRequest,n),jwe.call(this,n),this};Ya.prototype.write=function(n,t,o){if(this._ending)throw new Ywe;if(!nl(n)&&!Vwe(n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(sl(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 xwe),this.abort())};Ya.prototype.end=function(n,t,o){if(sl(n)?(o=n,n=t=null):sl(t)&&(o=t,t=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,o);else{var a=this,e=this._currentRequest;this.write(n,t,function(){a._ended=!0,e.end(null,null,o)}),this._ending=!0}};Ya.prototype.setHeader=function(n,t){this._options.headers[n]=t,this._currentRequest.setHeader(n,t)};Ya.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};Ya.prototype.setTimeout=function(n,t){var o=this;function a(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"),i()},n),a(A)}function i(){o._timeout&&(clearTimeout(o._timeout),o._timeout=null),o.removeListener("abort",i),o.removeListener("error",i),o.removeListener("response",i),o.removeListener("close",i),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",a),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){Ya.prototype[n]=function(t,o){return this._currentRequest[n](t,o)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(Ya.prototype,n,{get:function(){return this._currentRequest[n]}})});Ya.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),zwe(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))}};Ya.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 a=this._currentRequest=t.request(this._options,this._onNativeResponse);a._redirectable=this;for(var e of V0)a.on(e,W0[e]);if(this._currentUrl=/^\//.test(this._options.path)?xu.format(this._options):this._options.path,this._isRedirect){var i=0,A=this,r=this._requestBodyBuffers;(function s(g){if(a===A._currentRequest)if(g)A.emit("error",g);else if(i=400){n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[];return}if(X0(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Kwe;var a,e=this._options.beforeRedirect;e&&(a=Object.assign({Host:n.req.getHeader("host")},this._options.headers));var i=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=[],K0(/^content-/i,this._options.headers));var A=K0(/^host$/i,this._options.headers),r=Z0(this._currentUrl),s=A||r.host,g=/^\w+:/.test(o)?this._currentUrl:xu.format(Object.assign(r,{host:s})),c=Jwe(o,g);if(i4("redirecting to",c.href),this._isRedirect=!0,j0(c,this._options),(c.protocol!==r.protocol&&c.protocol!=="https:"||c.host!==s&&!qwe(c.host,s))&&K0(this._headerFilter,this._options.headers),sl(e)){var I={headers:n.headers,statusCode:t},p={url:g,method:i,headers:a};e(this._options,I,p),this._sanitizeOptions(this._options)}this._performRequest()};function a4(n){var t={maxRedirects:21,maxBodyLength:10485760},o={};return Object.keys(n).forEach(function(a){var e=a+":",i=o[e]=n[a],A=t[a]=Object.create(i);function r(g,c,I){return Wwe(g)?g=j0(g):nl(g)?g=j0(Z0(g)):(I=c,c=n4(g),g={protocol:e}),sl(c)&&(I=c,c=null),c=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},g,c),c.nativeProtocols=o,!nl(c.host)&&!nl(c.hostname)&&(c.hostname="::1"),q0.equal(c.protocol,e,"protocol mismatch"),i4("options",c),new Ya(c,I)}function s(g,c,I){var p=A.request(g,c,I);return p.end(),p}Object.defineProperties(A,{request:{value:r,configurable:!0,enumerable:!0,writable:!0},get:{value:s,configurable:!0,enumerable:!0,writable:!0}})}),t}function o4(){}function Z0(n){var t;if(z0)t=new Ku(n);else if(t=n4(xu.parse(n)),!nl(t.protocol))throw new x0({input:n});return t}function Jwe(n,t){return z0?new Ku(n,t):Z0(xu.resolve(t,n))}function n4(n){if(/^\[/.test(n.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(n.hostname))throw new x0({input:n.href||n});if(/^\[/.test(n.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(n.host))throw new x0({input:n.href||n});return n}function j0(n,t){var o=t||{};for(var a of Hwe)o[a]=n[a];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 K0(n,t){var o;for(var a in t)n.test(a)&&(o=t[a],delete t[a]);return o===null||typeof o>"u"?void 0:String(o).trim()}function Yu(n,t,o){function a(e){sl(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,e||{}),this.code=n,this.message=this.cause?t+": "+this.cause.message:t}return a.prototype=new(o||Error),Object.defineProperties(a.prototype,{constructor:{value:a,enumerable:!1},name:{value:"Error ["+n+"]",enumerable:!1}}),a}function X0(n,t){for(var o of V0)n.removeListener(o,W0[o]);n.on("error",o4),n.destroy(t)}function qwe(n,t){q0(nl(n)&&nl(t));var o=n.length-t.length-1;return o>0&&n[o]==="."&&n.endsWith(t)}function zwe(n){return n instanceof Array}function nl(n){return typeof n=="string"||n instanceof String}function sl(n){return typeof n=="function"}function Vwe(n){return typeof n=="object"&&"length"in n}function Wwe(n){return Ku&&n instanceof Ku}function Zwe(n){return n.replace(/[\]\\/()*+?.$]/g,"\\$&")}$0.exports=a4({http:Fwe,https:Lwe});$0.exports.wrap=a4});var i8=ee((ylA,r8)=>{r8.exports=$e("util").inspect});var AC=ee((mlA,S8)=>{var TN=typeof Map=="function"&&Map.prototype,yN=Object.getOwnPropertyDescriptor&&TN?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,nm=TN&&yN&&typeof yN.get=="function"?yN.get:null,a8=TN&&Map.prototype.forEach,NN=typeof Set=="function"&&Set.prototype,mN=Object.getOwnPropertyDescriptor&&NN?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,sm=NN&&mN&&typeof mN.get=="function"?mN.get:null,o8=NN&&Set.prototype.forEach,cOe=typeof WeakMap=="function"&&WeakMap.prototype,Xu=cOe?WeakMap.prototype.has:null,IOe=typeof WeakSet=="function"&&WeakSet.prototype,$u=IOe?WeakSet.prototype.has:null,lOe=typeof WeakRef=="function"&&WeakRef.prototype,n8=lOe?WeakRef.prototype.deref:null,pOe=Boolean.prototype.valueOf,dOe=Object.prototype.toString,hOe=Function.prototype.toString,EOe=String.prototype.match,RN=String.prototype.slice,Mc=String.prototype.replace,uOe=String.prototype.toUpperCase,s8=String.prototype.toLowerCase,u8=RegExp.prototype.test,g8=Array.prototype.concat,fs=Array.prototype.join,COe=Array.prototype.slice,c8=Math.floor,DN=typeof BigInt=="function"?BigInt.prototype.valueOf:null,SN=Object.getOwnPropertySymbols,ON=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Td=typeof Symbol=="function"&&typeof Symbol.iterator=="object",eC=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Td||!0)?Symbol.toStringTag:null,C8=Object.prototype.propertyIsEnumerable,I8=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function l8(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||u8.call(/e/,t))return t;var o=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var a=n<0?-c8(-n):c8(n);if(a!==n){var e=String(a),i=RN.call(t,e.length+1);return Mc.call(e,o,"$&_")+"."+Mc.call(Mc.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mc.call(t,o,"$&_")}var bN=i8(),p8=bN.custom,d8=Q8(p8)?p8:null,B8={__proto__:null,double:'"',single:"'"},BOe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};S8.exports=function n(t,o,a,e){var i=o||{};if(wg(i,"quoteStyle")&&!wg(B8,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(wg(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var A=wg(i,"customInspect")?i.customInspect:!0;if(typeof A!="boolean"&&A!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(wg(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(wg(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var r=i.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 m8(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return r?l8(t,s):s}if(typeof t=="bigint"){var g=String(t)+"n";return r?l8(t,g):g}var c=typeof i.depth>"u"?5:i.depth;if(typeof a>"u"&&(a=0),a>=c&&c>0&&typeof t=="object")return MN(t)?"[Array]":"[Object]";var I=GOe(i,a);if(typeof e>"u")e=[];else if(y8(e,t)>=0)return"[Circular]";function p(H,N,k){if(N&&(e=COe.call(e),e.push(N)),k){var J={depth:i.depth};return wg(i,"quoteStyle")&&(J.quoteStyle=i.quoteStyle),n(H,J,a+1,e)}return n(H,i,a+1,e)}if(typeof t=="function"&&!h8(t)){var B=bOe(t),f=om(t,p);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(f.length>0?" { "+fs.call(f,", ")+" }":"")}if(Q8(t)){var Q=Td?Mc.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ON.call(t);return typeof t=="object"&&!Td?Zu(Q):Q}if(kOe(t)){for(var y="<"+s8.call(String(t.nodeName)),m=t.attributes||[],T=0;T",y}if(MN(t)){if(t.length===0)return"[]";var _=om(t,p);return I&&!POe(_)?"["+_N(_,I)+"]":"[ "+fs.call(_,", ")+" ]"}if(yOe(t)){var R=om(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!C8.call(t,"cause")?"{ ["+String(t)+"] "+fs.call(g8.call("[cause]: "+p(t.cause),R),", ")+" }":R.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+fs.call(R,", ")+" }"}if(typeof t=="object"&&A){if(d8&&typeof t[d8]=="function"&&bN)return bN(t,{depth:c-a});if(A!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(MOe(t)){var L=[];return a8&&a8.call(t,function(H,N){L.push(p(N,t,!0)+" => "+p(H,t))}),E8("Map",nm.call(t),L,I)}if(NOe(t)){var U=[];return o8&&o8.call(t,function(H){U.push(p(H,t))}),E8("Set",sm.call(t),U,I)}if(_Oe(t))return wN("WeakMap");if(ROe(t))return wN("WeakSet");if(TOe(t))return wN("WeakRef");if(SOe(t))return Zu(p(Number(t)));if(DOe(t))return Zu(p(DN.call(t)));if(wOe(t))return Zu(pOe.call(t));if(mOe(t))return Zu(p(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(!QOe(t)&&!h8(t)){var F=om(t,p),q=I8?I8(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",K=!q&&eC&&Object(t)===t&&eC in t?RN.call(_c(t),8,-1):z?"Object":"",G=q||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",V=G+(K||z?"["+fs.call(g8.call([],K||[],z||[]),": ")+"] ":"");return F.length===0?V+"{}":I?V+"{"+_N(F,I)+"}":V+"{ "+fs.call(F,", ")+" }"}return String(t)};function f8(n,t,o){var a=o.quoteStyle||t,e=B8[a];return e+n+e}function fOe(n){return Mc.call(String(n),/"/g,""")}function cl(n){return!eC||!(typeof n=="object"&&(eC in n||typeof n[eC]<"u"))}function MN(n){return _c(n)==="[object Array]"&&cl(n)}function QOe(n){return _c(n)==="[object Date]"&&cl(n)}function h8(n){return _c(n)==="[object RegExp]"&&cl(n)}function yOe(n){return _c(n)==="[object Error]"&&cl(n)}function mOe(n){return _c(n)==="[object String]"&&cl(n)}function SOe(n){return _c(n)==="[object Number]"&&cl(n)}function wOe(n){return _c(n)==="[object Boolean]"&&cl(n)}function Q8(n){if(Td)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!ON)return!1;try{return ON.call(n),!0}catch{}return!1}function DOe(n){if(!n||typeof n!="object"||!DN)return!1;try{return DN.call(n),!0}catch{}return!1}var OOe=Object.prototype.hasOwnProperty||function(n){return n in this};function wg(n,t){return OOe.call(n,t)}function _c(n){return dOe.call(n)}function bOe(n){if(n.name)return n.name;var t=EOe.call(hOe.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function y8(n,t){if(n.indexOf)return n.indexOf(t);for(var o=0,a=n.length;ot.maxStringLength){var o=n.length-t.maxStringLength,a="... "+o+" more character"+(o>1?"s":"");return m8(RN.call(n,0,t.maxStringLength),t)+a}var e=BOe[t.quoteStyle||"single"];e.lastIndex=0;var i=Mc.call(Mc.call(n,e,"\\$1"),/[\x00-\x1f]/g,vOe);return f8(i,"single",t)}function vOe(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":"")+uOe.call(t.toString(16))}function Zu(n){return"Object("+n+")"}function wN(n){return n+" { ? }"}function E8(n,t,o,a){var e=a?_N(o,a):fs.call(o,", ");return n+" ("+t+") {"+e+"}"}function POe(n){for(var t=0;t=0)return!1;return!0}function GOe(n,t){var o;if(n.indent===" ")o=" ";else if(typeof n.indent=="number"&&n.indent>0)o=fs.call(Array(n.indent+1)," ");else return null;return{base:o,prev:fs.call(Array(t+1),o)}}function _N(n,t){if(n.length===0)return"";var o=` +`+t.prev+t.base;return o+fs.call(n,","+o)+` +`+t.prev}function om(n,t){var o=MN(n),a=[];if(o){a.length=n.length;for(var e=0;e{"use strict";var FOe=AC(),LOe=wc(),gm=function(n,t,o){for(var a=n,e;(e=a.next)!=null;a=e)if(e.key===t)return a.next=e.next,o||(e.next=n.next,n.next=e),e},UOe=function(n,t){if(n){var o=gm(n,t);return o&&o.value}},HOe=function(n,t,o){var a=gm(n,t);a?a.value=o:n.next={key:t,next:n.next,value:o}},KOe=function(n,t){return n?!!gm(n,t):!1},xOe=function(n,t){if(n)return gm(n,t,!0)};w8.exports=function(){var t,o={assert:function(a){if(!o.has(a))throw new LOe("Side channel does not contain "+FOe(a))},delete:function(a){var e=xOe(t,a);return e&&t&&!t.next&&(t=void 0),!!e},get:function(a){return UOe(t,a)},has:function(a){return KOe(t,a)},set:function(a,e){t||(t={next:void 0}),HOe(t,a,e)}};return o}});var kN=ee((wlA,M8)=>{"use strict";var O8=ku(),b8=g0(),YOe=b8([O8("%String.prototype.indexOf%")]);M8.exports=function(t,o){var a=O8(t,!!o);return typeof a=="function"&&YOe(t,".prototype.")>-1?b8([a]):a}});var vN=ee((DlA,T8)=>{"use strict";var jOe=ku(),tC=kN(),JOe=AC(),qOe=wc(),_8=jOe("%Map%",!0),zOe=tC("Map.prototype.get",!0),VOe=tC("Map.prototype.set",!0),WOe=tC("Map.prototype.has",!0),ZOe=tC("Map.prototype.delete",!0),XOe=tC("Map.prototype.size",!0);T8.exports=!!_8&&function(){var t,o={assert:function(a){if(!o.has(a))throw new qOe("Side channel does not contain "+JOe(a))},delete:function(a){if(t){var e=ZOe(t,a);return XOe(t)===0&&(t=void 0),e}return!1},get:function(a){if(t)return zOe(t,a)},has:function(a){return t?WOe(t,a):!1},set:function(a,e){t||(t=new _8),VOe(t,a,e)}};return o}});var R8=ee((OlA,N8)=>{"use strict";var $Oe=ku(),Im=kN(),ebe=AC(),cm=vN(),Abe=wc(),Nd=$Oe("%WeakMap%",!0),tbe=Im("WeakMap.prototype.get",!0),rbe=Im("WeakMap.prototype.set",!0),ibe=Im("WeakMap.prototype.has",!0),abe=Im("WeakMap.prototype.delete",!0);N8.exports=Nd?function(){var t,o,a={assert:function(e){if(!a.has(e))throw new Abe("Side channel does not contain "+ebe(e))},delete:function(e){if(Nd&&e&&(typeof e=="object"||typeof e=="function")){if(t)return abe(t,e)}else if(cm&&o)return o.delete(e);return!1},get:function(e){return Nd&&e&&(typeof e=="object"||typeof e=="function")&&t?tbe(t,e):o&&o.get(e)},has:function(e){return Nd&&e&&(typeof e=="object"||typeof e=="function")&&t?ibe(t,e):!!o&&o.has(e)},set:function(e,i){Nd&&e&&(typeof e=="object"||typeof e=="function")?(t||(t=new Nd),rbe(t,e,i)):cm&&(o||(o=cm()),o.set(e,i))}};return a}:cm});var PN=ee((blA,k8)=>{"use strict";var obe=wc(),nbe=AC(),sbe=D8(),gbe=vN(),cbe=R8(),Ibe=cbe||gbe||sbe;k8.exports=function(){var t,o={assert:function(a){if(!o.has(a)){var e=a&&Object(a)===a?"the given object key":nbe(a);throw new obe("Side channel does not contain "+e)}},delete:function(a){return!!t&&t.delete(a)},get:function(a){return t&&t.get(a)},has:function(a){return!!t&&t.has(a)},set:function(a,e){t||(t=Ibe()),t.set(a,e)}};return o}});var lm=ee((MlA,v8)=>{"use strict";var lbe=String.prototype.replace,pbe=/%20/g,GN={RFC1738:"RFC1738",RFC3986:"RFC3986"};v8.exports={default:GN.RFC3986,formatters:{RFC1738:function(n){return lbe.call(n,pbe,"+")},RFC3986:function(n){return String(n)}},RFC1738:GN.RFC1738,RFC3986:GN.RFC3986}});var HN=ee((_lA,F8)=>{"use strict";var dbe=lm(),G8=PN(),P8=i0(),FN=Object.prototype.hasOwnProperty,Il=Array.isArray,dm=G8(),ll=function(t,o){return dm.set(t,o),t},pl=function(t){return dm.has(t)},rC=function(t){return dm.get(t)},LN=function(t,o){dm.set(t,o)},Qs=(function(){for(var n=[],t=0;t<256;++t)n[n.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return n})(),hbe=function(t){for(;t.length>1;){var o=t.pop(),a=o.obj[o.prop];if(Il(a)){for(var e=[],i=0;i=a.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return ll(Rd(t.concat(o),a),e)}t[e]=o}else if(t&&typeof t=="object")if(pl(t)){var i=rC(t)+1;t[i]=o,LN(t,i)}else{if(a&&a.strictMerge)return[t,o];(a&&(a.plainObjects||a.allowPrototypes)||!FN.call(Object.prototype,o))&&(t[o]=!0)}else return[t,o];return t}if(!t||typeof t!="object"){if(pl(o)){for(var A=Object.keys(o),r=a&&a.plainObjects?{__proto__:null,0:t}:{0:t},s=0;sa.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return ll(Rd(c,a),c.length-1)}return c}var I=t;if(Il(t)&&!Il(o)&&(I=Rd(t,a)),Il(t)&&Il(o)){if(o.forEach(function(p,B){if(FN.call(t,B)){var f=t[B];f&&typeof f=="object"&&p&&typeof p=="object"?t[B]=n(f,p,a):t[t.length]=p}else t[B]=p}),a&&typeof a.arrayLimit=="number"&&t.length>a.arrayLimit){if(a.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return ll(Rd(t,a),t.length-1)}return t}return Object.keys(o).reduce(function(p,B){var f=o[B];if(FN.call(p,B)?UN(p,B,n(p[B],f,a)):UN(p,B,f),pl(o)&&!pl(p)&&ll(p,rC(o)),pl(p)){var Q=parseInt(B,10);String(Q)===B&&Q>=0&&Q>rC(p)&&LN(p,Q)}return p},I)},ube=function(t,o){return Object.keys(o).reduce(function(a,e){return UN(a,e,o[e]),a},t)},Cbe=function(n,t,o){var a=n.replace(/\+/g," ");if(o==="iso-8859-1")return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch{return a}},pm=1024,Bbe=function(t,o,a,e,i){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)),a==="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=pm?A.slice(s,s+pm):A;if(s+pm=55296&&c<=56319&&(g=g.slice(0,-1),s-=1)}for(var I=[],p=0;p=48&&B<=57||B>=65&&B<=90||B>=97&&B<=122||i===dbe.RFC1738&&(B===40||B===41)){I[I.length]=g.charAt(p);continue}if(B<128){I[I.length]=Qs[B];continue}if(B<2048){I[I.length]=Qs[192|B>>6]+Qs[128|B&63];continue}if(B<55296||B>=57344){I[I.length]=Qs[224|B>>12]+Qs[128|B>>6&63]+Qs[128|B&63];continue}p+=1,B=65536+((B&1023)<<10|g.charCodeAt(p)&1023),I[I.length]=Qs[240|B>>18]+Qs[128|B>>12&63]+Qs[128|B>>6&63]+Qs[128|B&63]}r+=I.join("")}return r},fbe=function(t){for(var o=[{obj:{o:t},prop:"o"}],a=G8(),e=0;ea){if(i)throw new RangeError("Array limit exceeded. Only "+a+" element"+(a===1?"":"s")+" allowed in an array.");return ll(Rd(r,{plainObjects:e}),r.length-1)}return r},Sbe=function(t,o){if(Il(t)){for(var a=[],e=0;e{"use strict";var U8=PN(),hm=HN(),iC=lm(),wbe=Object.prototype.hasOwnProperty,H8={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,o){return t+"["+o+"]"},repeat:function(t){return t}},ys=Array.isArray,Dbe=Array.prototype.push,K8=function(n,t){Dbe.apply(n,ys(t)?t:[t])},Obe=Date.prototype.toISOString,L8=iC.default,xr={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:hm.encode,encodeValuesOnly:!1,filter:void 0,format:L8,formatter:iC.formatters[L8],indices:!1,serializeDate:function(t){return Obe.call(t)},skipNulls:!1,strictNullHandling:!1},bbe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},KN={},Mbe=function n(t,o,a,e,i,A,r,s,g,c,I,p,B,f,Q,y,m,T){for(var _=t,R=T,L=0,U=!1;(R=R.get(KN))!==void 0&&!U;){var F=R.get(t);if(L+=1,typeof F<"u"){if(F===L)throw new RangeError("Cyclic object value");U=!0}typeof R.get(KN)>"u"&&(L=0)}if(typeof c=="function"?_=c(o,_):_ instanceof Date?_=B(_):a==="comma"&&ys(_)&&(_=hm.maybeMap(_,function(oe){return oe instanceof Date?B(oe):oe})),_===null){if(A)return Q(g&&!y?g(o,xr.encoder,m,"key",f):o);_=""}if(bbe(_)||hm.isBuffer(_)){if(g){var q=y?o:g(o,xr.encoder,m,"key",f);return[Q(q)+"="+Q(g(_,xr.encoder,m,"value",f))]}return[Q(o)+"="+Q(String(_))]}var z=[];if(typeof _>"u")return z;var K;if(a==="comma"&&ys(_))y&&g&&(_=hm.maybeMap(_,function(oe){return oe==null?oe:g(oe)})),K=[{value:_.length>0?_.join(",")||null:void 0}];else if(ys(c))K=c;else{var G=Object.keys(_);K=I?G.sort(I):G}var V=s?String(o).replace(/\./g,"%2E"):String(o),H=e&&ys(_)&&_.length===1?V+"[]":V;if(i&&ys(_)&&_.length===0)return H+"[]";for(var N=0;N"u"?t.encodeDotInKeys===!0?!0:xr.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:xr.addQueryPrefix,allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:xr.allowEmptyArrays,arrayFormat:A,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:xr.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?xr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:xr.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:xr.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:xr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:xr.encodeValuesOnly,filter:i,format:a,formatter:e,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:xr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:xr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:xr.strictNullHandling}};x8.exports=function(n,t){var o=n,a=_be(t),e,i;typeof a.filter=="function"?(i=a.filter,o=i("",o)):ys(a.filter)&&(i=a.filter,e=i);var A=[];if(typeof o!="object"||o===null)return"";var r=H8[a.arrayFormat],s=r==="comma"&&a.commaRoundTrip;e||(e=Object.keys(o)),a.sort&&e.sort(a.sort);for(var g=U8(),c=0;c"u"||I===null)){var p=o[I];a.skipNulls&&p===null||K8(A,Mbe(p,I,r,s,a.allowEmptyArrays,a.strictNullHandling,a.skipNulls,a.encodeDotInKeys,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,g))}}var B=A.join(a.delimiter),f=a.addQueryPrefix===!0?"?":"";return a.charsetSentinel&&(a.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B"+a.delimiter:f+="utf8=%E2%9C%93"+a.delimiter),B.length>0?f+B:""}});var q8=ee((NlA,J8)=>{"use strict";var ms=HN(),Em=Object.prototype.hasOwnProperty,xN=Array.isArray,dr={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ms.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},Tbe=function(n){return n.replace(/&#(\d+);/g,function(t,o){return String.fromCharCode(parseInt(o,10))})},j8=function(n,t,o,a){if(n&&typeof n=="string"&&t.comma&&n.indexOf(",")>-1){if(a&&t.throwOnLimitExceeded)for(var e=0,i=n.indexOf(",");i>-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.");i=n.indexOf(",",i+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},Nbe="utf8=%26%2310003%3B",Rbe="utf8=%E2%9C%93",kbe=function(t,o){var a={__proto__:null},e=o.ignoreQueryPrefix?t.replace(/^\?/,""):t;e=e.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=o.parameterLimit===1/0?void 0:o.parameterLimit,A=e.split(o.delimiter,o.throwOnLimitExceeded&&typeof i<"u"?i+1:i);if(o.throwOnLimitExceeded&&typeof i<"u"&&A.length>i)throw new RangeError("Parameter limit exceeded. Only "+i+" parameter"+(i===1?"":"s")+" allowed.");var r=-1,s,g=o.charset;if(o.charsetSentinel)for(s=0;s-1&&(f=xN(f)?[f]:f),o.comma&&xN(f)&&f.length>o.arrayLimit&&(f=ms.combine([],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded)),B!==null){var Q=Em.call(a,B);Q&&(o.duplicates==="combine"||c.indexOf("[]=")>-1)?a[B]=ms.combine(a[B],f,o.arrayLimit,o.plainObjects,o.throwOnLimitExceeded):(!Q||o.duplicates==="last")&&(a[B]=f)}}return a},vbe=function(n,t,o,a){var e=0;if(n.length>0&&n[n.length-1]==="[]"){var i=n.slice(0,-1).join("");e=Array.isArray(t)&&t[i]?t[i].length:0}for(var A=a?t:j8(t,o,e),r=n.length-1;r>=0;--r){var s,g=n[r];if(g==="[]"&&o.parseArrays)ms.isOverflow(A)?s=A:s=o.allowEmptyArrays&&(A===""||o.strictNullHandling&&A===null)?[]:ms.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,p=parseInt(I,10),B=!isNaN(p)&&g!==I&&String(p)===I&&p>=0&&o.parseArrays;if(!o.parseArrays&&I==="")s={0:A};else if(B&&p=0?a.slice(0,i):a;if(A){if(!o.plainObjects&&Em.call(Object.prototype,A)&&!o.allowPrototypes)return;e[e.length]=A}for(var r=a.length,s=i,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]="["+a.slice(s)+"]"}return e},Gbe=function(t,o,a,e){if(t){var i=Pbe(t,a);if(i)return vbe(i,o,a,e)}},Fbe=function(t){if(!t)return dr;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"?dr.charset:t.charset,a=typeof t.duplicates>"u"?dr.duplicates:t.duplicates;if(a!=="combine"&&a!=="first"&&a!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var e=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:dr.allowDots:!!t.allowDots;return{allowDots:e,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:dr.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:dr.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:dr.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:dr.arrayLimit,charset:o,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:dr.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:dr.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:dr.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:dr.decoder,delimiter:typeof t.delimiter=="string"||ms.isRegExp(t.delimiter)?t.delimiter:dr.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:dr.depth,duplicates:a,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:dr.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:dr.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:dr.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:dr.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:dr.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:dr.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}};J8.exports=function(n,t){var o=Fbe(t);if(n===""||n===null||typeof n>"u")return o.plainObjects?{__proto__:null}:{};for(var a=typeof n=="string"?kbe(n,o):n,e=o.plainObjects?{__proto__:null}:{},i=Object.keys(a),A=0;A{"use strict";var Lbe=Y8(),Ube=q8(),Hbe=lm();z8.exports={formats:Hbe,parse:Ube,stringify:Lbe}});var Z8=ee((klA,W8)=>{function Kbe(n){return n}W8.exports=Kbe});var kz=ee((aC,vd)=>{var xbe=200,Ybe="Expected a function",AR="__lodash_hash_undefined__",mm=1,Pd=2,nz=1/0,sz=9007199254740991,um="[object Arguments]",JN="[object Array]",gz="[object Boolean]",cz="[object Date]",Iz="[object Error]",lz="[object Function]",jbe="[object GeneratorFunction]",Cm="[object Map]",pz="[object Number]",kd="[object Object]",X8="[object Promise]",dz="[object RegExp]",Bm="[object Set]",hz="[object String]",Ez="[object Symbol]",qN="[object WeakMap]",uz="[object ArrayBuffer]",fm="[object DataView]",Jbe="[object Float32Array]",qbe="[object Float64Array]",zbe="[object Int8Array]",Vbe="[object Int16Array]",Wbe="[object Int32Array]",Zbe="[object Uint8Array]",Xbe="[object Uint8ClampedArray]",$be="[object Uint16Array]",eMe="[object Uint32Array]",AMe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tMe=/^\w*$/,rMe=/^\./,iMe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,aMe=/[\\^$.*+?()[\]{}|]/g,oMe=/\\(\\)?/g,nMe=/^\[object .+?Constructor\]$/,sMe=/^(?:0|[1-9]\d*)$/,Jt={};Jt[Jbe]=Jt[qbe]=Jt[zbe]=Jt[Vbe]=Jt[Wbe]=Jt[Zbe]=Jt[Xbe]=Jt[$be]=Jt[eMe]=!0;Jt[um]=Jt[JN]=Jt[uz]=Jt[gz]=Jt[fm]=Jt[cz]=Jt[Iz]=Jt[lz]=Jt[Cm]=Jt[pz]=Jt[kd]=Jt[dz]=Jt[Bm]=Jt[hz]=Jt[qN]=!1;var Cz=typeof global=="object"&&global&&global.Object===Object&&global,gMe=typeof self=="object"&&self&&self.Object===Object&&self,Rc=Cz||gMe||Function("return this")(),Bz=typeof aC=="object"&&aC&&!aC.nodeType&&aC,$8=Bz&&typeof vd=="object"&&vd&&!vd.nodeType&&vd,cMe=$8&&$8.exports===Bz,ez=cMe&&Cz.process,Az=(function(){try{return ez&&ez.binding("util")}catch{}})(),tz=Az&&Az.isTypedArray;function fz(n,t){for(var o=-1,a=t.length,e=n.length;++o-1}function LMe(n,t){var o=this.__data__,a=wm(o,n);return a<0?o.push([n,t]):o[a][1]=t,this}Og.prototype.clear=vMe;Og.prototype.delete=PMe;Og.prototype.get=GMe;Og.prototype.has=FMe;Og.prototype.set=LMe;function bg(n){var t=-1,o=n?n.length:0;for(this.clear();++tr))return!1;var g=i.get(n);if(g&&i.get(t))return g==t;var c=-1,I=!0,p=e&mm?new ym:void 0;for(i.set(n,t),i.set(t,n);++c-1&&n%1==0&&n-1&&n%1==0&&n<=sz}function sC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Mm(n){return!!n&&typeof n=="object"}function nR(n){return typeof n=="symbol"||Mm(n)&&Gd.call(n)==Ez}var w_e=tz?dMe(tz):i_e;function D_e(n){return n==null?"":l_e(n)}function O_e(n,t,o){var a=n==null?void 0:mz(n,t);return a===void 0?o:a}function b_e(n,t){return n!=null&&B_e(n,t,e_e)}function eR(n){return aR(n)?yz(n):o_e(n)}function M_e(n){return aR(n)?yz(n,!0):n_e(n)}function __e(n,t){return n==null?{}:c_e(n,h_e(n),a_e(t))}function T_e(n){return n}function N_e(n){return Om(n)?lMe(bm(n)):I_e(n)}function Rz(){return[]}vd.exports=__e});var gV=ee((gC,Ld)=>{var R_e=200,Yz="__lodash_hash_undefined__",k_e=800,v_e=16,jz=9007199254740991,Jz="[object Arguments]",P_e="[object Array]",G_e="[object AsyncFunction]",F_e="[object Boolean]",L_e="[object Date]",U_e="[object Error]",qz="[object Function]",H_e="[object GeneratorFunction]",K_e="[object Map]",x_e="[object Number]",Y_e="[object Null]",zz="[object Object]",j_e="[object Proxy]",J_e="[object RegExp]",q_e="[object Set]",z_e="[object String]",V_e="[object Undefined]",W_e="[object WeakMap]",Z_e="[object ArrayBuffer]",X_e="[object DataView]",$_e="[object Float32Array]",eTe="[object Float64Array]",ATe="[object Int8Array]",tTe="[object Int16Array]",rTe="[object Int32Array]",iTe="[object Uint8Array]",aTe="[object Uint8ClampedArray]",oTe="[object Uint16Array]",nTe="[object Uint32Array]",sTe=/[\\^$.*+?()[\]{}|]/g,gTe=/^\[object .+?Constructor\]$/,cTe=/^(?:0|[1-9]\d*)$/,qt={};qt[$_e]=qt[eTe]=qt[ATe]=qt[tTe]=qt[rTe]=qt[iTe]=qt[aTe]=qt[oTe]=qt[nTe]=!0;qt[Jz]=qt[P_e]=qt[Z_e]=qt[F_e]=qt[X_e]=qt[L_e]=qt[U_e]=qt[qz]=qt[K_e]=qt[x_e]=qt[zz]=qt[J_e]=qt[q_e]=qt[z_e]=qt[W_e]=!1;var Vz=typeof global=="object"&&global&&global.Object===Object&&global,ITe=typeof self=="object"&&self&&self.Object===Object&&self,lC=Vz||ITe||Function("return this")(),Wz=typeof gC=="object"&&gC&&!gC.nodeType&&gC,cC=Wz&&typeof Ld=="object"&&Ld&&!Ld.nodeType&&Ld,Zz=cC&&cC.exports===Wz,sR=Zz&&Vz.process,vz=(function(){try{var n=cC&&cC.require&&cC.require("util").types;return n||sR&&sR.binding&&sR.binding("util")}catch{}})(),Pz=vz&&vz.isTypedArray;function lTe(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 pTe(n,t){for(var o=-1,a=Array(n);++o-1}function vTe(n,t){var o=this.__data__,a=km(o,n);return a<0?(++this.size,o.push([n,t])):o[a][1]=t,this}_g.prototype.clear=TTe;_g.prototype.delete=NTe;_g.prototype.get=RTe;_g.prototype.has=kTe;_g.prototype.set=vTe;function Ud(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(i=n.length>3&&typeof i=="function"?(e--,i):void 0,A&&c0e(o[0],o[1],A)&&(i=e<3?void 0:i,e=1),t=Object(t);++a-1&&n%1==0&&n0){if(++t>=k_e)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function C0e(n){if(n!=null){try{return Rm.call(n)}catch{}try{return n+""}catch{}}return""}function Gm(n,t){return n===t||n!==n&&t!==t}var lR=xz((function(){return arguments})())?xz:function(n){return pC(n)&&Mg.call(n,"callee")&&!QTe.call(n,"callee")},pR=Array.isArray;function ER(n){return n!=null&&aV(n.length)&&!uR(n)}function B0e(n){return pC(n)&&ER(n)}var iV=mTe||S0e;function uR(n){if(!Cl(n))return!1;var t=vm(n);return t==qz||t==H_e||t==G_e||t==j_e}function aV(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=jz}function Cl(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function pC(n){return n!=null&&typeof n=="object"}function f0e(n){if(!pC(n)||vm(n)!=zz)return!1;var t=$z(n);if(t===null)return!0;var o=Mg.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&Rm.call(o)==BTe}var oV=Pz?dTe(Pz):WTe;function Q0e(n){return a0e(n,nV(n))}function nV(n){return ER(n)?JTe(n,!0):ZTe(n)}var y0e=o0e(function(n,t,o){AV(n,t,o)});function m0e(n){return function(){return n}}function sV(n){return n}function S0e(){return!1}Ld.exports=y0e});var Tg=ee((vlA,lV)=>{"use strict";var cV=["nodebuffer","arraybuffer","fragments"],IV=typeof Blob<"u";IV&&cV.push("blob");lV.exports={BINARY_TYPES:cV,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:IV,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var dC=ee((PlA,Fm)=>{"use strict";var{EMPTY_BUFFER:w0e}=Tg(),CR=Buffer[Symbol.species];function D0e(n,t){if(n.length===0)return w0e;if(n.length===1)return n[0];let o=Buffer.allocUnsafe(t),a=0;for(let e=0;e{"use strict";var hV=Symbol("kDone"),fR=Symbol("kRun"),QR=class{constructor(t){this[hV]=()=>{this.pending--,this[fR]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[fR]()}[fR](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[hV])}}};EV.exports=QR});var Yd=ee((FlA,QV)=>{"use strict";var hC=$e("zlib"),CV=dC(),b0e=uV(),{kStatusCode:BV}=Tg(),M0e=Buffer[Symbol.species],_0e=Buffer.from([0,0,255,255]),Um=Symbol("permessage-deflate"),Ng=Symbol("total-length"),Kd=Symbol("callback"),kc=Symbol("buffers"),xd=Symbol("error"),Lm,yR=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,!Lm){let o=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Lm=new b0e(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[Kd];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,a=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(!a)throw new Error("None of the extension offers can be accepted");return o.serverNoContextTakeover&&(a.server_no_context_takeover=!0),o.clientNoContextTakeover&&(a.client_no_context_takeover=!0),typeof o.serverMaxWindowBits=="number"&&(a.server_max_window_bits=o.serverMaxWindowBits),typeof o.clientMaxWindowBits=="number"?a.client_max_window_bits=o.clientMaxWindowBits:(a.client_max_window_bits===!0||o.clientMaxWindowBits===!1)&&delete a.client_max_window_bits,a}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(a=>{let e=o[a];if(e.length>1)throw new Error(`Parameter "${a}" must have only a single value`);if(e=e[0],a==="client_max_window_bits"){if(e!==!0){let i=+e;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${a}": ${e}`);e=i}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${a}": ${e}`)}else if(a==="server_max_window_bits"){let i=+e;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${a}": ${e}`);e=i}else if(a==="client_no_context_takeover"||a==="server_no_context_takeover"){if(e!==!0)throw new TypeError(`Invalid value for parameter "${a}": ${e}`)}else throw new Error(`Unknown parameter "${a}"`);o[a]=e})}),t}decompress(t,o,a){Lm.add(e=>{this._decompress(t,o,(i,A)=>{e(),a(i,A)})})}compress(t,o,a){Lm.add(e=>{this._compress(t,o,(i,A)=>{e(),a(i,A)})})}_decompress(t,o,a){let e=this._isServer?"client":"server";if(!this._inflate){let i=`${e}_max_window_bits`,A=typeof this.params[i]!="number"?hC.Z_DEFAULT_WINDOWBITS:this.params[i];this._inflate=hC.createInflateRaw({...this._options.zlibInflateOptions,windowBits:A}),this._inflate[Um]=this,this._inflate[Ng]=0,this._inflate[kc]=[],this._inflate.on("error",N0e),this._inflate.on("data",fV)}this._inflate[Kd]=a,this._inflate.write(t),o&&this._inflate.write(_0e),this._inflate.flush(()=>{let i=this._inflate[xd];if(i){this._inflate.close(),this._inflate=null,a(i);return}let A=CV.concat(this._inflate[kc],this._inflate[Ng]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Ng]=0,this._inflate[kc]=[],o&&this.params[`${e}_no_context_takeover`]&&this._inflate.reset()),a(null,A)})}_compress(t,o,a){let e=this._isServer?"server":"client";if(!this._deflate){let i=`${e}_max_window_bits`,A=typeof this.params[i]!="number"?hC.Z_DEFAULT_WINDOWBITS:this.params[i];this._deflate=hC.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:A}),this._deflate[Ng]=0,this._deflate[kc]=[],this._deflate.on("data",T0e)}this._deflate[Kd]=a,this._deflate.write(t),this._deflate.flush(hC.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let i=CV.concat(this._deflate[kc],this._deflate[Ng]);o&&(i=new M0e(i.buffer,i.byteOffset,i.length-4)),this._deflate[Kd]=null,this._deflate[Ng]=0,this._deflate[kc]=[],o&&this.params[`${e}_no_context_takeover`]&&this._deflate.reset(),a(null,i)})}};QV.exports=yR;function T0e(n){this[kc].push(n),this[Ng]+=n.length}function fV(n){if(this[Ng]+=n.length,this[Um]._maxPayload<1||this[Ng]<=this[Um]._maxPayload){this[kc].push(n);return}this[xd]=new RangeError("Max payload size exceeded"),this[xd].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[xd][BV]=1009,this.removeListener("data",fV),this.reset()}function N0e(n){if(this[Um]._inflate=null,this[xd]){this[Kd](this[xd]);return}n[BV]=1007,this[Kd](n)}});var jd=ee((LlA,Hm)=>{"use strict";var{isUtf8:yV}=$e("buffer"),{hasBlob:R0e}=Tg(),k0e=[0,0,0,0,0,0,0,0,0,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 v0e(n){return n>=1e3&&n<=1014&&n!==1004&&n!==1005&&n!==1006||n>=3e3&&n<=4999}function mR(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 P0e(n){return R0e&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&(n[Symbol.toStringTag]==="Blob"||n[Symbol.toStringTag]==="File")}Hm.exports={isBlob:P0e,isValidStatusCode:v0e,isValidUTF8:mR,tokenChars:k0e};if(yV)Hm.exports.isValidUTF8=function(n){return n.length<24?mR(n):yV(n)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let n=$e("utf-8-validate");Hm.exports.isValidUTF8=function(t){return t.length<32?mR(t):n(t)}}catch{}});var bR=ee((UlA,MV)=>{"use strict";var{Writable:G0e}=$e("stream"),mV=Yd(),{BINARY_TYPES:F0e,EMPTY_BUFFER:SV,kStatusCode:L0e,kWebSocket:U0e}=Tg(),{concat:SR,toArrayBuffer:H0e,unmask:K0e}=dC(),{isValidStatusCode:x0e,isValidUTF8:wV}=jd(),Km=Buffer[Symbol.species],Yo=0,DV=1,OV=2,bV=3,wR=4,DR=5,xm=6,OR=class extends G0e{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||F0e[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[U0e]=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=Yo}_write(t,o,a){if(this._opcode===8&&this._state==Yo)return a();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){a(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(a)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t=a.length?o.set(this._buffers.shift(),e):(o.set(new Uint8Array(a.buffer,a.byteOffset,t),e),this._buffers[0]=new Km(a.buffer,a.byteOffset+t,a.length-t)),t-=a.length}while(t>0);return o}startLoop(t){this._loop=!0;do switch(this._state){case Yo:this.getInfo(t);break;case DV:this.getPayloadLength16(t);break;case OV:this.getPayloadLength64(t);break;case bV:this.getMask();break;case wR:this.getData(t);break;case DR:case xm: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 a=(o[0]&64)===64;if(a&&!this._extensions[mV.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(a){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=a}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(a){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=DV:this._payloadLength===127?this._state=OV: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),a=o.readUInt32BE(0);if(a>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=a*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=bV:this._state=wR}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=wR}getData(t){let o=SV;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(o,t);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let a=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(a);return}if(this._compressed){this._state=DR,this.decompress(o,t);return}o.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(o)),this.dataMessage(t)}decompress(t,o){this._extensions[mV.extensionName].decompress(t,this._fin,(e,i)=>{if(e)return o(e);if(i.length){if(this._messageLength+=i.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(i)}this.dataMessage(o),this._state===Yo&&this.startLoop(o)})}dataMessage(t){if(!this._fin){this._state=Yo;return}let o=this._messageLength,a=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=SR(a,o):this._binaryType==="arraybuffer"?e=H0e(SR(a,o)):this._binaryType==="blob"?e=new Blob(a):e=a,this._allowSynchronousEvents?(this.emit("message",e,!0),this._state=Yo):(this._state=xm,setImmediate(()=>{this.emit("message",e,!0),this._state=Yo,this.startLoop(t)}))}else{let e=SR(a,o);if(!this._skipUTF8Validation&&!wV(e)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(i);return}this._state===DR||this._allowSynchronousEvents?(this.emit("message",e,!1),this._state=Yo):(this._state=xm,setImmediate(()=>{this.emit("message",e,!1),this._state=Yo,this.startLoop(t)}))}}controlMessage(t,o){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,SV),this.end();else{let a=t.readUInt16BE(0);if(!x0e(a)){let i=this.createError(RangeError,`invalid status code ${a}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");o(i);return}let e=new Km(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!wV(e)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");o(i);return}this._loop=!1,this.emit("conclude",a,e),this.end()}this._state=Yo;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=Yo):(this._state=xm,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=Yo,this.startLoop(o)}))}createError(t,o,a,e,i){this._loop=!1,this._errored=!0;let A=new t(a?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(A,this.createError),A.code=i,A[L0e]=e,A}};MV.exports=OR});var TR=ee((KlA,NV)=>{"use strict";var{Duplex:HlA}=$e("stream"),{randomFillSync:Y0e}=$e("crypto"),{types:{isUint8Array:j0e}}=$e("util"),_V=Yd(),{EMPTY_BUFFER:J0e,kWebSocket:q0e,NOOP:z0e}=Tg(),{isBlob:Jd,isValidStatusCode:V0e}=jd(),{mask:TV,toBuffer:Bl}=dC(),jo=Symbol("kByteLength"),W0e=Buffer.alloc(4),Ym=8*1024,fl,qd=Ym,Nn=0,Z0e=1,X0e=2,MR=class n{constructor(t,o,a){this._extensions=o||{},a&&(this._generateMask=a,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=Nn,this.onerror=z0e,this[q0e]=void 0}static frame(t,o){let a,e=!1,i=2,A=!1;o.mask&&(a=o.maskBuffer||W0e,o.generateMask?o.generateMask(a):(qd===Ym&&(fl===void 0&&(fl=Buffer.alloc(Ym)),Y0e(fl,0,Ym),qd=0),a[0]=fl[qd++],a[1]=fl[qd++],a[2]=fl[qd++],a[3]=fl[qd++]),A=(a[0]|a[1]|a[2]|a[3])===0,i=6);let r;typeof t=="string"?(!o.mask||A)&&o[jo]!==void 0?r=o[jo]:(t=Buffer.from(t),r=t.length):(r=t.length,e=o.mask&&o.readOnly&&!A);let s=r;r>=65536?(i+=8,s=127):r>125&&(i+=2,s=126);let g=Buffer.allocUnsafe(e?r+i:i);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[i-4]=a[0],g[i-3]=a[1],g[i-2]=a[2],g[i-1]=a[3],A?[g,t]:e?(TV(t,a,g,i,r),[g]):(TV(t,a,t,0,r),[g,t])):[g,t]}close(t,o,a,e){let i;if(t===void 0)i=J0e;else{if(typeof t!="number"||!V0e(t))throw new TypeError("First argument must be a valid error code number");if(o===void 0||!o.length)i=Buffer.allocUnsafe(2),i.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(i=Buffer.allocUnsafe(2+r),i.writeUInt16BE(t,0),typeof o=="string")i.write(o,2);else if(j0e(o))i.set(o,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let A={[jo]:i.length,fin:!0,generateMask:this._generateMask,mask:a,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==Nn?this.enqueue([this.dispatch,i,!1,A,e]):this.sendFrame(n.frame(i,A),e)}ping(t,o,a){let e,i;if(typeof t=="string"?(e=Buffer.byteLength(t),i=!1):Jd(t)?(e=t.size,i=!1):(t=Bl(t),e=t.length,i=Bl.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[jo]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};Jd(t)?this._state!==Nn?this.enqueue([this.getBlobData,t,!1,A,a]):this.getBlobData(t,!1,A,a):this._state!==Nn?this.enqueue([this.dispatch,t,!1,A,a]):this.sendFrame(n.frame(t,A),a)}pong(t,o,a){let e,i;if(typeof t=="string"?(e=Buffer.byteLength(t),i=!1):Jd(t)?(e=t.size,i=!1):(t=Bl(t),e=t.length,i=Bl.readOnly),e>125)throw new RangeError("The data size must not be greater than 125 bytes");let A={[jo]:e,fin:!0,generateMask:this._generateMask,mask:o,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};Jd(t)?this._state!==Nn?this.enqueue([this.getBlobData,t,!1,A,a]):this.getBlobData(t,!1,A,a):this._state!==Nn?this.enqueue([this.dispatch,t,!1,A,a]):this.sendFrame(n.frame(t,A),a)}send(t,o,a){let e=this._extensions[_V.extensionName],i=o.binary?2:1,A=o.compress,r,s;typeof t=="string"?(r=Buffer.byteLength(t),s=!1):Jd(t)?(r=t.size,s=!1):(t=Bl(t),r=t.length,s=Bl.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,i=0),o.fin&&(this._firstFragment=!0);let g={[jo]:r,fin:o.fin,generateMask:this._generateMask,mask:o.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:s,rsv1:A};Jd(t)?this._state!==Nn?this.enqueue([this.getBlobData,t,this._compress,g,a]):this.getBlobData(t,this._compress,g,a):this._state!==Nn?this.enqueue([this.dispatch,t,this._compress,g,a]):this.dispatch(t,this._compress,g,a)}getBlobData(t,o,a,e){this._bufferedBytes+=a[jo],this._state=X0e,t.arrayBuffer().then(i=>{if(this._socket.destroyed){let r=new Error("The socket was closed while the blob was being read");process.nextTick(_R,this,r,e);return}this._bufferedBytes-=a[jo];let A=Bl(i);o?this.dispatch(A,o,a,e):(this._state=Nn,this.sendFrame(n.frame(A,a),e),this.dequeue())}).catch(i=>{process.nextTick($0e,this,i,e)})}dispatch(t,o,a,e){if(!o){this.sendFrame(n.frame(t,a),e);return}let i=this._extensions[_V.extensionName];this._bufferedBytes+=a[jo],this._state=Z0e,i.compress(t,a.fin,(A,r)=>{if(this._socket.destroyed){let s=new Error("The socket was closed while data was being compressed");_R(this,s,e);return}this._bufferedBytes-=a[jo],this._state=Nn,a.readOnly=!1,this.sendFrame(n.frame(r,a),e),this.dequeue()})}dequeue(){for(;this._state===Nn&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][jo],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][jo],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)}};NV.exports=MR;function _R(n,t,o){typeof o=="function"&&o(t);for(let a=0;a{"use strict";var{kForOnEventAttribute:EC,kListener:NR}=Tg(),RV=Symbol("kCode"),kV=Symbol("kData"),vV=Symbol("kError"),PV=Symbol("kMessage"),GV=Symbol("kReason"),zd=Symbol("kTarget"),FV=Symbol("kType"),LV=Symbol("kWasClean"),Rg=class{constructor(t){this[zd]=null,this[FV]=t}get target(){return this[zd]}get type(){return this[FV]}};Object.defineProperty(Rg.prototype,"target",{enumerable:!0});Object.defineProperty(Rg.prototype,"type",{enumerable:!0});var Ql=class extends Rg{constructor(t,o={}){super(t),this[RV]=o.code===void 0?0:o.code,this[GV]=o.reason===void 0?"":o.reason,this[LV]=o.wasClean===void 0?!1:o.wasClean}get code(){return this[RV]}get reason(){return this[GV]}get wasClean(){return this[LV]}};Object.defineProperty(Ql.prototype,"code",{enumerable:!0});Object.defineProperty(Ql.prototype,"reason",{enumerable:!0});Object.defineProperty(Ql.prototype,"wasClean",{enumerable:!0});var Vd=class extends Rg{constructor(t,o={}){super(t),this[vV]=o.error===void 0?null:o.error,this[PV]=o.message===void 0?"":o.message}get error(){return this[vV]}get message(){return this[PV]}};Object.defineProperty(Vd.prototype,"error",{enumerable:!0});Object.defineProperty(Vd.prototype,"message",{enumerable:!0});var uC=class extends Rg{constructor(t,o={}){super(t),this[kV]=o.data===void 0?null:o.data}get data(){return this[kV]}};Object.defineProperty(uC.prototype,"data",{enumerable:!0});var eNe={addEventListener(n,t,o={}){for(let e of this.listeners(n))if(!o[EC]&&e[NR]===t&&!e[EC])return;let a;if(n==="message")a=function(i,A){let r=new uC("message",{data:A?i:i.toString()});r[zd]=this,jm(t,this,r)};else if(n==="close")a=function(i,A){let r=new Ql("close",{code:i,reason:A.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[zd]=this,jm(t,this,r)};else if(n==="error")a=function(i){let A=new Vd("error",{error:i,message:i.message});A[zd]=this,jm(t,this,A)};else if(n==="open")a=function(){let i=new Rg("open");i[zd]=this,jm(t,this,i)};else return;a[EC]=!!o[EC],a[NR]=t,o.once?this.once(n,a):this.on(n,a)},removeEventListener(n,t){for(let o of this.listeners(n))if(o[NR]===t&&!o[EC]){this.removeListener(n,o);break}}};UV.exports={CloseEvent:Ql,ErrorEvent:Vd,Event:Rg,EventTarget:eNe,MessageEvent:uC};function jm(n,t,o){typeof n=="object"&&n.handleEvent?n.handleEvent.call(n,o):n.call(t,o)}});var Jm=ee((YlA,KV)=>{"use strict";var{tokenChars:CC}=jd();function ws(n,t,o){n[t]===void 0?n[t]=[o]:n[t].push(o)}function ANe(n){let t=Object.create(null),o=Object.create(null),a=!1,e=!1,i=!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(a=>[t].concat(Object.keys(a).map(e=>{let i=a[e];return Array.isArray(i)||(i=[i]),i.map(A=>A===!0?e:`${e}=${A}`).join("; ")})).join("; ")).join(", ")}).join(", ")}KV.exports={format:tNe,parse:ANe}});var Wm=ee((qlA,eW)=>{"use strict";var rNe=$e("events"),iNe=$e("https"),aNe=$e("http"),jV=$e("net"),oNe=$e("tls"),{randomBytes:nNe,createHash:sNe}=$e("crypto"),{Duplex:jlA,Readable:JlA}=$e("stream"),{URL:RR}=$e("url"),vc=Yd(),gNe=bR(),cNe=TR(),{isBlob:INe}=jd(),{BINARY_TYPES:xV,CLOSE_TIMEOUT:lNe,EMPTY_BUFFER:qm,GUID:pNe,kForOnEventAttribute:kR,kListener:dNe,kStatusCode:hNe,kWebSocket:li,NOOP:JV}=Tg(),{EventTarget:{addEventListener:ENe,removeEventListener:uNe}}=HV(),{format:CNe,parse:BNe}=Jm(),{toBuffer:fNe}=dC(),qV=Symbol("kAborted"),vR=[8,13],kg=["CONNECTING","OPEN","CLOSING","CLOSED"],QNe=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,rr=class n extends rNe{constructor(t,o,a){super(),this._binaryType=xV[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=qm,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?(a=o,o=[]):o=[o]),zV(this,t,o,a)):(this._autoPong=a.autoPong,this._closeTimeout=a.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){xV.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,a){let e=new gNe({allowSynchronousEvents:a.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:a.maxBufferedChunks,maxFragments:a.maxFragments,maxPayload:a.maxPayload,skipUTF8Validation:a.skipUTF8Validation}),i=new cNe(t,this._extensions,a.generateMask);this._receiver=e,this._sender=i,this._socket=t,e[li]=this,i[li]=this,t[li]=this,e.on("conclude",SNe),e.on("drain",wNe),e.on("error",DNe),e.on("message",ONe),e.on("ping",bNe),e.on("pong",MNe),i.onerror=_Ne,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),o.length>0&&t.unshift(o),t.on("close",ZV),t.on("data",Vm),t.on("end",XV),t.on("error",$V),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[vc.extensionName]&&this._extensions[vc.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){lo(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,a=>{a||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),WV(this)}}pause(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(a=t,t=o=void 0):typeof o=="function"&&(a=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){PR(this,t,a);return}o===void 0&&(o=!this._isServer),this._sender.ping(t||qm,o,a)}pong(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(a=t,t=o=void 0):typeof o=="function"&&(a=o,o=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){PR(this,t,a);return}o===void 0&&(o=!this._isServer),this._sender.pong(t||qm,o,a)}resume(){this.readyState===n.CONNECTING||this.readyState===n.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,o,a){if(this.readyState===n.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"&&(a=o,o={}),typeof t=="number"&&(t=t.toString()),this.readyState!==n.OPEN){PR(this,t,a);return}let e={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...o};this._extensions[vc.extensionName]||(e.compress=!1),this._sender.send(t||qm,e,a)}terminate(){if(this.readyState!==n.CLOSED){if(this.readyState===n.CONNECTING){lo(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=n.CLOSING,this._socket.destroy())}}};Object.defineProperty(rr,"CONNECTING",{enumerable:!0,value:kg.indexOf("CONNECTING")});Object.defineProperty(rr.prototype,"CONNECTING",{enumerable:!0,value:kg.indexOf("CONNECTING")});Object.defineProperty(rr,"OPEN",{enumerable:!0,value:kg.indexOf("OPEN")});Object.defineProperty(rr.prototype,"OPEN",{enumerable:!0,value:kg.indexOf("OPEN")});Object.defineProperty(rr,"CLOSING",{enumerable:!0,value:kg.indexOf("CLOSING")});Object.defineProperty(rr.prototype,"CLOSING",{enumerable:!0,value:kg.indexOf("CLOSING")});Object.defineProperty(rr,"CLOSED",{enumerable:!0,value:kg.indexOf("CLOSED")});Object.defineProperty(rr.prototype,"CLOSED",{enumerable:!0,value:kg.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(n=>{Object.defineProperty(rr.prototype,n,{enumerable:!0})});["open","error","close","message"].forEach(n=>{Object.defineProperty(rr.prototype,`on${n}`,{enumerable:!0,get(){for(let t of this.listeners(n))if(t[kR])return t[dNe];return null},set(t){for(let o of this.listeners(n))if(o[kR]){this.removeListener(n,o);break}typeof t=="function"&&this.addEventListener(n,t,{[kR]:!0})}})});rr.prototype.addEventListener=ENe;rr.prototype.removeEventListener=uNe;eW.exports=rr;function zV(n,t,o,a){let e={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:lNe,protocolVersion:vR[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...a,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,!vR.includes(e.protocolVersion))throw new RangeError(`Unsupported protocol version: ${e.protocolVersion} (supported versions: ${vR.join(", ")})`);let i;if(t instanceof RR)i=t;else try{i=new RR(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}i.protocol==="http:"?i.protocol="ws:":i.protocol==="https:"&&(i.protocol="wss:"),n._url=i.href;let A=i.protocol==="wss:",r=i.protocol==="ws+unix:",s;if(i.protocol!=="ws:"&&!A&&!r?s=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:r&&!i.pathname?s="The URL's pathname is empty":i.hash&&(s="The URL contains a fragment identifier"),s){let Q=new SyntaxError(s);if(n._redirects===0)throw Q;zm(n,Q);return}let g=A?443:80,c=nNe(16).toString("base64"),I=A?iNe.request:aNe.request,p=new Set,B;if(e.createConnection=e.createConnection||(A?mNe:yNe),e.defaultPort=e.defaultPort||g,e.port=i.port||g,e.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,e.headers={...e.headers,"Sec-WebSocket-Version":e.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},e.path=i.pathname+i.search,e.timeout=e.handshakeTimeout,e.perMessageDeflate&&(B=new vc({...e.perMessageDeflate,isServer:!1,maxPayload:e.maxPayload}),e.headers["Sec-WebSocket-Extensions"]=CNe({[vc.extensionName]:B.offer()})),o.length){for(let Q of o){if(typeof Q!="string"||!QNe.test(Q)||p.has(Q))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.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),(i.username||i.password)&&(e.auth=`${i.username}:${i.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:i.host;let Q=a&&a.headers;if(a={...a,headers:{}},Q)for(let[y,m]of Object.entries(Q))a.headers[y.toLowerCase()]=m}else if(n.listenerCount("redirect")===0){let Q=r?n._originalIpc?e.socketPath===n._originalHostOrSocketPath:!1:n._originalIpc?!1:i.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&&!a.headers.authorization&&(a.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",()=>{lo(n,f,"Opening handshake has timed out")}),f.on("error",Q=>{f===null||f[qV]||(f=n._req=null,zm(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){lo(n,f,"Maximum redirects exceeded");return}f.abort();let T;try{T=new RR(y,t)}catch{let R=new SyntaxError(`Invalid URL: ${y}`);zm(n,R);return}zV(n,T,o,a)}else n.emit("unexpected-response",f,Q)||lo(n,f,`Unexpected server response: ${Q.statusCode}`)}),f.on("upgrade",(Q,y,m)=>{if(n.emit("upgrade",Q),n.readyState!==rr.CONNECTING)return;f=n._req=null;let T=Q.headers.upgrade;if(T===void 0||T.toLowerCase()!=="websocket"){lo(n,y,"Invalid Upgrade header");return}let _=sNe("sha1").update(c+pNe).digest("base64");if(Q.headers["sec-websocket-accept"]!==_){lo(n,y,"Invalid Sec-WebSocket-Accept header");return}let R=Q.headers["sec-websocket-protocol"],L;if(R!==void 0?p.size?p.has(R)||(L="Server sent an invalid subprotocol"):L="Server sent a subprotocol but none was requested":p.size&&(L="Server sent no subprotocol"),L){lo(n,y,L);return}R&&(n._protocol=R);let U=Q.headers["sec-websocket-extensions"];if(U!==void 0){if(!B){lo(n,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=BNe(U)}catch{lo(n,y,"Invalid Sec-WebSocket-Extensions header");return}let q=Object.keys(F);if(q.length!==1||q[0]!==vc.extensionName){lo(n,y,"Server indicated an extension that was not requested");return}try{B.accept(F[vc.extensionName])}catch{lo(n,y,"Invalid Sec-WebSocket-Extensions header");return}n._extensions[vc.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 zm(n,t){n._readyState=rr.CLOSING,n._errorEmitted=!0,n.emit("error",t),n.emitClose()}function yNe(n){return n.path=n.socketPath,jV.connect(n)}function mNe(n){return n.path=void 0,!n.servername&&n.servername!==""&&(n.servername=jV.isIP(n.host)?"":n.host),oNe.connect(n)}function lo(n,t,o){n._readyState=rr.CLOSING;let a=new Error(o);Error.captureStackTrace(a,lo),t.setHeader?(t[qV]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(zm,n,a)):(t.destroy(a),t.once("error",n.emit.bind(n,"error")),t.once("close",n.emitClose.bind(n)))}function PR(n,t,o){if(t){let a=INe(t)?t.size:fNe(t).length;n._socket?n._sender._bufferedBytes+=a:n._bufferedAmount+=a}if(o){let a=new Error(`WebSocket is not open: readyState ${n.readyState} (${kg[n.readyState]})`);process.nextTick(o,a)}}function SNe(n,t){let o=this[li];o._closeFrameReceived=!0,o._closeMessage=t,o._closeCode=n,o._socket[li]!==void 0&&(o._socket.removeListener("data",Vm),process.nextTick(VV,o._socket),n===1005?o.close():o.close(n,t))}function wNe(){let n=this[li];n.isPaused||n._socket.resume()}function DNe(n){let t=this[li];t._socket[li]!==void 0&&(t._socket.removeListener("data",Vm),process.nextTick(VV,t._socket),t.close(n[hNe])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n))}function YV(){this[li].emitClose()}function ONe(n,t){this[li].emit("message",n,t)}function bNe(n){let t=this[li];t._autoPong&&t.pong(n,!this._isServer,JV),t.emit("ping",n)}function MNe(n){this[li].emit("pong",n)}function VV(n){n.resume()}function _Ne(n){let t=this[li];t.readyState!==rr.CLOSED&&(t.readyState===rr.OPEN&&(t._readyState=rr.CLOSING,WV(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",n)))}function WV(n){n._closeTimer=setTimeout(n._socket.destroy.bind(n._socket),n._closeTimeout)}function ZV(){let n=this[li];if(this.removeListener("close",ZV),this.removeListener("data",Vm),this.removeListener("end",XV),n._readyState=rr.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[li]=void 0,clearTimeout(n._closeTimer),n._receiver._writableState.finished||n._receiver._writableState.errorEmitted?n.emitClose():(n._receiver.on("error",YV),n._receiver.on("finish",YV))}function Vm(n){this[li]._receiver.write(n)||this.pause()}function XV(){let n=this[li];n._readyState=rr.CLOSING,n._receiver.end(),this.end()}function $V(){let n=this[li];this.removeListener("error",$V),this.on("error",JV),n&&(n._readyState=rr.CLOSING,this.destroy())}});var iW=ee((VlA,rW)=>{"use strict";var zlA=Wm(),{Duplex:TNe}=$e("stream");function AW(n){n.emit("close")}function NNe(){!this.destroyed&&this._writableState.finished&&this.destroy()}function tW(n){this.removeListener("error",tW),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}function RNe(n,t){let o=!0,a=new TNe({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",function(i,A){let r=!A&&a._readableState.objectMode?i.toString():i;a.push(r)||n.pause()}),n.once("error",function(i){a.destroyed||(o=!1,a.destroy(i))}),n.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(e,i){if(n.readyState===n.CLOSED){i(e),process.nextTick(AW,a);return}let A=!1;n.once("error",function(s){A=!0,i(s)}),n.once("close",function(){A||i(e),process.nextTick(AW,a)}),o&&n.terminate()},a._final=function(e){if(n.readyState===n.CONNECTING){n.once("open",function(){a._final(e)});return}n._socket!==null&&(n._socket._writableState.finished?(e(),a._readableState.endEmitted&&a.destroy()):(n._socket.once("finish",function(){e()}),n.close()))},a._read=function(){n.isPaused&&n.resume()},a._write=function(e,i,A){if(n.readyState===n.CONNECTING){n.once("open",function(){a._write(e,i,A)});return}n.send(e,A)},a.on("end",NNe),a.on("error",tW),a}rW.exports=RNe});var GR=ee((WlA,aW)=>{"use strict";var{tokenChars:kNe}=jd();function vNe(n){let t=new Set,o=-1,a=-1,e=0;for(e;e{"use strict";var PNe=$e("events"),Zm=$e("http"),{Duplex:ZlA}=$e("stream"),{createHash:GNe}=$e("crypto"),oW=Jm(),yl=Yd(),FNe=GR(),LNe=Wm(),{CLOSE_TIMEOUT:UNe,GUID:HNe,kWebSocket:KNe}=Tg(),xNe=/^[+/0-9A-Za-z]{22}==$/,nW=0,sW=1,cW=2,FR=class extends PNe{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:UNe,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:LNe,...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=Zm.createServer((a,e)=>{let i=Zm.STATUS_CODES[426];e.writeHead(426,{"Content-Length":i.length,"Content-Type":"text/plain"}),e.end(i)}),this._server.listen(t.port,t.host,t.backlog,o)):t.server&&(this._server=t.server),this._server){let a=this.emit.bind(this,"connection");this._removeListeners=YNe(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(e,i,A)=>{this.handleUpgrade(e,i,A,a)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=nW}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===cW){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!==sW)if(this._state=sW,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,a,e){o.on("error",gW);let i=t.headers["sec-websocket-key"],A=t.headers.upgrade,r=+t.headers["sec-websocket-version"];if(t.method!=="GET"){ml(this,t,o,405,"Invalid HTTP method");return}if(A===void 0||A.toLowerCase()!=="websocket"){ml(this,t,o,400,"Invalid Upgrade header");return}if(i===void 0||!xNe.test(i)){ml(this,t,o,400,"Missing or invalid Sec-WebSocket-Key header");return}if(r!==13&&r!==8){ml(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=FNe.parse(s)}catch{ml(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 p=new yl({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let B=oW.parse(c);B[yl.extensionName]&&(p.accept(B[yl.extensionName]),I[yl.extensionName]=p)}catch{ml(this,t,o,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let p={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(p,(B,f,Q,y)=>{if(!B)return fC(o,f||401,Q,y);this.completeUpgrade(I,i,g,t,o,a,e)});return}if(!this.options.verifyClient(p))return fC(o,401)}this.completeUpgrade(I,i,g,t,o,a,e)}completeUpgrade(t,o,a,e,i,A,r){if(!i.readable||!i.writable)return i.destroy();if(i[KNe])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>nW)return fC(i,503);let g=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${GNe("sha1").update(o+HNe).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(a.size){let I=this.options.handleProtocols?this.options.handleProtocols(a,e):a.values().next().value;I&&(g.push(`Sec-WebSocket-Protocol: ${I}`),c._protocol=I)}if(t[yl.extensionName]){let I=t[yl.extensionName].params,p=oW.format({[yl.extensionName]:[I]});g.push(`Sec-WebSocket-Extensions: ${p}`),c._extensions=t}this.emit("headers",g,e),i.write(g.concat(`\r `).join(`\r -`)),a.removeListener("error",rW),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)}};iW.exports=RR;function FNe(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=aW,n.emit("close")}function rW(){this.destroy()}function hC(n,t,o,i){o=o||Jm.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} ${Jm.STATUS_CODES[t]}\r -`+Object.keys(i).map(e=>`${e}: ${i[e]}`).join(`\r +`)),i.removeListener("error",gW),c.setSocket(i,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)}};IW.exports=FR;function YNe(n,t){for(let o of Object.keys(t))n.on(o,t[o]);return function(){for(let a of Object.keys(t))n.removeListener(a,t[a])}}function BC(n){n._state=cW,n.emit("close")}function gW(){this.destroy()}function fC(n,t,o,a){o=o||Zm.STATUS_CODES[t],a={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(o),...a},n.once("finish",n.destroy),n.end(`HTTP/1.1 ${t} ${Zm.STATUS_CODES[t]}\r +`+Object.keys(a).map(e=>`${e}: ${a[e]}`).join(`\r `)+`\r \r -`+o)}function Bl(n,t,o,i,e,a){if(n.listenerCount("wsClientError")){let A=new Error(e);Error.captureStackTrace(A,Bl),n.emit("wsClientError",A,o,t)}else hC(o,i,e,a)}});var gW=ee((UlA,sW)=>{"use strict";sW.exports=JNe;function JNe(n,t){for(var o=new Array(arguments.length-1),i=0,e=2,a=!0;e{"use strict";var qm=lW;qm.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 Yp=new Array(64),IW=new Array(123);for(_n=0;_n<64;)IW[Yp[_n]=_n<26?_n+65:_n<52?_n+71:_n<62?_n-4:_n-59|43]=_n++;var _n;qm.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++]=Yp[s|g>>4],s=(g&15)<<2,r=2;break;case 2:a[A++]=Yp[s|g>>6],a[A++]=Yp[g&63],r=0;break}A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,a)),A=0)}return r&&(a[A++]=Yp[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 cW="invalid encoding";qm.decode=function(t,o,i){for(var e=i,a=0,A,r=0;r1)break;if((s=IW[s])===void 0)throw Error(cW);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(cW);return i-e};qm.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var hW=ee((KlA,pW)=>{"use strict";pW.exports=zm;function zm(){this._listeners=Object.create(null)}zm.prototype.on=function(t,o,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:o,ctx:i||this}),this};zm.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";QW.exports=EW(EW);function EW(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,uW),n.writeFloatBE=t.bind(null,CW);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,BW),n.readFloatBE=o.bind(null,fW)})(),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,uW,0,4),n.writeDoubleBE=t.bind(null,CW,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,BW,0,4),n.readDoubleBE=o.bind(null,fW,4,0)})(),n}function uW(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 CW(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 BW(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}function fW(n,t){return(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0}});var SW=ee(mW=>{"use strict";var vR=mW,kR=65533;vR.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:kR):r>=224&&r<240?(c=(r&15)<<12|(t[o++]&63)<<6|t[o++]&63,a[A++]=c>=2048?c:kR):r>=240&&(s=(r&7)<<18|(t[o++]&63)<<12|(t[o++]&63)<<6|t[o++]&63,s<65536||s>1114111?a[A++]=kR:(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))};vR.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 DW=ee((jlA,wW)=>{"use strict";wW.exports=qNe;function qNe(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 bW=ee((JlA,OW)=>{"use strict";OW.exports=la;var EC=Rc();function la(n,t){this.lo=n>>>0,this.hi=t>>>0}var fl=la.zero=new la(0,0);fl.toNumber=function(){return 0};fl.zzEncode=fl.zzDecode=function(){return this};fl.length=function(){return 1};var zNe=la.zeroHash="\0\0\0\0\0\0\0\0";la.fromNumber=function(t){if(t===0)return fl;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 la(i,e)};la.from=function(t){if(typeof t=="number")return la.fromNumber(t);if(EC.isString(t))if(EC.Long)t=EC.Long.fromString(t);else return la.fromNumber(parseInt(t,10));return t.low||t.high?new la(t.low>>>0,t.high>>>0):fl};la.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};la.prototype.toLong=function(t){return EC.Long?new EC.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var Nc=String.prototype.charCodeAt;la.fromHash=function(t){return t===zNe?fl:new la((Nc.call(t,0)|Nc.call(t,1)<<8|Nc.call(t,2)<<16|Nc.call(t,3)<<24)>>>0,(Nc.call(t,4)|Nc.call(t,5)<<8|Nc.call(t,6)<<16|Nc.call(t,7)<<24)>>>0)};la.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)};la.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};la.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};la.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 MW=ee((uC,PR)=>{(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 uC=="object"?(t(uC),typeof PR=="object"&&(PR.exports=o(uC))):(function(){var i={};t(i),n.Long=o(i)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:uC,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,J,X;return N?(U>>>=0,(X=0<=U&&U<256)&&(J=A[U],J)?J:(k=g(U,0,!0),X&&(A[U]=k),k)):(U|=0,(X=-128<=U&&U<128)&&(J=a[U],J)?J:(k=g(U,U<0?-1:0,!1),X&&(a[U]=k),k))}o.fromInt=r;function s(U,N){if(isNaN(U))return N?R:_;if(N){if(U<0)return R;if(U>=y)return z}else{if(U<=-m)return K;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:_;if(k=k||10,k<2||360)throw Error("interior hyphen");if(J===0)return I(U.substring(1),N,k).neg();for(var X=s(c(k,8)),ae=_,De=0;De>>0:this.low},G.toNumber=function(){return this.unsigned?(this.high>>>0)*Q+(this.low>>>0):this.high*Q+(this.low>>>0)},G.toString=function(N){if(N=N||10,N<2||36>>0,Re=Be.toString(N);if(De=Se,De.isZero())return Re+oe;for(;Re.length<6;)Re="0"+Re;oe=""+Re+oe}},G.getHighBits=function(){return this.high},G.getHighBitsUnsigned=function(){return this.high>>>0},G.getLowBits=function(){return this.low},G.getLowBitsUnsigned=function(){return this.low>>>0},G.getNumBitsAbs=function(){if(this.isNegative())return this.eq(K)?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},G.isZero=function(){return this.high===0&&this.low===0},G.eqz=G.isZero,G.isNegative=function(){return!this.unsigned&&this.high<0},G.isPositive=function(){return this.unsigned||this.high>=0},G.isOdd=function(){return(this.low&1)===1},G.isEven=function(){return(this.low&1)===0},G.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},G.eq=G.equals,G.notEquals=function(N){return!this.eq(N)},G.neq=G.notEquals,G.ne=G.notEquals,G.lessThan=function(N){return this.comp(N)<0},G.lt=G.lessThan,G.lessThanOrEqual=function(N){return this.comp(N)<=0},G.lte=G.lessThanOrEqual,G.le=G.lessThanOrEqual,G.greaterThan=function(N){return this.comp(N)>0},G.gt=G.greaterThan,G.greaterThanOrEqual=function(N){return this.comp(N)>=0},G.gte=G.greaterThanOrEqual,G.ge=G.greaterThanOrEqual,G.compare=function(N){if(i(N)||(N=d(N)),this.eq(N))return 0;var k=this.isNegative(),J=N.isNegative();return k&&!J?-1:!k&&J?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},G.comp=G.compare,G.negate=function(){return!this.unsigned&&this.eq(K)?K:this.not().add(H)},G.neg=G.negate,G.add=function(N){i(N)||(N=d(N));var k=this.high>>>16,J=this.high&65535,X=this.low>>>16,ae=this.low&65535,De=N.high>>>16,oe=N.high&65535,Se=N.low>>>16,Be=N.low&65535,Re=0,Ne=0,Je=0,ve=0;return ve+=ae+Be,Je+=ve>>>16,ve&=65535,Je+=X+Se,Ne+=Je>>>16,Je&=65535,Ne+=J+oe,Re+=Ne>>>16,Ne&=65535,Re+=k+De,Re&=65535,g(Je<<16|ve,Re<<16|Ne,this.unsigned)},G.subtract=function(N){return i(N)||(N=d(N)),this.add(N.neg())},G.sub=G.subtract,G.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:_;if(this.eq(K))return N.isOdd()?K:_;if(N.eq(K))return this.isOdd()?K:_;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(T)&&N.lt(T))return s(this.toNumber()*N.toNumber(),this.unsigned);var J=this.high>>>16,X=this.high&65535,ae=this.low>>>16,De=this.low&65535,oe=N.high>>>16,Se=N.high&65535,Be=N.low>>>16,Re=N.low&65535,Ne=0,Je=0,ve=0,aA=0;return aA+=De*Re,ve+=aA>>>16,aA&=65535,ve+=ae*Re,Je+=ve>>>16,ve&=65535,ve+=De*Be,Je+=ve>>>16,ve&=65535,Je+=X*Re,Ne+=Je>>>16,Je&=65535,Je+=ae*Be,Ne+=Je>>>16,Je&=65535,Je+=De*Se,Ne+=Je>>>16,Je&=65535,Ne+=J*Re+X*Be+ae*Se+De*oe,Ne&=65535,g(ve<<16|aA,Ne<<16|Je,this.unsigned)},G.mul=G.multiply,G.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:_;var J,X,ae;if(this.unsigned){if(N.unsigned||(N=N.toUnsigned()),N.gt(this))return R;if(N.gt(this.shru(1)))return F;ae=R}else{if(this.eq(K)){if(N.eq(H)||N.eq(L))return K;if(N.eq(K))return H;var De=this.shr(1);return J=De.div(N).shl(1),J.eq(_)?N.isNegative()?H:L:(X=this.sub(N.mul(J)),ae=J.add(X.div(N)),ae)}else if(N.eq(K))return this.unsigned?R:_;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();ae=_}for(X=this;X.gte(N);){J=Math.max(1,Math.floor(X.toNumber()/N.toNumber()));for(var oe=Math.ceil(Math.log(J)/Math.LN2),Se=oe<=48?1:c(2,oe-48),Be=s(J),Re=Be.mul(N);Re.isNegative()||Re.gt(X);)J-=Se,Be=s(J,this.unsigned),Re=Be.mul(N);Be.isZero()&&(Be=H),ae=ae.add(Be),X=X.sub(Re)}return ae},G.div=G.divide,G.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))},G.mod=G.modulo,G.rem=G.modulo,G.not=function(){return g(~this.low,~this.high,this.unsigned)},G.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},G.clz=G.countLeadingZeros,G.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},G.ctz=G.countTrailingZeros,G.and=function(N){return i(N)||(N=d(N)),g(this.low&N.low,this.high&N.high,this.unsigned)},G.or=function(N){return i(N)||(N=d(N)),g(this.low|N.low,this.high|N.high,this.unsigned)},G.xor=function(N){return i(N)||(N=d(N)),g(this.low^N.low,this.high^N.high,this.unsigned)},G.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)},G.shr=G.shiftRight,G.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)},G.shru=G.shiftRightUnsigned,G.shr_u=G.shiftRightUnsigned,G.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))},G.rotl=G.rotateLeft,G.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))},G.rotr=G.rotateRight,G.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},G.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},G.toBytes=function(N){return N?this.toBytesLE():this.toBytesBE()},G.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]},G.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,J){return J?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 J=Number(BigInt.asIntN(32,N)),X=Number(BigInt.asIntN(32,N>>BigInt(32)));return g(J,X,k)},o.fromValue=function(N,k){return typeof N=="bigint"?o.fromBigInt(N,k):d(N,k)},G.toBigInt=function(){var N=BigInt(this.low>>>0),k=BigInt(this.unsigned?this.high>>>0:this.high);return k<{"use strict";var BA=GR;BA.asPromise=gW();BA.base64=dW();BA.EventEmitter=hW();BA.float=yW();BA.utf8=SW();BA.pool=DW();BA.LongBits=bW();function _W(n){return n==="__proto__"||n==="prototype"||n==="constructor"}BA.isUnsafeProperty=_W;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||GR;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=MW();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 TW(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";PW.exports=yt;var jo=Rc(),FR,Vm=jo.LongBits,RW=jo.base64,kW=jo.utf8;function CC(n,t,o){this.fn=n,this.len=t,this.next=void 0,this.val=o}function UR(){}function VNe(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function yt(){this.len=0,this.head=new CC(UR,0,0),this.tail=this.head,this.states=null}var vW=function(){return jo.Buffer?function(){return(yt.create=function(){return new FR})()}:function(){return new yt}};yt.create=vW();yt.alloc=function(t){return new jo.Array(t)};jo.Array!==Array&&(yt.alloc=jo.pool(yt.alloc,jo.Array.prototype.subarray));yt.prototype._push=function(t,o,i){return this.tail=this.tail.next=new CC(t,o,i),this.len+=o,this};function HR(n,t,o){t[o]=n&255}function WNe(n,t,o){for(;n>127;)t[o++]=n&127|128,n>>>=7;t[o]=n}function KR(n,t){this.len=n,this.next=void 0,this.val=t}KR.prototype=Object.create(CC.prototype);KR.prototype.fn=WNe;yt.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new KR((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};yt.prototype.int32=function(t){return(t|=0)<0?this._push(xR,10,Vm.fromNumber(t)):this.uint32(t)};yt.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function xR(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}yt.prototype.uint64=function(t){var o=Vm.from(t);return this._push(xR,o.length(),o)};yt.prototype.int64=yt.prototype.uint64;yt.prototype.sint64=function(t){var o=Vm.from(t).zzEncode();return this._push(xR,o.length(),o)};yt.prototype.bool=function(t){return this._push(HR,1,t?1:0)};function LR(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}yt.prototype.fixed32=function(t){return this._push(LR,4,t>>>0)};yt.prototype.sfixed32=yt.prototype.fixed32;yt.prototype.fixed64=function(t){var o=Vm.from(t);return this._push(LR,4,o.lo)._push(LR,4,o.hi)};yt.prototype.sfixed64=yt.prototype.fixed64;yt.prototype.float=function(t){return this._push(jo.float.writeFloatLE,4,t)};yt.prototype.double=function(t){return this._push(jo.float.writeDoubleLE,8,t)};var ZNe=jo.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(HR,1,0);if(jo.isString(t)){var i=yt.alloc(o=RW.length(t));RW.decode(t,i,0),t=i}return this.uint32(o)._push(ZNe,o,t)};yt.prototype.string=function(t){var o=kW.length(t);return o?this.uint32(o)._push(kW.write,o,t):this._push(HR,1,0)};yt.prototype.fork=function(){return this.states=new VNe(this),this.head=this.tail=new CC(UR,0,0),this.len=0,this};yt.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(UR,0,0),this.len=0),this};yt.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};yt.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};yt._configure=function(n){FR=n,yt.create=vW(),FR._configure()}});var LW=ee((VlA,FW)=>{"use strict";FW.exports=Ss;var GW=YR();(Ss.prototype=Object.create(GW.prototype)).constructor=Ss;var kc=Rc();function Ss(){GW.call(this)}Ss._configure=function(){Ss.alloc=kc._Buffer_allocUnsafe,Ss.writeBytesBuffer=kc.Buffer&&kc.Buffer.prototype instanceof Uint8Array&&kc.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(Ss.writeBytesBuffer,o,t),this};function XNe(n,t,o){n.length<40?kc.utf8.write(n,t,o):t.utf8Write?t.utf8Write(n,o):t.write(n,o)}Ss.prototype.string=function(t){var o=kc.Buffer.byteLength(t);return this.uint32(o),o&&this._push(XNe,o,t),this};Ss._configure()});var qR=ee((WlA,YW)=>{"use strict";YW.exports=lr;var Jo=Rc(),JR,KW=Jo.LongBits,$Ne=Jo.utf8;function Tn(n,t){return RangeError("index out of range: "+n.pos+" + "+(t||1)+" > "+n.len)}function lr(n){this.buf=n,this.pos=0,this.len=n.length}var UW=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new lr(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new lr(t);throw Error("illegal buffer")},xW=function(){return Jo.Buffer?function(o){return(lr.create=function(e){return Jo.Buffer.isBuffer(e)?new JR(e):UW(e)})(o)}:UW};lr.create=xW();lr.prototype._slice=Jo.Array.prototype.subarray||Jo.Array.prototype.slice;lr.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,Tn(this,10);return t}})();lr.prototype.int32=function(){return this.uint32()|0};lr.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function jR(){var n=new KW(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 Tn(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 Tn(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}lr.prototype.bool=function(){return this.uint32()!==0};function Wm(n,t){return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}lr.prototype.fixed32=function(){if(this.pos+4>this.len)throw Tn(this,4);return Wm(this.buf,this.pos+=4)};lr.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Tn(this,4);return Wm(this.buf,this.pos+=4)|0};function HW(){if(this.pos+8>this.len)throw Tn(this,8);return new KW(Wm(this.buf,this.pos+=4),Wm(this.buf,this.pos+=4))}lr.prototype.float=function(){if(this.pos+4>this.len)throw Tn(this,4);var t=Jo.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};lr.prototype.double=function(){if(this.pos+8>this.len)throw Tn(this,4);var t=Jo.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};lr.prototype.bytes=function(){var t=this.uint32(),o=this.pos,i=this.pos+t;if(i>this.len)throw Tn(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(o,i);if(o===i){var e=Jo.Buffer;return e?e.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,i)};lr.prototype.string=function(){var t=this.bytes();return $Ne.read(t,0,t.length)};lr.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Tn(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Tn(this);while(this.buf[this.pos++]&128);return this};lr.recursionLimit=Jo.recursionLimit;lr.prototype.skipType=function(n,t){if(t===void 0&&(t=0),t>lr.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};lr._configure=function(n){JR=n,lr.create=xW(),JR._configure();var t=Jo.Long?"toLong":"toNumber";Jo.merge(lr.prototype,{int64:function(){return jR.call(this)[t](!1)},uint64:function(){return jR.call(this)[t](!0)},sint64:function(){return jR.call(this).zzDecode()[t](!1)},fixed64:function(){return HW.call(this)[t](!0)},sfixed64:function(){return HW.call(this)[t](!1)}})}});var zW=ee((ZlA,qW)=>{"use strict";qW.exports=Ql;var JW=qR();(Ql.prototype=Object.create(JW.prototype)).constructor=Ql;var jW=Rc();function Ql(n){JW.call(this,n)}Ql._configure=function(){jW.Buffer&&(Ql.prototype._slice=jW.Buffer.prototype.slice)};Ql.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))};Ql._configure()});var WW=ee((XlA,VW)=>{"use strict";VW.exports=BC;var zR=Rc();(BC.prototype=Object.create(zR.EventEmitter.prototype)).constructor=BC;function BC(n,t,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");zR.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!t,this.responseDelimited=!!o}BC.prototype.rpcCall=function n(t,o,i,e,a){if(!e)throw TypeError("request must be specified");var A=this;if(!a)return zR.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}};BC.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var XW=ee(ZW=>{"use strict";var eRe=ZW;eRe.Service=WW()});var e6=ee((edA,$W)=>{"use strict";$W.exports=Object.create(null)});var r6=ee(t6=>{"use strict";var xi=t6;xi.build="minimal";xi.Writer=YR();xi.BufferWriter=LW();xi.Reader=qR();xi.BufferReader=zW();xi.util=Rc();xi.rpc=XW();xi.roots=e6();xi.configure=A6;function A6(){xi.util._configure(),xi.Writer._configure(xi.BufferWriter),xi.Reader._configure(xi.BufferReader)}A6()});var Zm=ee((tdA,a6)=>{"use strict";a6.exports=r6()});var nZ=ee(st=>{"use strict";var qC=Symbol.for("react.element"),mGe=Symbol.for("react.portal"),SGe=Symbol.for("react.fragment"),wGe=Symbol.for("react.strict_mode"),DGe=Symbol.for("react.profiler"),OGe=Symbol.for("react.provider"),bGe=Symbol.for("react.context"),MGe=Symbol.for("react.forward_ref"),_Ge=Symbol.for("react.suspense"),TGe=Symbol.for("react.memo"),NGe=Symbol.for("react.lazy"),W5=Symbol.iterator;function RGe(n){return n===null||typeof n!="object"?null:(n=W5&&n[W5]||n["@@iterator"],typeof n=="function"?n:null)}var $5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},eZ=Object.assign,AZ={};function th(n,t,o){this.props=n,this.context=t,this.refs=AZ,this.updater=o||$5}th.prototype.isReactComponent={};th.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")};th.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function tZ(){}tZ.prototype=th.prototype;function iG(n,t,o){this.props=n,this.context=t,this.refs=AZ,this.updater=o||$5}var oG=iG.prototype=new tZ;oG.constructor=iG;eZ(oG,th.prototype);oG.isPureReactComponent=!0;var Z5=Array.isArray,rZ=Object.prototype.hasOwnProperty,nG={current:null},aZ={key:!0,ref:!0,__self:!0,__source:!0};function iZ(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)rZ.call(t,i)&&!aZ.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(x){if(x===null||typeof x!="object")return null;var te=f&&x[f]||x[Q];return typeof te=="function"?te:null}var m={current:null},T={transition:null},_={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},R={current:null},H={},F=null;function L(x){F=x}H.setExtraStackFrame=function(x){F=x},H.getCurrentStack=null,H.getStackAddendum=function(){var x="";F&&(x+=F);var te=H.getCurrentStack;return te&&(x+=te()||""),x};var q=!1,z=!1,K=!1,G=!1,V=!1,U={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:T,ReactCurrentOwner:R};U.ReactDebugCurrentFrame=H,U.ReactCurrentActQueue=_;function N(x){{for(var te=arguments.length,pe=new Array(te>1?te-1:0),me=1;me1?te-1:0),me=1;me1){for(var Zt=Array(Ft),Xt=0;Xt1){for(var sr=Array(Xt),Tr=0;Tr is not supported and will be removed in a future major release. Did you mean to render instead?")),te.Provider},set:function(uA){te.Provider=uA}},_currentValue:{get:function(){return te._currentValue},set:function(uA){te._currentValue=uA}},_currentValue2:{get:function(){return te._currentValue2},set:function(uA){te._currentValue2=uA}},_threadCount:{get:function(){return te._threadCount},set:function(uA){te._threadCount=uA}},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(uA){Ve||(N("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",uA),Ve=!0)}}}),te.Consumer=TA}return te._currentRenderer=null,te._currentRenderer2=null,te}var he=-1,ye=0,qe=1,IA=2;function yA(x){if(x._status===he){var te=x._result,pe=te();if(pe.then(function(TA){if(x._status===ye||x._status===he){var uA=x;uA._status=qe,uA._result=TA}},function(TA){if(x._status===ye||x._status===he){var uA=x;uA._status=IA,uA._result=TA}}),x._status===he){var me=x;me._status=ye,me._result=pe}}if(x._status===qe){var Ve=x._result;return Ve===void 0&&k(`lazy: Expected the result of a dynamic import() call. Instead received: %s +`+o)}function ml(n,t,o,a,e,i){if(n.listenerCount("wsClientError")){let A=new Error(e);Error.captureStackTrace(A,ml),n.emit("wsClientError",A,o,t)}else fC(o,a,e,i)}});var hW=ee((epA,dW)=>{"use strict";dW.exports=XNe;function XNe(n,t){for(var o=new Array(arguments.length-1),a=0,e=2,i=!0;e{"use strict";var Xm=CW;Xm.length=function(t){var o=t.length;if(!o)return 0;for(var a=0;--o%4>1&&t.charAt(o)==="=";)++a;return Math.ceil(t.length*3)/4-a};var Wd=new Array(64),uW=new Array(123);for(Rn=0;Rn<64;)uW[Wd[Rn]=Rn<26?Rn+65:Rn<52?Rn+71:Rn<62?Rn-4:Rn-59|43]=Rn++;var Rn;Xm.encode=function(t,o,a){for(var e=null,i=[],A=0,r=0,s;o>2],s=(g&3)<<4,r=1;break;case 1:i[A++]=Wd[s|g>>4],s=(g&15)<<2,r=2;break;case 2:i[A++]=Wd[s|g>>6],i[A++]=Wd[g&63],r=0;break}A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,i)),A=0)}return r&&(i[A++]=Wd[s],i[A++]=61,r===1&&(i[A++]=61)),e?(A&&e.push(String.fromCharCode.apply(String,i.slice(0,A))),e.join("")):String.fromCharCode.apply(String,i.slice(0,A))};var EW="invalid encoding";Xm.decode=function(t,o,a){for(var e=a,i=0,A,r=0;r1)break;if((s=uW[s])===void 0)throw Error(EW);switch(i){case 0:A=s,i=1;break;case 1:o[a++]=A<<2|(s&48)>>4,A=s,i=2;break;case 2:o[a++]=(A&15)<<4|(s&60)>>2,A=s,i=3;break;case 3:o[a++]=(A&3)<<6|s,i=0;break}}if(i===1)throw Error(EW);return a-e};Xm.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var QW=ee((tpA,fW)=>{"use strict";fW.exports=$m;function $m(){this._listeners=Object.create(null)}$m.prototype.on=function(t,o,a){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:o,ctx:a||this}),this};$m.prototype.off=function(t,o){if(t===void 0)this._listeners=Object.create(null);else if(o===void 0)this._listeners[t]=[];else{var a=this._listeners[t];if(!a)return this;for(var e=0;e{"use strict";OW.exports=yW(yW);function yW(n){return typeof Float32Array<"u"?(function(){var t=new Float32Array([-0]),o=new Uint8Array(t.buffer),a=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 i(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=a?e:i,n.writeFloatBE=a?i: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=a?A:r,n.readFloatBE=a?r:A})():(function(){function t(a,e,i,A){var r=e<0?1:0;if(r&&(e=-e),e===0)a(1/e>0?0:2147483648,i,A);else if(isNaN(e))a(2143289344,i,A);else if(e>34028234663852886e22)a((r<<31|2139095040)>>>0,i,A);else if(e<11754943508222875e-54)a((r<<31|Math.round(e/1401298464324817e-60))>>>0,i,A);else{var s=Math.floor(Math.log(e)/Math.LN2),g=Math.round(e*Math.pow(2,-s)*8388608)&8388607;a((r<<31|s+127<<23|g)>>>0,i,A)}}n.writeFloatLE=t.bind(null,mW),n.writeFloatBE=t.bind(null,SW);function o(a,e,i){var A=a(e,i),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,wW),n.readFloatBE=o.bind(null,DW)})(),typeof Float64Array<"u"?(function(){var t=new Float64Array([-0]),o=new Uint8Array(t.buffer),a=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 i(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=a?e:i,n.writeDoubleBE=a?i: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=a?A:r,n.readDoubleBE=a?r:A})():(function(){function t(a,e,i,A,r,s){var g=A<0?1:0;if(g&&(A=-A),A===0)a(0,r,s+e),a(1/A>0?0:2147483648,r,s+i);else if(isNaN(A))a(0,r,s+e),a(2146959360,r,s+i);else if(A>17976931348623157e292)a(0,r,s+e),a((g<<31|2146435072)>>>0,r,s+i);else{var c;if(A<22250738585072014e-324)c=A/5e-324,a(c>>>0,r,s+e),a((g<<31|c/4294967296)>>>0,r,s+i);else{var I=Math.floor(Math.log(A)/Math.LN2);I===1024&&(I=1023),c=A*Math.pow(2,-I),a(c*4503599627370496>>>0,r,s+e),a((g<<31|I+1023<<20|c*1048576&1048575)>>>0,r,s+i)}}}n.writeDoubleLE=t.bind(null,mW,0,4),n.writeDoubleBE=t.bind(null,SW,4,0);function o(a,e,i,A,r){var s=a(A,r+e),g=a(A,r+i),c=(g>>31)*2+1,I=g>>>20&2047,p=4294967296*(g&1048575)+s;return I===2047?p?NaN:c*(1/0):I===0?c*5e-324*p:c*Math.pow(2,I-1075)*(p+4503599627370496)}n.readDoubleLE=o.bind(null,wW,0,4),n.readDoubleBE=o.bind(null,DW,4,0)})(),n}function mW(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 SW(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 wW(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}function DW(n,t){return(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0}});var _W=ee(MW=>{"use strict";var UR=MW,LR=65533;UR.length=function(t){for(var o=0,a=0,e=0;e=192&&r<224?(g=(r&31)<<6|t[o++]&63,i[A++]=g>=128?g:LR):r>=224&&r<240?(c=(r&15)<<12|(t[o++]&63)<<6|t[o++]&63,i[A++]=c>=2048?c:LR):r>=240&&(s=(r&7)<<18|(t[o++]&63)<<12|(t[o++]&63)<<6|t[o++]&63,s<65536||s>1114111?i[A++]=LR:(s-=65536,i[A++]=55296+(s>>10),i[A++]=56320+(s&1023))),A>8191&&((e||(e=[])).push(String.fromCharCode.apply(String,i.slice(0,A))),A=0);return e?(A&&e.push(String.fromCharCode.apply(String,i.slice(0,A))),e.join("")):String.fromCharCode.apply(String,i.slice(0,A))};UR.write=function(t,o,a){for(var e=a,i,A,r=0;r>6|192,o[a++]=i&63|128):(i&64512)===55296&&((A=t.charCodeAt(r+1))&64512)===56320?(i=65536+((i&1023)<<10)+(A&1023),++r,o[a++]=i>>18|240,o[a++]=i>>12&63|128,o[a++]=i>>6&63|128,o[a++]=i&63|128):(o[a++]=i>>12|224,o[a++]=i>>6&63|128,o[a++]=i&63|128);return a-e}});var NW=ee((apA,TW)=>{"use strict";TW.exports=$Ne;function $Ne(n,t,o){var a=o||8192,e=a>>>1,i=null,A=a;return function(s){if(s<1||s>e)return n(s);A+s>a&&(i=n(a),A=0);var g=t.call(i,A,A+=s);return A&7&&(A=(A|7)+1),g}}});var kW=ee((opA,RW)=>{"use strict";RW.exports=pi;var QC=Gc();function pi(n,t){this.lo=n>>>0,this.hi=t>>>0}var Sl=pi.zero=new pi(0,0);Sl.toNumber=function(){return 0};Sl.zzEncode=Sl.zzDecode=function(){return this};Sl.length=function(){return 1};var eRe=pi.zeroHash="\0\0\0\0\0\0\0\0";pi.fromNumber=function(t){if(t===0)return Sl;var o=t<0;o&&(t=-t);var a=t>>>0,e=(t-a)/4294967296>>>0;return o&&(e=~e>>>0,a=~a>>>0,++a>4294967295&&(a=0,++e>4294967295&&(e=0))),new pi(a,e)};pi.from=function(t){if(typeof t=="number")return pi.fromNumber(t);if(QC.isString(t))if(QC.Long)t=QC.Long.fromString(t);else return pi.fromNumber(parseInt(t,10));return t.low||t.high?new pi(t.low>>>0,t.high>>>0):Sl};pi.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var o=~this.lo+1>>>0,a=~this.hi>>>0;return o||(a=a+1>>>0),-(o+a*4294967296)}return this.lo+this.hi*4294967296};pi.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 Pc=String.prototype.charCodeAt;pi.fromHash=function(t){return t===eRe?Sl:new pi((Pc.call(t,0)|Pc.call(t,1)<<8|Pc.call(t,2)<<16|Pc.call(t,3)<<24)>>>0,(Pc.call(t,4)|Pc.call(t,5)<<8|Pc.call(t,6)<<16|Pc.call(t,7)<<24)>>>0)};pi.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)};pi.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};pi.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};pi.prototype.length=function(){var t=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?o===0?t<16384?t<128?1:2:t<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:a<128?9:10}});var vW=ee((yC,HR)=>{(function(n,t){function o(a){return a.default||a}typeof define=="function"&&define.amd?define([],function(){var a={};return t(a),o(a)}):typeof yC=="object"?(t(yC),typeof HR=="object"&&(HR.exports=o(yC))):(function(){var a={};t(a),n.Long=o(a)})()})(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(H,N,k){this.low=H|0,this.high=N|0,this.unsigned=!!k}o.prototype.__isLong__,Object.defineProperty(o.prototype,"__isLong__",{value:!0});function a(H){return(H&&H.__isLong__)===!0}function e(H){var N=Math.clz32(H&-H);return H?31-N:N}o.isLong=a;var i={},A={};function r(H,N){var k,J,X;return N?(H>>>=0,(X=0<=H&&H<256)&&(J=A[H],J)?J:(k=g(H,0,!0),X&&(A[H]=k),k)):(H|=0,(X=-128<=H&&H<128)&&(J=i[H],J)?J:(k=g(H,H<0?-1:0,!1),X&&(i[H]=k),k))}o.fromInt=r;function s(H,N){if(isNaN(H))return N?R:_;if(N){if(H<0)return R;if(H>=y)return z}else{if(H<=-m)return K;if(H+1>=m)return q}return H<0?s(-H,N).neg():g(H%Q|0,H/Q|0,N)}o.fromNumber=s;function g(H,N,k){return new o(H,N,k)}o.fromBits=g;var c=Math.pow;function I(H,N,k){if(H.length===0)throw Error("empty string");if(typeof N=="number"?(k=N,N=!1):N=!!N,H==="NaN"||H==="Infinity"||H==="+Infinity"||H==="-Infinity")return N?R:_;if(k=k||10,k<2||360)throw Error("interior hyphen");if(J===0)return I(H.substring(1),N,k).neg();for(var X=s(c(k,8)),ie=_,De=0;De>>0:this.low},G.toNumber=function(){return this.unsigned?(this.high>>>0)*Q+(this.low>>>0):this.high*Q+(this.low>>>0)},G.toString=function(N){if(N=N||10,N<2||36>>0,Re=Be.toString(N);if(De=Se,De.isZero())return Re+oe;for(;Re.length<6;)Re="0"+Re;oe=""+Re+oe}},G.getHighBits=function(){return this.high},G.getHighBitsUnsigned=function(){return this.high>>>0},G.getLowBits=function(){return this.low},G.getLowBitsUnsigned=function(){return this.low>>>0},G.getNumBitsAbs=function(){if(this.isNegative())return this.eq(K)?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},G.isZero=function(){return this.high===0&&this.low===0},G.eqz=G.isZero,G.isNegative=function(){return!this.unsigned&&this.high<0},G.isPositive=function(){return this.unsigned||this.high>=0},G.isOdd=function(){return(this.low&1)===1},G.isEven=function(){return(this.low&1)===0},G.equals=function(N){return a(N)||(N=p(N)),this.unsigned!==N.unsigned&&this.high>>>31===1&&N.high>>>31===1?!1:this.high===N.high&&this.low===N.low},G.eq=G.equals,G.notEquals=function(N){return!this.eq(N)},G.neq=G.notEquals,G.ne=G.notEquals,G.lessThan=function(N){return this.comp(N)<0},G.lt=G.lessThan,G.lessThanOrEqual=function(N){return this.comp(N)<=0},G.lte=G.lessThanOrEqual,G.le=G.lessThanOrEqual,G.greaterThan=function(N){return this.comp(N)>0},G.gt=G.greaterThan,G.greaterThanOrEqual=function(N){return this.comp(N)>=0},G.gte=G.greaterThanOrEqual,G.ge=G.greaterThanOrEqual,G.compare=function(N){if(a(N)||(N=p(N)),this.eq(N))return 0;var k=this.isNegative(),J=N.isNegative();return k&&!J?-1:!k&&J?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},G.comp=G.compare,G.negate=function(){return!this.unsigned&&this.eq(K)?K:this.not().add(L)},G.neg=G.negate,G.add=function(N){a(N)||(N=p(N));var k=this.high>>>16,J=this.high&65535,X=this.low>>>16,ie=this.low&65535,De=N.high>>>16,oe=N.high&65535,Se=N.low>>>16,Be=N.low&65535,Re=0,Ne=0,Je=0,ve=0;return ve+=ie+Be,Je+=ve>>>16,ve&=65535,Je+=X+Se,Ne+=Je>>>16,Je&=65535,Ne+=J+oe,Re+=Ne>>>16,Ne&=65535,Re+=k+De,Re&=65535,g(Je<<16|ve,Re<<16|Ne,this.unsigned)},G.subtract=function(N){return a(N)||(N=p(N)),this.add(N.neg())},G.sub=G.subtract,G.multiply=function(N){if(this.isZero())return this;if(a(N)||(N=p(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:_;if(this.eq(K))return N.isOdd()?K:_;if(N.eq(K))return this.isOdd()?K:_;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(T)&&N.lt(T))return s(this.toNumber()*N.toNumber(),this.unsigned);var J=this.high>>>16,X=this.high&65535,ie=this.low>>>16,De=this.low&65535,oe=N.high>>>16,Se=N.high&65535,Be=N.low>>>16,Re=N.low&65535,Ne=0,Je=0,ve=0,tA=0;return tA+=De*Re,ve+=tA>>>16,tA&=65535,ve+=ie*Re,Je+=ve>>>16,ve&=65535,ve+=De*Be,Je+=ve>>>16,ve&=65535,Je+=X*Re,Ne+=Je>>>16,Je&=65535,Je+=ie*Be,Ne+=Je>>>16,Je&=65535,Je+=De*Se,Ne+=Je>>>16,Je&=65535,Ne+=J*Re+X*Be+ie*Se+De*oe,Ne&=65535,g(ve<<16|tA,Ne<<16|Je,this.unsigned)},G.mul=G.multiply,G.divide=function(N){if(a(N)||(N=p(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:_;var J,X,ie;if(this.unsigned){if(N.unsigned||(N=N.toUnsigned()),N.gt(this))return R;if(N.gt(this.shru(1)))return U;ie=R}else{if(this.eq(K)){if(N.eq(L)||N.eq(F))return K;if(N.eq(K))return L;var De=this.shr(1);return J=De.div(N).shl(1),J.eq(_)?N.isNegative()?L:F:(X=this.sub(N.mul(J)),ie=J.add(X.div(N)),ie)}else if(N.eq(K))return this.unsigned?R:_;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=_}for(X=this;X.gte(N);){J=Math.max(1,Math.floor(X.toNumber()/N.toNumber()));for(var oe=Math.ceil(Math.log(J)/Math.LN2),Se=oe<=48?1:c(2,oe-48),Be=s(J),Re=Be.mul(N);Re.isNegative()||Re.gt(X);)J-=Se,Be=s(J,this.unsigned),Re=Be.mul(N);Be.isZero()&&(Be=L),ie=ie.add(Be),X=X.sub(Re)}return ie},G.div=G.divide,G.modulo=function(N){if(a(N)||(N=p(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))},G.mod=G.modulo,G.rem=G.modulo,G.not=function(){return g(~this.low,~this.high,this.unsigned)},G.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},G.clz=G.countLeadingZeros,G.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},G.ctz=G.countTrailingZeros,G.and=function(N){return a(N)||(N=p(N)),g(this.low&N.low,this.high&N.high,this.unsigned)},G.or=function(N){return a(N)||(N=p(N)),g(this.low|N.low,this.high|N.high,this.unsigned)},G.xor=function(N){return a(N)||(N=p(N)),g(this.low^N.low,this.high^N.high,this.unsigned)},G.shiftLeft=function(N){return a(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)},G.shr=G.shiftRight,G.shiftRightUnsigned=function(N){return a(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)},G.shru=G.shiftRightUnsigned,G.shr_u=G.shiftRightUnsigned,G.rotateLeft=function(N){var k;return a(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))},G.rotl=G.rotateLeft,G.rotateRight=function(N){var k;return a(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))},G.rotr=G.rotateRight,G.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},G.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},G.toBytes=function(N){return N?this.toBytesLE():this.toBytesBE()},G.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]},G.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,J){return J?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 J=Number(BigInt.asIntN(32,N)),X=Number(BigInt.asIntN(32,N>>BigInt(32)));return g(J,X,k)},o.fromValue=function(N,k){return typeof N=="bigint"?o.fromBigInt(N,k):p(N,k)},G.toBigInt=function(){var N=BigInt(this.low>>>0),k=BigInt(this.unsigned?this.high>>>0:this.high);return k<{"use strict";var BA=KR;BA.asPromise=hW();BA.base64=BW();BA.EventEmitter=QW();BA.float=bW();BA.utf8=_W();BA.pool=NW();BA.LongBits=kW();function PW(n){return n==="__proto__"||n==="prototype"||n==="constructor"}BA.isUnsafeProperty=PW;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||KR;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 a=t[o];return a!=null&&Object.hasOwnProperty.call(t,o)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).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=vW();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 a=BA.LongBits.fromHash(t);return BA.Long?BA.Long.fromBits(a.lo,a.hi,o):a.toNumber(!!o)};function GW(n){var t=typeof arguments[arguments.length-1]=="boolean",o=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var a=1;a-1;--i)if(o[e[i]]===1&&this[e[i]]!==void 0&&this[e[i]]!==null)return e[i]}};BA.oneOfSetter=function(t){return function(o){for(var a=0;a{"use strict";KW.exports=yt;var qo=Gc(),xR,eS=qo.LongBits,LW=qo.base64,UW=qo.utf8;function mC(n,t,o){this.fn=n,this.len=t,this.next=void 0,this.val=o}function jR(){}function ARe(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function yt(){this.len=0,this.head=new mC(jR,0,0),this.tail=this.head,this.states=null}var HW=function(){return qo.Buffer?function(){return(yt.create=function(){return new xR})()}:function(){return new yt}};yt.create=HW();yt.alloc=function(t){return new qo.Array(t)};qo.Array!==Array&&(yt.alloc=qo.pool(yt.alloc,qo.Array.prototype.subarray));yt.prototype._push=function(t,o,a){return this.tail=this.tail.next=new mC(t,o,a),this.len+=o,this};function JR(n,t,o){t[o]=n&255}function tRe(n,t,o){for(;n>127;)t[o++]=n&127|128,n>>>=7;t[o]=n}function qR(n,t){this.len=n,this.next=void 0,this.val=t}qR.prototype=Object.create(mC.prototype);qR.prototype.fn=tRe;yt.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new qR((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};yt.prototype.int32=function(t){return(t|=0)<0?this._push(zR,10,eS.fromNumber(t)):this.uint32(t)};yt.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function zR(n,t,o){for(var a=n.lo,e=n.hi;e;)t[o++]=a&127|128,a=(a>>>7|e<<25)>>>0,e>>>=7;for(;a>127;)t[o++]=a&127|128,a=a>>>7;t[o++]=a}yt.prototype.uint64=function(t){var o=eS.from(t);return this._push(zR,o.length(),o)};yt.prototype.int64=yt.prototype.uint64;yt.prototype.sint64=function(t){var o=eS.from(t).zzEncode();return this._push(zR,o.length(),o)};yt.prototype.bool=function(t){return this._push(JR,1,t?1:0)};function YR(n,t,o){t[o]=n&255,t[o+1]=n>>>8&255,t[o+2]=n>>>16&255,t[o+3]=n>>>24}yt.prototype.fixed32=function(t){return this._push(YR,4,t>>>0)};yt.prototype.sfixed32=yt.prototype.fixed32;yt.prototype.fixed64=function(t){var o=eS.from(t);return this._push(YR,4,o.lo)._push(YR,4,o.hi)};yt.prototype.sfixed64=yt.prototype.fixed64;yt.prototype.float=function(t){return this._push(qo.float.writeFloatLE,4,t)};yt.prototype.double=function(t){return this._push(qo.float.writeDoubleLE,8,t)};var rRe=qo.Array.prototype.set?function(t,o,a){o.set(t,a)}:function(t,o,a){for(var e=0;e>>0;if(!o)return this._push(JR,1,0);if(qo.isString(t)){var a=yt.alloc(o=LW.length(t));LW.decode(t,a,0),t=a}return this.uint32(o)._push(rRe,o,t)};yt.prototype.string=function(t){var o=UW.length(t);return o?this.uint32(o)._push(UW.write,o,t):this._push(JR,1,0)};yt.prototype.fork=function(){return this.states=new ARe(this),this.head=this.tail=new mC(jR,0,0),this.len=0,this};yt.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(jR,0,0),this.len=0),this};yt.prototype.ldelim=function(){var t=this.head,o=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=t.next,this.tail=o,this.len+=a),this};yt.prototype.finish=function(){for(var t=this.head.next,o=this.constructor.alloc(this.len),a=0;t;)t.fn(t.val,o,a),a+=t.len,t=t.next;return o};yt._configure=function(n){xR=n,yt.create=HW(),xR._configure()}});var jW=ee((gpA,YW)=>{"use strict";YW.exports=Ds;var xW=VR();(Ds.prototype=Object.create(xW.prototype)).constructor=Ds;var Fc=Gc();function Ds(){xW.call(this)}Ds._configure=function(){Ds.alloc=Fc._Buffer_allocUnsafe,Ds.writeBytesBuffer=Fc.Buffer&&Fc.Buffer.prototype instanceof Uint8Array&&Fc.Buffer.prototype.set.name==="set"?function(t,o,a){o.set(t,a)}:function(t,o,a){if(t.copy)t.copy(o,a,0,t.length);else for(var e=0;e>>0;return this.uint32(o),o&&this._push(Ds.writeBytesBuffer,o,t),this};function iRe(n,t,o){n.length<40?Fc.utf8.write(n,t,o):t.utf8Write?t.utf8Write(n,o):t.write(n,o)}Ds.prototype.string=function(t){var o=Fc.Buffer.byteLength(t);return this.uint32(o),o&&this._push(iRe,o,t),this};Ds._configure()});var XR=ee((cpA,WW)=>{"use strict";WW.exports=hr;var zo=Gc(),ZR,zW=zo.LongBits,aRe=zo.utf8;function kn(n,t){return RangeError("index out of range: "+n.pos+" + "+(t||1)+" > "+n.len)}function hr(n){this.buf=n,this.pos=0,this.len=n.length}var JW=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new hr(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new hr(t);throw Error("illegal buffer")},VW=function(){return zo.Buffer?function(o){return(hr.create=function(e){return zo.Buffer.isBuffer(e)?new ZR(e):JW(e)})(o)}:JW};hr.create=VW();hr.prototype._slice=zo.Array.prototype.subarray||zo.Array.prototype.slice;hr.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,kn(this,10);return t}})();hr.prototype.int32=function(){return this.uint32()|0};hr.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function WR(){var n=new zW(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 kn(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 kn(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}hr.prototype.bool=function(){return this.uint32()!==0};function AS(n,t){return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}hr.prototype.fixed32=function(){if(this.pos+4>this.len)throw kn(this,4);return AS(this.buf,this.pos+=4)};hr.prototype.sfixed32=function(){if(this.pos+4>this.len)throw kn(this,4);return AS(this.buf,this.pos+=4)|0};function qW(){if(this.pos+8>this.len)throw kn(this,8);return new zW(AS(this.buf,this.pos+=4),AS(this.buf,this.pos+=4))}hr.prototype.float=function(){if(this.pos+4>this.len)throw kn(this,4);var t=zo.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};hr.prototype.double=function(){if(this.pos+8>this.len)throw kn(this,4);var t=zo.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};hr.prototype.bytes=function(){var t=this.uint32(),o=this.pos,a=this.pos+t;if(a>this.len)throw kn(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(o,a);if(o===a){var e=zo.Buffer;return e?e.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,a)};hr.prototype.string=function(){var t=this.bytes();return aRe.read(t,0,t.length)};hr.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw kn(this,t);this.pos+=t}else do if(this.pos>=this.len)throw kn(this);while(this.buf[this.pos++]&128);return this};hr.recursionLimit=zo.recursionLimit;hr.prototype.skipType=function(n,t){if(t===void 0&&(t=0),t>hr.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};hr._configure=function(n){ZR=n,hr.create=VW(),ZR._configure();var t=zo.Long?"toLong":"toNumber";zo.merge(hr.prototype,{int64:function(){return WR.call(this)[t](!1)},uint64:function(){return WR.call(this)[t](!0)},sint64:function(){return WR.call(this).zzDecode()[t](!1)},fixed64:function(){return qW.call(this)[t](!0)},sfixed64:function(){return qW.call(this)[t](!1)}})}});var e6=ee((IpA,$W)=>{"use strict";$W.exports=wl;var XW=XR();(wl.prototype=Object.create(XW.prototype)).constructor=wl;var ZW=Gc();function wl(n){XW.call(this,n)}wl._configure=function(){ZW.Buffer&&(wl.prototype._slice=ZW.Buffer.prototype.slice)};wl.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))};wl._configure()});var t6=ee((lpA,A6)=>{"use strict";A6.exports=SC;var $R=Gc();(SC.prototype=Object.create($R.EventEmitter.prototype)).constructor=SC;function SC(n,t,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");$R.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!t,this.responseDelimited=!!o}SC.prototype.rpcCall=function n(t,o,a,e,i){if(!e)throw TypeError("request must be specified");var A=this;if(!i)return $R.asPromise(n,A,t,o,a,e);if(!A.rpcImpl){setTimeout(function(){i(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),i(s);if(g===null){A.end(!0);return}if(!(g instanceof a))try{g=a[A.responseDelimited?"decodeDelimited":"decode"](g)}catch(c){return A.emit("error",c,t),i(c)}return A.emit("data",g,t),i(null,g)})}catch(r){A.emit("error",r,t),setTimeout(function(){i(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 i6=ee(r6=>{"use strict";var oRe=r6;oRe.Service=t6()});var o6=ee((dpA,a6)=>{"use strict";a6.exports=Object.create(null)});var g6=ee(s6=>{"use strict";var ja=s6;ja.build="minimal";ja.Writer=VR();ja.BufferWriter=jW();ja.Reader=XR();ja.BufferReader=e6();ja.util=Gc();ja.rpc=i6();ja.roots=o6();ja.configure=n6;function n6(){ja.util._configure(),ja.Writer._configure(ja.BufferWriter),ja.Reader._configure(ja.BufferReader)}n6()});var tS=ee((EpA,c6)=>{"use strict";c6.exports=g6()});var pZ=ee(st=>{"use strict";var XC=Symbol.for("react.element"),MGe=Symbol.for("react.portal"),_Ge=Symbol.for("react.fragment"),TGe=Symbol.for("react.strict_mode"),NGe=Symbol.for("react.profiler"),RGe=Symbol.for("react.provider"),kGe=Symbol.for("react.context"),vGe=Symbol.for("react.forward_ref"),PGe=Symbol.for("react.suspense"),GGe=Symbol.for("react.memo"),FGe=Symbol.for("react.lazy"),tZ=Symbol.iterator;function LGe(n){return n===null||typeof n!="object"?null:(n=tZ&&n[tZ]||n["@@iterator"],typeof n=="function"?n:null)}var aZ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oZ=Object.assign,nZ={};function sh(n,t,o){this.props=n,this.context=t,this.refs=nZ,this.updater=o||aZ}sh.prototype.isReactComponent={};sh.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")};sh.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function sZ(){}sZ.prototype=sh.prototype;function cG(n,t,o){this.props=n,this.context=t,this.refs=nZ,this.updater=o||aZ}var IG=cG.prototype=new sZ;IG.constructor=cG;oZ(IG,sh.prototype);IG.isPureReactComponent=!0;var rZ=Array.isArray,gZ=Object.prototype.hasOwnProperty,lG={current:null},cZ={key:!0,ref:!0,__self:!0,__source:!0};function IZ(n,t,o){var a,e={},i=null,A=null;if(t!=null)for(a in t.ref!==void 0&&(A=t.ref),t.key!==void 0&&(i=""+t.key),t)gZ.call(t,a)&&!cZ.hasOwnProperty(a)&&(e[a]=t[a]);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"),a=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),i=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"),p=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),f=Symbol.iterator,Q="@@iterator";function y(x){if(x===null||typeof x!="object")return null;var te=f&&x[f]||x[Q];return typeof te=="function"?te:null}var m={current:null},T={transition:null},_={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},R={current:null},L={},U=null;function F(x){U=x}L.setExtraStackFrame=function(x){U=x},L.getCurrentStack=null,L.getStackAddendum=function(){var x="";U&&(x+=U);var te=L.getCurrentStack;return te&&(x+=te()||""),x};var q=!1,z=!1,K=!1,G=!1,V=!1,H={ReactCurrentDispatcher:m,ReactCurrentBatchConfig:T,ReactCurrentOwner:R};H.ReactDebugCurrentFrame=L,H.ReactCurrentActQueue=_;function N(x){{for(var te=arguments.length,de=new Array(te>1?te-1:0),me=1;me1?te-1:0),me=1;me1){for(var er=Array(Lt),Ar=0;Ar1){for(var Ir=Array(Ar),Nr=0;Nr is not supported and will be removed in a future major release. Did you mean to render instead?")),te.Provider},set:function(uA){te.Provider=uA}},_currentValue:{get:function(){return te._currentValue},set:function(uA){te._currentValue=uA}},_currentValue2:{get:function(){return te._currentValue2},set:function(uA){te._currentValue2=uA}},_threadCount:{get:function(){return te._threadCount},set:function(uA){te._threadCount=uA}},Consumer:{get:function(){return de||(de=!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(uA){Ve||(N("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",uA),Ve=!0)}}}),te.Consumer=TA}return te._currentRenderer=null,te._currentRenderer2=null,te}var he=-1,ye=0,qe=1,IA=2;function yA(x){if(x._status===he){var te=x._result,de=te();if(de.then(function(TA){if(x._status===ye||x._status===he){var uA=x;uA._status=qe,uA._result=TA}},function(TA){if(x._status===ye||x._status===he){var uA=x;uA._status=IA,uA._result=TA}}),x._status===he){var me=x;me._status=ye,me._result=de}}if(x._status===qe){var Ve=x._result;return Ve===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')) @@ -33,49 +33,49 @@ Your code should look like: Did you accidentally put curly braces around the import?`,Ve),"default"in Ve||k(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: - const MyComponent = lazy(() => import('./MyComponent'))`,Ve),Ve.default}else throw x._result}function $A(x){var te={_status:he,_result:x},pe={$$typeof:d,_payload:te,_init:yA};{var me,Ve;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 Ve},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."),Ve=TA,Object.defineProperty(pe,"propTypes",{enumerable:!0})}}})}return pe}function vA(x){x!=null&&x.$$typeof===I?k("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof x!="function"?k("forwardRef requires a render function but was given %s.",x===null?"null":typeof x):x.length!==0&&x.length!==2&&k("forwardRef render functions accept exactly two parameters: props and ref. %s",x.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),x!=null&&(x.defaultProps!=null||x.propTypes!=null)&&k("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var te={$$typeof:s,render:x};{var pe;Object.defineProperty(te,"displayName",{enumerable:!1,configurable:!0,get:function(){return pe},set:function(me){pe=me,!x.name&&!x.displayName&&(x.displayName=me)}})}return te}var YA;YA=Symbol.for("react.module.reference");function At(x){return!!(typeof x=="string"||typeof x=="function"||x===i||x===a||V||x===e||x===g||x===c||G||x===B||q||z||K||typeof x=="object"&&x!==null&&(x.$$typeof===d||x.$$typeof===I||x.$$typeof===A||x.$$typeof===r||x.$$typeof===s||x.$$typeof===YA||x.getModuleId!==void 0))}function Ge(x,te){At(x)||k("memo: The first argument must be a component. Instead received: %s",x===null?"null":typeof x);var pe={$$typeof:I,type:x,compare:te===void 0?null:te};{var me;Object.defineProperty(pe,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ve){me=Ve,!x.name&&!x.displayName&&(x.displayName=Ve)}})}return pe}function tA(){var x=m.current;return x===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: + const MyComponent = lazy(() => import('./MyComponent'))`,Ve),Ve.default}else throw x._result}function $A(x){var te={_status:he,_result:x},de={$$typeof:p,_payload:te,_init:yA};{var me,Ve;Object.defineProperties(de,{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(de,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Ve},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."),Ve=TA,Object.defineProperty(de,"propTypes",{enumerable:!0})}}})}return de}function vA(x){x!=null&&x.$$typeof===I?k("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof x!="function"?k("forwardRef requires a render function but was given %s.",x===null?"null":typeof x):x.length!==0&&x.length!==2&&k("forwardRef render functions accept exactly two parameters: props and ref. %s",x.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),x!=null&&(x.defaultProps!=null||x.propTypes!=null)&&k("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var te={$$typeof:s,render:x};{var de;Object.defineProperty(te,"displayName",{enumerable:!1,configurable:!0,get:function(){return de},set:function(me){de=me,!x.name&&!x.displayName&&(x.displayName=me)}})}return te}var YA;YA=Symbol.for("react.module.reference");function At(x){return!!(typeof x=="string"||typeof x=="function"||x===a||x===i||V||x===e||x===g||x===c||G||x===B||q||z||K||typeof x=="object"&&x!==null&&(x.$$typeof===p||x.$$typeof===I||x.$$typeof===A||x.$$typeof===r||x.$$typeof===s||x.$$typeof===YA||x.getModuleId!==void 0))}function Ge(x,te){At(x)||k("memo: The first argument must be a component. Instead received: %s",x===null?"null":typeof x);var de={$$typeof:I,type:x,compare:te===void 0?null:te};{var me;Object.defineProperty(de,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ve){me=Ve,!x.name&&!x.displayName&&(x.displayName=Ve)}})}return de}function rA(){var x=m.current;return x===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.`),x}function tt(x){var te=tA();if(x._context!==void 0){var pe=x._context;pe.Consumer===x?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===x&&k("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return te.useContext(x)}function ea(x){var te=tA();return te.useState(x)}function nr(x,te,pe){var me=tA();return me.useReducer(x,te,pe)}function So(x){var te=tA();return te.useRef(x)}function zM(x,te){var pe=tA();return pe.useEffect(x,te)}function VM(x,te){var pe=tA();return pe.useInsertionEffect(x,te)}function wo(x,te){var pe=tA();return pe.useLayoutEffect(x,te)}function Md(x,te){var pe=tA();return pe.useCallback(x,te)}function WM(x,te){var pe=tA();return pe.useMemo(x,te)}function ZM(x,te,pe){var me=tA();return me.useImperativeHandle(x,te,pe)}function _le(x,te){{var pe=tA();return pe.useDebugValue(x,te)}}function Tle(){var x=tA();return x.useTransition()}function Nle(x){var te=tA();return te.useDeferredValue(x)}function Rle(){var x=tA();return x.useId()}function kle(x,te,pe){var me=tA();return me.useSyncExternalStore(x,te,pe)}var YE=0,$K,ex,Ax,tx,rx,ax,ix;function ox(){}ox.__reactDisabledLog=!0;function vle(){{if(YE===0){$K=console.log,ex=console.info,Ax=console.warn,tx=console.error,rx=console.group,ax=console.groupCollapsed,ix=console.groupEnd;var x={configurable:!0,enumerable:!0,value:ox,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}YE++}}function Ple(){{if(YE--,YE===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:oe({},x,{value:$K}),info:oe({},x,{value:ex}),warn:oe({},x,{value:Ax}),error:oe({},x,{value:tx}),group:oe({},x,{value:rx}),groupCollapsed:oe({},x,{value:ax}),groupEnd:oe({},x,{value:ix})})}YE<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var XM=U.ReactCurrentDispatcher,$M;function BQ(x,te,pe){{if($M===void 0)try{throw Error()}catch(Ve){var me=Ve.stack.trim().match(/\n( *(at )?)/);$M=me&&me[1]||""}return` -`+$M+x}}var e_=!1,fQ;{var Gle=typeof WeakMap=="function"?WeakMap:Map;fQ=new Gle}function nx(x,te){if(!x||e_)return"";{var pe=fQ.get(x);if(pe!==void 0)return pe}var me;e_=!0;var Ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var TA;TA=XM.current,XM.current=null,vle();try{if(te){var uA=function(){throw Error()};if(Object.defineProperty(uA.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(uA,[])}catch(ma){me=ma}Reflect.construct(x,[],uA)}else{try{uA.call()}catch(ma){me=ma}x.call(uA.prototype)}}else{try{throw Error()}catch(ma){me=ma}x()}}catch(ma){if(ma&&me&&typeof ma.stack=="string"){for(var xA=ma.stack.split(` +See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),x}function tt(x){var te=rA();if(x._context!==void 0){var de=x._context;de.Consumer===x?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?"):de.Provider===x&&k("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return te.useContext(x)}function Ai(x){var te=rA();return te.useState(x)}function cr(x,te,de){var me=rA();return me.useReducer(x,te,de)}function Do(x){var te=rA();return te.useRef(x)}function $M(x,te){var de=rA();return de.useEffect(x,te)}function e_(x,te){var de=rA();return de.useInsertionEffect(x,te)}function Oo(x,te){var de=rA();return de.useLayoutEffect(x,te)}function Tp(x,te){var de=rA();return de.useCallback(x,te)}function A_(x,te){var de=rA();return de.useMemo(x,te)}function t_(x,te,de){var me=rA();return me.useImperativeHandle(x,te,de)}function Ple(x,te){{var de=rA();return de.useDebugValue(x,te)}}function Gle(){var x=rA();return x.useTransition()}function Fle(x){var te=rA();return te.useDeferredValue(x)}function Lle(){var x=rA();return x.useId()}function Ule(x,te,de){var me=rA();return me.useSyncExternalStore(x,te,de)}var WE=0,ix,ax,ox,nx,sx,gx,cx;function Ix(){}Ix.__reactDisabledLog=!0;function Hle(){{if(WE===0){ix=console.log,ax=console.info,ox=console.warn,nx=console.error,sx=console.group,gx=console.groupCollapsed,cx=console.groupEnd;var x={configurable:!0,enumerable:!0,value:Ix,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}WE++}}function Kle(){{if(WE--,WE===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:oe({},x,{value:ix}),info:oe({},x,{value:ax}),warn:oe({},x,{value:ox}),error:oe({},x,{value:nx}),group:oe({},x,{value:sx}),groupCollapsed:oe({},x,{value:gx}),groupEnd:oe({},x,{value:cx})})}WE<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var r_=H.ReactCurrentDispatcher,i_;function SQ(x,te,de){{if(i_===void 0)try{throw Error()}catch(Ve){var me=Ve.stack.trim().match(/\n( *(at )?)/);i_=me&&me[1]||""}return` +`+i_+x}}var a_=!1,wQ;{var xle=typeof WeakMap=="function"?WeakMap:Map;wQ=new xle}function lx(x,te){if(!x||a_)return"";{var de=wQ.get(x);if(de!==void 0)return de}var me;a_=!0;var Ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var TA;TA=r_.current,r_.current=null,Hle();try{if(te){var uA=function(){throw Error()};if(Object.defineProperty(uA.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(uA,[])}catch(wi){me=wi}Reflect.construct(x,[],uA)}else{try{uA.call()}catch(wi){me=wi}x.call(uA.prototype)}}else{try{throw Error()}catch(wi){me=wi}x()}}catch(wi){if(wi&&me&&typeof wi.stack=="string"){for(var xA=wi.stack.split(` `),Et=me.stack.split(` -`),Ft=xA.length-1,Zt=Et.length-1;Ft>=1&&Zt>=0&&xA[Ft]!==Et[Zt];)Zt--;for(;Ft>=1&&Zt>=0;Ft--,Zt--)if(xA[Ft]!==Et[Zt]){if(Ft!==1||Zt!==1)do if(Ft--,Zt--,Zt<0||xA[Ft]!==Et[Zt]){var Xt=` -`+xA[Ft].replace(" at new "," at ");return x.displayName&&Xt.includes("")&&(Xt=Xt.replace("",x.displayName)),typeof x=="function"&&fQ.set(x,Xt),Xt}while(Ft>=1&&Zt>=0);break}}}finally{e_=!1,XM.current=TA,Ple(),Error.prepareStackTrace=Ve}var sr=x?x.displayName||x.name:"",Tr=sr?BQ(sr):"";return typeof x=="function"&&fQ.set(x,Tr),Tr}function Fle(x,te,pe){return nx(x,!1)}function Lle(x){var te=x.prototype;return!!(te&&te.isReactComponent)}function QQ(x,te,pe){if(x==null)return"";if(typeof x=="function")return nx(x,Lle(x));if(typeof x=="string")return BQ(x);switch(x){case g:return BQ("Suspense");case c:return BQ("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case s:return Fle(x.render);case I:return QQ(x.type,te,pe);case d:{var me=x,Ve=me._payload,TA=me._init;try{return QQ(TA(Ve),te,pe)}catch{}}}return""}var sx={},gx=U.ReactDebugCurrentFrame;function yQ(x){if(x){var te=x._owner,pe=QQ(x.type,x._source,te?te.type:null);gx.setExtraStackFrame(pe)}else gx.setExtraStackFrame(null)}function Ule(x,te,pe,me,Ve){{var TA=Function.call.bind(ke);for(var uA in x)if(TA(x,uA)){var xA=void 0;try{if(typeof x[uA]!="function"){var Et=Error((me||"React class")+": "+pe+" type `"+uA+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[uA]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Et.name="Invariant Violation",Et}xA=x[uA](te,uA,me,pe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ft){xA=Ft}xA&&!(xA instanceof Error)&&(yQ(Ve),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,uA,typeof xA),yQ(null)),xA instanceof Error&&!(xA.message in sx)&&(sx[xA.message]=!0,yQ(Ve),k("Failed %s type: %s",pe,xA.message),yQ(null))}}}function _d(x){if(x){var te=x._owner,pe=QQ(x.type,x._source,te?te.type:null);L(pe)}else L(null)}var A_;A_=!1;function cx(){if(R.current){var x=Ce(R.current.type);if(x)return` +`),Lt=xA.length-1,er=Et.length-1;Lt>=1&&er>=0&&xA[Lt]!==Et[er];)er--;for(;Lt>=1&&er>=0;Lt--,er--)if(xA[Lt]!==Et[er]){if(Lt!==1||er!==1)do if(Lt--,er--,er<0||xA[Lt]!==Et[er]){var Ar=` +`+xA[Lt].replace(" at new "," at ");return x.displayName&&Ar.includes("")&&(Ar=Ar.replace("",x.displayName)),typeof x=="function"&&wQ.set(x,Ar),Ar}while(Lt>=1&&er>=0);break}}}finally{a_=!1,r_.current=TA,Kle(),Error.prepareStackTrace=Ve}var Ir=x?x.displayName||x.name:"",Nr=Ir?SQ(Ir):"";return typeof x=="function"&&wQ.set(x,Nr),Nr}function Yle(x,te,de){return lx(x,!1)}function jle(x){var te=x.prototype;return!!(te&&te.isReactComponent)}function DQ(x,te,de){if(x==null)return"";if(typeof x=="function")return lx(x,jle(x));if(typeof x=="string")return SQ(x);switch(x){case g:return SQ("Suspense");case c:return SQ("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case s:return Yle(x.render);case I:return DQ(x.type,te,de);case p:{var me=x,Ve=me._payload,TA=me._init;try{return DQ(TA(Ve),te,de)}catch{}}}return""}var px={},dx=H.ReactDebugCurrentFrame;function OQ(x){if(x){var te=x._owner,de=DQ(x.type,x._source,te?te.type:null);dx.setExtraStackFrame(de)}else dx.setExtraStackFrame(null)}function Jle(x,te,de,me,Ve){{var TA=Function.call.bind(ke);for(var uA in x)if(TA(x,uA)){var xA=void 0;try{if(typeof x[uA]!="function"){var Et=Error((me||"React class")+": "+de+" type `"+uA+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[uA]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Et.name="Invariant Violation",Et}xA=x[uA](te,uA,me,de,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Lt){xA=Lt}xA&&!(xA instanceof Error)&&(OQ(Ve),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",de,uA,typeof xA),OQ(null)),xA instanceof Error&&!(xA.message in px)&&(px[xA.message]=!0,OQ(Ve),k("Failed %s type: %s",de,xA.message),OQ(null))}}}function Np(x){if(x){var te=x._owner,de=DQ(x.type,x._source,te?te.type:null);F(de)}else F(null)}var o_;o_=!1;function hx(){if(R.current){var x=Ce(R.current.type);if(x)return` -Check the render method of \``+x+"`."}return""}function Hle(x){if(x!==void 0){var te=x.fileName.replace(/^.*[\\\/]/,""),pe=x.lineNumber;return` +Check the render method of \``+x+"`."}return""}function qle(x){if(x!==void 0){var te=x.fileName.replace(/^.*[\\\/]/,""),de=x.lineNumber;return` -Check your code at `+te+":"+pe+"."}return""}function Kle(x){return x!=null?Hle(x.__source):""}var Ix={};function xle(x){var te=cx();if(!te){var pe=typeof x=="string"?x:x.displayName||x.name;pe&&(te=` +Check your code at `+te+":"+de+"."}return""}function zle(x){return x!=null?qle(x.__source):""}var Ex={};function Vle(x){var te=hx();if(!te){var de=typeof x=="string"?x:x.displayName||x.name;de&&(te=` -Check the top-level render call using <`+pe+">.")}return te}function lx(x,te){if(!(!x._store||x._store.validated||x.key!=null)){x._store.validated=!0;var pe=xle(te);if(!Ix[pe]){Ix[pe]=!0;var me="";x&&x._owner&&x._owner!==R.current&&(me=" It was passed a child from "+Ce(x._owner.type)+"."),_d(x),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),_d(null)}}}function dx(x,te){if(typeof x=="object"){if(je(x))for(var pe=0;pe",Ve=" Did you accidentally export a JSX literal instead of a component?"):uA=typeof x,k("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",uA,Ve)}var xA=Qe.apply(this,arguments);if(xA==null)return xA;if(me)for(var Et=2;Et10&&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 ux=!1,mQ=null;function zle(x){if(mQ===null)try{var te=("require"+Math.random()).slice(0,7),pe=VS&&VS[te];mQ=pe.call(VS,"timers").setImmediate}catch{mQ=function(Ve){ux===!1&&(ux=!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=Ve,TA.port2.postMessage(void 0)}}return mQ(x)}var Td=0,Cx=!1;function Bx(x){{var te=Td;Td++,_.current===null&&(_.current=[]);var pe=_.isBatchingLegacy,me;try{if(_.isBatchingLegacy=!0,me=x(),!pe&&_.didScheduleLegacyUpdate){var Ve=_.current;Ve!==null&&(_.didScheduleLegacyUpdate=!1,a_(Ve))}}catch(sr){throw SQ(te),sr}finally{_.isBatchingLegacy=pe}if(me!==null&&typeof me=="object"&&typeof me.then=="function"){var TA=me,uA=!1,xA={then:function(sr,Tr){uA=!0,TA.then(function(ma){SQ(te),Td===0?t_(ma,sr,Tr):sr(ma)},function(ma){SQ(te),Tr(ma)})}};return!Cx&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){uA||(Cx=!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 Et=me;if(SQ(te),Td===0){var Ft=_.current;Ft!==null&&(a_(Ft),_.current=null);var Zt={then:function(sr,Tr){_.current===null?(_.current=[],t_(Et,sr,Tr)):sr(Et)}};return Zt}else{var Xt={then:function(sr,Tr){sr(Et)}};return Xt}}}}function SQ(x){x!==Td-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. "),Td=x}function t_(x,te,pe){{var me=_.current;if(me!==null)try{a_(me),zle(function(){me.length===0?(_.current=null,te(x)):t_(x,te,pe)})}catch(Ve){pe(Ve)}else te(x)}}var r_=!1;function a_(x){if(!r_){r_=!0;var te=0;try{for(;te{"use strict";process.env.NODE_ENV==="production"?gG.exports=nZ():gG.exports=sZ()});var Ll=ee((XyA,BX)=>{"use strict";var nD=$e("crypto"),sKe=$e("assert");function Zo(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}function gKe(n,t,o){Zo(n),Zo(t),Zo(o);let i=nD.createCipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(t),i.final()])}function cKe(n,t,o){Zo(n),Zo(t),Zo(o);let i=nD.createDecipheriv("aes-256-cbc",n,o);return Buffer.concat([i.update(t),i.final()])}function hh(n,t){Zo(n),Zo(t);let o=nD.createHmac("sha256",n);return o.update(t),Buffer.from(o.digest())}function IKe(n){Zo(n);let t=nD.createHash("sha512");return t.update(n),t.digest()}function lKe(n,t,o,i){if(Zo(n),Zo(t),Zo(o),t.byteLength!=32)throw new Error("Got salt of incorrect length");i=i||3,sKe(i>=1&&i<=3);let e=hh(t,n),a=new Uint8Array(o.byteLength+1+32);a.set(o,32),a[a.length-1]=1;let A=[hh(e,Buffer.from(a.slice(32)))];return i>1&&(a.set(A[A.length-1]),a[a.length-1]=2,A.push(hh(e,Buffer.from(a)))),i>2&&(a.set(A[A.length-1]),a[a.length-1]=3,A.push(hh(e,Buffer.from(a)))),A}function dKe(n,t,o,i){let e=hh(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")}BX.exports={deriveSecrets:lKe,decrypt:cKe,encrypt:gKe,hash:IKe,calculateMAC:hh,verifyMAC:dKe}});var RX=ee(Lg=>{"use strict";Object.defineProperty(Lg,"__esModule",{value:!0});var $yA=new Uint8Array(16),OX=new Uint8Array(32);OX[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 CKe(n,t,o,i,e){var a,A=0;for(a=0;a>>8)-1}function bX(n,t,o,i){return CKe(n,t,o,i,32)}function qc(n,t){var o;for(o=0;o<16;o++)n[o]=t[o]|0}function HF(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 Eh(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 Ch(n,t){var o,i,e,a=pA(),A=pA();for(o=0;o<16;o++)A[o]=t[o];for(HF(A),HF(A),HF(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,Eh(A,a,1-e)}for(o=0;o<16;o++)n[2*o]=A[o]&255,n[2*o+1]=A[o]>>8}function mX(n,t){var o=new Uint8Array(32),i=new Uint8Array(32);return Ch(o,n),Ch(i,t),bX(o,0,i,0)}function MX(n){var t=new Uint8Array(32);return Ch(t,n),t[0]&1}function JF(n,t){var o;for(o=0;o<16;o++)n[o]=t[2*o]+(t[2*o+1]<<8);n[15]&=32767}function Ln(n,t,o){for(var i=0;i<16;i++)n[i]=t[i]+o[i]}function Hn(n,t,o){for(var i=0;i<16;i++)n[i]=t[i]-o[i]}function pt(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,T=0,_=0,R=0,H=0,F=0,L=0,q=0,z=0,K=0,G=0,V=0,U=0,N=0,k=0,J=0,X=0,ae=0,De=0,oe=o[0],Se=o[1],Be=o[2],Re=o[3],Ne=o[4],Je=o[5],ve=o[6],aA=o[7],fe=o[8],Ie=o[9],Xe=o[10],je=o[11],be=o[12],EA=o[13],hA=o[14],iA=o[15];i=t[0],a+=i*oe,A+=i*Se,r+=i*Be,s+=i*Re,g+=i*Ne,c+=i*Je,I+=i*ve,d+=i*aA,B+=i*fe,f+=i*Ie,Q+=i*Xe,y+=i*je,m+=i*be,T+=i*EA,_+=i*hA,R+=i*iA,i=t[1],A+=i*oe,r+=i*Se,s+=i*Be,g+=i*Re,c+=i*Ne,I+=i*Je,d+=i*ve,B+=i*aA,f+=i*fe,Q+=i*Ie,y+=i*Xe,m+=i*je,T+=i*be,_+=i*EA,R+=i*hA,H+=i*iA,i=t[2],r+=i*oe,s+=i*Se,g+=i*Be,c+=i*Re,I+=i*Ne,d+=i*Je,B+=i*ve,f+=i*aA,Q+=i*fe,y+=i*Ie,m+=i*Xe,T+=i*je,_+=i*be,R+=i*EA,H+=i*hA,F+=i*iA,i=t[3],s+=i*oe,g+=i*Se,c+=i*Be,I+=i*Re,d+=i*Ne,B+=i*Je,f+=i*ve,Q+=i*aA,y+=i*fe,m+=i*Ie,T+=i*Xe,_+=i*je,R+=i*be,H+=i*EA,F+=i*hA,L+=i*iA,i=t[4],g+=i*oe,c+=i*Se,I+=i*Be,d+=i*Re,B+=i*Ne,f+=i*Je,Q+=i*ve,y+=i*aA,m+=i*fe,T+=i*Ie,_+=i*Xe,R+=i*je,H+=i*be,F+=i*EA,L+=i*hA,q+=i*iA,i=t[5],c+=i*oe,I+=i*Se,d+=i*Be,B+=i*Re,f+=i*Ne,Q+=i*Je,y+=i*ve,m+=i*aA,T+=i*fe,_+=i*Ie,R+=i*Xe,H+=i*je,F+=i*be,L+=i*EA,q+=i*hA,z+=i*iA,i=t[6],I+=i*oe,d+=i*Se,B+=i*Be,f+=i*Re,Q+=i*Ne,y+=i*Je,m+=i*ve,T+=i*aA,_+=i*fe,R+=i*Ie,H+=i*Xe,F+=i*je,L+=i*be,q+=i*EA,z+=i*hA,K+=i*iA,i=t[7],d+=i*oe,B+=i*Se,f+=i*Be,Q+=i*Re,y+=i*Ne,m+=i*Je,T+=i*ve,_+=i*aA,R+=i*fe,H+=i*Ie,F+=i*Xe,L+=i*je,q+=i*be,z+=i*EA,K+=i*hA,G+=i*iA,i=t[8],B+=i*oe,f+=i*Se,Q+=i*Be,y+=i*Re,m+=i*Ne,T+=i*Je,_+=i*ve,R+=i*aA,H+=i*fe,F+=i*Ie,L+=i*Xe,q+=i*je,z+=i*be,K+=i*EA,G+=i*hA,V+=i*iA,i=t[9],f+=i*oe,Q+=i*Se,y+=i*Be,m+=i*Re,T+=i*Ne,_+=i*Je,R+=i*ve,H+=i*aA,F+=i*fe,L+=i*Ie,q+=i*Xe,z+=i*je,K+=i*be,G+=i*EA,V+=i*hA,U+=i*iA,i=t[10],Q+=i*oe,y+=i*Se,m+=i*Be,T+=i*Re,_+=i*Ne,R+=i*Je,H+=i*ve,F+=i*aA,L+=i*fe,q+=i*Ie,z+=i*Xe,K+=i*je,G+=i*be,V+=i*EA,U+=i*hA,N+=i*iA,i=t[11],y+=i*oe,m+=i*Se,T+=i*Be,_+=i*Re,R+=i*Ne,H+=i*Je,F+=i*ve,L+=i*aA,q+=i*fe,z+=i*Ie,K+=i*Xe,G+=i*je,V+=i*be,U+=i*EA,N+=i*hA,k+=i*iA,i=t[12],m+=i*oe,T+=i*Se,_+=i*Be,R+=i*Re,H+=i*Ne,F+=i*Je,L+=i*ve,q+=i*aA,z+=i*fe,K+=i*Ie,G+=i*Xe,V+=i*je,U+=i*be,N+=i*EA,k+=i*hA,J+=i*iA,i=t[13],T+=i*oe,_+=i*Se,R+=i*Be,H+=i*Re,F+=i*Ne,L+=i*Je,q+=i*ve,z+=i*aA,K+=i*fe,G+=i*Ie,V+=i*Xe,U+=i*je,N+=i*be,k+=i*EA,J+=i*hA,X+=i*iA,i=t[14],_+=i*oe,R+=i*Se,H+=i*Be,F+=i*Re,L+=i*Ne,q+=i*Je,z+=i*ve,K+=i*aA,G+=i*fe,V+=i*Ie,U+=i*Xe,N+=i*je,k+=i*be,J+=i*EA,X+=i*hA,ae+=i*iA,i=t[15],R+=i*oe,H+=i*Se,F+=i*Be,L+=i*Re,q+=i*Ne,z+=i*Je,K+=i*ve,G+=i*aA,V+=i*fe,U+=i*Ie,N+=i*Xe,k+=i*je,J+=i*be,X+=i*EA,ae+=i*hA,De+=i*iA,a+=38*H,A+=38*F,r+=38*L,s+=38*q,g+=38*z,c+=38*K,I+=38*G,d+=38*V,B+=38*U,f+=38*N,Q+=38*k,y+=38*J,m+=38*X,T+=38*ae,_+=38*De,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=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=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=T+e+65535,e=Math.floor(i/65536),T=i-e*65536,i=_+e+65535,e=Math.floor(i/65536),_=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]=T,n[14]=_,n[15]=R}function Un(n,t){pt(n,t,t)}function qF(n,t){var o=pA(),i;for(i=0;i<16;i++)o[i]=t[i];for(i=253;i>=0;i--)Un(o,o),i!==2&&i!==4&&pt(o,o,t);for(i=0;i<16;i++)n[i]=o[i]}function BKe(n,t){var o=pA(),i;for(i=0;i<16;i++)o[i]=t[i];for(i=250;i>=0;i--)Un(o,o),i!==1&&pt(o,o,t);for(i=0;i<16;i++)n[i]=o[i]}function _X(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,JF(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,Eh(r,s,a),Eh(g,c,a),Ln(I,r,g),Hn(r,r,g),Ln(g,s,c),Hn(s,s,c),Un(c,I),Un(d,r),pt(r,g,r),pt(g,s,I),Ln(I,r,g),Hn(r,r,g),Un(s,r),Hn(g,c,d),pt(r,g,pKe),Ln(r,r,c),pt(g,g,r),pt(r,c,d),pt(c,s,e),Un(s,I),Eh(r,s,a),Eh(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 qF(B,B),pt(f,f,B),Ch(n,f),0}function fKe(n,t){return _X(n,t,OX)}var SX=[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 wX(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,F,L,q,z,K,G,V,U,N,k,J=n[0],X=n[1],ae=n[2],De=n[3],oe=n[4],Se=n[5],Be=n[6],Re=n[7],Ne=t[0],Je=t[1],ve=t[2],aA=t[3],fe=t[4],Ie=t[5],Xe=t[6],je=t[7],be=0;i>=128;){for(q=0;q<16;q++)z=8*q+be,e[q]=o[z+0]<<24|o[z+1]<<16|o[z+2]<<8|o[z+3],a[q]=o[z+4]<<24|o[z+5]<<16|o[z+6]<<8|o[z+7];for(q=0;q<80;q++)if(A=J,r=X,s=ae,g=De,c=oe,I=Se,d=Be,B=Re,f=Ne,Q=Je,y=ve,m=aA,T=fe,_=Ie,R=Xe,H=je,K=Re,G=je,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=(oe>>>14|fe<<18)^(oe>>>18|fe<<14)^(fe>>>9|oe<<23),G=(fe>>>14|oe<<18)^(fe>>>18|oe<<14)^(oe>>>9|fe<<23),V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,K=oe&Se^~oe&Be,G=fe&Ie^~fe&Xe,V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,K=SX[q*2],G=SX[q*2+1],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,K=e[q%16],G=a[q%16],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,F=N&65535|k<<16,L=V&65535|U<<16,K=F,G=L,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=(J>>>28|Ne<<4)^(Ne>>>2|J<<30)^(Ne>>>7|J<<25),G=(Ne>>>28|J<<4)^(J>>>2|Ne<<30)^(J>>>7|Ne<<25),V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,K=J&X^J&ae^X&ae,G=Ne&Je^Ne&ve^Je&ve,V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,B=N&65535|k<<16,H=V&65535|U<<16,K=g,G=m,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=F,G=L,V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,g=N&65535|k<<16,m=V&65535|U<<16,X=A,ae=r,De=s,oe=g,Se=c,Be=I,Re=d,J=B,Je=f,ve=Q,aA=y,fe=m,Ie=T,Xe=_,je=R,Ne=H,q%16===15)for(z=0;z<16;z++)K=e[z],G=a[z],V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=e[(z+9)%16],G=a[(z+9)%16],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,F=e[(z+1)%16],L=a[(z+1)%16],K=(F>>>1|L<<31)^(F>>>8|L<<24)^F>>>7,G=(L>>>1|F<<31)^(L>>>8|F<<24)^(L>>>7|F<<25),V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,F=e[(z+14)%16],L=a[(z+14)%16],K=(F>>>19|L<<13)^(L>>>29|F<<3)^F>>>6,G=(L>>>19|F<<13)^(F>>>29|L<<3)^(L>>>6|F<<26),V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,e[z]=N&65535|k<<16,a[z]=V&65535|U<<16;K=J,G=Ne,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=n[0],G=t[0],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,n[0]=J=N&65535|k<<16,t[0]=Ne=V&65535|U<<16,K=X,G=Je,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=n[1],G=t[1],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,n[1]=X=N&65535|k<<16,t[1]=Je=V&65535|U<<16,K=ae,G=ve,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=n[2],G=t[2],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,n[2]=ae=N&65535|k<<16,t[2]=ve=V&65535|U<<16,K=De,G=aA,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=n[3],G=t[3],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,n[3]=De=N&65535|k<<16,t[3]=aA=V&65535|U<<16,K=oe,G=fe,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=n[4],G=t[4],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,n[4]=oe=N&65535|k<<16,t[4]=fe=V&65535|U<<16,K=Se,G=Ie,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=n[5],G=t[5],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,n[5]=Se=N&65535|k<<16,t[5]=Ie=V&65535|U<<16,K=Be,G=Xe,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=n[6],G=t[6],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,n[6]=Be=N&65535|k<<16,t[6]=Xe=V&65535|U<<16,K=Re,G=je,V=G&65535,U=G>>>16,N=K&65535,k=K>>>16,K=n[7],G=t[7],V+=G&65535,U+=G>>>16,N+=K&65535,k+=K>>>16,U+=V>>>16,N+=U>>>16,k+=N>>>16,n[7]=Re=N&65535|k<<16,t[7]=je=V&65535|U<<16,be+=128,i-=128}return i}function OB(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,wX(i,e,t,o),o%=128,A=0;A=0;--e)i=o[e/8|0]>>(e&7)&1,DX(n,t,i),YF(t,n),YF(n,n),DX(n,t,i)}function gD(n,t){var o=[pA(),pA(),pA(),pA()];qc(o[0],fX),qc(o[1],QX),qc(o[2],uh),pt(o[3],fX,QX),TX(n,o,t)}var KF=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 zF(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)*KF[e],o=t[e]>>8,t[e]&=255;for(e=0;e<32;e++)t[e]-=o*KF[e];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,n[i]=t[i]&255}function bB(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;zF(n,t)}function QKe(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&&Hn(n[0],xF,n[0]),pt(n[3],n[0],n[1]),0)}function SKe(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||mKe(g,i))return-1;for(e=0;e=0}Lg.verify=_Ke;function TKe(n){if(zc(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 fKe(o,t),t[0]&=248,t[31]&=127,t[31]|=64,o[31]&=127,{public:o,private:t}}Lg.generateKeyPair=TKe;Lg.default={}});var Vc=ee(fh=>{"use strict";var MB=RX(),Bh=$e("crypto"),VF=Buffer.from([48,42,48,5,6,3,43,101,110,3,33,0]),WF=Buffer.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]),NKe=Buffer.from([5]),ZF=function(n){return Buffer.concat([NKe,n])};function kX(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 vX(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 RKe(n){let t=new Uint8Array(n);return t[0]|=6,t[31]|=128,t[31]&=-65,t}fh.getPublicFromPrivateKey=function(n){let t=RKe(n),o=MB.generateKeyPair(t);return ZF(Buffer.from(o.public))};fh.generateKeyPair=function(){try{let{publicKey:n,privateKey:t}=Bh.generateKeyPairSync("x25519",{publicKeyEncoding:{format:"der",type:"spki"},privateKeyEncoding:{format:"der",type:"pkcs8"}}),o=n.slice(VF.length,VF.length+32),i=t.slice(WF.length,WF.length+32);return{pubKey:ZF(o),privKey:i}}catch{let t=MB.generateKeyPair(Bh.randomBytes(32));return{privKey:Buffer.from(t.private),pubKey:ZF(Buffer.from(t.public))}}};fh.calculateAgreement=function(n,t){if(n=vX(n),kX(t),!n||n.byteLength!=32)throw new Error("Invalid public key");if(typeof Bh.diffieHellman=="function"){let o=Bh.createPrivateKey({key:Buffer.concat([WF,t]),format:"der",type:"pkcs8"}),i=Bh.createPublicKey({key:Buffer.concat([VF,n]),format:"der",type:"spki"});return Bh.diffieHellman({privateKey:o,publicKey:i})}else{let o=MB.sharedKey(t,n);return Buffer.from(o)}};fh.calculateSignature=function(n,t){if(kX(n),!t)throw new Error("Invalid message");return Buffer.from(MB.sign(n,t))};fh.verifySignature=function(n,t,o,i){if(n=vX(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:MB.verify(n,t,o)}});var GX=ee(_B=>{var cD=Vc(),kKe=$e("crypto");function PX(n){return typeof n=="number"&&n%1===0&&n>=0}_B.generateIdentityKeyPair=cD.generateKeyPair;_B.generateRegistrationId=function(){var n=Uint16Array.from(kKe.randomBytes(2))[0];return n&16383};_B.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(!PX(t))throw new TypeError("Invalid argument for signedKeyId: "+t);let o=cD.generateKeyPair(),i=cD.calculateSignature(n.privKey,o.pubKey);return{keyId:t,keyPair:o,signature:i}};_B.generatePreKey=function(n){if(!PX(n))throw new TypeError("Invalid argument for keyId: "+n);let t=cD.generateKeyPair();return{keyId:n,keyPair:t}}});var $F=ee((rmA,FX)=>{var XF=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}};FX.exports=XF});var eL=ee((amA,LX)=>{var vKe={OURS:1,THEIRS:2};LX.exports=vKe});var AL=ee((imA,UX)=>{var PKe={SENDING:1,RECEIVING:2};UX.exports=PKe});var pD=ee((omA,KX)=>{var GKe=eL(),FKe=40,HX="v1";function lD(n){if(!Buffer.isBuffer(n))throw new TypeError("Buffer required")}var dD=class{constructor(){this._chains={}}toString(){return``}inspect(){return this.toString()}addChain(t,o){lD(t);let i=t.toString("base64");if(this._chains.hasOwnProperty(i))throw new Error("Overwrite attempt");this._chains[i]=o}getChain(t){return lD(t),this._chains[t.toString("base64")]}deleteChain(t){lD(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}},ID=[{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)}}],tL=class{static createEntry(){return new dD}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:iFKe;){let t,o;for(let[i,e]of Object.entries(this.sessions))e.indexInfo.closed!==-1&&(!o||e.indexInfo.closed{Ns.SignalError=class extends Error{};Ns.UntrustedIdentityKeyError=class extends Ns.SignalError{constructor(t,o){super(),this.name="UntrustedIdentityKeyError",this.addr=t,this.identityKey=o}};Ns.SessionError=class extends Ns.SignalError{constructor(t){super(t),this.name="SessionError"}};Ns.MessageCounterError=class extends Ns.SessionError{constructor(t){super(t),this.name="MessageCounterError"}};Ns.PreKeyError=class extends Ns.SessionError{constructor(t){super(t),this.name="PreKeyError"}}});var rL=ee((dmA,YX)=>{"use strict";var ED=new Map,xX=1e4;async function LKe(n,t){let o=0;for(;;){let i=Math.min(n.length,xX);for(let e=o;e=xX?(n.splice(0,i),o=0):o=i;else break}t()}YX.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&&LKe(i,()=>ED.delete(n)),e}});var iL=ee((pmA,zX)=>{"use strict";var jX=eL(),UKe=AL(),JX=pD(),qX=Ll(),Wc=Vc(),uD=hD(),HKe=rL(),aL=class{constructor(t,o){this.addr=o,this.storage=t}async initOutgoing(t){let o=this.addr.toString();return await HKe(o,async()=>{if(!await this.storage.isTrustedIdentity(this.addr.id,t.identityKey))throw new uD.UntrustedIdentityKeyError(this.addr.id,t.identityKey);Wc.verifySignature(t.identityKey,t.signedPreKey.publicKey,t.signedPreKey.signature,!0);let i=Wc.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 JX;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 uD.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 uD.PreKeyError("Invalid PreKey ID");let a=await this.storage.loadSignedPreKey(o.signedPreKeyId);if(!a)throw new uD.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=Wc.calculateAgreement(A,c.privKey),d=Wc.calculateAgreement(e,i.privKey),B=Wc.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=Wc.calculateAgreement(a,o.privKey);s.set(new Uint8Array(y),128)}let f=qX.deriveSecrets(Buffer.from(s),Buffer.alloc(32),Buffer.from("WhisperText")),Q=JX.createEntry();return Q.registrationId=r,Q.currentRatchet={rootKey:f[0],ephemeralKeyPair:t?Wc.generateKeyPair():i,lastRemoteEphemeralKey:A,previousCounter:0},Q.indexInfo={created:Date.now(),used:Date.now(),remoteIdentityKey:e,baseKey:t?o.pubKey:a,baseKeyType:t?jX.OURS:jX.THEIRS,closed:-1},t&&this.calculateSendingRatchet(Q,A),Q}calculateSendingRatchet(t,o){let i=t.currentRatchet,e=Wc.calculateAgreement(o,i.ephemeralKeyPair.privKey),a=qX.deriveSecrets(e,i.rootKey,Buffer.from("WhisperRatchet"));t.addChain(i.ephemeralKeyPair.pubKey,{messageKeys:{},chainKey:{counter:-1,key:a[1]},chainType:UKe.SENDING}),i.rootKey=a[0]}};zX.exports=aL});var WX=ee((hmA,VX)=>{"use strict";var Zc=Zm(),Xo=Zc.Reader,oL=Zc.Writer,nA=Zc.util,Kn=Zc.roots.default||(Zc.roots.default={});Kn.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 Xo||(i=new Xo(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 Kn.textsecure.WhisperMessage)return i;var e=new Kn.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,Zc.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 Xo||(i=new Xo(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 Kn.textsecure.PreKeyWhisperMessage)return i;var e=new Kn.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,Zc.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 Xo||(i=new Xo(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 Kn.textsecure.KeyExchangeMessage)return i;var e=new Kn.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,Zc.util.toJSONOptions)},t})(),n})();VX.exports=Kn});var nL=ee((EmA,ZX)=>{"use strict";var{textsecure:{WhisperMessage:KKe,PreKeyWhisperMessage:xKe}}=WX();ZX.exports={WhisperMessage:KKe,PreKeyWhisperMessage:xKe}});var A7=ee((umA,e7)=>{var CD=AL(),YKe=$F(),jKe=iL(),XX=pD(),Ug=Ll(),$X=Vc(),Rs=hD(),Qh=nL(),JKe=rL(),Xc=3;function BD(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}var sL=class{constructor(t,o){if(!(o instanceof YKe))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 XX))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 JKe(this.addr.toString(),t)}async encrypt(t){BD(t);let o=await this.storage.getOurIdentity();return await this.queueJob(async()=>{let i=await this.getRecord();if(!i)throw new Rs.SessionError("No sessions");let e=i.getOpenSession();if(!e)throw new Rs.SessionError("No open session");let a=e.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,a))throw new Rs.UntrustedIdentityKeyError(this.addr.id,a);let A=e.getChain(e.currentRatchet.ephemeralKeyPair.pubKey);if(A.chainType===CD.RECEIVING)throw new Error("Tried to encrypt on a receiving chain");this.fillMessageKeys(A,A.chainKey.counter+1);let r=Ug.deriveSecrets(A.messageKeys[A.chainKey.counter],Buffer.alloc(32),Buffer.from("WhisperMessageKeys"));delete A.messageKeys[A.chainKey.counter];let s=Qh.WhisperMessage.create();s.ephemeralKey=e.currentRatchet.ephemeralKeyPair.pubKey,s.counter=A.chainKey.counter,s.previousCounter=e.currentRatchet.previousCounter,s.ciphertext=Ug.encrypt(r[0],t,r[2].slice(0,16));let g=Qh.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(Xc,Xc),c.set(g,67);let I=Ug.calculateMAC(r[1],c),d=Buffer.alloc(g.byteLength+9);d[0]=this._encodeTupleByte(Xc,Xc),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=Qh.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(Xc,Xc)]),Buffer.from(Qh.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 Rs.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 Rs.SessionError("No matching sessions found for message")}async decryptWhisperMessage(t){return BD(t),await this.queueJob(async()=>{let o=await this.getRecord();if(!o)throw new Rs.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 Rs.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){BD(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=Qh.PreKeyWhisperMessage.decode(t.slice(1));if(!i){if(e.registrationId==null)throw new Error("No registrationId");i=new XX}let A=await new jKe(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(BD(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=Qh.WhisperMessage.decode(e);this.maybeStepRatchet(o,a.ephemeralKey,a.previousCounter);let A=o.getChain(a.ephemeralKey);if(A.chainType===CD.SENDING)throw new Error("Tried to decrypt on a sending chain");if(this.fillMessageKeys(A,a.counter),!A.messageKeys.hasOwnProperty(a.counter))throw new Rs.MessageCounterError("Key used already or never filled");let r=A.messageKeys[a.counter];delete A.messageKeys[a.counter];let s=Ug.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(Xc,Xc),c.set(e,67),Ug.verifyMAC(c,s[1],t.slice(-8),8);let I=Ug.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 Rs.SessionError("Over 2000 messages into the future!");if(t.chainKey.key===void 0)throw new Rs.SessionError("Chain closed");let i=t.chainKey.key;return t.messageKeys[t.chainKey.counter+1]=Ug.calculateMAC(i,Buffer.from([1])),t.chainKey.key=Ug.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=$X.generateKeyPair(),this.calculateRatchet(t,o,!0),e.lastRemoteEphemeralKey=o}calculateRatchet(t,o,i){let e=t.currentRatchet,a=$X.calculateAgreement(o,e.ephemeralKeyPair.privKey),A=Ug.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?CD.SENDING:CD.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))}})}};e7.exports=sL});var t7=ee(Hg=>{"use strict";Hg.crypto=Ll();Hg.curve=Vc();Hg.keyhelper=GX();Hg.ProtocolAddress=$F();Hg.SessionBuilder=iL();Hg.SessionCipher=A7();Hg.SessionRecord=pD();Object.assign(Hg,hD())});var cL=ee((ymA,n7)=>{"use strict";n7.exports=function(...n){try{return JSON.stringify(...n)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var IL=ee((s7,g7)=>{"use strict";var $Ke=cL();g7.exports=class extends Error{constructor(n){let t=n.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:$Ke(o));super(t.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s7.assert)}}});var Ul=ee((SmA,c7)=>{"use strict";var exe=IL();c7.exports=function(n,...t){if(!n)throw t.length===1&&t[0]instanceof Error?t[0]:new exe(t)}});var RB=ee((wmA,l7)=>{"use strict";var lL=Ul(),I7={};l7.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);lL(!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 d7={};ui=p7.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};d7.typeMap=new Map([["[object Error]",ui.error],["[object Map]",ui.map],["[object Promise]",ui.promise],["[object Set]",ui.set],["[object WeakMap]",ui.weakMap],["[object WeakSet]",ui.weakSet]]);ui.getInternalProto=function(n){if(Array.isArray(n))return ui.array;if(Buffer&&n instanceof Buffer)return ui.buffer;if(n instanceof Date)return ui.date;if(n instanceof RegExp)return ui.regex;if(n instanceof Error)return ui.error;let t=Object.prototype.toString.call(n);return d7.typeMap.get(t)||ui.generic}});var QD=ee(h7=>{"use strict";h7.keys=function(n,t={}){return t.symbols!==!1?Reflect.ownKeys(n):Object.getOwnPropertyNames(n)}});var yD=ee((OmA,E7)=>{"use strict";var Axe=RB(),Eo=dL(),txe=QD(),xg={needsProtoHack:new Set([Eo.set,Eo.map,Eo.weakSet,Eo.weakMap])};E7.exports=xg.clone=function(n,t={},o=null){if(typeof n!="object"||n===null)return n;let i=xg.clone,e=o;if(t.shallow){if(t.shallow!==!0)return xg.cloneWithShallow(n,t);i=s=>s}else if(e){let s=e.get(n);if(s)return s}else e=new Map;let a=Eo.getInternalProto(n);if(a===Eo.buffer)return Buffer&&Buffer.from(n);if(a===Eo.date)return new Date(n.getTime());if(a===Eo.regex)return new RegExp(n);let A=xg.base(n,a,t);if(A===n)return n;if(e&&e.set(n,A),a===Eo.set)for(let s of n)A.add(i(s,t,e));else if(a===Eo.map)for(let[s,g]of n)A.set(s,i(g,t,e));let r=txe.keys(n,t);for(let s of r){if(s==="__proto__")continue;if(a===Eo.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};xg.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=Axe(n,e);(typeof a=="object"||typeof a=="function")&&i.set(a,a)}return xg.clone(n,t,i)};xg.base=function(n,t,o){if(o.prototype===!1)return xg.needsProtoHack.has(t)?new t.constructor:t===Eo.array?[]:{};let i=Object.getPrototypeOf(n);if(i&&i.isImmutable)return n;if(t===Eo.array){let e=[];return i!==t&&Object.setPrototypeOf(e,i),e}if(xg.needsProtoHack.has(t)){let e=new i.constructor;return i!==t&&Object.setPrototypeOf(e,i),e}return Object.create(i)}});var hL=ee((bmA,B7)=>{"use strict";var pL=Ul(),u7=yD(),rxe=QD(),C7={};B7.exports=C7.merge=function(n,t,o){if(pL(n&&typeof n=="object","Invalid target value: must be an object"),pL(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)){pL(Array.isArray(n),"Cannot merge array onto an object"),o.mergeArrays||(n.length=0);for(let e=0;e{"use strict";var mD=Ul(),Q7=yD(),y7=hL(),f7=RB(),SD={};m7.exports=function(n,t,o={}){if(mD(n&&typeof n=="object","Invalid defaults value: must be an object"),mD(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),mD(typeof o=="object","Invalid options: must be an object"),!t)return null;if(o.shallow)return SD.applyToDefaultsWithShallow(n,t,o);let i=Q7(n);if(t===!0)return i;let e=o.nullOverride!==void 0?o.nullOverride:!1;return y7(i,t,{nullOverride:e,mergeArrays:!1})};SD.applyToDefaultsWithShallow=function(n,t,o){let i=o.shallow;mD(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=f7(n,s);g&&typeof g=="object"?e.set(g,a&&f7(t,s)||g):a&&a.add(s)}let A=Q7(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 y7(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 EL={};w7.exports=EL.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=EL.Bench.now()}elapsed(){return EL.Bench.now()-this.ts}static now(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}}});var uL=ee((NmA,O7)=>{"use strict";O7.exports=function(){}});var M7=ee((RmA,b7)=>{"use strict";var axe=uL();b7.exports=function(){return new Promise(axe)}});var CL=ee((kmA,_7)=>{"use strict";var ks=dL(),oi={mismatched:null};_7.exports=function(n,t,o){return o=Object.assign({prototype:!0},o),!!oi.isDeepEqual(n,t,o,[])};oi.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=oi.getSharedType(n,t,!!o.prototype);switch(a){case ks.buffer:return Buffer&&Buffer.prototype.equals.call(n,t);case ks.promise:return n===t;case ks.regex:return n.toString()===t.toString();case oi.mismatched:return!1}for(let A=i.length-1;A>=0;--A)if(i[A].isSame(n,t))return!0;i.push(new oi.SeenEntry(n,t));try{return!!oi.isDeepEqualObj(a,n,t,o,i)}finally{i.pop()}};oi.getSharedType=function(n,t,o){if(o)return Object.getPrototypeOf(n)!==Object.getPrototypeOf(t)?oi.mismatched:ks.getInternalProto(n);let i=ks.getInternalProto(n);return i!==ks.getInternalProto(t)?oi.mismatched:i};oi.valueOf=function(n){let t=n.valueOf;if(t===void 0)return n;try{return t.call(n)}catch(o){return o}};oi.hasOwnEnumerableProperty=function(n,t){return Object.prototype.propertyIsEnumerable.call(n,t)};oi.isSetSimpleEqual=function(n,t){for(let o of Set.prototype.values.call(n))if(!Set.prototype.has.call(t,o))return!1;return!0};oi.isDeepEqualObj=function(n,t,o,i,e){let{isDeepEqual:a,valueOf:A,hasOwnEnumerableProperty:r}=oi,{keys:s,getOwnPropertySymbols:g}=Object;if(n===ks.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";T7.exports=function(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var R7=ee((GmA,N7)=>{"use strict";var wD=Ul(),ixe=CL(),oxe=BL(),nxe=QD(),uo={};N7.exports=function(n,t,o={}){return typeof t!="object"&&(t=[t]),wD(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof n=="string"?uo.string(n,t,o):Array.isArray(n)?uo.array(n,t,o):(wD(typeof n=="object","Reference must be string or an object"),uo.object(n,t,o))};uo.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||uo.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||uo.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=uo.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(wD(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(oxe(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.hitsixe(e,a,i)};uo.shallow=function(n,t){return n===t}});var v7=ee((FmA,k7)=>{"use strict";var sxe=Ul();k7.exports=function(n){return sxe(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(n),"Bad attribute value ("+n+")"),n.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var G7=ee((LmA,P7)=>{"use strict";var eI={};P7.exports=function(n){if(!n)return"";let t="";for(let o=0;o=256?"&#"+n+";":`&#x${n.toString(16).padStart(2,"0")};`)};eI.isSafe=function(n){return eI.safeCharCodes.has(n)};eI.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);eI.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 L7=ee((UmA,F7)=>{"use strict";var DD={};F7.exports=function(n){return n?n.replace(/[<>&\u2028\u2029]/g,DD.escape):""};DD.escape=function(n){return DD.replacements.get(n)};DD.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var K7=ee((HmA,H7)=>{"use strict";var U7={};H7.exports=U7.flatten=function(n,t){let o=t||[];for(let i of n)Array.isArray(i)?U7.flatten(i,o):o.push(i);return o}});var j7=ee((KmA,Y7)=>{"use strict";var x7={};Y7.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(x7.has(e,A)&&!a.has(A)){if(o.first)return A;i.push(A),a.add(A)}return o.first?null:i};x7.has=function(n,t){return typeof n.has=="function"?n.has(t):n[t]!==void 0}});var q7=ee((xmA,J7)=>{"use strict";J7.exports=function(n){return!!n&&typeof n.then=="function"}});var W7=ee((YmA,V7)=>{"use strict";var z7={wrapped:Symbol("wrapped")};V7.exports=function(n){if(n[z7.wrapped])return n;let t=!1,o=function(...i){t||(t=!0,n(...i))};return o[z7.wrapped]=!0,o}});var X7=ee((jmA,Z7)=>{"use strict";var gxe=RB();Z7.exports=function(n,t,o){return t.replace(/{([^{}]+)}/g,(i,e)=>{let a=gxe(n,e,o);return a??""})}});var e$=ee((JmA,$7)=>{"use strict";var cxe={maxTimer:2147483647};$7.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,cxe.maxTimer);n-=A,e(()=>n>0?a():i(t),A)};n!==1/0&&a()})}});var A$=ee(Er=>{"use strict";Er.applyToDefaults=S7();Er.assert=Ul();Er.Bench=D7();Er.block=M7();Er.clone=yD();Er.contain=R7();Er.deepEqual=CL();Er.Error=IL();Er.escapeHeaderAttribute=v7();Er.escapeHtml=G7();Er.escapeJson=L7();Er.escapeRegex=BL();Er.flatten=K7();Er.ignore=uL();Er.intersect=j7();Er.isPromise=q7();Er.merge=hL();Er.once=W7();Er.reach=RB();Er.reachTemplate=X7();Er.stringify=cL();Er.wait=e$()});var jr=ee(Pe=>{"use strict";var Hl=A$(),zi={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"]])};Pe.Boom=class extends Error{constructor(n,t={}){if(n instanceof Error)return Pe.boomify(Hl.clone(n),t);let{statusCode:o=500,data:i=null,ctor:e=Pe.Boom}=t,a=new Error(n||void 0);Error.captureStackTrace(a,e),a.data=i;let A=zi.initialize(a,o);return Object.defineProperty(A,"typeof",{value:e}),t.decorate&&Object.assign(A,t.decorate),A}static[Symbol.hasInstance](n){return this===Pe.Boom?Pe.isBoom(n):this.prototype.isPrototypeOf(n)}};Pe.isBoom=function(n,t){return n instanceof Error&&!!n.isBoom&&(!t||n.output.statusCode===t)};Pe.boomify=function(n,t){return Hl.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:zi.initialize(n,t.statusCode||n.output.statusCode,t.message):zi.initialize(n,t.statusCode||500,t.message)};Pe.badRequest=function(n,t){return new Pe.Boom(n,{statusCode:400,data:t,ctor:Pe.badRequest})};Pe.unauthorized=function(n,t,o){let i=new Pe.Boom(n,{statusCode:401,ctor:Pe.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+=" "+Hl.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}="${Hl.escapeHeaderAttribute(A.toString())}"`}).join(", ")),n?(o&&(e+=","),e+=` error="${Hl.escapeHeaderAttribute(n)}"`,i.output.payload.attributes.error=n):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=e,i};Pe.paymentRequired=function(n,t){return new Pe.Boom(n,{statusCode:402,data:t,ctor:Pe.paymentRequired})};Pe.forbidden=function(n,t){return new Pe.Boom(n,{statusCode:403,data:t,ctor:Pe.forbidden})};Pe.notFound=function(n,t){return new Pe.Boom(n,{statusCode:404,data:t,ctor:Pe.notFound})};Pe.methodNotAllowed=function(n,t,o){let i=new Pe.Boom(n,{statusCode:405,data:t,ctor:Pe.methodNotAllowed});return typeof o=="string"&&(o=[o]),Array.isArray(o)&&(i.output.headers.Allow=o.join(", ")),i};Pe.notAcceptable=function(n,t){return new Pe.Boom(n,{statusCode:406,data:t,ctor:Pe.notAcceptable})};Pe.proxyAuthRequired=function(n,t){return new Pe.Boom(n,{statusCode:407,data:t,ctor:Pe.proxyAuthRequired})};Pe.clientTimeout=function(n,t){return new Pe.Boom(n,{statusCode:408,data:t,ctor:Pe.clientTimeout})};Pe.conflict=function(n,t){return new Pe.Boom(n,{statusCode:409,data:t,ctor:Pe.conflict})};Pe.resourceGone=function(n,t){return new Pe.Boom(n,{statusCode:410,data:t,ctor:Pe.resourceGone})};Pe.lengthRequired=function(n,t){return new Pe.Boom(n,{statusCode:411,data:t,ctor:Pe.lengthRequired})};Pe.preconditionFailed=function(n,t){return new Pe.Boom(n,{statusCode:412,data:t,ctor:Pe.preconditionFailed})};Pe.entityTooLarge=function(n,t){return new Pe.Boom(n,{statusCode:413,data:t,ctor:Pe.entityTooLarge})};Pe.uriTooLong=function(n,t){return new Pe.Boom(n,{statusCode:414,data:t,ctor:Pe.uriTooLong})};Pe.unsupportedMediaType=function(n,t){return new Pe.Boom(n,{statusCode:415,data:t,ctor:Pe.unsupportedMediaType})};Pe.rangeNotSatisfiable=function(n,t){return new Pe.Boom(n,{statusCode:416,data:t,ctor:Pe.rangeNotSatisfiable})};Pe.expectationFailed=function(n,t){return new Pe.Boom(n,{statusCode:417,data:t,ctor:Pe.expectationFailed})};Pe.teapot=function(n,t){return new Pe.Boom(n,{statusCode:418,data:t,ctor:Pe.teapot})};Pe.badData=function(n,t){return new Pe.Boom(n,{statusCode:422,data:t,ctor:Pe.badData})};Pe.locked=function(n,t){return new Pe.Boom(n,{statusCode:423,data:t,ctor:Pe.locked})};Pe.failedDependency=function(n,t){return new Pe.Boom(n,{statusCode:424,data:t,ctor:Pe.failedDependency})};Pe.tooEarly=function(n,t){return new Pe.Boom(n,{statusCode:425,data:t,ctor:Pe.tooEarly})};Pe.preconditionRequired=function(n,t){return new Pe.Boom(n,{statusCode:428,data:t,ctor:Pe.preconditionRequired})};Pe.tooManyRequests=function(n,t){return new Pe.Boom(n,{statusCode:429,data:t,ctor:Pe.tooManyRequests})};Pe.illegal=function(n,t){return new Pe.Boom(n,{statusCode:451,data:t,ctor:Pe.illegal})};Pe.internal=function(n,t,o=500){return zi.serverError(n,t,o,Pe.internal)};Pe.notImplemented=function(n,t){return zi.serverError(n,t,501,Pe.notImplemented)};Pe.badGateway=function(n,t){return zi.serverError(n,t,502,Pe.badGateway)};Pe.serverUnavailable=function(n,t){return zi.serverError(n,t,503,Pe.serverUnavailable)};Pe.gatewayTimeout=function(n,t){return zi.serverError(n,t,504,Pe.gatewayTimeout)};Pe.badImplementation=function(n,t){let o=zi.serverError(n,t,500,Pe.badImplementation);return o.isDeveloperError=!0,o};zi.initialize=function(n,t,o){let i=parseInt(t,10);if(Hl.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:zi.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");Hl.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};zi.reformat=function(n=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=zi.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)};zi.serverError=function(n,t,o,i){return t instanceof Error&&!t.isBoom?Pe.boomify(t,{statusCode:o,message:n}):new Pe.Boom(n,{statusCode:o,data:t,ctor:i})}});var aee,Yxe,jxe,Jxe,qxe,zxe,Vxe,Wxe,Zxe,Xxe,$xe,eYe,AYe,tYe,rYe,O,Ps=ue(()=>{aee=n=>typeof n<"u"&&n!==null,Yxe=n=>typeof n=="object",jxe=n=>Object.prototype.toString.call(n)==="[object Object]",Jxe=n=>typeof n=="function",qxe=n=>typeof n=="boolean",zxe=n=>n instanceof Buffer,Vxe=n=>{if(aee(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},Wxe=n=>n instanceof ArrayBuffer,Zxe=n=>typeof n=="string"&&n.length>0,Xxe=n=>typeof n=="number"&&Number.isFinite(n),$xe=n=>Number.isInteger(n),eYe=(n,t,o)=>n>=t&&n<=o,AYe=(n,t)=>t.includes(n),tYe=(n,t,o)=>new Error(`Expected ${t} for ${n} but received ${o} of type ${typeof o}`),rYe=(n,t)=>(t.message=n.message,t),O={defined:aee,object:Yxe,plainObject:jxe,fn:Jxe,bool:qxe,buffer:zxe,typedArray:Vxe,arrayBuffer:Wxe,string:Zxe,number:Xxe,integer:$xe,inRange:eYe,inArray:AYe,invalidParameterError:tYe,nativeError:rYe}});var nee=ee((rwA,oee)=>{"use strict";var iee=()=>process.platform==="linux",KD=null,aYe=()=>{if(!KD)if(iee()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,KD=process.report.getReport(),process.report.excludeNetwork=n}else KD={};return KD};oee.exports={isLinux:iee,getReport:aYe}});var gee=ee((awA,see)=>{"use strict";var Nh=$e("fs"),iYe="/usr/bin/ldd",oYe="/proc/self/exe",xD=2048,nYe=n=>{let t=Nh.openSync(n,"r"),o=Buffer.alloc(xD),i=Nh.readSync(t,o,0,xD,0);return Nh.close(t,()=>{}),o.subarray(0,i)},sYe=n=>new Promise((t,o)=>{Nh.open(n,"r",(i,e)=>{if(i)o(i);else{let a=Buffer.alloc(xD);Nh.read(e,a,0,xD,0,(A,r)=>{t(a.subarray(0,r)),Nh.close(e,()=>{})})}})});see.exports={LDD_PATH:iYe,SELF_PATH:oYe,readFileSync:nYe,readFile:sYe}});var Iee=ee((iwA,cee)=>{"use strict";var gYe=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 dee=$e("child_process"),{isLinux:Rh,getReport:pee}=nee(),{LDD_PATH:YD,SELF_PATH:hee,readFile:RL,readFileSync:kL}=gee(),{interpreterPath:Eee}=Iee(),Gs,Fs,Ls,uee="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",nI="",Cee=()=>nI||new Promise(n=>{dee.exec(uee,(t,o)=>{nI=t?" ":o,n(nI)})}),Bee=()=>{if(!nI)try{nI=dee.execSync(uee,{encoding:"utf8"})}catch{nI=" "}return nI},zg="glibc",fee=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,ql="musl",cYe=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),Qee=()=>{let n=pee();return n.header&&n.header.glibcVersionRuntime?zg:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(cYe)?ql:null},yee=n=>{let[t,o]=n.split(/[\r\n]+/);return t&&t.includes(zg)?zg:o&&o.includes(ql)?ql:null},mee=n=>{if(n){if(n.includes("/ld-musl-"))return ql;if(n.includes("/ld-linux-"))return zg}return null},See=n=>(n=n.toString(),n.includes("musl")?ql:n.includes("GNU C Library")?zg:null),IYe=async()=>{if(Fs!==void 0)return Fs;Fs=null;try{let n=await RL(YD);Fs=See(n)}catch{}return Fs},lYe=()=>{if(Fs!==void 0)return Fs;Fs=null;try{let n=kL(YD);Fs=See(n)}catch{}return Fs},dYe=async()=>{if(Gs!==void 0)return Gs;Gs=null;try{let n=await RL(hee),t=Eee(n);Gs=mee(t)}catch{}return Gs},pYe=()=>{if(Gs!==void 0)return Gs;Gs=null;try{let n=kL(hee),t=Eee(n);Gs=mee(t)}catch{}return Gs},wee=async()=>{let n=null;if(Rh()&&(n=await dYe(),!n&&(n=await IYe(),n||(n=Qee()),!n))){let t=await Cee();n=yee(t)}return n},Dee=()=>{let n=null;if(Rh()&&(n=pYe(),!n&&(n=lYe(),n||(n=Qee()),!n))){let t=Bee();n=yee(t)}return n},hYe=async()=>Rh()&&await wee()!==zg,EYe=()=>Rh()&&Dee()!==zg,uYe=async()=>{if(Ls!==void 0)return Ls;Ls=null;try{let t=(await RL(YD)).match(fee);t&&(Ls=t[1])}catch{}return Ls},CYe=()=>{if(Ls!==void 0)return Ls;Ls=null;try{let t=kL(YD).match(fee);t&&(Ls=t[1])}catch{}return Ls},Oee=()=>{let n=pee();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},lee=n=>n.trim().split(/\s+/)[1],bee=n=>{let[t,o,i]=n.split(/[\r\n]+/);return t&&t.includes(zg)?lee(t):o&&i&&o.includes(ql)?lee(i):null},BYe=async()=>{let n=null;if(Rh()&&(n=await uYe(),n||(n=Oee()),!n)){let t=await Cee();n=bee(t)}return n},fYe=()=>{let n=null;if(Rh()&&(n=CYe(),n||(n=Oee()),!n)){let t=Bee();n=bee(t)}return n};Mee.exports={GLIBC:zg,MUSL:ql,family:wee,familySync:Dee,isNonGlibcLinux:hYe,isNonGlibcLinuxSync:EYe,version:BYe,versionSync:fYe}});var kh=ee((nwA,_ee)=>{"use strict";var QYe="2.0.0",yYe=Number.MAX_SAFE_INTEGER||9007199254740991,mYe=16,SYe=250,wYe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];_ee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:mYe,MAX_SAFE_BUILD_LENGTH:SYe,MAX_SAFE_INTEGER:yYe,RELEASE_TYPES:wYe,SEMVER_SPEC_VERSION:QYe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var qB=ee((swA,Tee)=>{"use strict";var DYe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};Tee.exports=DYe});var vh=ee((Us,Nee)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:vL,MAX_SAFE_BUILD_LENGTH:OYe,MAX_LENGTH:bYe}=kh(),MYe=qB();Us=Nee.exports={};var _Ye=Us.re=[],TYe=Us.safeRe=[],gA=Us.src=[],NYe=Us.safeSrc=[],cA=Us.t={},RYe=0,PL="[a-zA-Z0-9-]",kYe=[["\\s",1],["\\d",bYe],[PL,OYe]],vYe=n=>{for(let[t,o]of kYe)n=n.split(`${t}*`).join(`${t}{0,${o}}`).split(`${t}+`).join(`${t}{1,${o}}`);return n},JA=(n,t,o)=>{let i=vYe(t),e=RYe++;MYe(n,e,t),cA[n]=e,gA[e]=t,NYe[e]=i,_Ye[e]=new RegExp(t,o?"g":void 0),TYe[e]=new RegExp(i,o?"g":void 0)};JA("NUMERICIDENTIFIER","0|[1-9]\\d*");JA("NUMERICIDENTIFIERLOOSE","\\d+");JA("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${PL}*`);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",`${PL}+`);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,${vL}})(?:\\.(\\d{1,${vL}}))?(?:\\.(\\d{1,${vL}}))?`);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);Us.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);Us.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);Us.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 JD=ee((gwA,Ree)=>{"use strict";var PYe=Object.freeze({loose:!0}),GYe=Object.freeze({}),FYe=n=>n?typeof n!="object"?PYe:n:GYe;Ree.exports=FYe});var GL=ee((cwA,Pee)=>{"use strict";var kee=/^[0-9]+$/,vee=(n,t)=>{if(typeof n=="number"&&typeof t=="number")return n===t?0:nvee(t,n);Pee.exports={compareIdentifiers:vee,rcompareIdentifiers:LYe}});var Pa=ee((IwA,Fee)=>{"use strict";var qD=qB(),{MAX_LENGTH:Gee,MAX_SAFE_INTEGER:zD}=kh(),{safeRe:VD,t:WD}=vh(),UYe=JD(),{compareIdentifiers:FL}=GL(),HYe=(n,t)=>{let o=t.split(".");if(o.length>n.length)return!1;for(let i=0;iGee)throw new TypeError(`version is longer than ${Gee} characters`);qD("SemVer",t,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let i=t.trim().match(o.loose?VD[WD.LOOSE]:VD[WD.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>zD||this.major<0)throw new TypeError("Invalid major version");if(this.minor>zD||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>zD||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(qD("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 FL(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(qD("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 FL(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?VD[WD.PRERELEASELOOSE]:VD[WD.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]),HYe(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}};Fee.exports=LL});var sI=ee((lwA,Uee)=>{"use strict";var Lee=Pa(),KYe=(n,t,o=!1)=>{if(n instanceof Lee)return n;try{return new Lee(n,t)}catch(i){if(!o)return null;throw i}};Uee.exports=KYe});var Kee=ee((dwA,Hee)=>{"use strict";var xYe=sI(),YYe=(n,t)=>{let o=xYe(n,t);return o?o.version:null};Hee.exports=YYe});var Yee=ee((pwA,xee)=>{"use strict";var jYe=sI(),JYe=(n,t)=>{let o=jYe(n.trim().replace(/^[=v]+/,""),t);return o?o.version:null};xee.exports=JYe});var qee=ee((hwA,Jee)=>{"use strict";var jee=Pa(),qYe=(n,t,o,i,e)=>{typeof o=="string"&&(e=i,i=o,o=void 0);try{return new jee(n instanceof jee?n.version:n,o).inc(t,i,e).version}catch{return null}};Jee.exports=qYe});var Wee=ee((EwA,Vee)=>{"use strict";var zee=sI(),zYe=(n,t)=>{let o=zee(n,null,!0),i=zee(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"};Vee.exports=zYe});var Xee=ee((uwA,Zee)=>{"use strict";var VYe=Pa(),WYe=(n,t)=>new VYe(n,t).major;Zee.exports=WYe});var eAe=ee((CwA,$ee)=>{"use strict";var ZYe=Pa(),XYe=(n,t)=>new ZYe(n,t).minor;$ee.exports=XYe});var tAe=ee((BwA,AAe)=>{"use strict";var $Ye=Pa(),e1e=(n,t)=>new $Ye(n,t).patch;AAe.exports=e1e});var aAe=ee((fwA,rAe)=>{"use strict";var A1e=sI(),t1e=(n,t)=>{let o=A1e(n,t);return o&&o.prerelease.length?o.prerelease:null};rAe.exports=t1e});var en=ee((QwA,oAe)=>{"use strict";var iAe=Pa(),r1e=(n,t,o)=>new iAe(n,o).compare(new iAe(t,o));oAe.exports=r1e});var sAe=ee((ywA,nAe)=>{"use strict";var a1e=en(),i1e=(n,t,o)=>a1e(t,n,o);nAe.exports=i1e});var cAe=ee((mwA,gAe)=>{"use strict";var o1e=en(),n1e=(n,t)=>o1e(n,t,!0);gAe.exports=n1e});var ZD=ee((SwA,lAe)=>{"use strict";var IAe=Pa(),s1e=(n,t,o)=>{let i=new IAe(n,o),e=new IAe(t,o);return i.compare(e)||i.compareBuild(e)};lAe.exports=s1e});var pAe=ee((wwA,dAe)=>{"use strict";var g1e=ZD(),c1e=(n,t)=>n.sort((o,i)=>g1e(o,i,t));dAe.exports=c1e});var EAe=ee((DwA,hAe)=>{"use strict";var I1e=ZD(),l1e=(n,t)=>n.sort((o,i)=>I1e(i,o,t));hAe.exports=l1e});var zB=ee((OwA,uAe)=>{"use strict";var d1e=en(),p1e=(n,t,o)=>d1e(n,t,o)>0;uAe.exports=p1e});var XD=ee((bwA,CAe)=>{"use strict";var h1e=en(),E1e=(n,t,o)=>h1e(n,t,o)<0;CAe.exports=E1e});var UL=ee((MwA,BAe)=>{"use strict";var u1e=en(),C1e=(n,t,o)=>u1e(n,t,o)===0;BAe.exports=C1e});var HL=ee((_wA,fAe)=>{"use strict";var B1e=en(),f1e=(n,t,o)=>B1e(n,t,o)!==0;fAe.exports=f1e});var $D=ee((TwA,QAe)=>{"use strict";var Q1e=en(),y1e=(n,t,o)=>Q1e(n,t,o)>=0;QAe.exports=y1e});var eO=ee((NwA,yAe)=>{"use strict";var m1e=en(),S1e=(n,t,o)=>m1e(n,t,o)<=0;yAe.exports=S1e});var KL=ee((RwA,mAe)=>{"use strict";var w1e=UL(),D1e=HL(),O1e=zB(),b1e=$D(),M1e=XD(),_1e=eO(),T1e=(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 w1e(n,o,i);case"!=":return D1e(n,o,i);case">":return O1e(n,o,i);case">=":return b1e(n,o,i);case"<":return M1e(n,o,i);case"<=":return _1e(n,o,i);default:throw new TypeError(`Invalid operator: ${t}`)}};mAe.exports=T1e});var wAe=ee((kwA,SAe)=>{"use strict";var N1e=Pa(),R1e=sI(),{safeRe:AO,t:tO}=vh(),k1e=(n,t)=>{if(n instanceof N1e)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?AO[tO.COERCEFULL]:AO[tO.COERCE]);else{let s=t.includePrerelease?AO[tO.COERCERTLFULL]:AO[tO.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 R1e(`${i}.${e}.${a}${A}${r}`,t)};SAe.exports=k1e});var OAe=ee((vwA,DAe)=>{"use strict";var v1e=sI(),P1e=kh(),G1e=Pa(),F1e=(n,t,o)=>{if(!P1e.RELEASE_TYPES.includes(t))return null;let i=L1e(n,o);return i&&U1e(i,t)},L1e=(n,t)=>{let o=n instanceof G1e?n.version:n;return v1e(o,t)},U1e=(n,t)=>{if(H1e(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()},H1e=n=>n.startsWith("pre");DAe.exports=F1e});var MAe=ee((PwA,bAe)=>{"use strict";var xL=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}};bAe.exports=xL});var An=ee((GwA,RAe)=>{"use strict";var K1e=/\s+/g,YL=class n{constructor(t,o){if(o=Y1e(o),t instanceof n)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new n(t.raw,o);if(t instanceof jL)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(K1e," "),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=>!TAe(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&&$1e(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(X1e,"");let i=((this.options.includePrerelease&&W1e)|(this.options.loose&&Z1e))+":"+t,e=_Ae.get(i);if(e)return e;let a=this.options.loose,A=a?Ci[Ga.HYPHENRANGELOOSE]:Ci[Ga.HYPHENRANGE];t=t.replace(A,c3e(this.options.includePrerelease)),Vt("hyphen replace",t),t=t.replace(Ci[Ga.COMPARATORTRIM],q1e),Vt("comparator trim",t),t=t.replace(Ci[Ga.TILDETRIM],z1e),Vt("tilde trim",t),t=t.replace(Ci[Ga.CARETTRIM],V1e),Vt("caret trim",t);let r=t.split(" ").map(I=>e3e(I,this.options)).join(" ").split(/\s+/).map(I=>g3e(I,this.options));a&&(r=r.filter(I=>(Vt("loose invalid filter",I,this.options),!!I.match(Ci[Ga.COMPARATORLOOSE])))),Vt("range list",r);let s=new Map,g=r.map(I=>new jL(I,this.options));for(let I of g){if(TAe(I))return[I];s.set(I.value,I)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return _Ae.set(i,c),c}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Range is required");return this.set.some(i=>NAe(i,o)&&t.set.some(e=>NAe(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 j1e(t,this.options)}catch{return!1}for(let o=0;on.value==="<0.0.0-0",$1e=n=>n.value==="",NAe=(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},e3e=(n,t)=>(n=n.replace(Ci[Ga.BUILD],""),Vt("comp",n,t),n=a3e(n,t),Vt("caret",n),n=t3e(n,t),Vt("tildes",n),n=o3e(n,t),Vt("xrange",n),n=s3e(n,t),Vt("stars",n),n),Vr=n=>!n||n.toLowerCase()==="x"||n==="*",A3e=(n,t,o)=>Vr(n)&&!Vr(t)||Vr(t)&&o&&!Vr(o),t3e=(n,t)=>n.trim().split(/\s+/).map(o=>r3e(o,t)).join(" "),r3e=(n,t)=>{let o=t.loose?Ci[Ga.TILDELOOSE]:Ci[Ga.TILDE],i=t.includePrerelease?"-0":"";return n.replace(o,(e,a,A,r,s)=>{Vt("tilde",n,e,a,A,r,s);let g;return Vr(a)?g="":Vr(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Vr(r)?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:s?(Vt("replaceTilde pr",s),g=`>=${a}.${A}.${r}-${s} <${a}.${+A+1}.0-0`):g=`>=${a}.${A}.${r} <${a}.${+A+1}.0-0`,Vt("tilde return",g),g})},a3e=(n,t)=>n.trim().split(/\s+/).map(o=>i3e(o,t)).join(" "),i3e=(n,t)=>{Vt("caret",n,t);let o=t.loose?Ci[Ga.CARETLOOSE]:Ci[Ga.CARET],i=t.includePrerelease?"-0":"";return n.replace(o,(e,a,A,r,s)=>{Vt("caret",n,e,a,A,r,s);let g;return Vr(a)?g="":Vr(A)?g=`>=${a}.0.0${i} <${+a+1}.0.0-0`:Vr(r)?a==="0"?g=`>=${a}.${A}.0${i} <${a}.${+A+1}.0-0`:g=`>=${a}.${A}.0${i} <${+a+1}.0.0-0`:s?(Vt("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`):(Vt("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`),Vt("caret return",g),g})},o3e=(n,t)=>(Vt("replaceXRanges",n,t),n.split(/\s+/).map(o=>n3e(o,t)).join(" ")),n3e=(n,t)=>{n=n.trim();let o=t.loose?Ci[Ga.XRANGELOOSE]:Ci[Ga.XRANGE];return n.replace(o,(i,e,a,A,r,s)=>{if(Vt("xRange",n,i,e,a,A,r,s),A3e(a,A,r))return n;let g=Vr(a),c=g||Vr(A),I=c||Vr(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`),Vt("xRange return",i),i})},s3e=(n,t)=>(Vt("replaceStars",n,t),n.trim().replace(Ci[Ga.STAR],"")),g3e=(n,t)=>(Vt("replaceGTE0",n,t),n.trim().replace(Ci[t.includePrerelease?Ga.GTE0PRE:Ga.GTE0],"")),c3e=n=>(t,o,i,e,a,A,r,s,g,c,I,d)=>(Vr(i)?o="":Vr(e)?o=`>=${i}.0.0${n?"-0":""}`:Vr(a)?o=`>=${i}.${e}.0${n?"-0":""}`:A?o=`>=${o}`:o=`>=${o}${n?"-0":""}`,Vr(g)?s="":Vr(c)?s=`<${+g+1}.0.0-0`:Vr(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()),I3e=(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 VB=ee((FwA,LAe)=>{"use strict";var WB=Symbol("SemVer ANY"),zL=class n{static get ANY(){return WB}constructor(t,o){if(o=kAe(o),t instanceof n){if(t.loose===!!o.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),qL("comparator",t,o),this.options=o,this.loose=!!o.loose,this.parse(t),this.semver===WB?this.value="":this.value=this.operator+this.semver.version,qL("comp",this)}parse(t){let o=this.options.loose?vAe[PAe.COMPARATORLOOSE]:vAe[PAe.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 GAe(i[2],this.options.loose):this.semver=WB}toString(){return this.value}test(t){if(qL("Comparator.test",t,this.options.loose),this.semver===WB||t===WB)return!0;if(typeof t=="string")try{t=new GAe(t,this.options)}catch{return!1}return JL(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 FAe(t.value,o).test(this.value):t.operator===""?t.value===""?!0:new FAe(this.value,o).test(t.semver):(o=kAe(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("=")||JL(this.semver,"<",t.semver,o)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||JL(this.semver,">",t.semver,o)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};LAe.exports=zL;var kAe=JD(),{safeRe:vAe,t:PAe}=vh(),JL=KL(),qL=qB(),GAe=Pa(),FAe=An()});var ZB=ee((LwA,UAe)=>{"use strict";var l3e=An(),d3e=(n,t,o)=>{try{t=new l3e(t,o)}catch{return!1}return t.test(n)};UAe.exports=d3e});var KAe=ee((UwA,HAe)=>{"use strict";var p3e=An(),h3e=(n,t)=>new p3e(n,t).set.map(o=>o.map(i=>i.value).join(" ").trim().split(" "));HAe.exports=h3e});var YAe=ee((HwA,xAe)=>{"use strict";var E3e=Pa(),u3e=An(),C3e=(n,t,o)=>{let i=null,e=null,a=null;try{a=new u3e(t,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===-1)&&(i=A,e=new E3e(i,o))}),i};xAe.exports=C3e});var JAe=ee((KwA,jAe)=>{"use strict";var B3e=Pa(),f3e=An(),Q3e=(n,t,o)=>{let i=null,e=null,a=null;try{a=new f3e(t,o)}catch{return null}return n.forEach(A=>{a.test(A)&&(!i||e.compare(A)===1)&&(i=A,e=new B3e(i,o))}),i};jAe.exports=Q3e});var VAe=ee((xwA,zAe)=>{"use strict";var VL=Pa(),y3e=An(),qAe=zB(),m3e=(n,t)=>{n=new y3e(n,t);let o=new VL("0.0.0");if(n.test(o)||(o=new VL("0.0.0-0"),n.test(o)))return o;o=null;for(let i=0;i{let r=new VL(A.semver.version);switch(A.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!a||qAe(r,a))&&(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),a&&(!o||qAe(o,a))&&(o=a)}return o&&n.test(o)?o:null};zAe.exports=m3e});var ZAe=ee((YwA,WAe)=>{"use strict";var S3e=An(),w3e=(n,t)=>{try{return new S3e(n,t).range||"*"}catch{return null}};WAe.exports=w3e});var rO=ee((jwA,Ate)=>{"use strict";var D3e=Pa(),ete=VB(),{ANY:O3e}=ete,b3e=An(),M3e=ZB(),XAe=zB(),$Ae=XD(),_3e=eO(),T3e=$D(),N3e=(n,t,o,i)=>{n=new D3e(n,i),t=new b3e(t,i);let e,a,A,r,s;switch(o){case">":e=XAe,a=_3e,A=$Ae,r=">",s=">=";break;case"<":e=$Ae,a=T3e,A=XAe,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(M3e(n,t,i))return!1;for(let g=0;g{B.semver===O3e&&(B=new ete(">=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};Ate.exports=N3e});var rte=ee((JwA,tte)=>{"use strict";var R3e=rO(),k3e=(n,t,o)=>R3e(n,t,">",o);tte.exports=k3e});var ite=ee((qwA,ate)=>{"use strict";var v3e=rO(),P3e=(n,t,o)=>v3e(n,t,"<",o);ate.exports=P3e});var ste=ee((zwA,nte)=>{"use strict";var ote=An(),G3e=(n,t,o)=>(n=new ote(n,o),t=new ote(t,o),n.intersects(t,o));nte.exports=G3e});var cte=ee((VwA,gte)=>{"use strict";var F3e=ZB(),L3e=en();gte.exports=(n,t,o)=>{let i=[],e=null,a=null,A=n.sort((c,I)=>L3e(c,I,o));for(let c of A)F3e(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 Ite=An(),XL=VB(),{ANY:WL}=XL,ZL=ZB(),$L=en(),U3e=(n,t,o={})=>{if(n===t)return!0;n=new Ite(n,o),t=new Ite(t,o);let i=!1;e:for(let e of n.set){for(let a of t.set){let A=K3e(e,a,o);if(i=i||A!==null,A)continue e}if(i)return!1}return!0},H3e=[new XL(">=0.0.0-0")],lte=[new XL(">=0.0.0")],K3e=(n,t,o)=>{if(n===t)return!0;if(n.length===1&&n[0].semver===WL){if(t.length===1&&t[0].semver===WL)return!0;o.includePrerelease?n=H3e:n=lte}if(t.length===1&&t[0].semver===WL){if(o.includePrerelease)return!0;t=lte}let i=new Set,e,a;for(let B of n)B.operator===">"||B.operator===">="?e=dte(e,B,o):B.operator==="<"||B.operator==="<="?a=pte(a,B,o):i.add(B.semver);if(i.size>1)return null;let A;if(e&&a){if(A=$L(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&&!ZL(B,String(e),o)||a&&!ZL(B,String(a),o))return null;for(let f of t)if(!ZL(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=dte(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=pte(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)},dte=(n,t,o)=>{if(!n)return t;let i=$L(n.semver,t.semver,o);return i>0?n:i<0||t.operator===">"&&n.operator===">="?t:n},pte=(n,t,o)=>{if(!n)return t;let i=$L(n.semver,t.semver,o);return i<0?n:i>0||t.operator==="<"&&n.operator==="<="?t:n};hte.exports=U3e});var aO=ee((ZwA,Bte)=>{"use strict";var e2=vh(),ute=kh(),x3e=Pa(),Cte=GL(),Y3e=sI(),j3e=Kee(),J3e=Yee(),q3e=qee(),z3e=Wee(),V3e=Xee(),W3e=eAe(),Z3e=tAe(),X3e=aAe(),$3e=en(),eje=sAe(),Aje=cAe(),tje=ZD(),rje=pAe(),aje=EAe(),ije=zB(),oje=XD(),nje=UL(),sje=HL(),gje=$D(),cje=eO(),Ije=KL(),lje=wAe(),dje=OAe(),pje=VB(),hje=An(),Eje=ZB(),uje=KAe(),Cje=YAe(),Bje=JAe(),fje=VAe(),Qje=ZAe(),yje=rO(),mje=rte(),Sje=ite(),wje=ste(),Dje=cte(),Oje=Ete();Bte.exports={parse:Y3e,valid:j3e,clean:J3e,inc:q3e,diff:z3e,major:V3e,minor:W3e,patch:Z3e,prerelease:X3e,compare:$3e,rcompare:eje,compareLoose:Aje,compareBuild:tje,sort:rje,rsort:aje,gt:ije,lt:oje,eq:nje,neq:sje,gte:gje,lte:cje,cmp:Ije,coerce:lje,truncate:dje,Comparator:pje,Range:hje,satisfies:Eje,toComparators:uje,maxSatisfying:Cje,minSatisfying:Bje,minVersion:fje,validRange:Qje,outside:yje,gtr:mje,ltr:Sje,intersects:wje,simplifyRange:Dje,subset:Oje,SemVer:x3e,re:e2.re,src:e2.src,tokens:e2.t,SEMVER_SPEC_VERSION:ute.SEMVER_SPEC_VERSION,RELEASE_TYPES:ute.RELEASE_TYPES,compareIdentifiers:Cte.compareIdentifiers,rcompareIdentifiers:Cte.rcompareIdentifiers}});var Vg,iO=ue(()=>{Vg={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 XB}from"node:child_process";import{createHash as Mje}from"node:crypto";var $B,t2,_je,Qte,Tje,r2,Nje,yte,Rje,Ph,kje,vje,Pje,Gje,mte,Fje,fte,Lje,Uje,Ste,Hje,Kje,wte,A2,xje,oO,a2=ue(()=>{$B=ze(aO(),1),t2=ze(jD(),1);iO();_je=process.env.npm_package_config_libvips||Vg.config.libvips,Qte=$B.default.coerce(_je).version,Tje=["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"],r2={encoding:"utf8",shell:!0},Nje=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},yte=()=>t2.default.isNonGlibcLinuxSync()?t2.default.familySync():"",Rje=()=>`${process.platform}${yte()}-${process.arch}`,Ph=()=>{if(mte())return"wasm32";let{npm_config_arch:n,npm_config_platform:t,npm_config_libc:o}=process.env,i=typeof o=="string"?o:yte();return`${t||process.platform}${i}-${n||process.arch}`},kje=()=>{try{return $e(`@img/sharp-libvips-dev-${Ph()}/include`)}catch{try{return $e("@img/sharp-libvips-dev/include")}catch{}}return""},vje=()=>{try{return $e("@img/sharp-libvips-dev/cplusplus")}catch{}return""},Pje=()=>{try{return $e(`@img/sharp-libvips-dev-${Ph()}/lib`)}catch{try{return $e(`@img/sharp-libvips-${Ph()}/lib`)}catch{}}return""},Gje=()=>{if(process.release?.name==="node"&&process.versions&&!$B.default.satisfies(process.versions.node,Vg.engines.node))return{found:process.versions.node,expected:Vg.engines.node}},mte=()=>{let{CC:n}=process.env;return!!n?.endsWith("/emcc")},Fje=()=>process.platform==="darwin"&&process.arch==="x64"?(XB("sysctl sysctl.proc_translated",r2).stdout||"").trim()==="sysctl.proc_translated: 1":!1,fte=n=>Mje("sha512").update(n).digest("hex"),Lje=()=>{try{let n=fte(`imgsharp-libvips-${Ph()}`),t=$B.default.coerce(Vg.optionalDependencies[`@img/sharp-libvips-${Ph()}`],{includePrerelease:!0}).version;return fte(`${n}npm:${t}`).slice(0,10)}catch{}return""},Uje=()=>XB(`node-gyp rebuild --directory=src ${mte()?"--nodedir=emscripten":""}`,{...r2,stdio:"inherit"}).status,Ste=()=>process.platform!=="win32"?(XB("pkg-config --modversion vips-cpp",{...r2,env:{...process.env,PKG_CONFIG_PATH:wte()}}).stdout||"").trim():"",Hje=()=>{try{let n=(XB("brew",["--prefix"],{encoding:"utf8"}).stdout||"").trim();if(n)return`${n}/lib/pkgconfig`}catch{}},Kje=()=>{try{let n=(XB("pkg-config",["--variable","pc_path","pkg-config"],{encoding:"utf8"}).stdout||"").trim();if(n)return n}catch{}},wte=()=>process.platform!=="win32"?[Hje(),Kje(),process.env.PKG_CONFIG_PATH].filter(Boolean).join(":"):"",A2=(n,t,o)=>(o&&o(`Detected ${t}, skipping search for globally-installed libvips`),n),xje=n=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return A2(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return A2(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(Fje())return A2(!1,"Rosetta",n);let t=Ste();return!!t&&$B.default.gte(t,Qte)},oO={minimumLibvipsVersion:Qte,prebuiltPlatforms:Tje,buildPlatformArch:Ph,buildSharpLibvipsIncludeDir:kje,buildSharpLibvipsCPlusPlusDir:vje,buildSharpLibvipsLibDir:Pje,isUnsupportedNodeRuntime:Gje,runtimePlatformArch:Rje,log:Nje,yarnLocator:Lje,spawnRebuild:Uje,globalLibvipsVersion:Ste,pkgConfigPath:wte,useGlobalLibvips:xje}});import{createRequire as Yje}from"node:module";var nO,Wr,Ote,jje,Dte,Jje,qje,Wg,Ht,gI,wt,ef=ue(()=>{nO=ze(jD(),1);a2();iO();Wr=Yje(import.meta.url),{version:Ote}=Vg,{runtimePlatformArch:jje,isUnsupportedNodeRuntime:Dte,prebuiltPlatforms:Jje,minimumLibvipsVersion:qje}=oO,Wg=jje(),gI=[];try{Ht=Wr(`../src/build/Release/sharp-${Wg}-${Ote}.node`)}catch(n){gI.push(n)}if(!Ht)try{Ht=Wr(`../src/build/Release/sharp-wasm32-${Ote}.node`)}catch(n){gI.push(n)}if(!Ht)try{switch(Wg){case"darwin-arm64":Ht=Wr("@img/sharp-darwin-arm64/sharp.node");break;case"darwin-x64":Ht=Wr("@img/sharp-darwin-x64/sharp.node");break;case"linux-arm":Ht=Wr("@img/sharp-linux-arm/sharp.node");break;case"linux-arm64":Ht=Wr("@img/sharp-linux-arm64/sharp.node");break;case"linux-ppc64":Ht=Wr("@img/sharp-linux-ppc64/sharp.node");break;case"linux-riscv64":Ht=Wr("@img/sharp-linux-riscv64/sharp.node");break;case"linux-s390x":Ht=Wr("@img/sharp-linux-s390x/sharp.node");break;case"linux-x64":Ht=Wr("@img/sharp-linux-x64/sharp.node");break;case"linuxmusl-arm64":Ht=Wr("@img/sharp-linuxmusl-arm64/sharp.node");break;case"linuxmusl-x64":Ht=Wr("@img/sharp-linuxmusl-x64/sharp.node");break;case"win32-arm64":Ht=Wr("@img/sharp-win32-arm64/sharp.node");break;case"win32-ia32":Ht=Wr("@img/sharp-win32-ia32/sharp.node");break;case"win32-x64":Ht=Wr("@img/sharp-win32-x64/sharp.node");break;case"freebsd-arm64":case"freebsd-x64":Ht=Wr("@img/sharp-freebsd-wasm32/sharp.node");break;case"linux-wasm32":Ht=Wr("@img/sharp-webcontainers-wasm32/sharp.node");break}if(Ht&&["linux-x64","linuxmusl-x64"].includes(Wg)&&!Ht._isUsingX64V2()){let n=new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");n.code="Unsupported CPU",gI.push(n),Ht=null}Ht&&process.versions.electron&&Wg.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){gI.push(n)}if(!Ht)try{Ht=Wr("@img/sharp-wasm32/sharp.node")}catch(n){gI.push(n)}if(!Ht){let[n,t,o]=["linux","darwin","win32"].map(a=>Wg.startsWith(a)),i=[`Could not load the "sharp" module using the ${Wg} runtime`];gI.forEach(a=>{a.code.endsWith("MODULE_NOT_FOUND")||i.push(`${a.code}: ${a.message}`)});let e=gI.map(a=>a.message).join(" ");if(i.push("Possible solutions:"),Dte()){let{found:a,expected:A}=Dte();i.push("- Please upgrade Node.js:",` Found ${a}`,` Requires ${A}`)}else if(Jje.includes(Wg)){let[a,A]=Wg.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 >= ${qje}`," 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}=Wr(`@img/sharp-libvips-${Wg}/package`),A=`${(0,nO.familySync)()} ${(0,nO.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"),gI.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(` -`))}wt=Ht});import zje from"node:util";import i2 from"node:stream";function Zje(){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 Vje,Wje,zl,Hs,bte=ue(()=>{Ps();ef();Vje=zje.debuglog("sharp"),Wje=n=>{zl.queue.emit("change",n)},zl=function(n,t){if(arguments.length===1&&!O.defined(n))throw new Error("Invalid input");return this instanceof zl?(i2.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),Vje(o)},queueListener:Wje},this.options.input=this._createInputDescriptor(n,t,{allowStream:!0}),this):new zl(n,t)};Object.setPrototypeOf(zl.prototype,i2.Duplex.prototype);Object.setPrototypeOf(zl,i2.Duplex);Object.assign(zl.prototype,{clone:Zje});Hs=zl});function Mte(n){let t=$je.filter(o=>O.defined(n[o])).map(o=>[o,n[o]]);return t.length?Object.fromEntries(t):void 0}function eJe(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,Mte(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 AJe(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 tJe(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function rJe(){return Array.isArray(this.options.input.buffer)}function aJe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),wt.metadata(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)})}):wt.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(),wt.metadata(this.options,(a,A)=>{a?i(O.nativeError(a,t)):o(A)})};this.writableFinished?e():this.once("finish",e)}):new Promise((o,i)=>{wt.metadata(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}function iJe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),wt.stats(this.options,(o,i)=>{o?n(O.nativeError(o,t)):n(null,i)})}):wt.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(),wt.stats(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}):new Promise((o,i)=>{wt.stats(this.options,(e,a)=>{e?i(O.nativeError(e,t)):o(a)})})}var Xje,$je,_te,Tte=ue(()=>{Ps();ef();Xje={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},$je=["failOn","limitInputPixels","limitInputChannels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","openSlideLevel","pdfBackground","tiffSubifd"];_te=n=>{Object.assign(n.prototype,{_inputOptionsFromObject:Mte,_createInputDescriptor:eJe,_write:AJe,_flattenBufferIn:tJe,_isStreamInput:rJe,metadata:aJe,stats:iJe}),n.align=Xje}});function n2(n){return n.angle%360!==0||n.rotationAngle!==0}function sO(n){return n.width!==-1||n.height!==-1}function sJe(n,t,o){if(sO(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=nJe[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:vte[o.position]||kte[o.position]||Rte[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(o2[o.kernel]))this.options.kernel=o2[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 n2(this.options)&&sO(this.options)&&(this.options.rotateBefore=!0),this}function gJe(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(Nte[n.extendWith]))this.options.extendWith=Nte[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 cJe(n){let t=sO(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),n2(this.options)&&!sO(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function IJe(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 n2(this.options)&&(this.options.rotateBefore=!0),this}var Rte,kte,Nte,vte,o2,oJe,nJe,Pte,Gte=ue(()=>{Ps();Rte={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},kte={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},Nte={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},vte={entropy:16,attention:17},o2={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},oJe={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},nJe={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};Pte=n=>{Object.assign(n.prototype,{resize:sJe,extend:gJe,extract:cJe,trim:IJe}),n.gravity=Rte,n.strategy=vte,n.kernel=o2,n.fit=oJe,n.position=kte}});function lJe(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(s2[t.blend]))i.blend=s2[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 s2,Fte,Lte=ue(()=>{Ps();s2={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"};Fte=n=>{n.prototype.composite=lJe,n.blend=s2}});function dJe(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 pJe(){return this.options.input.autoOrient=!0,this}function hJe(n){return this.options.flip=O.bool(n)?n:!0,this}function EJe(n){return this.options.flop=O.bool(n)?n:!0,this}function uJe(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 CJe(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 BJe(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 fJe(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(Ute[n.precision]))this.options.precision=Ute[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 QJe(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 yJe(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 mJe(n){return this.options.flatten=O.bool(n)?n:!0,O.object(n)&&this._setBackgroundColourOption("flattenBackground",n.background),this}function SJe(){return this.options.unflatten=!0,this}function wJe(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 DJe(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 OJe(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 bJe(n){return this.normalise(n)}function MJe(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 _Je(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 TJe(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 NJe(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 RJe(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 kJe(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 vJe(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 Ute,Hte,Kte=ue(()=>{Ps();Ute={integer:"integer",float:"float",approximate:"approximate"};Hte=n=>{Object.assign(n.prototype,{autoOrient:pJe,rotate:dJe,flip:hJe,flop:EJe,affine:uJe,sharpen:CJe,erode:yJe,dilate:QJe,median:BJe,blur:fJe,flatten:mJe,unflatten:SJe,gamma:wJe,negate:DJe,normalise:OJe,normalize:bJe,clahe:MJe,convolve:_Je,threshold:TJe,boolean:NJe,linear:RJe,recomb:kJe,modulate:vJe})}});var zte=ee((yDA,qte)=>{var d2=Object.defineProperty,PJe=Object.getOwnPropertyDescriptor,GJe=Object.getOwnPropertyNames,FJe=Object.prototype.hasOwnProperty,LJe=(n,t)=>{for(var o in t)d2(n,o,{get:t[o],enumerable:!0})},UJe=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of GJe(t))!FJe.call(n,e)&&e!==o&&d2(n,e,{get:()=>t[e],enumerable:!(i=PJe(t,e))||i.enumerable});return n},HJe=n=>UJe(d2({},"__esModule",{value:!0}),n),xte={};LJe(xte,{default:()=>Aqe});qte.exports=HJe(xte);var g2={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 g2)Object.freeze(g2[n]);var Ks=Object.freeze(g2),Yte=Object.create(null);for(let n in Ks)Object.hasOwn(Ks,n)&&(Yte[Ks[n]]=n);var Wi={to:{},get:{}};Wi.get=function(n){let t=n.slice(0,3).toLowerCase(),o,i;switch(t){case"hsl":{o=Wi.get.hsl(n),i="hsl";break}case"hwb":{o=Wi.get.hwb(n),i="hwb";break}default:{o=Wi.get.rgb(n),i="rgb";break}}return o?{model:i,value:o}:null};Wi.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(Ks,r[1])?(A=Ks[r[1]].slice(),A[3]=1,A):null:null;for(s=0;s<3;s++)A[s]=cI(A[s],0,255);return A[3]=cI(A[3],0,1),A};Wi.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=cI(Number.parseFloat(o[2]),0,100),A=cI(Number.parseFloat(o[3]),0,100),r=cI(Number.isNaN(i)?1:i,0,1);return[e,a,A,r]}return null};Wi.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=cI(Number.parseFloat(o[2]),0,100),A=cI(Number.parseFloat(o[3]),0,100),r=cI(Number.isNaN(i)?1:i,0,1);return[e,a,A,r]}return null};Wi.to.hex=function(...n){return"#"+gO(n[0])+gO(n[1])+gO(n[2])+(n[3]<1?gO(Math.round(n[3]*255)):"")};Wi.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]+")"};Wi.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]+")"};Wi.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]+")"};Wi.to.hwb=function(...n){let t="";return n.length>=4&&n[3]!==1&&(t=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+t+")"};Wi.to.keyword=function(...n){return Yte[n.slice(0,3)]};function cI(n,t,o){return Math.min(Math.max(t,n),o)}function gO(n){let t=Math.round(n).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Gh=Wi,jte={};for(let n of Object.keys(Ks))jte[Ks[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"]}},Vl=sA,Zg=(6/29)**3;function Lh(n){let t=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,t),1)}function Uh(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=Uh(n[0]/255),o=Uh(n[1]/255),i=Uh(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 KJe(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=jte[n];if(t)return t;let o=Number.POSITIVE_INFINITY,i;for(let e of Object.keys(Ks)){let a=Ks[e],A=KJe(n,a);AZg?o**(1/3):7.787*o+16/116,i=i>Zg?i**(1/3):7.787*i+16/116,e=e>Zg?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=Lh(e),a=Lh(a),A=Lh(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>Zg?t**(1/3):7.787*t+16/116,o=o>Zg?o**(1/3):7.787*o+16/116,i=i>Zg?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=Lh(4.0767416621*e-3.3077115913*a+.2309699292*A),s=Lh(-1.2684380046*e+2.6097574011*a-.3413193965*A),g=Lh(-.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>Zg?r:(a-16/116)/7.787,e=s>Zg?s:(e-16/116)/7.787,A=g>Zg?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 xJe(){let n={},t=Object.keys(Vl);for(let{length:o}=t,i=0;i0;){let i=o.pop(),e=Object.keys(Vl[i]);for(let{length:a}=e,A=0;A1&&(o=i),n(o))};return"conversion"in n&&(t.conversion=n.conversion),t}function ZJe(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=Co[this.model].channels;let e=Array.prototype.slice.call(n,0,i);this.color=l2(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 c2))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=c2[a];let{labels:A}=Co[this.model],r=[];for(o=0;o(n%360+360)%360),saturationl:Or("hsl",1,Zr(100)),lightness:Or("hsl",2,Zr(100)),saturationv:Or("hsv",1,Zr(100)),value:Or("hsv",2,Zr(100)),chroma:Or("hcg",1,Zr(100)),gray:Or("hcg",2,Zr(100)),white:Or("hwb",1,Zr(100)),wblack:Or("hwb",2,Zr(100)),cyan:Or("cmyk",0,Zr(100)),magenta:Or("cmyk",1,Zr(100)),yellow:Or("cmyk",2,Zr(100)),black:Or("cmyk",3,Zr(100)),x:Or("xyz",0,Zr(95.047)),y:Or("xyz",1,Zr(100)),z:Or("xyz",2,Zr(108.833)),l:Or("lab",0,Zr(100)),a:Or("lab",1),b:Or("lab",2),keyword(n){return n!==void 0?new ua(n):Co[this.model].keyword(this.color)},hex(n){return n!==void 0?new ua(n):Gh.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new ua(n);let t=this.rgb().round().color,o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),Gh.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 ua.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 ua.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(Co)){if(Jte.includes(n))continue;let{channels:t}=Co[n];ua.prototype[n]=function(...o){return this.model===n?new ua(this):o.length>0?new ua(o,n):new ua([...eqe(Co[this.model][n].raw(this.color)),this.valpha],n)},ua[n]=function(...o){let i=o[0];return typeof i=="number"&&(i=l2(o,t)),new ua(i,n)}}function XJe(n,t){return Number(n.toFixed(t))}function $Je(n){return function(t){return XJe(t,n)}}function Or(n,t,o){n=Array.isArray(n)?n:[n];for(let i of n)(I2[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 Zr(n){return function(t){return Math.max(0,Math.min(n,t))}}function eqe(n){return Array.isArray(n)?n:[n]}function l2(n,t){for(let o=0;o{Vte.exports=zte().default});function tqe(n){return this._setBackgroundColourOption("tint",n),this}function rqe(n){return this.options.greyscale=O.bool(n)?n:!0,this}function aqe(n){return this.greyscale(n)}function iqe(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspacePipeline=n,this}function oqe(n){return this.pipelineColourspace(n)}function nqe(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspace=n,this}function sqe(n){return this.toColourspace(n)}function $te(n){if(O.object(n)||O.string(n)&&n.length>=3&&n.length<=200){let t=(0,Xte.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 gqe(n,t){O.defined(t)&&(this.options[n]=$te(t))}var Xte,Zte,ere,Are=ue(()=>{Xte=ze(Wte(),1);Ps();Zte={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};ere=n=>{Object.assign(n.prototype,{tint:tqe,greyscale:rqe,grayscale:aqe,pipelineColourspace:iqe,pipelineColorspace:oqe,toColourspace:nqe,toColorspace:sqe,_getBackgroundColourOption:$te,_setBackgroundColourOption:gqe}),n.colourspace=Zte,n.colorspace=Zte}});function Iqe(){return this.options.removeAlpha=!0,this}function lqe(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 dqe(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 pqe(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 hqe(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 cqe,tre,rre=ue(()=>{Ps();cqe={and:"and",or:"or",eor:"eor"};tre=n=>{Object.assign(n.prototype,{removeAlpha:Iqe,ensureAlpha:lqe,extractChannel:dqe,joinChannel:pqe,bandbool:hqe}),n.bool=cqe}});import p2 from"node:path";function uqe(n,t){let o;if(O.string(n)?O.string(this.options.input.file)&&p2.resolve(this.options.input.file)===p2.resolve(n)?o=new Error("Cannot use same file for input and output"):Eqe.test(p2.extname(n))&&!this.constructor.format.jp2.output.file&&(o=ire()):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 Cqe(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 Bqe(){this.options.resolveWithObject=!0,this.options.typedArrayOut=!0;let n=Error();return this._pipeline(null,n)}function fqe(n){if(O.number(n)&&n>0)this.options.withMetadataDensity=n;else throw O.invalidParameterError("density","positive number",n);return this.keepExif()}function Qqe(){return this.options.keepMetadata|=1,this}function yqe(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 mqe(n){return this.withExif(n),this.options.withExifMerge=!0,this}function Sqe(){return this.options.keepMetadata|=8,this}function wqe(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 Dqe(){return this.options.keepGainMap=!0,this.options.withGainMap=!1,this.options.keepMetadata|=32,this}function Oqe(){return this.options.withGainMap=!0,this.options.keepGainMap=!1,this.options.colourspace="scrgb",this}function bqe(){return this.options.keepMetadata|=2,this}function Mqe(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 _qe(){return this.options.keepMetadata|=31,this}function Tqe(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 Nqe(n,t){let o=are.get((O.object(n)&&O.string(n.id)?n.id:n).toLowerCase());if(!o)throw O.invalidParameterError("format",`one of: ${[...are.keys()].join(", ")}`,n);return this[o](t)}function Rqe(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 kqe(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=ore(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 vqe(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 h2(n,this.options),this._updateFormatOut("webp",n)}function Pqe(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=ore(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 h2(n,this.options),this._updateFormatOut("gif",n)}function Gqe(n){if(!this.constructor.format.jp2.output.buffer)throw ire();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 h2(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 Fqe(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 Lqe(n){return this.heif({...n,compression:"av1"})}function Uqe(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 Hqe(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 h2(n,this.options),this._updateFormatOut("jxl",n)}function Kqe(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 xqe(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 Yqe(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 jqe(n,t){return O.object(t)&&t.force===!1||(this.options.formatOut=n),this}function Jqe(n,t){if(O.bool(t))this.options[n]=t;else throw O.invalidParameterError(n,"boolean",t)}function qqe(){if(!this.options.streamOut){this.options.streamOut=!0;let n=Error();this._pipeline(void 0,n)}}function zqe(n,t){return typeof n=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),wt.pipeline(this.options,(o,i,e)=>{o?n(O.nativeError(o,t)):n(null,i,e)})}):wt.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(),wt.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")):wt.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(),wt.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)=>{wt.pipeline(this.options,(e,a,A)=>{e?i(O.nativeError(e,t)):this.options.resolveWithObject?o({data:a,info:A}):o(a)})})}var are,Eqe,ire,ore,nre,sre=ue(()=>{Ps();ef();are=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"]]),Eqe=/\.(jp[2x]|j2[kc])$/i,ire=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),ore=n=>1<<31-Math.clz32(Math.ceil(Math.log2(n)));nre=n=>{Object.assign(n.prototype,{toFile:uqe,toBuffer:Cqe,toUint8Array:Bqe,withDensity:fqe,keepExif:Qqe,withExif:yqe,withExifMerge:mqe,keepIccProfile:Sqe,withIccProfile:wqe,keepGainMap:Dqe,withGainMap:Oqe,keepXmp:bqe,withXmp:Mqe,keepMetadata:_qe,withMetadata:Tqe,toFormat:Nqe,jpeg:Rqe,jp2:Gqe,png:kqe,webp:vqe,tiff:Fqe,avif:Lqe,heif:Uqe,jxl:Hqe,gif:Pqe,raw:Kqe,tile:xqe,timeout:Yqe,_updateFormatOut:jqe,_setBooleanOption:Jqe,_read:qqe,_pipeline:zqe})}});import Vqe from"node:events";import{createRequire as Wqe}from"node:module";import{availableParallelism as Zqe}from"node:os";function cre(n){if(O.bool(n))return n?wt.cache(50,20,100):wt.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 wt.cache(n.memory,n.files,n.items)}else return wt.cache()}function $qe(n){return wt.concurrency(O.integer(n)?n:null)}function A4e(){return wt.counters()}function t4e(n){return wt.simd(O.bool(n)?n:null)}function r4e(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))wt.block(n.operation,!0);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}function a4e(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))wt.block(n.operation,!1);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}var Af,E2,gre,u2,II,Xqe,Hh,e4e,Ire,lre=ue(()=>{Af=ze(jD(),1);Ps();a2();ef();iO();E2=Wqe(import.meta.url),gre=oO.runtimePlatformArch(),u2=wt.libvipsVersion(),II=wt.format();II.heif.output.alias=["avif","heic"];II.jpeg.output.alias=["jpe","jpg"];II.tiff.output.alias=["tif"];II.jp2.output.alias=["j2c","j2k","jp2","jpx"];Xqe={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},Hh={vips:u2.semver};if(!u2.isGlobal)if(u2.isWasm)try{Hh=E2("@img/sharp-wasm32/versions")}catch{}else try{Hh=E2(`@img/sharp-${gre}/versions`)}catch{try{Hh=E2(`@img/sharp-libvips-${gre}/versions`)}catch{}}Hh.sharp=Vg.version;Hh.heif&&II.heif&&(II.heif.input.fileSuffix=[".avif"],II.heif.output.alias=["avif"]);cre(!0);!process.env.MALLOC_ARENA_MAX&&Af.default.familySync()===Af.default.GLIBC&&!wt._isUsingJemalloc()?wt.concurrency(1):Af.default.familySync()===Af.default.MUSL&&wt.concurrency()===1024&&wt.concurrency(Zqe());e4e=new Vqe.EventEmitter;Ire=n=>{n.cache=cre,n.concurrency=$qe,n.counters=A4e,n.simd=t4e,n.format=II,n.interpolators=Xqe,n.versions=Hh,n.queue=e4e,n.block=r4e,n.unblock=a4e}});var dre={};Lr(dre,{default:()=>i4e});var i4e,pre=ue(()=>{bte();Tte();Gte();Lte();Kte();Are();rre();sre();lre();_te(Hs);Pte(Hs);Fte(Hs);Hte(Hs);ere(Hs);tre(Hs);nre(Hs);Ire(Hs);i4e=Hs});var o4e,kA,lI,tf=ue(()=>{o4e="End-Of-Stream",kA=class extends Error{constructor(){super(o4e),this.name="EndOfStreamError"}},lI=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}});var cO,hre=ue(()=>{cO=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((t,o)=>{this.reject=o,this.resolve=t})}}});var dI,IO=ue(()=>{tf();dI=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{tf();hre();IO();rf=class extends dI{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 cO};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 lI)}async close(){return this.abort()}}});var lO,ure=ue(()=>{IO();lO=class extends dI{constructor(t){super(),this.reader=t}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var af,C2=ue(()=>{ure();af=class extends lO{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 Kh,B2=ue(()=>{tf();IO();Kh=class extends dI{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{C2();B2()});var pI=ue(()=>{tf();Ere();C2();B2();Cre()});var zn,xh=ue(()=>{pI();zn=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{xh();pI();n4e=256e3,of=class extends zn{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{pI();xh();dO=class extends zn{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{pI();xh();pO=class extends zn{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 of(o,i)}function hO(n,t){let o=f2(n),i=t??{},e=i.onClose;return i.onClose=async()=>{if(await o.close(),e)return e()},new of(o,i)}function Bo(n,t){return new dO(n,t)}function EO(n,t){return new pO(n,t)}var uO=ue(()=>{pI();Bre();fre();Qre();pI();xh()});import{open as g4e}from"node:fs/promises";var Yh,Q2=ue(()=>{xh();pI();Yh=class n extends zn{static async fromFile(t){let o=await g4e(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{uO();Q2();Q2();uO();mre=Yh.fromFile});var Sre=ee(m2=>{m2.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)};m2.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 I4e(){if(!(typeof globalThis.TextDecoder>"u"))return CO??(CO=new globalThis.TextDecoder("utf-8"))}function l4e(){if(!(typeof globalThis.TextEncoder>"u"))return BO??(BO=new globalThis.TextEncoder)}function Mr(n,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=I4e();return o?o.decode(n):p4e(n)}case"utf-16le":return h4e(n);case"us-ascii":case"ascii":return E4e(n);case"latin1":case"iso-8859-1":return u4e(n);case"windows-1252":return C4e(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function Dre(n="",t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=l4e();return o?o.encode(n):B4e(n)}case"utf-16le":return f4e(n);case"us-ascii":case"ascii":return Q4e(n);case"latin1":case"iso-8859-1":return y4e(n);case"windows-1252":return m4e(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function w2(n,t){t.length!==0&&(n.push(String.fromCharCode.apply(null,t)),t.length=0)}function Pr(n,t,o){t.push(o),t.length>=jh&&w2(n,t)}function d4e(n,t,o){if(o<=65535){Pr(n,t,o);return}o-=65536,Pr(n,t,55296+(o>>10)),Pr(n,t,56320+(o&1023))}function p4e(n){let t=[],o=[],i=0;for(n.length>=3&&n[0]===239&&n[1]===187&&n[2]===191&&(i=3);i244){Pr(t,o,Fa),i++;continue}if(e<=223){if(i+1>=n.length){Pr(t,o,Fa),i++;continue}let c=n[i+1];if((c&192)!==128){Pr(t,o,Fa),i++;continue}let I=(e&31)<<6|c&63;Pr(t,o,I),i+=2;continue}if(e<=239){if(i+2>=n.length){Pr(t,o,Fa),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))){Pr(t,o,Fa),i++;continue}let B=(e&15)<<12|(c&63)<<6|I&63;Pr(t,o,B),i+=3;continue}if(i+3>=n.length){Pr(t,o,Fa),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))){Pr(t,o,Fa),i++;continue}let g=(e&7)<<18|(a&63)<<12|(A&63)<<6|r&63;d4e(t,o,g),i+=4}return w2(t,o),t.join("")}function h4e(n){let t=[],o=[],i=n.length,e=0;for(;e+1=55296&&a<=56319){if(e+1=56320&&A<=57343?(Pr(t,o,a),Pr(t,o,A),e+=2):Pr(t,o,Fa)}else Pr(t,o,Fa);continue}if(a>=56320&&a<=57343){Pr(t,o,Fa);continue}Pr(t,o,a)}return e=128&&e<=159?wre[e]:void 0;o+=a??String.fromCharCode(e),o.length>=jh&&(t.push(o),o="")}return o&&t.push(o),t.join("")}function B4e(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=Fa}else i=Fa;else i>=56320&&i<=57343&&(i=Fa);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 f4e(n){let t=[];for(let i=0;i=55296&&e<=56319){if(i+1=56320&&a<=57343?(t.push(e,a),i++):t.push(Fa)}else t.push(Fa);continue}if(e>=56320&&e<=57343){t.push(Fa);continue}t.push(e)}let o=new Uint8Array(t.length*2);for(let i=0;i>>8}return o}function Q4e(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 wre,S2,CO,BO,jh,Fa,xs=ue(()=>{wre={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"},S2={};for(let[n,t]of Object.entries(wre))S2[t]=Number.parseInt(n,10);jh=32*1024,Fa=65533});var VA={};Lr(VA,{AnsiStringType:()=>O2,Float16_BE:()=>D4e,Float16_LE:()=>O4e,Float32_BE:()=>M2,Float32_LE:()=>b4e,Float64_BE:()=>QO,Float64_LE:()=>M4e,Float80_BE:()=>_4e,Float80_LE:()=>T4e,INT16_BE:()=>rn,INT16_LE:()=>S4e,INT24_BE:()=>fO,INT24_LE:()=>w4e,INT32_BE:()=>Bi,INT32_LE:()=>ur,INT64_BE:()=>b2,INT64_LE:()=>gf,INT8:()=>js,IgnoreType:()=>D2,StringType:()=>We,UINT16_BE:()=>LA,UINT16_LE:()=>SA,UINT24_BE:()=>Gr,UINT24_LE:()=>sf,UINT32_BE:()=>xe,UINT32_LE:()=>Le,UINT64_BE:()=>Js,UINT64_LE:()=>Fr,UINT8:()=>QA,Uint8ArrayType:()=>bt});function zA(n){return new DataView(n.buffer,n.byteOffset)}var Ys,QA,SA,LA,sf,Gr,Le,xe,js,rn,S4e,w4e,fO,Bi,ur,Fr,gf,Js,b2,D4e,O4e,M2,b4e,QO,M4e,_4e,T4e,D2,bt,We,O2,DA=ue(()=>{Ys=ze(Sre(),1);xs();QA={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}},sf={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}},Gr={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}},Le={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}},js={len:1,get(n,t){return zA(n).getInt8(t)},put(n,t,o){return zA(n).setInt8(t,o),t+1}},rn={len:2,get(n,t){return zA(n).getInt16(t)},put(n,t,o){return zA(n).setInt16(t,o),t+2}},S4e={len:2,get(n,t){return zA(n).getInt16(t,!0)},put(n,t,o){return zA(n).setInt16(t,o,!0),t+2}},w4e={len:3,get(n,t){let o=sf.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}},fO={len:3,get(n,t){let o=Gr.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}},Bi={len:4,get(n,t){return zA(n).getInt32(t)},put(n,t,o){return zA(n).setInt32(t,o),t+4}},ur={len:4,get(n,t){return zA(n).getInt32(t,!0)},put(n,t,o){return zA(n).setInt32(t,o,!0),t+4}},Fr={len:8,get(n,t){return zA(n).getBigUint64(t,!0)},put(n,t,o){return zA(n).setBigUint64(t,o,!0),t+8}},gf={len:8,get(n,t){return zA(n).getBigInt64(t,!0)},put(n,t,o){return zA(n).setBigInt64(t,o,!0),t+8}},Js={len:8,get(n,t){return zA(n).getBigUint64(t)},put(n,t,o){return zA(n).setBigUint64(t,o),t+8}},b2={len:8,get(n,t){return zA(n).getBigInt64(t)},put(n,t,o){return zA(n).setBigInt64(t,o),t+8}},D4e={len:2,get(n,t){return Ys.read(n,t,!1,10,this.len)},put(n,t,o){return Ys.write(n,o,t,!1,10,this.len),t+this.len}},O4e={len:2,get(n,t){return Ys.read(n,t,!0,10,this.len)},put(n,t,o){return Ys.write(n,o,t,!0,10,this.len),t+this.len}},M2={len:4,get(n,t){return zA(n).getFloat32(t)},put(n,t,o){return zA(n).setFloat32(t,o),t+4}},b4e={len:4,get(n,t){return zA(n).getFloat32(t,!0)},put(n,t,o){return zA(n).setFloat32(t,o,!0),t+4}},QO={len:8,get(n,t){return zA(n).getFloat64(t)},put(n,t,o){return zA(n).setFloat64(t,o),t+8}},M4e={len:8,get(n,t){return zA(n).getFloat64(t,!0)},put(n,t,o){return zA(n).setFloat64(t,o,!0),t+8}},_4e={len:10,get(n,t){return Ys.read(n,t,!1,63,this.len)},put(n,t,o){return Ys.write(n,o,t,!1,63,this.len),t+this.len}},T4e={len:10,get(n,t){return Ys.read(n,t,!0,63,this.len)},put(n,t,o){return Ys.write(n,o,t,!0,63,this.len),t+this.len}},D2=class{constructor(t){this.len=t}get(t,o){}},bt=class{constructor(t){this.len=t}get(t,o){return t.subarray(o,o+this.len)}},We=class{constructor(t,o){this.len=t,this.encoding=o}get(t,o=0){let i=t.subarray(o,o+this.len);return Mr(i,this.encoding)}},O2=class extends We{constructor(t){super(t,"windows-1252")}}});var Wl,_2,Ore,bre,Mre,_re=ue(()=>{DA();Wl={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},_2={get(n){return{signature:Le.get(n,0),compressedSize:Le.get(n,8),uncompressedSize:Le.get(n,12)}},len:16},Ore={get(n){let t=SA.get(n,6);return{signature:Le.get(n,0),minVersion:SA.get(n,4),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,8),compressedSize:Le.get(n,18),uncompressedSize:Le.get(n,22),filenameLength:SA.get(n,26),extraFieldLength:SA.get(n,28),filename:null}},len:30},bre={get(n){return{signature:Le.get(n,0),nrOfThisDisk:SA.get(n,4),nrOfThisDiskWithTheStart:SA.get(n,6),nrOfEntriesOnThisDisk:SA.get(n,8),nrOfEntriesOfSize:SA.get(n,10),sizeOfCd:Le.get(n,12),offsetOfStartOfCd:Le.get(n,16),zipFileCommentLength:SA.get(n,20)}},len:22},Mre={get(n){let t=SA.get(n,8);return{signature:Le.get(n,0),minVersion:SA.get(n,6),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,10),compressedSize:Le.get(n,20),uncompressedSize:Le.get(n,24),filenameLength:SA.get(n,28),extraFieldLength:SA.get(n,30),fileCommentLength:SA.get(n,32),relativeOffsetOfLocalHeader:Le.get(n,42),filename:null}},len:46}});function Nre(n){let t=new Uint8Array(Le.len);return Le.put(t,0,n),t}function R4e(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 Tre,qs,T2,N4e,yO,Zl,Rre=ue(()=>{DA();Tre=ze(lt(),1);_re();qs=(0,Tre.default)("tokenizer:inflate"),T2=256*1024,N4e=Nre(Wl.DataDescriptor),yO=Nre(Wl.EndOfCentralDirectory),Zl=class n{constructor(t){this.tokenizer=t,this.syncBuffer=new Uint8Array(T2)}async isZip(){return await this.peekSignature()===Wl.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(Le)}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]===yO[0]&&i[e+1]===yO[1]&&i[e+2]===yO[2]&&i[e+3]===yO[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(bre,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,k4e(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(_2)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-_2.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(Le);if(t===Wl.LocalFileHeader){let o=await this.tokenizer.readToken(Ore);return o.filename=await this.tokenizer.readToken(new We(o.filenameLength,"utf-8")),o}if(t===Wl.CentralFileHeader)return!1;throw t===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var cf,kre=ue(()=>{cf=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 vre=ue(()=>{Rre();kre()});function G4e(n,t,o){return n?n.constructor===t?!0:v4e.call(n)===o:!1}function F4e(n){return G4e(n,Uint8Array,P4e)}function L4e(n){if(!F4e(n))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n}\``)}function mO(n){L4e(n);let t="";for(let o=0;o{v4e=Object.prototype.toString,P4e="[object Uint8Array]";rbA={utf8:new globalThis.TextDecoder("utf8")},abA=new globalThis.TextEncoder,U4e=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"))});function Pre(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 Gre(n,t=0){let o=Number.parseInt(new We(6).get(n,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(o))return!1;let i=256;for(let e=t;e{DA();Fre={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4}});var Ure,Hre,Kre=ue(()=>{Ure=["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"],Hre=["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 e8e(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 v2(n,t,o){if(!Number.isFinite(n)||n<0||n>t)throw new Xg(`${o} has invalid size ${n} (maximum ${t} bytes)`);return n}async function hI(n,t,{maximumLength:o=an,reason:i="skip"}={}){let e=v2(t,o,i);await n.ignore(e)}async function R2(n,t,o,{maximumLength:i=t.length,reason:e="read"}={}){let a=o?.length??t.length,A=v2(a,i,e);return n.readBuffer(t,{...o,length:A})}async function A8e(n,{maximumLength:t=Vs}={}){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 r8e(n,t){if(n.length=0?0:r===e?Math.min(t8e,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(fi(n.tokenizer)||(n.knownSizeDescriptorScannedBytes+=A),!!t)return i8e(a,A)}function n8e(n,t){return fi(n.tokenizer)?Math.max(0,an-(n.tokenizer.position-t)):Math.max(0,Vs-n.knownSizeDescriptorScannedBytes)}async function s8e(n,t,{shouldBuffer:o,maximumDescriptorLength:i=Vs}={}){if(t.dataDescriptor&&t.compressedSize===0)return o8e(n,{shouldBuffer:o,maximumLength:i});if(!o){await hI(n.tokenizer,t.compressedSize,{maximumLength:fi(n.tokenizer)?Vs:n.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let e=p8e(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 g8e(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 hf(n,t){return new k2(t).fromBuffer(n)}function Xre(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 zs(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 c8e(n){return Number.isFinite(n)?Math.max(1,Math.trunc(n)):df}function I8e(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 l8e(n){return Number.isFinite(n)?Math.max(0,Math.min(H4e,Math.trunc(n))):0}function d8e(n){return Number.isFinite(n)?Math.max(0,n):Number.MAX_SAFE_INTEGER}function fi(n){let t=n.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function pf(n,t,o){return fi(n)&&n.position-t>o}function p8e(n){let t=n.fileInfo.size,o=Number.isFinite(t)?Math.max(0,t-n.position):Number.MAX_SAFE_INTEGER;return Math.min(o,K4e)}function h8e(n){if(n instanceof kA||n instanceof Xg)return!0;if(!(n instanceof Error))return!1;if(Z4e.has(n.message)||$4e.has(n.code))return!0;for(let t of X4e)if(n.message.startsWith(t))return!0;return!1}function $re(n,t=Vs){let o=[n.compressedSize,n.uncompressedSize];for(let i of o)if(!Number.isFinite(i)||i<0||i>t)return!1;return!0}function E8e(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function u8e(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 eae(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 C8e(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 df,H4e,Vs,xre,K4e,an,wO,Yre,x4e,Y4e,jre,N2,Jre,qre,j4e,J4e,q4e,z4e,V4e,zre,Vre,Wre,W4e,Zre,Z4e,X4e,$4e,Xg,Aae,SO,t8e,k2,B8e,f8e,tae=ue(()=>{DA();uO();vre();lf();Lre();Kre();df=4100,H4e=df-2,Vs=1024*1024,xre=1024,K4e=2**31-1,an=16*1024*1024,wO=Vs,Yre=Vs,x4e=an,Y4e=1,jre=100,N2=an,Jre=64,qre=wO,j4e=256,J4e=512,q4e=an,z4e=512,V4e=512,zre=256,Vre=wO,Wre=wO,W4e=wO,Zre=an,Z4e=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),X4e=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],$4e=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),Xg=class extends Error{};Aae=134695760,SO=16,t8e=SO-1;Zl.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 A8e(t,{maximumLength:Vs});return o(i)};Zl.prototype.unzip=async function(n){let t=!1,o=0,i=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(pf(this.tokenizer,i,an))throw new Xg(`ZIP stream probing exceeds ${an} bytes`);let e=await this.readLocalFileHeader();if(!e)break;if(o++,o>xre)throw new Error(`ZIP entry count exceeds ${xre}`);let a=n(e);t=!!a.stop,await this.tokenizer.ignore(e.extraFieldLength);let A=await s8e(this,e,{shouldBuffer:!!a.handler,maximumDescriptorLength:Math.min(Vs,n8e(this,i))});if(a.handler&&await this.inflate(e,A,a.handler),e.dataDescriptor){let r=new Uint8Array(SO);if(await this.tokenizer.readBuffer(r),Le.get(r,0)!==Aae)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-r.length}`)}if(pf(this.tokenizer,i,an))throw new Xg(`ZIP stream probing exceeds ${an} bytes`)}while(!t)};k2=class n{constructor(t){let o=l8e(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 e8e(hO(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 Xg)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(Bo(o,this.getTokenizerOptions()))}async fromBlob(t){this.options.signal?.throwIfAborted();let o=EO(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=c8e(o?.sampleSize??df),e,a,A=t.getReader({mode:"byob"});try{let{value:g,done:c}=await I8e(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>=Y4e)return{ext:"gz",mime:"application/gzip"};let o=new cf(t),i=g8e(o.inflate(),x4e),e=fi(t),a,A,r,s;if(e){let g=new AbortController;a=setTimeout(()=>{g.abort(new DOMException(`Operation timed out after ${jre} ms`,"TimeoutError"))},jre),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 zs(this.buffer,t,o)}checkString(t,o){return this.check(Pre(t,o?.encoding),o)}detectConfident=async t=>{if(this.buffer=new Uint8Array(df),t.fileInfo.size===void 0&&(t.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=t,fi(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>=zre?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 hI(t,6,{maximumLength:6,reason:"ID3 header prefix"});let o=await t.readToken(Fre),i=fi(t);if(!Number.isFinite(o)||o<0||i&&(o>N2||t.position+o>N2))return;if(t.position+o>t.fileInfo.size)return i?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await hI(t,o,{maximumLength:i?N2:t.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof kA)return;throw e}return this.detectionReentryCount>=zre?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=E8e();try{await new Zl(t).unzip(e=>{u8e(i,e.filename);let a=e.filename==="[Content_Types].xml",A=eae(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 $re(e,Yre)?{async handler(r){let s=new TextDecoder("utf-8").decode(r).trim();o=Xre(s)},stop:!0}:{};case"[Content_Types].xml":return i.hasContentTypesEntry=!0,$re(e,Yre)?(i.isParsingContentTypes=!0,{async handler(r){let s=new TextDecoder("utf-8").decode(r),g=C8e(s);g&&(o=Xre(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(!h8e(e))throw e;i.isParsingContentTypes&&(i.isParsingContentTypes=!1,i.hasUnparseableContentTypes=!0)}return o??eae(i)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await t.ignore(28);let o=new Uint8Array(8);return await t.readBuffer(o),zs(o,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:zs(o,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:zs(o,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:zs(o,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:zs(o,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:zs(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(QA),g=128,c=0;for(;(s&g)===0&&g!==0;)++c,g>>=1;let I=new Uint8Array(c+1);return await R2(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:If(I),len:If(d)}}async function e(s){let g=0;for(;s>0;){if(g++,g>j4e||pf(t,A,an))return;let c=t.position,I=await i();if(I.id===17026){if(I.len>Jre)return;let d=v2(I.len,Jre,"EBML DocType");return(await t.readToken(new We(d))).replaceAll(/\00.*$/g,"")}if(fi(t)&&(!Number.isFinite(I.len)||I.len<0||I.len>qre)||(await hI(t,I.len,{maximumLength:fi(t)?qre: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 We(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(Bi),type:await t.readToken(new We(4,"latin1"))}}let a=fi(t),A=t.position,r=0,s=!1;do{if(r++,r>J4e||pf(t,A,q4e))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>Vre)return s&&a8e(c.type)?o:void 0;try{await hI(t,c.length+4,{maximumLength:a?Vre+4:t.fileInfo.size,reason:"PNG chunk payload"})}catch(I){if(!a&&(I instanceof Xg||I instanceof kA))return o;throw I}}if(t.position<=g)break}while(t.position+8z4e||pf(t,a,an)));){let r=t.position,s=await i(),g=s.size-24;if(!Number.isFinite(g)||g<0){o=!0;break}if(zs(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 R2(t,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),zs(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(zs(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>Wre){o=!0;break}if(await hI(t,g,{maximumLength:e?Wre:t.fileInfo.size,reason:"ASF header payload"}),t.position<=r){o=!0;break}}}catch(i){if(i instanceof kA||i instanceof Xg)fi(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 We(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})&&Gre(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(df);let o=d8e(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>V4e)&&!(fi(this.tokenizer)&&2+o*12>Zre))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(fi(this.tokenizer)&&e>W4e)return o;let a=fi(this.tokenizer)?Zre:this.tokenizer.fileInfo.size;try{await hI(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"}}}},B8e=new Set(Ure),f8e=new Set(Hre)});var P2=ue(()=>{tn();tae()});var gae=ee(DO=>{"use strict";Object.defineProperty(DO,"__esModule",{value:!0});DO.format=S8e;DO.parse=w8e;var Q8e=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,aae=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,y8e=/[\\"]/g,m8e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,iae=(()=>{let n=function(){};return n.prototype=Object.create(null),n})();function S8e(n){let{type:t,parameters:o}=n;if(!t||!m8e.test(t))throw new TypeError(`Invalid type: ${t}`);let i=t;if(o)for(let e of Object.keys(o)){if(!aae.test(e))throw new TypeError(`Invalid parameter name: ${e}`);i+=`; ${e}=${_8e(o[e])}`}return i}function w8e(n,t){let o=t?.comma===!0?b8e:65536,i=n.length,e=F2(n,t?.start??0,i),a=e;e=G2(n,e,i,o);let A=L2(n,a,e),r=n.slice(a,A).toLowerCase();return t?.parameters===!1?{type:r,index:e,parameters:new iae}:M8e(n,r,e,i,o)}var oae=32,nae=9,sae=59,D8e=61,rae=34,O8e=92,b8e=44;function M8e(n,t,o,i,e){let a=new iae;e:for(;ot;){let i=n.charCodeAt(o-1);if(i!==oae&&i!==nae)break;o--}return o}function _8e(n){if(aae.test(n))return n;if(Q8e.test(n))return`"${n.replace(y8e,"\\$&")}"`;throw new TypeError(`Invalid parameter value: ${n}`)}});function cae(n){if(!T8e.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 T8e,Iae=ue(()=>{T8e=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/});var lae,Ca,U2,H2=ue(()=>{lae={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},Ca={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},U2={[Ca.video]:"video",[Ca.audio]:"audio",[Ca.complex]:"complex",[Ca.logo]:"logo",[Ca.subtitle]:"subtitle",[Ca.button]:"button",[Ca.control]:"control"}});var Jh,EI,uI,K2,on,Xl,mt,rr=ue(()=>{Jh=n=>class extends Error{constructor(o){super(o),this.name=n}},EI=class extends Jh("CouldNotDetermineFileTypeError"){},uI=class extends Jh("UnsupportedFileTypeError"){},K2=class extends Jh("UnexpectedFileContentError"){constructor(t,o){super(o),this.fileType=t}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}},on=class extends Jh("FieldDecodingError"){},Xl=class extends Jh("InternalParserError"){},mt=n=>class extends K2{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|=XA(n,t,o+r,s)),A}function La(n,t,o){return XA(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:R8e(o)}:{dB:N8e(o),ratio:o}}}function x2(n){if(n.length===0)throw new Error("decodeUintBE: empty Uint8Array");let t=new DataView(n.buffer,n.byteOffset,n.byteLength);return If(t)}var ar=ue(()=>{DA();rr();lf()});var qh,zh,Vh,Y2,Ef,j2,Wh,bO,J2,CI=ue(()=>{DA();ar();qh={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"},zh={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},Vh={notSynchronized:0,mpegFrameNumber:1,milliseconds:2},Y2={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4},Ef={len:10,get:(n,t)=>({fileIdentifier:new We(3,"ascii").get(n,t),version:{major:js.get(n,t+3),revision:js.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:Y2.get(n,t+6)})},j2={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)})},Wh={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}}}},bO={len:4,get:(n,t)=>({encoding:Wh.get(n,t),language:new We(3,"latin1").get(n,t+1)})},J2={len:6,get:(n,t)=>{let o=bO.get(n,t);return{encoding:o.encoding,language:o.language,timeStampFormat:QA.get(n,t+4),contentType:QA.get(n,t+5)}}}});var $l=ue(()=>{H2();CI()});function Eae(n){return MO[n]&&!MO[n].multiple}function uae(n){return!MO[n].multiple||MO[n].unique||!1}var AA,MO,Cae=ue(()=>{AA={multiple:!1},MO={year:AA,track:AA,disk:AA,title:AA,artist:AA,artists:{multiple:!0,unique:!0},albumartist:AA,albumartists:{multiple:!0,unique:!0},album:AA,date:AA,originaldate:AA,originalyear:AA,releasedate:AA,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:AA,subtitle:{multiple:!0},discsubtitle:AA,totaltracks:AA,totaldiscs:AA,compilation:AA,rating:{multiple:!0},bpm:AA,mood:AA,media:AA,catalognumber:{multiple:!0,unique:!0},tvShow:AA,tvShowSort:AA,tvSeason:AA,tvEpisode:AA,tvEpisodeId:AA,tvNetwork:AA,podcast:AA,podcasturl:AA,releasestatus:AA,releasetype:{multiple:!0},releasecountry:AA,script:AA,language:AA,copyright:AA,license:AA,encodedby:AA,encodersettings:AA,gapless:AA,barcode:AA,isrc:{multiple:!0},asin:AA,musicbrainz_recordingid:AA,musicbrainz_trackid:AA,musicbrainz_albumid:AA,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:AA,musicbrainz_workid:AA,musicbrainz_trmid:AA,musicbrainz_discid:AA,acoustid_id:AA,acoustid_fingerprint:AA,musicip_puid:AA,musicip_fingerprint:AA,website:AA,"performer:instrument":{multiple:!0,unique:!0},averageLevel:AA,peakLevel:AA,notes:{multiple:!0,unique:!1},key:AA,originalalbum:AA,originalartist:AA,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:AA,discogs_label_id:AA,discogs_master_release_id:AA,discogs_votes:AA,discogs_rating:AA,replaygain_track_peak:AA,replaygain_track_gain:AA,replaygain_album_peak:AA,replaygain_album_gain:AA,replaygain_track_minmax:AA,replaygain_album_minmax:AA,replaygain_undo:AA,description:{multiple:!0},longDescription:AA,category:{multiple:!0},hdVideo:AA,keywords:{multiple:!0},movement:AA,movementIndex:AA,movementTotal:AA,podcastId:AA,showMovement:AA,stik:AA,playCounter:AA}});var Cr,$g=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 k8e,_O,Bae=ue(()=>{$g();k8e={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"},_O=class extends Cr{constructor(){super(["ID3v1"],k8e)}}});var sn,Zh=ue(()=>{$g();sn=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 v8e,TO,fae=ue(()=>{DA();$g();Zh();ar();v8e={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"},TO=class n extends sn{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"],v8e)}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=Ba(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?Le.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 P8e,NO,Qae=ue(()=>{$g();P8e={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"},NO=class n extends Cr{static toRating(t){return{rating:Number.parseFloat(t+1)/5}}constructor(){super(["asf"],P8e)}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 G8e,RO,yae=ue(()=>{Zh();G8e={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"},RO=class extends sn{constructor(){super(["ID3v2.2"],G8e)}}});var F8e,kO,mae=ue(()=>{Zh();F8e={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"},kO=class extends sn{constructor(){super(["APEv2"],F8e)}}});var L8e,U8e,uf,Sae=ue(()=>{Zh();L8e={"\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"},U8e="iTunes",uf=class extends sn{constructor(){super([U8e],L8e)}postMap(t,o){switch(t.id){case"rate":t.value={source:void 0,rating:Number.parseFloat(t.value)/100};break}}}});var H8e,vO,wae=ue(()=>{$g();H8e={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"},vO=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"],H8e)}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 K8e,PO,Dae=ue(()=>{$g();K8e={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"},PO=class extends Cr{constructor(){super(["exif"],K8e)}}});var x8e,GO,Oae=ue(()=>{Zh();x8e={"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"},GO=class extends sn{constructor(){super(["matroska"],x8e)}}});var Y8e,FO,bae=ue(()=>{$g();Y8e={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"},FO=class extends Cr{constructor(){super(["AIFF"],Y8e)}}});var LO,Mae=ue(()=>{Bae();fae();Qae();yae();mae();Sae();wae();Dae();Oae();bae();rr();LO=class{constructor(){this.tagMappers={},[new _O,new RO,new TO,new uf,new uf,new vO,new kO,new NO,new PO,new GO,new FO].forEach(t=>{this.registerTagMapper(t)})}mapTag(t,o,i){if(this.tagMappers[t])return this.tagMappers[t].mapGenericTag(o,i);throw new Xl(`No generic tag mapper defined for tag-format: ${t}`)}registerTagMapper(t){for(let o of t.tagTypes)this.tagMappers[o]=t}}});function _ae(n){return q2.test(n)?J8e(n):j8e(n)}function j8e(n){return{contentType:zh.lyrics,timeStampFormat:Vh.notSynchronized,text:n.trim(),syncText:[]}}function J8e(n){let t=n.split(` -`),o=[];for(let i of t){let e=i.match(q2);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(q2,"").trim();o.push({timestamp:s,text:g})}}return{contentType:zh.lyrics,timeStampFormat:Vh.milliseconds,text:o.map(i=>i.text).join(` -`),syncText:o}}var q2,Tae=ue(()=>{$l();q2=/\[(\d{2}):(\d{2})\.(\d{2,3})]/});function z8e(n){return n.length>2?`${n.slice(0,n.length-1).join(", ")} & ${n[n.length-1]}`:n.join(" & ")}var Nae,ed,q8e,UO,Rae=ue(()=>{$l();Nae=ze(lt(),1);Cae();Mae();$g();ar();P2();Tae();ed=(0,Nae.default)("music-metadata:collector"),q8e=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"],UO=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 LO,this.opts=t;let o=1;for(let i of q8e)this.originPriority[i]=o++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(t){ed(`streamInfo: type=${t.type?U2[t.type]:"?"}, codec=${t.codecName}`),this.format.trackInfo.push(t)}setFormat(t,o){ed(`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){ed(`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=hae(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=_ae(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=z8e(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 hf(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){ed(`common.${o.id} = ${o.value}`);let i=this.commonOrigin[o.id]||1e3,e=this.originPriority[t];if(Eae(o.id))if(e<=i)this.common[o.id]=o.value,this.commonOrigin[o.id]=e;else return ed(`Ignore native tag (singleton): ${t}.${o.id} = ${o.value}`);else if(e===i)!uae(o.id)||this.common[o.id].indexOf(o.value)===-1?this.common[o.id].push(o.value):ed(`Ignore duplicate value: ${t}.${o.id} = ${o.value}`);else if(e{Pt=class{constructor(t,o,i){this.metadata=t,this.tokenizer=o,this.options=i}}});var V8e,it,Qi=ue(()=>{xs();ar();rr();V8e=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,it={len:4,get:(n,t)=>{let o=Mr(n.subarray(t,t+it.len),"latin1");if(!o.match(V8e))throw new on(`FourCC contains invalid characters: ${pae(o)} "${o}"`);return o},put:(n,t,o)=>{let i=Dre(o,"latin1");if(i.length!==4)throw new Xl("Invalid length");return n.set(i,t),t+4}}});function vae(n){return{containsHeader:HO(n,31),containsFooter:HO(n,30),isHeader:HO(n,29),readOnly:HO(n,0),dataType:(n&6)>>1}}function HO(n,t){return(n&1<{DA();Qi();Cf={text_utf8:0,binary:1,external_info:2,reserved:3},z2={len:52,get:(n,t)=>({ID:it.get(n,t),version:Le.get(n,t+4)/1e3,descriptorBytes:Le.get(n,t+8),headerBytes:Le.get(n,t+12),seekTableBytes:Le.get(n,t+16),headerDataBytes:Le.get(n,t+20),apeFrameDataBytes:Le.get(n,t+24),apeFrameDataBytesHigh:Le.get(n,t+28),terminatingDataBytes:Le.get(n,t+32),fileMD5:new bt(16).get(n,t+36)})},kae={len:24,get:(n,t)=>({compressionLevel:SA.get(n,t),formatFlags:SA.get(n,t+2),blocksPerFrame:Le.get(n,t+4),finalFrameBlocks:Le.get(n,t+8),totalFrames:Le.get(n,t+12),bitsPerSample:SA.get(n,t+16),channel:SA.get(n,t+18),sampleRate:Le.get(n,t+20)})},Xi={len:32,get:(n,t)=>({ID:new We(8,"ascii").get(n,t),version:Le.get(n,t+8),size:Le.get(n,t+12),fields:Le.get(n,t+16),flags:vae(Le.get(n,t+20))})},KO={len:8,get:(n,t)=>({size:Le.get(n,t),flags:vae(Le.get(n,t+4))})}});var Uae={};Lr(Uae,{APEv2Parser:()=>fI,ApeContentError:()=>Xh,tryParseApeHeader:()=>Ad});function Ad(n,t,o){return new fI(n,t,o).tryParseApeHeader()}var Lae,BI,Gae,Fae,Xh,fI,td=ue(()=>{Lae=ze(lt(),1);tn();DA();ar();Zi();Pae();rr();xs();BI=(0,Lae.default)("music-metadata:parser:APEv2"),Gae="APEv2",Fae="APETAGEX",Xh=class extends mt("APEv2"){};fI=class n extends Pt{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(Xi.len),e=t.position;if(o<=Xi.len){BI(`Offset is too small to read APE footer: offset=${o}`);return}if(o>Xi.len){await t.readBuffer(i,{position:o-Xi.len}),t.setPosition(e);let a=Xi.get(i,0);if(a.ID==="APETAGEX")return a.flags.isHeader?BI(`APE Header found at offset=${o-Xi.len}`):(BI(`APE Footer found at offset=${o-Xi.len}`),o-=a.size),{footer:a,offset:o}}}static parseTagFooter(t,o,i){let e=Xi.get(o,o.length-Xi.len);if(e.ID!==Fae)throw new Xh("Unexpected APEv2 Footer ID preamble value");return Bo(o),new n(t,Bo(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-Xi.len;BI(`Parse APE tags at offset=${this.tokenizer.position}, size=${i}`);for(let e=0;ethis.metadata.addTag(Gae,r,c)));break}case Cf.binary:if(this.options.skipCovers)await this.tokenizer.ignore(a.size);else{let s=new Uint8Array(a.size);await this.tokenizer.readBuffer(s),A=Ws(s);let g=Mr(s.subarray(0,A),"utf-8"),c=s.subarray(A+1);await this.metadata.addTag(Gae,r,{description:g,data:c})}break;case Cf.external_info:BI(`Ignore external info ${r}`),await this.tokenizer.ignore(a.size);break;case Cf.reserved:BI(`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(kae);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 Xh("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}});async function Kae(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),Mr(t,"latin1")==="TAG"}return!1}var Hae,xO,$h,YO,QI,jO,Bf=ue(()=>{Hae=ze(lt(),1);DA();ar();Zi();td();xs();xO=(0,Hae.default)("music-metadata:parser:ID3v1"),$h=["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"],YO={len:128,get:(n,t)=>{let o=new QI(3).get(n,t);return o==="TAG"?{header:o,title:new QI(30).get(n,t+3),artist:new QI(30).get(n,t+33),album:new QI(30).get(n,t+63),year:new QI(4).get(n,t+93),comment:new QI(28).get(n,t+97),zeroByte:QA.get(n,t+127),track:QA.get(n,t+126),genre:QA.get(n,t+127)}:null}},QI=class{constructor(t){this.len=t,this.stringType=new We(t,"latin1")}get(t,o){let i=this.stringType.get(t,o);return i=OO(i),i=i.trim(),i.length>0?i:void 0}},jO=class n extends Pt{constructor(t,o,i){super(t,o,i),this.apeHeader=i.apeHeader}static getGenre(t){if(t<$h.length)return $h[t]}async parse(){if(!this.tokenizer.fileInfo.size){xO("Skip checking for ID3v1 because the file-size is unknown");return}this.apeHeader&&this.tokenizer.supportsRandomAccess()&&(this.tokenizer.setPosition(this.apeHeader.offset),await new fI(this.metadata,this.tokenizer,this.options).parseTags(this.apeHeader.footer));let t=this.tokenizer.fileInfo.size-YO.len;if(this.tokenizer.position>t){xO("Already consumed the last 128 bytes");return}let o=await this.tokenizer.readToken(YO,t);if(o){xO("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-YO.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 xO("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-YO.len)}async addTag(t,o){await this.metadata.addTag("ID3v1",t,o)}}});var V2,xae=ue(()=>{DA();V2={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 ff(n){switch(n){case 2:return 6;case 3:case 4:return 10;default:throw Yae(n)}}function W8e(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 Qf(n,t,o){switch(t){case 2:return Z8e(n,t,o);case 3:case 4:return X8e(n,t,o);default:throw Yae(t)}}function Z8e(n,t,o){let i={id:Mr(n.subarray(0,3),"ascii"),length:Gr.get(n,3)};return i.id.match(/^[A-Z0-9]{3}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${i.id}`),i}function X8e(n,t,o){let i={id:Mr(n.subarray(0,4),"ascii"),length:(t===4?Y2:xe).get(n,4),flags:W8e(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 yI(`Unexpected majorVer: ${n}`)}var W2=ue(()=>{DA();ar();CI();xs();Z2()});function $8e(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=jae(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=jae(i)),i&&t.push(i)),t}function jae(n){if(n==="RX")return"Remix";if(n==="CR")return"Cover";if(n.match(/^\d*$/))return $h[Number.parseInt(n,10)]}function eze(n){throw new yI(`Unexpected majorVer: ${n}`)}var Jae,JO,gn,X2,qO,yI,Z2=ue(()=>{Jae=ze(lt(),1);DA();ar();CI();Bf();rr();ar();xae();W2();JO=(0,Jae.default)("music-metadata:id3v2:frame-parser"),gn="latin1",X2={encoding:gn,bom:!1};qO=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}=Wh.get(t,0),A=t.length,r=0,s=[],g=n.getNullTerminatorLength(e),c;switch(JO(`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(Ba(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=>$8e(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,Ba(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=Ba(t.subarray(0,3),"latin1"),t=t.subarray(3);break;case 3:case 4:c=Ws(t,gn),I.format=Ba(t.subarray(0,c),gn),t=t.subarray(c+1);break;default:throw eze(this.major)}I.format=n.fixPictureMimeType(I.format),I.type=qh[t[0]],t=t.subarray(1),c=Ws(t,e),I.description=Ba(t.subarray(0,c),e),t=t.subarray(c+g),I.data=t,s=I}break;case"CNT":case"PCNT":s=x2(t);break;case"SYLT":{let I=J2.get(t,0);t=t.subarray(J2.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=bO.get(t,r);r+=bO.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,gn);s={owner_identifier:I.id,identifier:I.data};break}case"PRIV":{let I=n.readIdentifierAndData(t,gn);s={owner_identifier:I.id,data:I.data};break}case"POPM":{t=t.subarray(r);let I=n.readNullTerminatedString(t,X2),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=QA.get(t,0),f=t.subarray(QA.len);s={email:d,rating:B,counter:f.length>0?x2(f):void 0};break}case"GEOB":{let I=Wh.get(t,0);t=t.subarray(1);let d=n.readNullTerminatedString(t,X2),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,X2).text;break;case"WXXX":{let I=Wh.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(Ba(t,gn))};break}case"WFD":case"WFED":{let I=Wh.get(t,0);t=t.subarray(1),s=n.readNullTerminatedString(t,I).text;break}case"MCDI":{s=t.subarray(0,A);break}case"CHAP":{JO("Reading CHAP"),c=Ws(t,gn);let I={label:Ba(t.subarray(0,c),gn),info:V2.get(t,c+1),frames:new Map};for(r+=c+1+V2.len;r=a.length)return{text:Ba(t,o.encoding),len:e};let r=t.subarray(0,i+A);return{text:Ba(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}},yI=class extends mt("id3v2"){}});function Aze(n){throw new yI(`Unexpected majorVer: ${n}`)}var cn,eE=ue(()=>{DA();Z2();CI();W2();cn=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 bt(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=ff(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=Qf(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 qae,$2,Zs,yf=ue(()=>{tn();qae=ze(lt(),1);CI();eE();Bf();Zi();$2=(0,qae.default)("music-metadata:parser:ID3"),Zs=class extends Pt{constructor(){super(...arguments),this.id3parser=new cn}static async startsWithID3v2Header(t){return(await t.peekToken(Ef)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(t){if(t instanceof kA)$2("End-of-stream");else throw t}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),$2("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 jO(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(Ef)).fileIdentifier==="ID3")return $2("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}});var eU,zae=ue(()=>{ar();eU={len:2,get:(n,t)=>{let o=XA(n,t,0,3),i=XA(n,t,6,1),e=XA(n,t,7,9)/10;if(o>0)return{type:XA(n,t,0,3),origin:XA(n,t,3,3),adjustment:i?-e:e}}}});var Vae,Wae=ue(()=>{DA();ar();zae();Vae={len:27,get:(n,t)=>{let o=xe.get(n,t+2);return{revision:XA(n,t,0,4),vbr_method:XA(n,t,4,4),lowpass_filter:100*QA.get(n,t+1),track_peak:o===0?null:o/2**23,track_gain:eU.get(n,6),album_gain:eU.get(n,8),music_length:xe.get(n,t+20),music_crc:QA.get(n,t+24),header_crc:LA.get(n,t+24)}}}});async function Zae(n){let t=await n.readToken(tze),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 We(4,"ascii"))==="LAME"){await n.ignore(4),o.lame={version:await n.readToken(new We(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(Vae))}}return o}var AU,zO,tze,Xae=ue(()=>{DA();ar();Wae();AU=new We(4,"ascii"),zO=new We(6,"ascii"),tze={len:4,get:(n,t)=>({frames:La(n,t,31),bytes:La(n,t,30),toc:La(n,t,29),vbrScale:La(n,t,28)})}});var rie={};Lr(rie,{MpegContentError:()=>rd,MpegParser:()=>tU});function aze(n){return`V${Math.floor((100-n)/10)}`}var tie,fo,rd,$ae,eie,rze,Qo,Aie,tU,aie=ue(()=>{DA();tn();tie=ze(lt(),1);ar();yf();Xae();rr();fo=(0,tie.default)("music-metadata:parser:mpeg"),rd=class extends mt("MPEG"){},$ae=1024,eie={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]},rze=[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"]],Qo=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=XA(t,o+1,3,2),this.layer=n.LayerDescription[XA(t,o+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(t,o):this.parseMpegHeader(t,o),this.isProtectedByCRC=!La(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=XA(t,o+2,0,4),this.sampRateFreqIndex=XA(t,o+2,4,2),this.padding=La(t,o+2,6),this.privateBit=La(t,o+2,7),this.channelModeIndex=XA(t,o+3,0,2),this.modeExtension=XA(t,o+3,2,2),this.isCopyrighted=La(t,o+3,4),this.isOriginalMedia=La(t,o+3,5),this.emphasis=XA(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 rd("Cannot determine bit-rate");if(this.bitrate=i*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new rd("Cannot determine sampling-rate")}parseAdtsHeader(t,o){fo("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;let i=XA(t,o+2,0,2);this.codec="AAC",this.codecProfile=eie.AudioObjectTypes[i],fo(`MPEG-4 audio-codec=${this.codec}`);let e=XA(t,o+2,2,4);this.samplingRate=eie.SamplingFrequencies[e],fo(`sampling-rate=${this.samplingRate}`);let a=XA(t,o+2,7,3);this.mp4ChannelConfig=rze[a],fo(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=XA(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]}};Qo.SyncByte1=255;Qo.SyncByte2=224;Qo.VersionID=[2.5,null,2,1];Qo.LayerDescription=[0,3,2,1];Qo.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];Qo.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}};Qo.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}};Qo.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];Aie={len:4,get:(n,t)=>new Qo(n,t)};tU=class extends Zs{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($ae),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(fo("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;fo(`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;fo("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:$ae,mayBeLess:!0}),this.syncPeek.len<=163)throw new kA;for(;;){if(t&&(this.syncPeek.buf[o]&224)===224){this.buf_frame_header[0]=Qo.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[o],await this.tokenizer.ignore(o),fo(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(fo(`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(Qo.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&&fo("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 rd("invalid slot_size");let i=t.calcSamplesPerFrame();fo(`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=Aie.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+=XA(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),fo(`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(rn.len),this.offset+=rn.len,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){let t=this.audioFrameHeader.calculateSideInfoLength();if(t!==null){await this.tokenizer.readToken(new bt(t)),this.offset+=t,await this.readXtraInfoHeader();return}}}async readXtraInfoHeader(){let t=await this.tokenizer.readToken(AU);switch(this.offset+=AU.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=aze(i.vbrScale);this.metadata.setFormat("codecProfile",e)}return null}case"Xtra":break;case"LAME":{let i=await this.tokenizer.readToken(zO);if(this.frame_size!==null&&this.frame_size>=this.offset+zO.len)return this.offset+=zO.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 Zae(this.tokenizer);if(this.offset+=this.tokenizer.position-t,o.lame&&(this.metadata.setFormat("tool",`LAME ${nn(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),fo("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 rd("frame-data-left cannot be negative");await this.tokenizer.ignore(t)}areAllSame(t){let o=t[0];return t.every(i=>i===o)}}});var iie,oie=ue(()=>{iie={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],async load(){return(await Promise.resolve().then(()=>(aie(),rie))).MpegParser}}});var nie,sie=ue(()=>{nie={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],async load(){return(await Promise.resolve().then(()=>(td(),Uae))).APEv2Parser}}});function rU(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 VO,gie=ue(()=>{VO=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(rU(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,ir,aU=ue(()=>{gie();Ye=class n{static fromBin(t,o=0){return new n(n.decode(t,o))}static decode(t,o=0){return new VO(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 rU(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");ir=Ye});function Iie(n){return ize[n]}function mf(n){return nn(Ba(n,"utf-16le"))}function cie(n){return new Uint8Array(n)}function oze(n,t=0){return lie(n,t)===1}function nze(n,t=0){return Le.get(n,t)}function sze(n,t=0){return Fr.get(n,t)}function lie(n,t=0){return SA.get(n,t)}var ize,die=ue(()=>{DA();ar();ize=[mf,cie,oze,nze,sze,lie,cie]});async function pie(n){let t=await n.readNumber(SA);return(await n.readToken(new We(t*2,"utf-16le"))).replace("\0","")}async function Eie(n){let t=await n.readToken(gze),o=[];for(let i=0;i{DA();ar();aU();die();CI();rr();AE=class extends mt("ASF"){},hie={len:30,get:(n,t)=>({objectId:ir.fromBin(n,t),objectSize:Number(Fr.get(n,t+16)),numberOfHeaderObjects:Le.get(n,t+24)})},mI={len:24,get:(n,t)=>({objectId:ir.fromBin(n,t),objectSize:Number(Fr.get(n,t+16))})},ec=class{constructor(t){this.len=Number(t.objectSize)-mI.len}postProcessTag(t,o,i,e){if(o==="WM/Picture")t.push({id:o,value:iU.fromBuffer(e)});else{let a=Iie(i);if(!a)throw new AE(`unexpected value headerType: ${i}`);t.push({id:o,value:a(e)})}}},Sf=class extends ec{get(t,o){return null}},tE=class extends ec{get(t,o){return{fileId:ir.fromBin(t,o),fileSize:Fr.get(t,o+16),creationDate:Fr.get(t,o+24),dataPacketsCount:Fr.get(t,o+32),playDuration:Fr.get(t,o+40),sendDuration:Fr.get(t,o+48),preroll:Fr.get(t,o+56),flags:{broadcast:GA(t,o+64,24),seekable:GA(t,o+64,25)},minimumDataPacketSize:Le.get(t,o+68),maximumDataPacketSize:Le.get(t,o+72),maximumBitrate:Le.get(t,o+76)}}};tE.guid=ir.FilePropertiesObject;rE=class extends ec{get(t,o){return{streamType:ir.decodeMediaType(ir.fromBin(t,o)),errorCorrectionType:ir.fromBin(t,o+8)}}};rE.guid=ir.StreamPropertiesObject;aE=class{constructor(){this.len=22}get(t,o){let i=new DataView(t.buffer,o);return{reserved1:ir.fromBin(t,o),reserved2:i.getUint16(16,!0),extensionDataSize:i.getUint16(18,!0)}}};aE.guid=ir.HeaderExtensionObject;gze={len:20,get:(n,t)=>({entryCount:new DataView(n.buffer,t).getUint16(16,!0)})};ad=class n extends ec{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:mf(t.subarray(o+a,o+g))}),a=g}}return i}};ad.guid=ir.ContentDescriptionObject;ad.contentDescTags=["Title","Author","Copyright","Description","Rating"];iE=class extends ec{get(t,o){let i=[],e=new DataView(t.buffer,o),a=e.getUint16(0,!0),A=2;for(let r=0;rsU});var uie,nU,dze,sU,Bie=ue(()=>{uie=ze(lt(),1);$l();aU();oU();Zi();oU();nU=(0,uie.default)("music-metadata:parser:ASF"),dze="asf",sU=class extends Pt{async parse(){let t=await this.tokenizer.readToken(hie);if(!t.objectId.equals(ir.HeaderObject))throw new AE(`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(mI);switch(nU("header GUID=%s",i.objectId.str),i.objectId.str){case tE.guid.str:{let e=await this.tokenizer.readToken(new tE(i));this.metadata.setFormat("duration",Number(e.playDuration/BigInt(1e3))/1e4-Number(e.preroll)/1e3),this.metadata.setFormat("bitrate",e.maximumBitrate);break}case rE.guid.str:{let e=await this.tokenizer.readToken(new rE(i));this.metadata.setFormat("container",`ASF/${e.streamType}`);break}case aE.guid.str:{let e=await this.tokenizer.readToken(new aE);await this.parseExtensionObject(e.extensionDataSize);break}case ad.guid.str:o=await this.tokenizer.readToken(new ad(i)),await this.addTags(o);break;case iE.guid.str:o=await this.tokenizer.readToken(new iE(i)),await this.addTags(o);break;case ir.CodecListObject.str:{let e=await Eie(this.tokenizer);e.forEach(A=>{this.metadata.addStreamInfo({type:A.type.videoCodec?Ca.video:Ca.audio,codecName:A.codecName})});let a=e.filter(A=>A.type.audioCodec).map(A=>A.codecName).join("/");this.metadata.setFormat("codec",a);break}case ir.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(i.objectSize-mI.len);break;case ir.PaddingObject.str:nU("Padding: %s bytes",i.objectSize-mI.len),await this.tokenizer.ignore(i.objectSize-mI.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${i.objectId.str}`),nU("Ignore ASF-Object-GUID: %s",i.objectId.str),await this.tokenizer.readToken(new Sf(i))}}while(--t)}async addTags(t){await Promise.all(t.map(({id:o,value:i})=>this.metadata.addTag(dze,o,i)))}async parseExtensionObject(t){do{let o=await this.tokenizer.readToken(mI),i=o.objectSize-mI.len;if(i<0)throw new AE(`Invalid ASF header object size: ${o.objectSize}`);switch(o.objectId.str){case oE.guid.str:await this.tokenizer.readToken(new oE(o));break;case id.guid.str:{let e=await this.tokenizer.readToken(new id(o));await this.addTags(e);break}case nE.guid.str:{let e=await this.tokenizer.readToken(new nE(o));await this.addTags(e);break}case ir.PaddingObject.str:await this.tokenizer.ignore(i);break;case ir.CompatibilityObject.str:await this.tokenizer.ignore(i);break;case ir.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 Sf(o));break}t-=o.objectSize}while(t>0)}}});var fie,Qie=ue(()=>{fie={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(()=>(Bie(),Cie))).AsfParser}}});var od,yie=ue(()=>{DA();Qi();od={len:12,get:(n,t)=>({chunkID:it.get(n,t),chunkSize:b2.get(n,t+4)})}});var Sie={};Lr(Sie,{DsdiffContentParseError:()=>sE,DsdiffParser:()=>gU});var mie,yi,sE,gU,wie=ue(()=>{DA();mie=ze(lt(),1);tn();Qi();Zi();eE();yie();rr();yi=(0,mie.default)("music-metadata:parser:aiff"),sE=class extends mt("DSDIFF"){},gU=class extends Pt{async parse(){let t=await this.tokenizer.readToken(od);if(t.chunkID!=="FRM8")throw new sE("Unexpected chunk-ID");this.metadata.setAudioOnly();let o=(await this.tokenizer.readToken(it)).trim();switch(o){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${o}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(t.chunkSize-BigInt(it.len));default:throw new sE(`Unsupported DSDIFF type: ${o}`)}}async readFmt8Chunks(t){for(;t>=od.len;){let o=await this.tokenizer.readToken(od);yi(`Chunk id=${o.chunkID}`),await this.readData(o),t-=BigInt(od.len)+o.chunkSize}}async readData(t){yi(`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(Le);yi(`DSDIFF version=${e}`);break}case"PROP":{if(await this.tokenizer.readToken(it)!=="SND ")throw new sE("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(t.chunkSize-BigInt(it.len));break}case"ID3":{let e=await this.tokenizer.readToken(new bt(Number(t.chunkSize))),a=Bo(e);await new cn().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:yi(`Ignore chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);break}let i=t.chunkSize-BigInt(this.tokenizer.position-o);i>0&&(yi(`After Parsing chunk, remaining ${i} bytes`),await this.tokenizer.ignore(Number(i)))}async handleSoundPropertyChunks(t){for(yi(`Parsing sound-property-chunks, remainingSize=${t}`);t>0;){let o=await this.tokenizer.readToken(od);yi(`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(it)).trim(),A=await this.tokenizer.readToken(QA),r=await this.tokenizer.readToken(new We(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(QA),r=await this.tokenizer.readToken(QA),s=await this.tokenizer.readToken(xe);yi(`ABSS ${a}:${A}:${r}.${s}`);break}case"LSCO":{let a=await this.tokenizer.readToken(LA);yi(`LSCO lsConfig=${a}`);break}default:yi(`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&&(yi(`After Parsing sound-property-chunk ${o.chunkSize}, remaining ${e} bytes`),await this.tokenizer.ignore(Number(e))),t-=BigInt(od.len)+o.chunkSize,yi(`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){yi(`Parsing channel-chunks, remainingSize=${t}`);let o=[];for(;t>=it.len;){let i=await this.tokenizer.readToken(it);yi(`Channel[ID=${i}]`),o.push(i),t-=BigInt(it.len)}return yi(`Channels: ${o.join(", ")}`),o}}});var Die,Oie=ue(()=>{Die={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],async load(){return(await Promise.resolve().then(()=>(wie(),Sie))).DsdiffParser}}});var bie,SI,WO,cU=ue(()=>{DA();Qi();rr();bie={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 "},SI=class extends mt("AIFF"){},WO=class{constructor(t,o){this.isAifc=o;let i=o?22:18;if(t.chunkSize>Math.abs(i):e<22){let A=QA.get(t,o+22);if(A>0){let r=(A+1)%2;if(23+A+r===this.len)a.compressionName=new We(A,"latin1").get(t,o+23);else throw new SI("Illegal pstring length")}else a.compressionName=void 0}}else a.compressionName="PCM";return a}}});var ZO,Mie=ue(()=>{DA();Qi();ZO={len:8,get:(n,t)=>({chunkID:it.get(n,t),chunkSize:Number(BigInt(xe.get(n,t+4)))})}});var Tie={};Lr(Tie,{AIFFParser:()=>lU});var _ie,IU,lU,Nie=ue(()=>{DA();_ie=ze(lt(),1);tn();eE();Qi();Zi();cU();cU();Mie();IU=(0,_ie.default)("music-metadata:parser:aiff"),lU=class extends Pt{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(ZO)).chunkID!=="FORM")throw new SI("Invalid Chunk-ID, expected 'FORM'");let o=await this.tokenizer.readToken(it);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 SI(`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>=ZO.len;){IU(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(ZO),e=2*Math.round(i.chunkSize/2),a=await this.readData(i);await this.tokenizer.ignore(e-a)}}catch(i){if(i instanceof kA)IU("End-of-stream");else throw i}}async readData(t){switch(t.chunkID){case"COMM":{if(this.isCompressed===null)throw new SI("Failed to parse AIFF.COMM chunk when compression type is unknown");let o=await this.tokenizer.readToken(new WO(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??bie[o.compressionType]),t.chunkSize}case"ID3 ":{let o=await this.tokenizer.readToken(new bt(t.chunkSize)),i=Bo(o);return await new cn().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 IU(`Ignore chunk id=${t.chunkID}, size=${t.chunkSize}`),0}}async readTextChunk(t){let i=(await this.tokenizer.readToken(new We(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 Rie,kie=ue(()=>{Rie={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],async load(){return(await Promise.resolve().then(()=>(Nie(),Tie))).AIFFParser}}});var wf,vie,Pie,Gie=ue(()=>{DA();Qi();wf={len:12,get:(n,t)=>({id:it.get(n,t),size:Fr.get(n,t+4)})},vie={len:16,get:(n,t)=>({fileSize:gf.get(n,t),metadataPointer:gf.get(n,t+8)})},Pie={len:40,get:(n,t)=>({formatVersion:ur.get(n,t),formatID:ur.get(n,t+4),channelType:ur.get(n,t+8),channelNum:ur.get(n,t+12),samplingFrequency:ur.get(n,t+16),bitsPerSample:ur.get(n,t+20),sampleCount:gf.get(n,t+24),blockSizePerChannel:ur.get(n,t+32)})}});var Lie={};Lr(Lie,{DsdContentParseError:()=>XO,DsfParser:()=>pU});var Fie,dU,XO,pU,Uie=ue(()=>{Fie=ze(lt(),1);yf();Gie();eE();rr();dU=(0,Fie.default)("music-metadata:parser:DSF"),XO=class extends mt("DSD"){},pU=class extends Zs{async postId3v2Parse(){let t=this.tokenizer.position,o=await this.tokenizer.readToken(wf);if(o.id!=="DSD ")throw new XO("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();let i=await this.tokenizer.readToken(vie);if(i.metadataPointer===BigInt(0))dU("No ID3v2 tag present");else return dU(`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 cn().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(t){for(;t>=wf.len;){let o=await this.tokenizer.readToken(wf);switch(dU(`Parsing chunk name=${o.id} size=${o.size}`),o.id){case"fmt ":{let i=await this.tokenizer.readToken(Pie);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)-wf.len);break}t-=o.size}}}});var Hie,Kie=ue(()=>{Hie={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],async load(){return(await Promise.resolve().then(()=>(Uie(),Lie))).DsfParser}}});var wI,Df,xie,$O=ue(()=>{DA();CI();wI=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=qh[xe.get(t,o)];o+=4;let e=xe.get(t,o);o+=4;let a=new We(e,"utf-8").get(t,o);o+=e;let A=xe.get(t,o);o+=4;let r=new We(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}}},Df={len:7,get:(n,t)=>({packetType:QA.get(n,t),vorbis:new We(6,"ascii").get(n,t+1)})},xie={len:23,get:(n,t)=>({version:Le.get(n,t+0),channelMode:QA.get(n,t+4),sampleRate:Le.get(n,t+5),bitrateMax:Le.get(n,t+9),bitrateNominal:Le.get(n,t+13),bitrateMin:Le.get(n,t+17)})}});var gE,hU=ue(()=>{DA();xs();gE=class{constructor(t,o){this.data=t,this.offset=o}readInt32(){let t=Le.get(this.data,this.offset);return this.offset+=4,t}readStringUtf8(){let t=this.readInt32(),o=Mr(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 Yie,cE,Of,Xs,bf=ue(()=>{DA();Yie=ze(lt(),1);hU();$O();rr();cE=(0,Yie.default)("music-metadata:parser:ogg:vorbis1"),Of=class extends mt("Vorbis"){},Xs=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 Of("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 gE(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){cE("Ignore picture");return}o=wI.fromBase64(o),cE(`Push picture: id=${t}, format=${o.format}`)}else cE(`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),cE("Parse first page");let i=Df.get(o,0);if(i.vorbis!=="vorbis")throw new Of("Metadata does not look like Vorbis");if(i.packetType===1){let e=xie.get(o,Df.len);this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("bitrate",e.bitrateNominal),this.metadata.setFormat("numberOfChannels",e.channelMode),cE("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",e.sampleRate,e.bitrateNominal,e.channelMode)}else throw new Of("First Ogg page should be type 1: the identification header")}async parseFullPage(t){let o=Df.get(t,0);switch(cE("Parse full page: type=%s, byteLength=%s",o.packetType,t.byteLength),o.packetType){case 3:return this.parseUserCommentList(t,Df.len);case 1:case 5:break}}async parseUserCommentList(t,o){let i=Le.get(t,o);o+=4,o+=i;let e=Le.get(t,o);for(o+=4;e-- >0;)o+=await this.parseUserComment(t,o)}}});var mi,Mf,_f,EU=ue(()=>{ar();DA();mi={STREAMINFO:0,PADDING:1,APPLICATION:2,SEEKTABLE:3,VORBIS_COMMENT:4,CUESHEET:5,PICTURE:6},Mf={len:4,get:(n,t)=>({lastBlock:GA(n,t,7),type:XA(n,t,1,7),length:Gr.get(n,t+1)})},_f={len:34,get:(n,t)=>({minimumBlockSize:LA.get(n,t),maximumBlockSize:LA.get(n,t+2)/1e3,minimumFrameSize:Gr.get(n,t+4),maximumFrameSize:Gr.get(n,t+7),sampleRate:Gr.get(n,t+10)>>4,channels:XA(n,t+12,4,3)+1,bitsPerSample:XA(n,t+12,7,5)+1,totalSamples:XA(n,t+13,4,36),fileMD5:new bt(16).get(n,t+18)})}});var qie={};Lr(qie,{FlacParser:()=>Tf});var Jie,Eze,eb,Tf,uU=ue(()=>{Jie=ze(lt(),1);DA();$O();yf();Qi();bf();hU();rr();EU();Eze=(0,Jie.default)("music-metadata:parser:FLAC"),eb=class extends mt("FLAC"){},Tf=class extends Zs{constructor(){super(...arguments),this.vorbisParser=new Xs(this.metadata,this.options)}async postId3v2Parse(){if((await this.tokenizer.readToken(it)).toString()!=="fLaC")throw new eb("Invalid FLAC preamble");let o;do o=await this.tokenizer.readToken(Mf),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(Eze(`blockHeader type=${t.type}, length=${t.length}`),t.type){case mi.STREAMINFO:return this.readBlockStreamInfo(t.length);case mi.PADDING:break;case mi.APPLICATION:break;case mi.SEEKTABLE:break;case mi.VORBIS_COMMENT:return this.readComment(t.length);case mi.CUESHEET:break;case mi.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!==_f.len)throw new eb("Unexpected block-stream-info length");let o=await this.tokenizer.readToken(_f);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 bt(t));return this.parseComment(o)}async parseComment(t){let o=new gE(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 wI(t)))}addPictureTag(t){return this.addTag("METADATA_BLOCK_PICTURE",t)}addTag(t,o){return this.vorbisParser.addTag(t,o)}}});var zie,Vie=ue(()=>{zie={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],async load(){return(await Promise.resolve().then(()=>(uU(),qie))).FlacParser}}});var _e,CU=ue(()=>{_e={string:0,uint:1,uid:2,bool:3,binary:4,float:5}});var Wie,Zie=ue(()=>{CU();Wie={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:_e.uint},17143:{name:"ebmlReadVersion",value:_e.uint},17138:{name:"ebmlMaxIDWidth",value:_e.uint},17139:{name:"ebmlMaxSizeWidth",value:_e.uint},17026:{name:"docType",value:_e.string},17031:{name:"docTypeVersion",value:_e.uint},17029:{name:"docTypeReadVersion",value:_e.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:_e.binary},21420:{name:"position",value:_e.uint}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:_e.uid},29572:{name:"filename",value:_e.string},3979555:{name:"prevUID",value:_e.uid},3965867:{name:"prevFilename",value:_e.string},4110627:{name:"nextUID",value:_e.uid},4096955:{name:"nextFilename",value:_e.string},2807729:{name:"timecodeScale",value:_e.uint},17545:{name:"duration",value:_e.float},17505:{name:"dateUTC",value:_e.uint},31657:{name:"title",value:_e.string},19840:{name:"muxingApp",value:_e.string},22337:{name:"writingApp",value:_e.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:_e.uid},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:_e.uid},171:{name:"prevSize",value:_e.uid},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:_e.uint},29637:{name:"uid",value:_e.uid},131:{name:"trackType",value:_e.uint},185:{name:"flagEnabled",value:_e.bool},136:{name:"flagDefault",value:_e.bool},21930:{name:"flagForced",value:_e.bool},156:{name:"flagLacing",value:_e.bool},28135:{name:"minCache",value:_e.uint},28136:{name:"maxCache",value:_e.uint},2352003:{name:"defaultDuration",value:_e.uint},2306383:{name:"timecodeScale",value:_e.float},21358:{name:"name",value:_e.string},2274716:{name:"language",value:_e.string},134:{name:"codecID",value:_e.string},25506:{name:"codecPrivate",value:_e.binary},2459272:{name:"codecName",value:_e.string},3839639:{name:"codecSettings",value:_e.string},3883072:{name:"codecInfoUrl",value:_e.string},2536e3:{name:"codecDownloadUrl",value:_e.string},170:{name:"codecDecodeAll",value:_e.bool},28587:{name:"trackOverlay",value:_e.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:_e.bool},21432:{name:"stereoMode",value:_e.uint},176:{name:"pixelWidth",value:_e.uint},186:{name:"pixelHeight",value:_e.uint},21680:{name:"displayWidth",value:_e.uint},21690:{name:"displayHeight",value:_e.uint},21683:{name:"aspectRatioType",value:_e.uint},3061028:{name:"colourSpace",value:_e.uint},3126563:{name:"gammaValue",value:_e.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:_e.float},30901:{name:"outputSamplingFrequency",value:_e.float},159:{name:"channels",value:_e.uint},148:{name:"channels",value:_e.uint},32123:{name:"channelPositions",value:_e.binary},25188:{name:"bitDepth",value:_e.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:_e.uint},20530:{name:"scope",value:_e.bool},20531:{name:"type",value:_e.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:_e.uint},16981:{name:"contentCompSettings",value:_e.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:_e.uint},18402:{name:"contentEncKeyID",value:_e.binary},18403:{name:"contentSignature ",value:_e.binary},18404:{name:"ContentSigKeyID ",value:_e.binary},18405:{name:"contentSigAlgo ",value:_e.uint},18406:{name:"contentSigHashAlgo ",value:_e.uint}}},25188:{name:"bitDepth",value:_e.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:_e.uid},183:{name:"positions",container:{247:{name:"track",value:_e.uint},241:{name:"clusterPosition",value:_e.uint},21368:{name:"blockNumber",value:_e.uint},234:{name:"codecState",value:_e.uint},219:{name:"reference",container:{150:{name:"time",value:_e.uint},151:{name:"cluster",value:_e.uint},21343:{name:"number",value:_e.uint},235:{name:"codecState",value:_e.uint}}},240:{name:"relativePosition",value:_e.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:_e.string},18030:{name:"name",value:_e.string},18016:{name:"mimeType",value:_e.string},18012:{name:"data",value:_e.binary},18094:{name:"uid",value:_e.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:_e.uid},145:{name:"timeStart",value:_e.uint},146:{name:"timeEnd",value:_e.uid},152:{name:"hidden",value:_e.bool},17816:{name:"enabled",value:_e.uid},143:{name:"track",container:{137:{name:"trackNumber",value:_e.uid},128:{name:"display",container:{133:{name:"string",value:_e.string},17276:{name:"language ",value:_e.string},17278:{name:"country ",value:_e.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:_e.uid},25540:{name:"tagChapterUID",value:_e.uint},25542:{name:"tagAttachmentUID",value:_e.uid},25546:{name:"targetType",value:_e.string},26826:{name:"targetTypeValue",value:_e.uint},25545:{name:"tagEditionUID",value:_e.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:_e.string},17543:{name:"string",value:_e.string},17541:{name:"binary",value:_e.binary},17530:{name:"language",value:_e.string},17531:{name:"languageIETF",value:_e.string},17540:{name:"default",value:_e.bool}}}}}}}}}}}});function BU(n,t){return Number(uze(n,t))}function uze(n,t){let o=new Uint8Array(8),i=n.subarray(0,t);try{return o.set(i,8-t),Js.get(o,0)}catch{return BigInt(-1)}}function $ie(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,$ie(t)}),n}function nd(n){let t="";return n.parent&&n.parent.name!=="dtd"&&(t+=`${nd(n.parent)}/`),t+n.name}var Xie,IE,Ab,$s,tb,eoe=ue(()=>{DA();Xie=ze(lt(),1);tn();CU();DA();rr();IE=(0,Xie.default)("music-metadata:parser:ebml"),Ab=class extends mt("EBML"){},$s={ReadNext:0,IgnoreElement:2,SkipSiblings:3,TerminateParsing:4,SkipElement:5},tb=class{constructor(t){this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=t,this.parserMap.set(_e.uint,o=>this.readUint(o)),this.parserMap.set(_e.string,o=>this.readString(o)),this.parserMap.set(_e.binary,o=>this.readBuffer(o)),this.parserMap.set(_e.uid,async o=>this.readBuffer(o)),this.parserMap.set(_e.bool,o=>this.readFlag(o)),this.parserMap.set(_e.float,o=>this.readFloat(o))}async iterate(t,o,i){return this.parseContainer($ie(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:IE(`Go to next element: name=${nd(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`);break;case $s.IgnoreElement:IE(`Ignore element: name=${nd(r)}, element.id=0x${a.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(a.len);break;case $s.SkipSiblings:IE(`Ignore remaining container, at: name=${nd(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 IE(`Terminate parsing at element: name=${nd(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:IE(`parseEbml: parent=${nd(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(QA),i=128,e=1;for(;(o&i)===0;){if(e>t)throw new Ab("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:BU(t,t.length),len:BU(o,o.length)}}async readFloat(t){switch(t.len){case 0:return 0;case 4:return this.tokenizer.readNumber(M2);case 8:return this.tokenizer.readNumber(QO);case 10:return this.tokenizer.readNumber(QO);default:throw new Ab(`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 BU(o,t.len)}async readString(t){return(await this.tokenizer.readToken(new We(t.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(t){let o=new Uint8Array(t.len);return await this.tokenizer.readBuffer(o),o}}});var toe={};Lr(toe,{MatroskaParser:()=>fU});var Aoe,rb,fU,roe=ue(()=>{Aoe=ze(lt(),1);Zi();Zie();H2();eoe();rb=(0,Aoe.default)("music-metadata:parser:matroska"),fU=class extends Pt{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 tb(this.tokenizer);rb("Initializing DTD end MatroskaIterator"),await o.iterate(Wie,t,{startNext:i=>{switch(i.id){case 475249515:return rb(`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 rb(`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(rb(`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===Ca.audio).reduce((s,g)=>!s||g.flagDefault&&!s.flagDefault||g.trackNumber{let s=r.target,g=s?.targetTypeValue?lae[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 aoe,ioe=ue(()=>{aoe={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],async load(){return(await Promise.resolve().then(()=>(roe(),toe))).MatroskaParser}}});function coe(n,t,o,i,e){if(yU(`remainingLen=${i}, numberOfEntries=${e} * token-len=${t.len}`),i===0)return[];if(i!==e*t.len)throw new Ac("mismatch number-of-entries with remaining atom-length");let a=[];for(let A=0;A{DA();noe=ze(lt(),1);Qi();rr();ar();rr();yU=(0,noe.default)("music-metadata:parser:MP4:atom"),Ac=class extends mt("MP4"){},sd={len:8,get:(n,t)=>{let o=xe.get(n,t);if(o<0)throw new Ac("Invalid atom header length");return{length:BigInt(o),name:new We(4,"latin1").get(n,t+4)}},put:(n,t,o)=>(xe.put(n,t,Number(o.length)),it.put(n,t+4,o.name))},soe=Js,mU={len:4,get:(n,t)=>({type:new We(4,"ascii").get(n,t)})},ab=class{constructor(t,o,i){if(to&&yU(`Warning: atom ${i} expected to be ${o}, but was actually ${t} bytes long.`),this.len=t}},lE={len:4,get:(n,t)=>{let o=xe.get(n,t)-2082844800;return new Date(o*1e3)}},dE={len:8,get:(n,t)=>{let o=Number(Js.get(n,t))-2082844800;return new Date(o*1e3)}},ib=class extends ab{constructor(t){super(t,24,"mdhd")}get(t,o){let i=QA.get(t,o+0),e=Gr.get(t,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:lE.get(t,o+4),modificationTime:lE.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:dE.get(t,o+4),modificationTime:dE.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(Js.get(t,o+24)),language:LA.get(t,o+32),quality:LA.get(t,o+34)};default:throw new on("Invalid mdhd version header")}}},ob=class extends ab{constructor(t){super(t,100,"mvhd")}get(t,o){let i=QA.get(t,o),e=Gr.get(t,o+1);return i===1?{version:i,flags:e,creationTime:dE.get(t,o+4),modificationTime:dE.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(Js.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:lE.get(t,o+4),modificationTime:lE.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)}}},nb=class{constructor(t){this.len=t}get(t,o){return{type:{set:QA.get(t,o+0),type:Gr.get(t,o+1)},locale:Gr.get(t,o+4),value:new bt(this.len-8).get(t,o+8)}}},sb=class{constructor(t){this.len=t}get(t,o){return{version:QA.get(t,o),flags:Gr.get(t,o+1),name:new We(this.len-4,"utf-8").get(t,o+4)}}},gb=class{constructor(t){this.len=t}get(t,o){let i=QA.get(t,o),e=Gr.get(t,o+1);switch(i){case 0:return{version:i,flags:e,creationTime:lE.get(t,o+4),modificationTime:lE.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:dE.get(t,o+4),modificationTime:dE.get(t,o+12),trackId:xe.get(t,o+20),duration:Number(Js.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 on("Invalid tkhd version header")}}},ooe={len:8,get:(n,t)=>({version:QA.get(n,t),flags:Gr.get(n,t+1),numberOfEntries:xe.get(n,t+4)})},QU=class{constructor(t){this.len=t}get(t,o){let i=this.len-12;return{dataFormat:it.get(t,o),dataReferenceIndex:LA.get(t,o+10),description:i>0?new bt(i).get(t,o+12):void 0}}},Nf=class{constructor(t){this.len=t}get(t,o){let i=ooe.get(t,o);o+=ooe.len;let e=[];for(let a=0;a=this.len){yU("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}},Eb=class{constructor(t){this.len=t}get(t,o){let i=o+1,e=new We(4,"utf-8");return{version:js.get(t,o),flags:Gr.get(t,o+1),componentType:e.get(t,o+4),handlerType:e.get(t,o+8),componentName:new We(this.len-28,"utf-8").get(t,o+28)}}},ub=class{constructor(t){this.len=t}get(t,o){let i=0,e=[];for(;i{doe=ze(lt(),1);vf();vf();loe=(0,doe.default)("music-metadata:parser:MP4:Atom"),Cb=class n{static async readAtom(t,o,i,e){let a=t.position;loe(`Reading next token on offset=${a}...`);let A=await t.readToken(sd),r=A.length===1n;r&&(A.length=await t.readToken(soe));let s=new n(A,r,i),g=s.getPayloadLength(e);return loe(`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(sd)).name==="hdlr"?0:4;return await t.ignore(a),this.readAtoms(t,o,this.getPayloadLength(i)-a)}default:return o(this,i)}}}});var Coe={};Lr(Coe,{MP4Parser:()=>wU});function Eoe(n,t,o){return o.indexOf(n)===t}var uoe,$i,fze,hoe,wU,Boe=ue(()=>{uoe=ze(lt(),1);DA();Zi();Bf();poe();vf();vf();$l();lf();xs();$i=(0,uoe.default)("music-metadata:parser:MP4"),fze="iTunes",hoe={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"}};wU=class n extends Pt{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 ob(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(mU);t-=mU.len;let a=e.type.replace(/\W/g,"");a.length>0&&o.push(a)}$i(`ftyp: ${o.join("/")}`);let i=o.filter(Eoe).join("/");this.metadata.setFormat("container",i)},stsd:async t=>{let o=await this.tokenizer.readToken(new Nf(t)),i=this.getTrackDescription();i.soundSampleDescription=o.table.map(e=>this.parseSoundSampleDescription(e))},stsz:async t=>{let o=await this.tokenizer.readToken(new kf(t)),i=this.getTrackDescription();i.sampleSize=o.sampleSize,i.sampleSizeTable=o.entries},date:async t=>{let o=await this.tokenizer.readToken(new We(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 Ac(`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(sd)).name==="\0\0\0\0"){let A=`Error at offset=${this.tokenizer.position}: box.id=0`;$i(A),this.addWarning(A);break}}catch(a){if(a instanceof Error){let A=`Error at offset=${this.tokenizer.position}: ${a.message}`;$i(A),this.addWarning(A)}else throw a;break}let e=await Cb.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=hoe[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=Ca.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(Eoe).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&&($i("Using duration defined on audio track"),e.samples=e.media.header.duration,e.duration=e.samples/e.sampleRate),e.fragments.length>0){$i("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=hoe[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);$i(`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(fze,t,o)}addWarning(t){$i(`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 sb(a));o+=`:${A.name}`;break}default:{let A=await this.tokenizer.readToken(new bt(a));this.addWarning(`Unsupported meta-item: ${o}[${i.header.name}] => value=${mO(A)} ascii=${Mr(A,"ascii")}`)}}},t.getPayloadLength(0))}async parseValueAtom(t,o){let i=await this.tokenizer.readToken(new nb(Number(o.header.length)-sd.len));if(i.type.set!==0)throw new Ac(`Unsupported type-set != 0: ${i.type.set}`);switch(i.type.type){case 0:switch(t){case"trkn":case"disk":{let e=QA.get(i.value,3),a=QA.get(i.value,5);await this.addTag(t,`${e}/${a}`);break}case"gnre":{let e=QA.get(i.value,1),a=$h[e-1];await this.addTag(t,a);break}case"rate":{let e=Mr(i.value,"ascii");await this.addTag(t,e);break}default:$i(`unknown proprietary value type for: ${o.atomPath}`)}break;case 1:case 18:await this.addTag(t,Mr(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,QA.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 ub(e));o.chapterList=A;break}case"tkhd":o.header=await this.tokenizer.readToken(new gb(a));break;case"hdlr":o.handler=await this.tokenizer.readToken(new Eb(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 ib(a));o.media.header=A;break}case"stco":{let A=await this.tokenizer.readToken(new lb(a));o.chunkOffsetTable=A.entries;break}case"stsc":{let A=await this.tokenizer.readToken(new Ib(a));o.sampleToChunkTable=A.entries;break}case"stsd":{let A=await this.tokenizer.readToken(new Nf(a));o.soundSampleDescription=A.table.map(r=>this.parseSoundSampleDescription(r));break}case"stts":{let A=await this.tokenizer.readToken(new cb(a));o.timeToSampleTable=A.entries;break}case"stsz":{let A=await this.tokenizer.readToken(new kf(a));o.sampleSize=A.sampleSize,o.sampleSizeTable=A.entries;break}case"dinf":case"vmhd":case"smhd":$i(`Ignoring: ${i.header.name}`),await this.tokenizer.ignore(a);break;default:$i(`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 pb(i.getPayloadLength(e));o=await this.tokenizer.readToken(A);break}case"tfdt":await this.tokenizer.ignore(a);break;case"trun":{let A=new hb(a),r=await this.tokenizer.readToken(A);o&&this.tracks.get(o.trackId)?.fragments.push({header:o,trackRun:r});break}default:$i(`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=SU.get(t.description,i);i+=SU.len,e.version===0||e.version===1?o.description=goe.get(t.description,i):$i(`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 Ac("Chapter chunk exceeding token length");await this.tokenizer.ignore(s);let c=await this.tokenizer.readToken(new db(g));$i(`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)};$i(`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{foe={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(()=>(Boe(),Coe))).MP4Parser}}});var woe,yoe,Qze,moe,Soe,Bb,Doe=ue(()=>{DA();woe=ze(lt(),1);ar();yoe=(0,woe.default)("music-metadata:parser:musepack:sv8"),Qze=new We(2,"latin1"),moe={len:5,get:(n,t)=>({crc:Le.get(n,t),streamVersion:QA.get(n,t+4)})},Soe={len:2,get:(n,t)=>({sampleFrequency:[44100,48e3,37800,32e3][XA(n,t,0,3)],maxUsedBands:XA(n,t,3,5),channelCount:XA(n,t+1,0,4)+1,msUsed:La(n,t+1,4),audioBlockFrames:XA(n,t+1,5,3)})},Bb=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(Qze),o=await this.readVariableSizeField();return{key:t,payloadLength:o.value-2-o.len}}async readStreamHeader(t){let o={};yoe(`Reading SH at offset=${this.tokenizer.position}`);let i=await this.tokenizer.readToken(moe);t-=moe.len,Object.assign(o,i),yoe(`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(Soe);return t-=Soe.len,Object.assign(o,A),await this.tokenizer.ignore(t),o}async readVariableSizeField(t=1,o=0){let i=await this.tokenizer.readNumber(QA);return(i&128)===0?{len:t,value:o+i}:(i&=127,i+=o,this.readVariableSizeField(t+1,i<<7))}}});var tc,fb=ue(()=>{rr();tc=class extends mt("Musepack"){}});var Ooe,mze,Qb,boe=ue(()=>{Ooe=ze(lt(),1);Zi();td();Qi();Doe();fb();mze=(0,Ooe.default)("music-metadata:parser:musepack"),Qb=class extends Pt{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(it)!=="MPCK")throw new tc("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){let t=new Bb(this.tokenizer);do{let o=await t.readPacketHeader();switch(mze(`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),Ad(this.metadata,this.tokenizer,this.options);default:throw new tc(`Unexpected header: ${o.key}`)}}while(!0)}}});var yb,Moe=ue(()=>{DA();yb=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(Le);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 _oe,Toe=ue(()=>{DA();ar();xs();_oe={len:24,get:(n,t)=>{let o={signature:Mr(n.subarray(t,t+3),"latin1"),streamMinorVersion:XA(n,t+3,0,4),streamMajorVersion:XA(n,t+3,4,4),frameCount:Le.get(n,t+4),maxLevel:SA.get(n,t+8),sampleFrequency:[44100,48e3,37800,32e3][XA(n,t+10,0,2)],link:XA(n,t+10,2,2),profile:XA(n,t+10,4,4),maxBand:XA(n,t+11,0,6),intensityStereo:La(n,t+11,6),midSideStereo:La(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:Le.get(n,t+20)>>>20&2047,trueGapless:La(n,t+23,0)};return o.lastFrameLength=o.trueGapless?Le.get(n,20)>>>20&2047:0,o}}});var Roe,Noe,mb,koe=ue(()=>{Roe=ze(lt(),1);Zi();td();Moe();Toe();fb();Noe=(0,Roe.default)("music-metadata:parser:musepack"),mb=class extends Pt{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){let t=await this.tokenizer.readToken(_oe);if(t.signature!=="MP+")throw new tc("Unexpected magic number");Noe(`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 yb(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),Noe(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),Ad(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 Goe={};Lr(Goe,{MusepackParser:()=>DU});var Poe,voe,DU,Foe=ue(()=>{Poe=ze(lt(),1);DA();yf();boe();koe();fb();voe=(0,Poe.default)("music-metadata:parser:musepack"),DU=class extends Zs{async postId3v2Parse(){let t=await this.tokenizer.peekToken(new We(3,"latin1")),o;switch(t){case"MP+":{voe("Stream-version 7"),o=new mb(this.metadata,this.tokenizer,this.options);break}case"MPC":{voe("Stream-version 8"),o=new Qb(this.metadata,this.tokenizer,this.options);break}default:throw new tc("Invalid signature prefix")}return this.metadata.setAudioOnly(),o.parse()}}});var Loe,Uoe=ue(()=>{Loe={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],async load(){return(await Promise.resolve().then(()=>(Foe(),Goe))).MusepackParser}}});var Pf,Sb,OU=ue(()=>{DA();rr();Pf=class extends mt("Opus"){},Sb=class{constructor(t){if(t<19)throw new Pf("ID-header-page 0 should be at least 19 bytes long");this.len=t}get(t,o){return{magicSignature:new We(8,"ascii").get(t,o+0),version:QA.get(t,o+8),channelCount:QA.get(t,o+9),preSkip:SA.get(t,o+10),inputSampleRate:Le.get(t,o+12),outputGain:SA.get(t,o+16),channelMapping:QA.get(t,o+18)}}}});var wb,Hoe=ue(()=>{DA();bf();OU();OU();wb=class extends Xs{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 Sb(o.length).get(o,0),this.idHeader.magicSignature!=="OpusHead")throw new Pf("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 We(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 Koe,xoe=ue(()=>{DA();ar();Koe={len:80,get:(n,t)=>({speex:new We(8,"ascii").get(n,t+0),version:OO(new We(20,"ascii").get(n,t+8)),version_id:ur.get(n,t+28),header_size:ur.get(n,t+32),rate:ur.get(n,t+36),mode:ur.get(n,t+40),mode_bitstream_version:ur.get(n,t+44),nb_channels:ur.get(n,t+48),bitrate:ur.get(n,t+52),frame_size:ur.get(n,t+56),vbr:ur.get(n,t+60),frames_per_packet:ur.get(n,t+64),extra_headers:ur.get(n,t+68),reserved1:ur.get(n,t+72),reserved2:ur.get(n,t+76)})}});var Yoe,Oze,Db,joe=ue(()=>{Yoe=ze(lt(),1);bf();xoe();Oze=(0,Yoe.default)("music-metadata:parser:ogg:speex"),Db=class extends Xs{constructor(t,o,i){super(t,o)}parseFirstPage(t,o){Oze("First Ogg/Speex page");let i=Koe.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 Joe,qoe=ue(()=>{DA();Joe={len:42,get:(n,t)=>({id:new We(7,"ascii").get(n,t),vmaj:QA.get(n,t+7),vmin:QA.get(n,t+8),vrev:QA.get(n,t+9),vmbw:LA.get(n,t+10),vmbh:LA.get(n,t+17),nombr:Gr.get(n,t+37),nqual:QA.get(n,t+40)})}});var Voe,zoe,Ob,Woe=ue(()=>{Voe=ze(lt(),1);qoe();zoe=(0,Voe.default)("music-metadata:parser:ogg:theora"),Ob=class{constructor(t,o,i){this.durationOnLastPage=!1,this.metadata=t}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){zoe("duration calculation not implemented")}async parseFirstPage(t,o){zoe("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");let i=Joe.get(o,0);this.metadata.setFormat("bitrate",i.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}});var Zoe,bb,Xoe=ue(()=>{DA();ar();DA();Zoe={len:27,get:(n,t)=>({capturePattern:new We(4,"latin1").get(n,t),version:QA.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(Fr.get(n,t+6)),streamSerialNumber:Le.get(n,t+14),pageSequenceNo:Le.get(n,t+18),pageChecksum:Le.get(n,t+22),page_segments:QA.get(n,t+26)})},bb=class n{static sum(t,o,i){let e=new DataView(t.buffer,0),a=0;for(let A=o;A{$oe=ze(lt(),1);EU();uU();Qi();$O();bU=(0,$oe.default)("music-metadata:parser:ogg:theora"),Mb=class{constructor(t,o,i){this.durationOnLastPage=!1,this.metadata=t,this.options=o,this.tokenizer=i,this.flacParser=new Tf(this.metadata,this.tokenizer,o)}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){bU("duration calculation not implemented")}async parseFirstPage(t,o){if(bU("First Ogg/FLAC page"),(await it.get(o,9)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let e=await Mf.get(o,13);await this.parseDataBlock(e,o.subarray(13+Mf.len))}async parseDataBlock(t,o){switch(bU(`blockHeader type=${t.type}, length=${t.length}`),t.type){case mi.STREAMINFO:{let i=_f.get(o,0);return this.flacParser.processsStreamInfo(i)}case mi.PADDING:break;case mi.APPLICATION:break;case mi.SEEKTABLE:break;case mi.VORBIS_COMMENT:return this.flacParser.parseComment(o);case mi.PICTURE:if(!this.options.skipCovers){let i=new wI(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 tne={};Lr(tne,{OggContentError:()=>pE,OggParser:()=>_U});var Ane,pE,eg,MU,_U,rne=ue(()=>{DA();tn();Ane=ze(lt(),1);Zi();bf();Hoe();joe();Woe();rr();Xoe();ene();pE=class extends mt("Ogg"){},eg=(0,Ane.default)("music-metadata:parser:ogg"),MU=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,eg("serial=%s page#=%s, Ogg.id=%s",o.streamSerialNumber,o.pageSequenceNo,o.capturePattern);let i=await t.readToken(new bb(o));eg("totalPageSize=%s",i.totalPageSize);let e=await t.readToken(new bt(i.totalPageSize));if(eg("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":eg(`Set Ogg stream serial ${o.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new Xs(this.metadata,this.options);break;case"OpusHea":eg("Set page consumer to Ogg/Opus"),this.pageConsumer=new wb(this.metadata,this.options,t);break;case"Speex ":eg("Set page consumer to Ogg/Speex"),this.pageConsumer=new Db(this.metadata,this.options,t);break;case"fishead":case"theora":eg("Set page consumer to Ogg/Theora"),this.pageConsumer=new Ob(this.metadata,this.options,t);break;case"FLAC":eg("Set page consumer to Vorbis"),this.pageConsumer=new Mb(this.metadata,this.options,t);break;default:throw new pE(`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")}},_U=class extends Pt{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(Zoe),o.capturePattern!=="OggS")throw new pE("Invalid Ogg capture pattern");let i=this.streams.get(o.streamSerialNumber);if(i||(i=new MU(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))){eg("Stop processing Ogg stream");break}}while(![...this.streams.values()].every(i=>i.closed))}catch(i){if(i instanceof kA)eg("Reached end-of-stream"),t=!0;else if(i instanceof pE)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 ane,ine=ue(()=>{ane={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(()=>(rne(),tne))).OggParser}}});function Ag(n,t){return _b(n,t,1)===1}function _b(n,t,o){return n>>>t&4294967295>>>32-o}var bze,Gf,Tb,one=ue(()=>{DA();Qi();bze=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],Gf={len:32,get:(n,t)=>{let o=Le.get(n,t+24),i={BlockID:it.get(n,t),blockSize:Le.get(n,t+4),version:SA.get(n,t+8),totalSamples:Le.get(n,t+12),blockIndex:Le.get(n,t+16),blockSamples:Le.get(n,t+20),flags:{bitsPerSample:(1+_b(o,0,2))*8,isMono:Ag(o,2),isHybrid:Ag(o,3),isJointStereo:Ag(o,4),crossChannel:Ag(o,5),hybridNoiseShaping:Ag(o,6),floatingPoint:Ag(o,7),samplingRate:bze[_b(o,23,4)],isDSD:Ag(o,31)},crc:new bt(4).get(n,t+28)};return i.flags.isDSD&&(i.totalSamples*=8),i}},Tb={len:1,get:(n,t)=>({functionId:_b(n[t],0,6),isOptional:Ag(n[t],5),isOddSize:Ag(n[t],6),largeBlock:Ag(n[t],7)})}});var sne={};Lr(sne,{WavPackContentError:()=>hE,WavPackParser:()=>TU});var nne,gd,hE,TU,gne=ue(()=>{DA();td();Qi();Zi();one();nne=ze(lt(),1);lf();rr();gd=(0,nne.default)("music-metadata:parser:WavPack"),hE=class extends mt("WavPack"){},TU=class extends Pt{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),Ad(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(it)!=="wvpk")break;let o=await this.tokenizer.readToken(Gf);if(o.BlockID!=="wvpk")throw new hE("Invalid WavPack Block-ID");gd(`WavPack header blockIndex=${o.blockIndex}, len=${Gf.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-(Gf.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>=Gf.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>Tb.len;){let e=await this.tokenizer.readToken(Tb),a=await this.tokenizer.readNumber(e.largeBlock?sf:QA),A=new Uint8Array(a*2-(e.isOddSize?1:0));switch(await this.tokenizer.readBuffer(A),gd(`Metadata Sub-Blocks functionId=0x${e.functionId.toString(16)}, id.largeBlock=${e.largeBlock},data-size=${A.length}`),e.functionId){case 0:break;case 14:{gd("ID_DSD_BLOCK");let r=1<{cne={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],async load(){return(await Promise.resolve().then(()=>(gne(),sne))).WavPackParser}}});var EE,Nb,lne=ue(()=>{DA();EE={len:8,get:(n,t)=>({chunkID:new We(4,"latin1").get(n,t),chunkSize:Le.get(n,t+4)})},Nb=class{constructor(t){this.tagHeader=t,this.len=t.chunkSize,this.len+=this.len&1}get(t,o){return new We(this.tagHeader.chunkSize,"ascii").get(t,o)}}});var cd,fa,dne,Rb,kb,NU=ue(()=>{DA();rr();cd=class extends mt("Wave"){},fa={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},dne={[fa.PCM]:"PCM",[fa.ADPCM]:"ADPCM",[fa.IEEE_FLOAT]:"IEEE_FLOAT",[fa.ALAW]:"ALAW",[fa.MULAW]:"MULAW",[fa.DVI_ADPCM]:"DVI_ADPCM",[fa.GSM610]:"GSM610",[fa.MPEG_ADTS_AAC]:"MPEG_ADTS_AAC",[fa.MPEG_LOAS]:"MPEG_LOAS",[fa.RAW_AAC1]:"RAW_AAC1",[fa.DOLBY_AC3_SPDIF]:"DOLBY_AC3_SPDIF",[fa.DVM]:"DVM",[fa.RAW_SPORT]:"RAW_SPORT",[fa.ESST_AC3]:"ESST_AC3",[fa.DRM]:"DRM",[fa.DTS2]:"DTS2",[fa.MPEG]:"MPEG",[fa.MPEGLAYER3]:"MPEGLAYER3"},Rb=class{constructor(t){if(t.chunkSize<16)throw new cd("Invalid chunk size");this.len=t.chunkSize}get(t,o){return{wFormatTag:SA.get(t,o),nChannels:SA.get(t,o+2),nSamplesPerSec:Le.get(t,o+4),nAvgBytesPerSec:Le.get(t,o+8),nBlockAlign:SA.get(t,o+12),wBitsPerSample:SA.get(t,o+14)}}},kb=class{constructor(t){if(t.chunkSize<4)throw new cd("Invalid fact chunk size.");this.len=t.chunkSize}get(t,o){return{dwSampleLength:Le.get(t,o)}}}});var RU,pne=ue(()=>{DA();ar();RU={len:420,get:(n,t)=>({description:nn(new We(256,"ascii").get(n,t)).trim(),originator:nn(new We(32,"ascii").get(n,t+256)).trim(),originatorReference:nn(new We(32,"ascii").get(n,t+288)).trim(),originationDate:nn(new We(10,"ascii").get(n,t+320)).trim(),originationTime:nn(new We(8,"ascii").get(n,t+330)).trim(),timeReferenceLow:Le.get(n,t+338),timeReferenceHigh:Le.get(n,t+342),version:SA.get(n,t+346),umid:new bt(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 Ene={};Lr(Ene,{WaveParser:()=>kU});var hne,DI,kU,une=ue(()=>{tn();DA();hne=ze(lt(),1);lne();NU();eE();ar();Qi();Zi();pne();NU();DI=(0,hne.default)("music-metadata:parser:RIFF"),kU=class extends Pt{constructor(){super(...arguments),this.blockAlign=0,this.avgBytesPerSec=0}async parse(){let t=await this.tokenizer.readToken(EE);if(DI(`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(it);switch(this.metadata.setFormat("container",o),o){case"WAVE":return this.readWaveChunk(t-it.len);default:throw new cd(`Unsupported RIFF format: RIFF/${o}`)}}async readWaveChunk(t){for(;t>=EE.len;){let o=await this.tokenizer.readToken(EE);switch(t-=EE.len+o.chunkSize,o.chunkSize>t&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=o,DI(`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 kb(o));break;case"fmt ":{let i=await this.tokenizer.readToken(new Rb(o)),e=dne[i.wFormatTag];e||(DI(`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 bt(o.chunkSize)),e=Bo(i);await new cn().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(RU);Object.keys(i).forEach(a=>{this.metadata.addTag("exif",`bext.${a}`,i[a])});let e=o.chunkSize-RU.len;await this.tokenizer.ignore(e);break}case"\0\0\0\0":DI(`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:DI(`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&&(DI("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(t){let o=await this.tokenizer.readToken(new We(4,"latin1"));switch(DI("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}`),DI(`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(EE),i=new Nb(o),e=await this.tokenizer.readToken(i);this.addTag(o.chunkID,nn(e)),t-=8+i.len}if(t!==0)throw new cd(`Illegal remaining size: ${t}`)}addTag(t,o){this.metadata.addTag("exif",t,o)}}});var Cne,Bne=ue(()=>{Cne={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],async load(){return(await Promise.resolve().then(()=>(une(),Ene))).WaveParser}}});function Tze(n){let t=fne.default.parse(n),o=cae(t.type);return{type:o.type,subtype:o.subtype,suffix:o.suffix,parameters:t.parameters}}function Nze(n){let t=n.lastIndexOf(".");return t===-1?"":n.substring(t)}var fne,Qne,Id,ld,vU=ue(()=>{P2();fne=ze(gae(),1);Iae();Qne=ze(lt(),1);Rae();$l();oie();rr();sie();Qie();Oie();kie();Kie();Vie();ioe();Qoe();Uoe();ine();Ine();Bne();vb();Id=(0,Qne.default)("music-metadata:parser:factory");ld=class{constructor(){this.parsers=[],[zie,iie,nie,foe,aoe,Cne,ane,fie,Rie,cne,Loe,Hie,Die].forEach(t=>{this.registerParser(t)})}registerParser(t){this.parsers.push(t)}async parse(t,o,i){if(t.supportsRandomAccess()?(Id("tokenizer supports random-access, scanning for appending headers"),await PU(t,i)):Id("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){Id("Guess parser on content..."),await t.peekBuffer(r,{mayBeLess:!0});let s=await hf(r,{mpegOffsetTolerance:10});if(!s||!s.mime)throw new EI("Failed to determine audio format");if(Id(`Guessed file type is mime=${s.mime}, extension=${s.ext}`),o=this.findLoaderForContentType(s.mime),!o)throw new uI(`Guessed MIME-type not supported: ${s.mime}`)}}Id(`Loading ${o.parserType} parser...`);let e=new UO(i),a=await o.load(),A=new a(e,t,i??{});return Id(`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===Ca.audio)),e.format.hasVideo===void 0&&e.setFormat("hasVideo",!!e.format.trackInfo.find(r=>r.type===Ca.video))),e.toCommonMetadata()}findLoaderForExtension(t){if(!t)return;let o=Nze(t).toLocaleLowerCase()||t;return this.parsers.find(i=>i.extensions.indexOf(o)!==-1)}findLoaderForContentType(t){let o;if(!t)return;try{o=Tze(t)}catch{Id(`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 yne(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=Mr(o,"latin1");if(e.substring(6)===Rze)return Number.parseInt(e.substring(0,6),10)+15}return 0}var Rze,mne=ue(()=>{xs();Rze="LYRICS200"});async function kze(n,t={}){let o=EO(n);try{return await uE(o,t)}finally{await o.close()}}async function vze(n,t,o={}){let i=hO(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await uE(i,o)}finally{await i.close()}}async function Pze(n,t,o={}){let i=Bo(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});return uE(i,o)}function uE(n,t){return new ld().parse(n,void 0,t)}function Gze(n){let t={};for(let{id:o,value:i}of n)(t[o]||(t[o]=[])).push(i);return t}function Fze(n){return n===void 0?0:1+Math.round(n*4)}function Lze(n){return n?n.reduce((t,o)=>o.name&&o.name.toLowerCase()in["front","cover","cover (front)"]?o:t):null}async function PU(n,t={}){let o=n.fileInfo.size;if(await Kae(n)){o-=128;let i=await yne(n);o-=i}t.apeHeader=await fI.findApeFooterOffset(n,o)}function Uze(){return new ld().getSupportedMimeTypes()}var vb=ue(()=>{tn();vU();td();Bf();mne();$l();rr();rr()});var Dne={};Lr(Dne,{CouldNotDetermineFileTypeError:()=>EI,FieldDecodingError:()=>on,InternalParserError:()=>Xl,LyricsContentType:()=>zh,TimestampFormat:()=>Vh,UnsupportedFileTypeError:()=>uI,getSupportedMimeTypes:()=>Uze,makeParseError:()=>Jh,makeUnexpectedFileContentError:()=>mt,orderTags:()=>Gze,parseBlob:()=>kze,parseBuffer:()=>Pze,parseFile:()=>Kze,parseFromTokenizer:()=>uE,parseStream:()=>Hze,parseWebStream:()=>vze,ratingToStars:()=>Fze,scanAppendingHeaders:()=>PU,selectCover:()=>Lze});async function Hze(n,t,o={}){let i=await y2(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await uE(i,o)}finally{await i.close()}}async function Kze(n,t={}){Sne(`parseFile: ${n}`);let o=await mre(n),i=new ld;try{let e=i.findLoaderForExtension(n);e||Sne("Parser could not be determined by file extension");try{return await i.parse(o,e,t)}catch(a){throw(a instanceof EI||a instanceof uI)&&(a.message+=`: ${n}`),a}}finally{await o.close()}}var wne,Sne,One=ue(()=>{tn();wne=ze(lt(),1);vb();vU();vb();Sne=(0,wne.default)("music-metadata:parser")});var Hse=ee((avA,EH)=>{"use strict";var ZVe=Object.prototype.hasOwnProperty,Si="~";function Wf(){}Object.create&&(Wf.prototype=Object.create(null),new Wf().__proto__||(Si=!1));function XVe(n,t,o){this.fn=n,this.context=t,this.once=o||!1}function Use(n,t,o,i,e){if(typeof o!="function")throw new TypeError("The listener must be a function");var a=new XVe(o,i||n,e),A=Si?Si+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 Vb(n,t){--n._eventsCount===0?n._events=new Wf:delete n._events[t]}function ni(){this._events=new Wf,this._eventsCount=0}ni.prototype.eventNames=function(){var t=[],o,i;if(this._eventsCount===0)return t;for(i in o=this._events)ZVe.call(o,i)&&t.push(Si?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};ni.prototype.listeners=function(t){var o=Si?Si+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 eQ=n=>n&&typeof n.message=="string",_H=n=>{if(!n)return;let t=n.cause;if(typeof t=="function"){let o=n.cause();return eQ(o)?o:void 0}else return eQ(t)?t:void 0},hge=(n,t)=>{if(!eQ(n))return"";let o=n.stack||"";if(t.has(n))return o+` -causes have become circular...`;let i=_H(n);return i?(t.add(n),o+` -caused by: `+hge(i,t)):o},kWe=n=>hge(n,new Set),Ege=(n,t,o)=>{if(!eQ(n))return"";let i=o?"":n.message||"";if(t.has(n))return i+": ...";let e=_H(n);if(e){t.add(n);let a=typeof n.cause=="function";return i+(a?"":": ")+Ege(e,t,a)}else return i},vWe=n=>Ege(n,new Set);uge.exports={isErrorLike:eQ,getErrorCause:_H,stackWithCauses:kWe,messageWithCauses:vWe}});var NH=ee((RGA,Bge)=>{"use strict";var PWe=Symbol("circular-ref-tag"),nM=Symbol("pino-raw-err-ref"),Cge=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[nM]},set:function(n){this[nM]=n}}});Object.defineProperty(Cge,nM,{writable:!0,value:{}});Bge.exports={pinoErrProto:Cge,pinoErrorSymbols:{seen:PWe,rawSymbol:nM}}});var yge=ee((kGA,Qge)=>{"use strict";Qge.exports=kH;var{messageWithCauses:GWe,stackWithCauses:FWe,isErrorLike:fge}=TH(),{pinoErrProto:LWe,pinoErrorSymbols:UWe}=NH(),{seen:RH}=UWe,{toString:HWe}=Object.prototype;function kH(n){if(!fge(n))return n;n[RH]=void 0;let t=Object.create(LWe);t.type=HWe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=GWe(n),t.stack=FWe(n),Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>kH(o)));for(let o in n)if(t[o]===void 0){let i=n[o];fge(i)?o!=="cause"&&!Object.prototype.hasOwnProperty.call(i,RH)&&(t[o]=kH(i)):t[o]=i}return delete n[RH],t.raw=n,t}});var Sge=ee((vGA,mge)=>{"use strict";mge.exports=gM;var{isErrorLike:vH}=TH(),{pinoErrProto:KWe,pinoErrorSymbols:xWe}=NH(),{seen:sM}=xWe,{toString:YWe}=Object.prototype;function gM(n){if(!vH(n))return n;n[sM]=void 0;let t=Object.create(KWe);t.type=YWe.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=>gM(o))),vH(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,sM)&&(t.cause=gM(n.cause));for(let o in n)if(t[o]===void 0){let i=n[o];vH(i)?Object.prototype.hasOwnProperty.call(i,sM)||(t[o]=gM(i)):t[o]=i}return delete n[sM],t.raw=n,t}});var bge=ee((PGA,Oge)=>{"use strict";Oge.exports={mapHttpRequest:jWe,reqSerializer:Dge};var PH=Symbol("pino-raw-req-ref"),wge=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[PH]},set:function(n){this[PH]=n}}});Object.defineProperty(wge,PH,{writable:!0,value:{}});function Dge(n){let t=n.info||n.socket,o=Object.create(wge);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 jWe(n){return{req:Dge(n)}}});var Nge=ee((GGA,Tge)=>{"use strict";Tge.exports={mapHttpResponse:JWe,resSerializer:_ge};var GH=Symbol("pino-raw-res-ref"),Mge=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[GH]},set:function(n){this[GH]=n}}});Object.defineProperty(Mge,GH,{writable:!0,value:{}});function _ge(n){let t=Object.create(Mge);return t.statusCode=n.headersSent?n.statusCode:null,t.headers=n.getHeaders?n.getHeaders():n._headers,t.raw=n,t}function JWe(n){return{res:_ge(n)}}});var LH=ee((FGA,Rge)=>{"use strict";var FH=yge(),qWe=Sge(),cM=bge(),IM=Nge();Rge.exports={err:FH,errWithCause:qWe,mapHttpRequest:cM.mapHttpRequest,mapHttpResponse:IM.mapHttpResponse,req:cM.reqSerializer,res:IM.resSerializer,wrapErrorSerializer:function(t){return t===FH?t:function(i){return t(FH(i))}},wrapRequestSerializer:function(t){return t===cM.reqSerializer?t:function(i){return t(cM.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===IM.resSerializer?t:function(i){return t(IM.resSerializer(i))}}}});var UH=ee((LGA,kge)=>{"use strict";function zWe(n,t){return t}kge.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=zWe;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 Uge=ee((UGA,Lge)=>{"use strict";function HH(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)Gge(c,r);else{let d=typeof o=="function"?o(WWe(c,r),[...s.slice(0,I),...r]):o;Pge(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 t6e(n){if(!Array.isArray(n))throw new TypeError("paths must be an array");for(let t of n)A6e(t)}function r6e(n={}){let{paths:t=[],censor:o="[REDACTED]",serialize:i=JSON.stringify,strict:e=!0,remove:a=!1}=n;t6e(t);let A=$We(t);return function(s){if(e&&(s===null||typeof s!="object")&&(s==null||typeof s!="object"))return i?i(s):s;let g=e6e(s,A),c=s,I=o;return typeof o=="function"&&(I=o),ZWe(g,t,I,a),i===!1?(g.restore=function(){return HH(c)},g):typeof i=="function"?i(g):JSON.stringify(g)}}Lge.exports=r6e});var _E=ee((HGA,Hge)=>{"use strict";var a6e=Symbol("pino.setLevel"),i6e=Symbol("pino.getLevel"),o6e=Symbol("pino.levelVal"),n6e=Symbol("pino.levelComp"),s6e=Symbol("pino.useLevelLabels"),g6e=Symbol("pino.useOnlyCustomLevels"),c6e=Symbol("pino.mixin"),I6e=Symbol("pino.lsCache"),l6e=Symbol("pino.chindings"),d6e=Symbol("pino.asJson"),p6e=Symbol("pino.write"),h6e=Symbol("pino.redactFmt"),E6e=Symbol("pino.time"),u6e=Symbol("pino.timeSliceIndex"),C6e=Symbol("pino.stream"),B6e=Symbol("pino.stringify"),f6e=Symbol("pino.stringifySafe"),Q6e=Symbol("pino.stringifiers"),y6e=Symbol("pino.end"),m6e=Symbol("pino.formatOpts"),S6e=Symbol("pino.messageKey"),w6e=Symbol("pino.errorKey"),D6e=Symbol("pino.nestedKey"),O6e=Symbol("pino.nestedKeyStr"),b6e=Symbol("pino.mixinMergeStrategy"),M6e=Symbol("pino.msgPrefix"),_6e=Symbol("pino.wildcardFirst"),T6e=Symbol.for("pino.serializers"),N6e=Symbol.for("pino.formatters"),R6e=Symbol.for("pino.hooks"),k6e=Symbol.for("pino.metadata");Hge.exports={setLevelSym:a6e,getLevelSym:i6e,levelValSym:o6e,levelCompSym:n6e,useLevelLabelsSym:s6e,mixinSym:c6e,lsCacheSym:I6e,chindingsSym:l6e,asJsonSym:d6e,writeSym:p6e,serializersSym:T6e,redactFmtSym:h6e,timeSym:E6e,timeSliceIndexSym:u6e,streamSym:C6e,stringifySym:B6e,stringifySafeSym:f6e,stringifiersSym:Q6e,endSym:y6e,formatOptsSym:m6e,messageKeySym:S6e,errorKeySym:w6e,nestedKeySym:D6e,wildcardFirstSym:_6e,needsMetadataGsym:k6e,useOnlyCustomLevelsSym:g6e,formattersSym:N6e,hooksSym:R6e,nestedKeyStrSym:O6e,mixinMergeStrategySym:b6e,msgPrefixSym:M6e}});var xH=ee((KGA,jge)=>{"use strict";var Kge=Uge(),{redactFmtSym:v6e,wildcardFirstSym:dM}=_E(),KH=/[^.[\]]+|\[([^[\]]*?)\]/g,xge="[Redacted]",Yge=!1;function P6e(n,t){let{paths:o,censor:i,remove:e}=G6e(n),a=o.reduce((s,g)=>{KH.lastIndex=0;let c=KH.exec(g),I=KH.exec(g),d=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(d==="*"&&(d=dM),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!==dM&&s[d].length===0&&s[d].push(...s[dM]||[]),d===dM&&Object.keys(s).forEach(function(Q){s[Q]&&s[Q].push(f)}),s[d].push(f),s},{}),A={[v6e]:Kge({paths:o,censor:i,serialize:t,strict:Yge,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]=Kge({paths:a[g],censor:c,serialize:t,strict:Yge,remove:e})}return s},A)}function G6e(n){if(Array.isArray(n))return n={paths:n,censor:xge},n;let{paths:t,censor:o=xge,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}}jge.exports=P6e});var zge=ee((xGA,qge)=>{"use strict";var F6e=()=>"",L6e=()=>`,"time":${Date.now()}`,U6e=()=>`,"time":${Math.round(Date.now()/1e3)}`,H6e=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,K6e=1000000n,Jge=1000000000n,x6e=BigInt(Date.now())*K6e,Y6e=process.hrtime.bigint(),j6e=()=>{let n=process.hrtime.bigint()-Y6e,t=x6e+n,o=t/Jge,i=t%Jge,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"`};qge.exports={nullTime:F6e,epochTime:L6e,unixTime:U6e,isoTime:H6e,isoTimeNano:j6e}});var Wge=ee((YGA,Vge)=>{"use strict";function J6e(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}Vge.exports=q6e;function q6e(n,t,o){var i=o&&o.stringify||J6e,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));YH.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(););};YH.exports=n}});var ace=ee((JGA,rce)=>{"use strict";var Wt=$e("fs"),z6e=$e("events"),V6e=$e("util").inherits,Zge=$e("path"),qH=jH(),W6e=$e("assert"),pM=100,hM=Buffer.allocUnsafe(0),Z6e=16*1024,Xge="buffer",$ge="utf8",[X6e,$6e]=(process.versions.node||"0.0").split(".").map(Number),e5e=X6e>=22&&$6e>=7;function ece(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&&Wt.mkdirSync(Zge.dirname(n),{recursive:!0});let a=Wt.openSync(n,i,e);o(null,a)}catch(a){throw o(a),a}else t.mkdir?Wt.mkdir(Zge.dirname(n),{recursive:!0},a=>{if(a)return o(a);Wt.open(n,i,e,o)}):Wt.open(n,i,e,o)}function Xn(n){if(!(this instanceof Xn))return new Xn(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||Z6e,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===Xge)this._writingBuf=hM,this.write=r5e,this.flush=i5e,this.flushSync=n5e,this._actualWrite=g5e,f=()=>Wt.writeSync(this.fd,this._writingBuf),Q=()=>Wt.write(this.fd,this._writingBuf,this.release);else if(d===void 0||d===$ge)this._writingBuf="",this.write=t5e,this.flush=a5e,this.flushSync=o5e,this._actualWrite=s5e,f=()=>Buffer.isBuffer(this._writingBuf)?Wt.writeSync(this.fd,this._writingBuf):Wt.writeSync(this.fd,this._writingBuf,"utf8"),Q=()=>Buffer.isBuffer(this._writingBuf)?Wt.write(this.fd,this._writingBuf,this.release):Wt.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${$ge}" and "${Xge}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")ece(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{qH(pM),this.release(void 0,0)}catch(R){this.release(R)}else setTimeout(Q,pM);else this._writing=!1,this.emit("error",y);return}this.emit("write",m);let T=JH(this._writingBuf,this._len,m);if(this._len=T.len,this._writingBuf=T.writingBuf,this._writingBuf.length){if(!this.sync){Q();return}try{do{let R=f(),H=JH(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&&Wt.fsyncSync(this.fd);let _=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):_>this.minLength?this._actualWrite():this._ending?_>0?this._actualWrite():(this._writing=!1,EM(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(A5e,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 JH(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 A5e(n){n.listenerCount("drain")>0&&(n._asyncDrainScheduled=!1,n.emit("drain"))}V6e(Xn,z6e);function Ace(n,t){return n.length===0?hM:n.length===1?n[0]:Buffer.concat(n,t)}function t5e(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{Wt.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 a5e(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&&tce.call(this,n),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function i5e(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&&tce.call(this,n),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}Xn.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&&Wt.close(t,o=>{if(o)return this.emit("error",o)})}),ece(this.file,this)};Xn.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():EM(this)))};function o5e(){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)?Wt.writeSync(this.fd,n):Wt.writeSync(this.fd,n,"utf8"),o=JH(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;qH(pM)}}try{Wt.fsyncSync(this.fd)}catch{}}function n5e(){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=hM);let n=hM;for(;this._bufs.length||n.length;){n.length<=0&&(n=Ace(this._bufs[0],this._lens[0]));try{let t=Wt.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;qH(pM)}}}Xn.prototype.destroy=function(){this.destroyed||EM(this)};function s5e(){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)?Wt.writeSync(this.fd,this._writingBuf):Wt.writeSync(this.fd,this._writingBuf,"utf8");n(null,t)}catch(t){n(t)}else Wt.write(this.fd,this._writingBuf,n)}function g5e(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Ace(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=Wt.writeSync(this.fd,this._writingBuf);n(null,t)}catch(t){n(t)}else e5e&&(this._writingBuf=Buffer.from(this._writingBuf)),Wt.write(this.fd,this._writingBuf,n)}function EM(n){if(n.fd===-1){n.once("ready",EM.bind(null,n));return}n._periodicFlushTimer!==void 0&&clearInterval(n._periodicFlushTimer),n.destroyed=!0,n._bufs=[],n._lens=[],W6e(typeof n.fd=="number",`sonic.fd must be a number, got ${typeof n.fd}`);try{Wt.fsync(n.fd,t)}catch{}function t(){n.fd!==1&&n.fd!==2?Wt.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")}}Xn.SonicBoom=Xn;Xn.default=Xn;rce.exports=Xn});var zH=ee((qGA,gce)=>{"use strict";var $n={exit:[],beforeExit:[]},ice={exit:l5e,beforeExit:d5e},TE;function c5e(){TE===void 0&&(TE=new FinalizationRegistry(p5e))}function I5e(n){$n[n].length>0||process.on(n,ice[n])}function oce(n){$n[n].length>0||(process.removeListener(n,ice[n]),$n.exit.length===0&&$n.beforeExit.length===0&&(TE=void 0))}function l5e(){nce("exit")}function d5e(){nce("beforeExit")}function nce(n){for(let t of $n[n]){let o=t.deref(),i=t.fn;o!==void 0&&i(o,n)}$n[n]=[]}function p5e(n){for(let t of["exit","beforeExit"]){let o=$n[t].indexOf(n);$n[t].splice(o,o+1),oce(t)}}function sce(n,t,o){if(t===void 0)throw new Error("the object can't be undefined");I5e(n);let i=new WeakRef(t);i.fn=o,c5e(),TE.register(t,i),$n[n].push(i)}function h5e(n,t){sce("exit",n,t)}function E5e(n,t){sce("beforeExit",n,t)}function u5e(n){if(TE!==void 0){TE.unregister(n);for(let t of["exit","beforeExit"])$n[t]=$n[t].filter(o=>{let i=o.deref();return i&&i!==n}),oce(t)}}gce.exports={register:h5e,registerBeforeExit:E5e,unregister:u5e}});var cce=ee((zGA,C5e)=>{C5e.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 lce=ee((VGA,Ice)=>{"use strict";function B5e(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 f5e(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)}Ice.exports={wait:B5e,waitDiff:f5e}});var pce=ee((WGA,dce)=>{"use strict";dce.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var Bce=ee((ZGA,Cce)=>{"use strict";var{version:Q5e}=cce(),{EventEmitter:y5e}=$e("events"),{Worker:m5e}=$e("worker_threads"),{join:S5e}=$e("path"),{pathToFileURL:w5e}=$e("url"),{wait:D5e}=lce(),{WRITE_INDEX:ln,READ_INDEX:eo,SEQ_INDEX:VH}=pce(),O5e=$e("buffer"),b5e=$e("assert"),Te=Symbol("kImpl"),M5e=O5e.constants.MAX_STRING_LENGTH;function NE(n,t){Atomics.add(n[Te].state,VH,1),t(),Atomics.add(n[Te].state,VH,1),Atomics.notify(n[Te].state,VH)}var AQ=class{constructor(t){this._value=t}deref(){return this._value}},CM=class{register(){}unregister(){}},_5e=process.env.NODE_V8_COVERAGE?CM:global.FinalizationRegistry||CM,T5e=process.env.NODE_V8_COVERAGE?AQ:global.WeakRef||AQ,hce=new _5e(n=>{n.exited||n.terminate()});function N5e(n,t){let{filename:o,workerData:i}=t,a=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||S5e(__dirname,"lib","worker.js"),A=new m5e(a,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:o.indexOf("file://")===0?o:w5e(o).href,dataBuf:n[Te].dataBuf,stateBuf:n[Te].stateBuf,workerData:{$context:{threadStreamVersion:Q5e},...i}}});return A.stream=new AQ(n),A.on("message",R5e),A.on("exit",uce),hce.register(n,A),A}function Ece(n){b5e(!n[Te].sync),n[Te].needDrain&&(n[Te].needDrain=!1,n.emit("drain"))}function uM(n){let t=Atomics.load(n[Te].state,ln),o=n[Te].data.length-t;if(o>0){if(n[Te].buf.length===0){n[Te].flushing=!1,n[Te].ending?eK(n):n[Te].needDrain&&process.nextTick(Ece,n);return}let i=n[Te].buf.slice(0,o),e=Buffer.byteLength(i);e<=o?(n[Te].buf=n[Te].buf.slice(o),BM(n,i,uM.bind(null,n))):n.flush(()=>{if(!n.destroyed){for(NE(n,()=>{Atomics.store(n[Te].state,eo,0),Atomics.store(n[Te].state,ln,0)}),Atomics.notify(n[Te].state,eo);e>n[Te].data.length;)o=o/2,i=n[Te].buf.slice(0,o),e=Buffer.byteLength(i);n[Te].buf=n[Te].buf.slice(o),BM(n,i,uM.bind(null,n))}})}else if(o===0){if(t===0&&n[Te].buf.length===0)return;n.flush(()=>{NE(n,()=>{Atomics.store(n[Te].state,eo,0),Atomics.store(n[Te].state,ln,0)}),Atomics.notify(n[Te].state,eo),uM(n)})}else ig(n,new Error("overwritten"))}function R5e(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 T5e(t),t.flush(()=>{t[Te].ready=!0,t.emit("ready")});break;case"ERROR":ig(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:ig(t,new Error("this should not happen: "+n.code))}}function uce(n){let t=this.stream.deref();t!==void 0&&(hce.unregister(t),t.worker.exited=!0,t.worker.off("exit",uce),ig(t,n!==0?new Error("the worker thread exited"):null))}var ZH=class extends y5e{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[Te]={},this[Te].stateBuf=new SharedArrayBuffer(128),this[Te].state=new Int32Array(this[Te].stateBuf),this[Te].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[Te].data=Buffer.from(this[Te].dataBuf),this[Te].sync=t.sync||!1,this[Te].ending=!1,this[Te].ended=!1,this[Te].needDrain=!1,this[Te].destroyed=!1,this[Te].flushing=!1,this[Te].ready=!1,this[Te].finished=!1,this[Te].errored=null,this[Te].closed=!1,this[Te].buf="",this.worker=N5e(this,t),this.on("message",(o,i)=>{this.worker.postMessage(o,i)})}write(t){if(this[Te].destroyed)return XH(this,new Error("the worker has exited")),!1;if(this[Te].ending)return XH(this,new Error("the worker is ending")),!1;if(this[Te].flushing&&this[Te].buf.length+t.length>=M5e)try{WH(this),this[Te].flushing=!0}catch(o){return ig(this,o),!1}if(this[Te].buf+=t,this[Te].sync)try{return WH(this),!0}catch(o){return ig(this,o),!1}return this[Te].flushing||(this[Te].flushing=!0,setImmediate(uM,this)),this[Te].needDrain=this[Te].data.length-this[Te].buf.length-Atomics.load(this[Te].state,ln)<=0,!this[Te].needDrain}end(){this[Te].destroyed||(this[Te].ending=!0,eK(this))}flush(t){if(this[Te].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let o=Atomics.load(this[Te].state,ln);D5e(this[Te].state,eo,o,1/0,(i,e)=>{if(i){ig(this,i),process.nextTick(t,i);return}if(e==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[Te].destroyed||(WH(this),$H(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[Te].ready}get destroyed(){return this[Te].destroyed}get closed(){return this[Te].closed}get writable(){return!this[Te].destroyed&&!this[Te].ending}get writableEnded(){return this[Te].ending}get writableFinished(){return this[Te].finished}get writableNeedDrain(){return this[Te].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[Te].errored}};function XH(n,t){setImmediate(()=>{n.emit("error",t)})}function ig(n,t){n[Te].destroyed||(n[Te].destroyed=!0,t&&(n[Te].errored=t,XH(n,t)),n.worker.exited?setImmediate(()=>{n[Te].closed=!0,n.emit("close")}):n.worker.terminate().catch(()=>{}).then(()=>{n[Te].closed=!0,n.emit("close")}))}function BM(n,t,o){let i=Atomics.load(n[Te].state,ln),e=Buffer.byteLength(t);return n[Te].data.write(t,i),NE(n,()=>{Atomics.store(n[Te].state,ln,i+e)}),o(),!0}function eK(n){if(!(n[Te].ended||!n[Te].ending||n[Te].flushing)){n[Te].ended=!0;try{n.flushSync();let t=Atomics.load(n[Te].state,eo);NE(n,()=>{Atomics.store(n[Te].state,ln,-1)});let o=0;for(;t!==-1;){if(Atomics.wait(n[Te].state,eo,t,1e3),t=Atomics.load(n[Te].state,eo),t===-2){ig(n,new Error("end() failed"));return}if(++o===10){ig(n,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{n[Te].finished=!0,n.emit("finish")})}catch(t){ig(n,t)}}}function WH(n){let t=()=>{n[Te].ending?eK(n):n[Te].needDrain&&process.nextTick(Ece,n)};for(n[Te].flushing=!1;n[Te].buf.length!==0;){let o=Atomics.load(n[Te].state,ln),i=n[Te].data.length-o;if(i===0){$H(n),NE(n,()=>{Atomics.store(n[Te].state,eo,0),Atomics.store(n[Te].state,ln,0)}),Atomics.notify(n[Te].state,eo);continue}else if(i<0)throw new Error("overwritten");let e=n[Te].buf.slice(0,i),a=Buffer.byteLength(e);if(a<=i)n[Te].buf=n[Te].buf.slice(i),BM(n,e,t);else{for($H(n),NE(n,()=>{Atomics.store(n[Te].state,eo,0),Atomics.store(n[Te].state,ln,0)}),Atomics.notify(n[Te].state,eo);a>n[Te].buf.length;)i=i/2,e=n[Te].buf.slice(0,i),a=Buffer.byteLength(e);n[Te].buf=n[Te].buf.slice(i),BM(n,e,t)}}}function $H(n){if(n[Te].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(n[Te].state,ln),o=0;for(;;){let i=Atomics.load(n[Te].state,eo);if(i===-2)throw Error("_flushSync failed");if(i!==t)Atomics.wait(n[Te].state,eo,i,1e3);else break;if(++o===10)throw new Error("_flushSync took too long (10s)")}}Cce.exports=ZH});var rK=ee((XGA,fce)=>{"use strict";var{createRequire:k5e}=$e("module"),v5e=UH(),{join:AK,isAbsolute:P5e,sep:G5e}=$e("node:path"),F5e=jH(),tK=zH(),L5e=Bce();function U5e(n){tK.register(n,K5e),tK.registerBeforeExit(n,x5e),n.on("close",function(){tK.unregister(n)})}function H5e(n,t,o,i){let e=new L5e({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&&U5e(e)}function A(){e.closed||(e.flushSync(),F5e(100),e.end())}return e}function K5e(n){n.ref(),n.flushSync(),n.end(),n.once("close",function(){n.unref()})}function x5e(n){n.flushSync()}function Y5e(n){let{pipeline:t,targets:o,levels:i,dedupe:e,worker:a={},caller:A=v5e(),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"]||AK(__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"]||AK(__dirname,"worker.js"),s.pipelines=[t.map(B=>({...B,target:d(B.target)}))]),i&&(s.levels=i),e&&(s.dedupe=e),s.pinoWillSendConfig=!0,H5e(d(I),s,a,r);function d(B){if(B=c[B]||B,P5e(B)||B.indexOf("file://")===0)return B;if(B==="pino/file")return AK(__dirname,"..","file.js");let f;for(let Q of g)try{let y=Q==="node:repl"?process.cwd()+G5e:Q;f=k5e(y).resolve(B);break}catch{continue}if(!f)throw new Error(`unable to determine transport target for "${B}"`);return f}}fce.exports=Y5e});var mM=ee(($GA,Rce)=>{"use strict";var Qce=$e("node:diagnostics_channel"),yce=Wge(),{mapHttpRequest:j5e,mapHttpResponse:J5e}=LH(),iK=ace(),mce=zH(),{lsCacheSym:q5e,chindingsSym:Oce,writeSym:Sce,serializersSym:bce,formatOptsSym:wce,endSym:z5e,stringifiersSym:Mce,stringifySym:_ce,stringifySafeSym:oK,wildcardFirstSym:Tce,nestedKeySym:V5e,formattersSym:Nce,messageKeySym:W5e,errorKeySym:Z5e,nestedKeyStrSym:X5e,msgPrefixSym:fM}=_E(),{isMainThread:$5e}=$e("worker_threads"),eZe=rK(),yM;typeof Qce.tracingChannel=="function"?yM=Qce.tracingChannel("pino_asJson"):yM={hasSubscribers:!1,traceSync(n,t,o,...i){return n.call(o,...i)}};function RE(){}function AZe(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=j5e(i):typeof i.setHeader=="function"&&(i=J5e(i)));let A;a===null&&e.length===0?A=[null]:(a=e.shift(),A=e),typeof this[fM]=="string"&&a!==void 0&&a!==null&&(a=this[fM]+a),this[Sce](i,yce(a,A,this[wce]),n)}else{let a=i===void 0?e.shift():i;typeof this[fM]=="string"&&a!==void 0&&a!==null&&(a=this[fM]+a),this[Sce](null,yce(a,e,this[wce]),n)}}}function aK(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 tZe(n,t,o,i){if(yM.hasSubscribers===!1)return Dce.call(this,n,t,o,i);let e={instance:this,arguments};return yM.traceSync(Dce,e,this,n,t,o,i)}function Dce(n,t,o,i){let e=this[_ce],a=this[oK],A=this[Mce],r=this[z5e],s=this[Oce],g=this[bce],c=this[Nce],I=this[W5e],d=this[Z5e],B=this[q5e][o]+i;B=B+s;let f;c.log&&(n=c.log(n));let Q=A[Tce],y="";for(let T in n)if(f=n[T],Object.prototype.hasOwnProperty.call(n,T)&&f!==void 0){g[T]?f=g[T](f):T===d&&g.err&&(f=g.err(f));let _=A[T]||Q;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":_&&(f=_(f));break;case"string":f=(_||aK)(f);break;default:f=(_||e)(f,a)}if(f===void 0)continue;let R=aK(T);y+=","+R+":"+f}let m="";if(t!==void 0){f=g[I]?g[I](t):t;let T=A[I]||Q;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":T&&(f=T(f)),m=',"'+I+'":'+f;break;case"string":f=(T||aK)(f),m=',"'+I+'":'+f;break;default:f=(T||e)(f,a),m=',"'+I+'":'+f}}return this[V5e]&&y?B+this[X5e]+y.slice(1)+"}"+m+r:B+y+m+r}function rZe(n,t){let o,i=n[Oce],e=n[_ce],a=n[oK],A=n[Mce],r=A[Tce],s=n[bce],g=n[Nce].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 aZe(n){return n.write!==n.constructor.prototype.write}function QM(n){let t=new iK(n);return t.on("error",o),!n.sync&&$5e&&(mce.register(t,iZe),t.on("close",function(){mce.unregister(t)})),t;function o(i){if(i.code==="EPIPE"){t.write=RE,t.end=RE,t.flushSync=RE,t.destroy=RE;return}t.removeListener("error",o),t.emit("error",i)}}function iZe(n,t){n.destroyed||(t==="beforeExit"?(n.flush(),n.on("drain",function(){n.end()})):n.flushSync())}function oZe(n){return function(o,i,e={},a){if(typeof e=="string")a=QM({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=QM({dest:a})}else if(e instanceof iK||e.writable||e._writableState)a=e,e={};else if(e.transport){if(e.transport instanceof iK||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=eZe({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=RE),a||(aZe(process.stdout)?a=process.stdout:a=QM({fd:process.stdout.fd||1})),{opts:e,stream:a}}}function nZe(n,t){try{return JSON.stringify(n)}catch{try{return(t||this[oK])(n)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function sZe(n,t,o){return{level:n,bindings:t,log:o}}function gZe(n){let t=Number(n);return typeof n=="string"&&Number.isFinite(t)?t:n===void 0?1:n}Rce.exports={noop:RE,buildSafeSonicBoom:QM,asChindings:rZe,asJson:tZe,genLog:AZe,createArgsNormalizer:oZe,stringify:nZe,buildFormatters:sZe,normalizeDestFileDescriptor:gZe}});var SM=ee((eFA,kce)=>{var cZe={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},IZe={ASC:"ASC",DESC:"DESC"};kce.exports={DEFAULT_LEVELS:cZe,SORTING_ORDER:IZe}});var gK=ee((AFA,Fce)=>{"use strict";var{lsCacheSym:lZe,levelValSym:nK,useOnlyCustomLevelsSym:dZe,streamSym:pZe,formattersSym:hZe,hooksSym:EZe,levelCompSym:vce}=_E(),{noop:uZe,genLog:Qd}=mM(),{DEFAULT_LEVELS:og,SORTING_ORDER:Pce}=SM(),Gce={fatal:n=>{let t=Qd(og.fatal,n);return function(...o){let i=this[pZe];if(t.call(this,...o),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:n=>Qd(og.error,n),warn:n=>Qd(og.warn,n),info:n=>Qd(og.info,n),debug:n=>Qd(og.debug,n),trace:n=>Qd(og.trace,n)},sK=Object.keys(og).reduce((n,t)=>(n[og[t]]=t,n),{}),CZe=Object.keys(sK).reduce((n,t)=>(n[t]='{"level":'+Number(t),n),{});function BZe(n){let t=n[hZe].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[lZe]=i,n}function fZe(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 QZe(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[nK],e=this[nK]=o[n],a=this[dZe],A=this[vce],r=this[EZe].logMethod;for(let s in o){if(A(o[s],e)===!1){this[s]=uZe;continue}this[s]=fZe(s,a)?Gce[s](r):Qd(o[s],r)}this.emit("level-change",n,e,t[i],i,this)}function yZe(n){let{levels:t,levelVal:o}=this;return t&&t.labels?t.labels[o]:""}function mZe(n){let{values:t}=this.levels,o=t[n];return o!==void 0&&this[vce](o,this[nK])}function SZe(n,t,o){return n===Pce.DESC?t<=o:t>=o}function wZe(n){return typeof n=="string"?SZe.bind(null,n):n}function DZe(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:sK,o),e=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:og,n);return{labels:i,values:e}}function OZe(n,t,o){if(typeof n=="number"){if(![].concat(Object.keys(t||{}).map(a=>t[a]),o?[]:Object.keys(sK).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:og,t);if(!(n in i))throw Error(`default level:${n} must be included in custom levels`)}function bZe(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 MZe(n){if(typeof n!="function"&&!(typeof n=="string"&&Object.values(Pce).includes(n)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Fce.exports={initialLsCache:CZe,genLsCache:BZe,levelMethods:Gce,getLevel:yZe,setLevel:QZe,isLevelEnabled:mZe,mappings:DZe,assertNoLevelCollisions:bZe,assertDefaultLevelFound:OZe,genLevelComparison:wZe,assertLevelComparison:MZe}});var cK=ee((tFA,Lce)=>{"use strict";Lce.exports={version:"9.14.0"}});var qce=ee((aFA,Jce)=>{"use strict";var{EventEmitter:_Ze}=$e("node:events"),{lsCacheSym:TZe,levelValSym:NZe,setLevelSym:DM,getLevelSym:Uce,chindingsSym:OM,parsedChindingsSym:RZe,mixinSym:kZe,asJsonSym:Kce,writeSym:vZe,mixinMergeStrategySym:PZe,timeSym:GZe,timeSliceIndexSym:FZe,streamSym:xce,serializersSym:yd,formattersSym:tQ,errorKeySym:LZe,messageKeySym:UZe,useOnlyCustomLevelsSym:HZe,needsMetadataGsym:KZe,redactFmtSym:xZe,stringifySym:YZe,formatOptsSym:jZe,stringifiersSym:JZe,msgPrefixSym:lK,hooksSym:qZe}=_E(),{getLevel:zZe,setLevel:VZe,isLevelEnabled:WZe,mappings:ZZe,initialLsCache:XZe,genLsCache:$Ze,assertNoLevelCollisions:e9e}=gK(),{asChindings:dK,asJson:A9e,buildFormatters:IK,stringify:Hce,noop:Yce}=mM(),{version:t9e}=cK(),r9e=xH(),a9e=class{},jce={constructor:a9e,child:i9e,bindings:o9e,setBindings:n9e,flush:c9e,isLevelEnabled:WZe,version:t9e,get level(){return this[Uce]()},set level(n){this[DM](n)},get levelVal(){return this[NZe]},set levelVal(n){throw Error("levelVal is read-only")},get msgPrefix(){return this[lK]},get[Symbol.toStringTag](){return"Pino"},[TZe]:XZe,[vZe]:g9e,[Kce]:A9e,[Uce]:zZe,[DM]:VZe};Object.setPrototypeOf(jce,_Ze.prototype);Jce.exports=function(){return Object.create(jce)};var wM=n=>n;function i9e(n,t){if(!n)throw Error("missing bindings for child Pino");let o=this[yd],i=this[tQ],e=Object.create(this);if(t==null)return e[tQ].bindings!==wM&&(e[tQ]=IK(i.level,wM,i.log)),e[OM]=dK(e,n),e[DM](this.level),this.onChild!==Yce&&this.onChild(e),e;if(t.hasOwnProperty("serializers")===!0){e[yd]=Object.create(null);for(let c in o)e[yd][c]=o[c];let s=Object.getOwnPropertySymbols(o);for(var a=0;a{"use strict";var{hasOwnProperty:rQ}=Object.prototype,Sd=EK();Sd.configure=EK;Sd.stringify=Sd;Sd.default=Sd;uK.stringify=Sd;uK.configure=EK;Wce.exports=Sd;var I9e=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function TI(n){return n.length<5e3&&!I9e.test(n)?`"${n}"`:JSON.stringify(n)}function pK(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 l9e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function hK(n){return l9e.call(n)!==void 0&&n.length!==0}function zce(n,t,o){n.length= 1`)}return o===void 0?1/0:o}function md(n){return n===1?"1 item":`${n} items`}function E9e(n){let t=new Set;for(let o of n)(typeof o=="string"||typeof o=="number")&&t.add(String(o));return t}function u9e(n){if(rQ.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 EK(n){n={...n};let t=u9e(n);t&&(n.bigint===void 0&&(n.bigint=!1),"circularValue"in n||(n.circularValue=Error));let o=d9e(n),i=h9e(n,"bigint"),e=p9e(n),a=typeof e=="function"?e:void 0,A=Vce(n,"maximumDepth"),r=Vce(n,"maximumBreadth");function s(B,f,Q,y,m,T){let _=f[B];switch(typeof _=="object"&&_!==null&&typeof _.toJSON=="function"&&(_=_.toJSON(B)),_=y.call(f,B,_),typeof _){case"string":return TI(_);case"object":{if(_===null)return"null";if(Q.indexOf(_)!==-1)return o;let R="",H=",",F=T;if(Array.isArray(_)){if(_.length===0)return"[]";if(Ar){let k=_.length-r-1;R+=`${H}"... ${md(k)} not stringified"`}return m!==""&&(R+=` -${F}`),Q.pop(),`[${R}]`}let L=Object.keys(_),q=L.length;if(q===0)return"{}";if(Ar){let V=q-r;R+=`${K}"...":${z}"${md(V)} not stringified"`,K=H}return m!==""&&K.length>1&&(R=` +Check the top-level render call using <`+de+">.")}return te}function ux(x,te){if(!(!x._store||x._store.validated||x.key!=null)){x._store.validated=!0;var de=Vle(te);if(!Ex[de]){Ex[de]=!0;var me="";x&&x._owner&&x._owner!==R.current&&(me=" It was passed a child from "+Ce(x._owner.type)+"."),Np(x),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',de,me),Np(null)}}}function Cx(x,te){if(typeof x=="object"){if(je(x))for(var de=0;de",Ve=" Did you accidentally export a JSX literal instead of a component?"):uA=typeof x,k("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",uA,Ve)}var xA=Qe.apply(this,arguments);if(xA==null)return xA;if(me)for(var Et=2;Et10&&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 yx=!1,bQ=null;function epe(x){if(bQ===null)try{var te=("require"+Math.random()).slice(0,7),de=ew&&ew[te];bQ=de.call(ew,"timers").setImmediate}catch{bQ=function(Ve){yx===!1&&(yx=!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=Ve,TA.port2.postMessage(void 0)}}return bQ(x)}var Rp=0,mx=!1;function Sx(x){{var te=Rp;Rp++,_.current===null&&(_.current=[]);var de=_.isBatchingLegacy,me;try{if(_.isBatchingLegacy=!0,me=x(),!de&&_.didScheduleLegacyUpdate){var Ve=_.current;Ve!==null&&(_.didScheduleLegacyUpdate=!1,g_(Ve))}}catch(Ir){throw MQ(te),Ir}finally{_.isBatchingLegacy=de}if(me!==null&&typeof me=="object"&&typeof me.then=="function"){var TA=me,uA=!1,xA={then:function(Ir,Nr){uA=!0,TA.then(function(wi){MQ(te),Rp===0?n_(wi,Ir,Nr):Ir(wi)},function(wi){MQ(te),Nr(wi)})}};return!mx&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){uA||(mx=!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 Et=me;if(MQ(te),Rp===0){var Lt=_.current;Lt!==null&&(g_(Lt),_.current=null);var er={then:function(Ir,Nr){_.current===null?(_.current=[],n_(Et,Ir,Nr)):Ir(Et)}};return er}else{var Ar={then:function(Ir,Nr){Ir(Et)}};return Ar}}}}function MQ(x){x!==Rp-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. "),Rp=x}function n_(x,te,de){{var me=_.current;if(me!==null)try{g_(me),epe(function(){me.length===0?(_.current=null,te(x)):n_(x,te,de)})}catch(Ve){de(Ve)}else te(x)}}var s_=!1;function g_(x){if(!s_){s_=!0;var te=0;try{for(;te{"use strict";process.env.NODE_ENV==="production"?dG.exports=pZ():dG.exports=dZ()});var Kl=ee((umA,wX)=>{"use strict";var lD=$e("crypto"),dKe=$e("assert");function $o(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}function hKe(n,t,o){$o(n),$o(t),$o(o);let a=lD.createCipheriv("aes-256-cbc",n,o);return Buffer.concat([a.update(t),a.final()])}function EKe(n,t,o){$o(n),$o(t),$o(o);let a=lD.createDecipheriv("aes-256-cbc",n,o);return Buffer.concat([a.update(t),a.final()])}function Qh(n,t){$o(n),$o(t);let o=lD.createHmac("sha256",n);return o.update(t),Buffer.from(o.digest())}function uKe(n){$o(n);let t=lD.createHash("sha512");return t.update(n),t.digest()}function CKe(n,t,o,a){if($o(n),$o(t),$o(o),t.byteLength!=32)throw new Error("Got salt of incorrect length");a=a||3,dKe(a>=1&&a<=3);let e=Qh(t,n),i=new Uint8Array(o.byteLength+1+32);i.set(o,32),i[i.length-1]=1;let A=[Qh(e,Buffer.from(i.slice(32)))];return a>1&&(i.set(A[A.length-1]),i[i.length-1]=2,A.push(Qh(e,Buffer.from(i)))),a>2&&(i.set(A[A.length-1]),i[i.length-1]=3,A.push(Qh(e,Buffer.from(i)))),A}function BKe(n,t,o,a){let e=Qh(t,n).slice(0,a);if(o.length!==a||e.length!==a)throw new Error("Bad MAC length");if(!o.equals(e))throw new Error("Bad MAC")}wX.exports={deriveSecrets:CKe,decrypt:EKe,encrypt:hKe,hash:uKe,calculateMAC:Qh,verifyMAC:BKe}});var LX=ee(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});var CmA=new Uint8Array(16),RX=new Uint8Array(32);RX[0]=9;function dA(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]=a>>24&255,n[t+5]=a>>16&255,n[t+6]=a>>8&255,n[t+7]=a&255}function SKe(n,t,o,a,e){var i,A=0;for(i=0;i>>8)-1}function kX(n,t,o,a){return SKe(n,t,o,a,32)}function Wc(n,t){var o;for(o=0;o<16;o++)n[o]=t[o]|0}function JF(n){var t,o,a=1;for(t=0;t<16;t++)o=n[t]+a+65535,a=Math.floor(o/65536),n[t]=o-a*65536;n[0]+=a-1+37*(a-1)}function yh(n,t,o){for(var a,e=~(o-1),i=0;i<16;i++)a=e&(n[i]^t[i]),n[i]^=a,t[i]^=a}function Sh(n,t){var o,a,e,i=dA(),A=dA();for(o=0;o<16;o++)A[o]=t[o];for(JF(A),JF(A),JF(A),a=0;a<2;a++){for(i[0]=A[0]-65517,o=1;o<15;o++)i[o]=A[o]-65535-(i[o-1]>>16&1),i[o-1]&=65535;i[15]=A[15]-32767-(i[14]>>16&1),e=i[15]>>16&1,i[14]&=65535,yh(A,i,1-e)}for(o=0;o<16;o++)n[2*o]=A[o]&255,n[2*o+1]=A[o]>>8}function MX(n,t){var o=new Uint8Array(32),a=new Uint8Array(32);return Sh(o,n),Sh(a,t),kX(o,0,a,0)}function vX(n){var t=new Uint8Array(32);return Sh(t,n),t[0]&1}function ZF(n,t){var o;for(o=0;o<16;o++)n[o]=t[2*o]+(t[2*o+1]<<8);n[15]&=32767}function Kn(n,t,o){for(var a=0;a<16;a++)n[a]=t[a]+o[a]}function Yn(n,t,o){for(var a=0;a<16;a++)n[a]=t[a]-o[a]}function dt(n,t,o){var a,e,i=0,A=0,r=0,s=0,g=0,c=0,I=0,p=0,B=0,f=0,Q=0,y=0,m=0,T=0,_=0,R=0,L=0,U=0,F=0,q=0,z=0,K=0,G=0,V=0,H=0,N=0,k=0,J=0,X=0,ie=0,De=0,oe=o[0],Se=o[1],Be=o[2],Re=o[3],Ne=o[4],Je=o[5],ve=o[6],tA=o[7],fe=o[8],Ie=o[9],Xe=o[10],je=o[11],be=o[12],EA=o[13],hA=o[14],aA=o[15];a=t[0],i+=a*oe,A+=a*Se,r+=a*Be,s+=a*Re,g+=a*Ne,c+=a*Je,I+=a*ve,p+=a*tA,B+=a*fe,f+=a*Ie,Q+=a*Xe,y+=a*je,m+=a*be,T+=a*EA,_+=a*hA,R+=a*aA,a=t[1],A+=a*oe,r+=a*Se,s+=a*Be,g+=a*Re,c+=a*Ne,I+=a*Je,p+=a*ve,B+=a*tA,f+=a*fe,Q+=a*Ie,y+=a*Xe,m+=a*je,T+=a*be,_+=a*EA,R+=a*hA,L+=a*aA,a=t[2],r+=a*oe,s+=a*Se,g+=a*Be,c+=a*Re,I+=a*Ne,p+=a*Je,B+=a*ve,f+=a*tA,Q+=a*fe,y+=a*Ie,m+=a*Xe,T+=a*je,_+=a*be,R+=a*EA,L+=a*hA,U+=a*aA,a=t[3],s+=a*oe,g+=a*Se,c+=a*Be,I+=a*Re,p+=a*Ne,B+=a*Je,f+=a*ve,Q+=a*tA,y+=a*fe,m+=a*Ie,T+=a*Xe,_+=a*je,R+=a*be,L+=a*EA,U+=a*hA,F+=a*aA,a=t[4],g+=a*oe,c+=a*Se,I+=a*Be,p+=a*Re,B+=a*Ne,f+=a*Je,Q+=a*ve,y+=a*tA,m+=a*fe,T+=a*Ie,_+=a*Xe,R+=a*je,L+=a*be,U+=a*EA,F+=a*hA,q+=a*aA,a=t[5],c+=a*oe,I+=a*Se,p+=a*Be,B+=a*Re,f+=a*Ne,Q+=a*Je,y+=a*ve,m+=a*tA,T+=a*fe,_+=a*Ie,R+=a*Xe,L+=a*je,U+=a*be,F+=a*EA,q+=a*hA,z+=a*aA,a=t[6],I+=a*oe,p+=a*Se,B+=a*Be,f+=a*Re,Q+=a*Ne,y+=a*Je,m+=a*ve,T+=a*tA,_+=a*fe,R+=a*Ie,L+=a*Xe,U+=a*je,F+=a*be,q+=a*EA,z+=a*hA,K+=a*aA,a=t[7],p+=a*oe,B+=a*Se,f+=a*Be,Q+=a*Re,y+=a*Ne,m+=a*Je,T+=a*ve,_+=a*tA,R+=a*fe,L+=a*Ie,U+=a*Xe,F+=a*je,q+=a*be,z+=a*EA,K+=a*hA,G+=a*aA,a=t[8],B+=a*oe,f+=a*Se,Q+=a*Be,y+=a*Re,m+=a*Ne,T+=a*Je,_+=a*ve,R+=a*tA,L+=a*fe,U+=a*Ie,F+=a*Xe,q+=a*je,z+=a*be,K+=a*EA,G+=a*hA,V+=a*aA,a=t[9],f+=a*oe,Q+=a*Se,y+=a*Be,m+=a*Re,T+=a*Ne,_+=a*Je,R+=a*ve,L+=a*tA,U+=a*fe,F+=a*Ie,q+=a*Xe,z+=a*je,K+=a*be,G+=a*EA,V+=a*hA,H+=a*aA,a=t[10],Q+=a*oe,y+=a*Se,m+=a*Be,T+=a*Re,_+=a*Ne,R+=a*Je,L+=a*ve,U+=a*tA,F+=a*fe,q+=a*Ie,z+=a*Xe,K+=a*je,G+=a*be,V+=a*EA,H+=a*hA,N+=a*aA,a=t[11],y+=a*oe,m+=a*Se,T+=a*Be,_+=a*Re,R+=a*Ne,L+=a*Je,U+=a*ve,F+=a*tA,q+=a*fe,z+=a*Ie,K+=a*Xe,G+=a*je,V+=a*be,H+=a*EA,N+=a*hA,k+=a*aA,a=t[12],m+=a*oe,T+=a*Se,_+=a*Be,R+=a*Re,L+=a*Ne,U+=a*Je,F+=a*ve,q+=a*tA,z+=a*fe,K+=a*Ie,G+=a*Xe,V+=a*je,H+=a*be,N+=a*EA,k+=a*hA,J+=a*aA,a=t[13],T+=a*oe,_+=a*Se,R+=a*Be,L+=a*Re,U+=a*Ne,F+=a*Je,q+=a*ve,z+=a*tA,K+=a*fe,G+=a*Ie,V+=a*Xe,H+=a*je,N+=a*be,k+=a*EA,J+=a*hA,X+=a*aA,a=t[14],_+=a*oe,R+=a*Se,L+=a*Be,U+=a*Re,F+=a*Ne,q+=a*Je,z+=a*ve,K+=a*tA,G+=a*fe,V+=a*Ie,H+=a*Xe,N+=a*je,k+=a*be,J+=a*EA,X+=a*hA,ie+=a*aA,a=t[15],R+=a*oe,L+=a*Se,U+=a*Be,F+=a*Re,q+=a*Ne,z+=a*Je,K+=a*ve,G+=a*tA,V+=a*fe,H+=a*Ie,N+=a*Xe,k+=a*je,J+=a*be,X+=a*EA,ie+=a*hA,De+=a*aA,i+=38*L,A+=38*U,r+=38*F,s+=38*q,g+=38*z,c+=38*K,I+=38*G,p+=38*V,B+=38*H,f+=38*N,Q+=38*k,y+=38*J,m+=38*X,T+=38*ie,_+=38*De,e=1,a=i+e+65535,e=Math.floor(a/65536),i=a-e*65536,a=A+e+65535,e=Math.floor(a/65536),A=a-e*65536,a=r+e+65535,e=Math.floor(a/65536),r=a-e*65536,a=s+e+65535,e=Math.floor(a/65536),s=a-e*65536,a=g+e+65535,e=Math.floor(a/65536),g=a-e*65536,a=c+e+65535,e=Math.floor(a/65536),c=a-e*65536,a=I+e+65535,e=Math.floor(a/65536),I=a-e*65536,a=p+e+65535,e=Math.floor(a/65536),p=a-e*65536,a=B+e+65535,e=Math.floor(a/65536),B=a-e*65536,a=f+e+65535,e=Math.floor(a/65536),f=a-e*65536,a=Q+e+65535,e=Math.floor(a/65536),Q=a-e*65536,a=y+e+65535,e=Math.floor(a/65536),y=a-e*65536,a=m+e+65535,e=Math.floor(a/65536),m=a-e*65536,a=T+e+65535,e=Math.floor(a/65536),T=a-e*65536,a=_+e+65535,e=Math.floor(a/65536),_=a-e*65536,a=R+e+65535,e=Math.floor(a/65536),R=a-e*65536,i+=e-1+37*(e-1),e=1,a=i+e+65535,e=Math.floor(a/65536),i=a-e*65536,a=A+e+65535,e=Math.floor(a/65536),A=a-e*65536,a=r+e+65535,e=Math.floor(a/65536),r=a-e*65536,a=s+e+65535,e=Math.floor(a/65536),s=a-e*65536,a=g+e+65535,e=Math.floor(a/65536),g=a-e*65536,a=c+e+65535,e=Math.floor(a/65536),c=a-e*65536,a=I+e+65535,e=Math.floor(a/65536),I=a-e*65536,a=p+e+65535,e=Math.floor(a/65536),p=a-e*65536,a=B+e+65535,e=Math.floor(a/65536),B=a-e*65536,a=f+e+65535,e=Math.floor(a/65536),f=a-e*65536,a=Q+e+65535,e=Math.floor(a/65536),Q=a-e*65536,a=y+e+65535,e=Math.floor(a/65536),y=a-e*65536,a=m+e+65535,e=Math.floor(a/65536),m=a-e*65536,a=T+e+65535,e=Math.floor(a/65536),T=a-e*65536,a=_+e+65535,e=Math.floor(a/65536),_=a-e*65536,a=R+e+65535,e=Math.floor(a/65536),R=a-e*65536,i+=e-1+37*(e-1),n[0]=i,n[1]=A,n[2]=r,n[3]=s,n[4]=g,n[5]=c,n[6]=I,n[7]=p,n[8]=B,n[9]=f,n[10]=Q,n[11]=y,n[12]=m,n[13]=T,n[14]=_,n[15]=R}function xn(n,t){dt(n,t,t)}function XF(n,t){var o=dA(),a;for(a=0;a<16;a++)o[a]=t[a];for(a=253;a>=0;a--)xn(o,o),a!==2&&a!==4&&dt(o,o,t);for(a=0;a<16;a++)n[a]=o[a]}function wKe(n,t){var o=dA(),a;for(a=0;a<16;a++)o[a]=t[a];for(a=250;a>=0;a--)xn(o,o),a!==1&&dt(o,o,t);for(a=0;a<16;a++)n[a]=o[a]}function PX(n,t,o){var a=new Uint8Array(32),e=new Float64Array(80),i,A,r=dA(),s=dA(),g=dA(),c=dA(),I=dA(),p=dA();for(A=0;A<31;A++)a[A]=t[A];for(a[31]=t[31]&127|64,a[0]&=248,ZF(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)i=a[A>>>3]>>>(A&7)&1,yh(r,s,i),yh(g,c,i),Kn(I,r,g),Yn(r,r,g),Kn(g,s,c),Yn(s,s,c),xn(c,I),xn(p,r),dt(r,g,r),dt(g,s,I),Kn(I,r,g),Yn(r,r,g),xn(s,r),Yn(g,c,p),dt(r,g,fKe),Kn(r,r,c),dt(g,g,r),dt(r,c,p),dt(c,s,e),xn(s,I),yh(r,s,i),yh(g,c,i);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 XF(B,B),dt(f,f,B),Sh(n,f),0}function DKe(n,t){return PX(n,t,RX)}var _X=[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 TX(n,t,o,a){for(var e=new Int32Array(16),i=new Int32Array(16),A,r,s,g,c,I,p,B,f,Q,y,m,T,_,R,L,U,F,q,z,K,G,V,H,N,k,J=n[0],X=n[1],ie=n[2],De=n[3],oe=n[4],Se=n[5],Be=n[6],Re=n[7],Ne=t[0],Je=t[1],ve=t[2],tA=t[3],fe=t[4],Ie=t[5],Xe=t[6],je=t[7],be=0;a>=128;){for(q=0;q<16;q++)z=8*q+be,e[q]=o[z+0]<<24|o[z+1]<<16|o[z+2]<<8|o[z+3],i[q]=o[z+4]<<24|o[z+5]<<16|o[z+6]<<8|o[z+7];for(q=0;q<80;q++)if(A=J,r=X,s=ie,g=De,c=oe,I=Se,p=Be,B=Re,f=Ne,Q=Je,y=ve,m=tA,T=fe,_=Ie,R=Xe,L=je,K=Re,G=je,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=(oe>>>14|fe<<18)^(oe>>>18|fe<<14)^(fe>>>9|oe<<23),G=(fe>>>14|oe<<18)^(fe>>>18|oe<<14)^(oe>>>9|fe<<23),V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,K=oe&Se^~oe&Be,G=fe&Ie^~fe&Xe,V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,K=_X[q*2],G=_X[q*2+1],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,K=e[q%16],G=i[q%16],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,U=N&65535|k<<16,F=V&65535|H<<16,K=U,G=F,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=(J>>>28|Ne<<4)^(Ne>>>2|J<<30)^(Ne>>>7|J<<25),G=(Ne>>>28|J<<4)^(J>>>2|Ne<<30)^(J>>>7|Ne<<25),V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,K=J&X^J&ie^X&ie,G=Ne&Je^Ne&ve^Je&ve,V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,B=N&65535|k<<16,L=V&65535|H<<16,K=g,G=m,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=U,G=F,V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,g=N&65535|k<<16,m=V&65535|H<<16,X=A,ie=r,De=s,oe=g,Se=c,Be=I,Re=p,J=B,Je=f,ve=Q,tA=y,fe=m,Ie=T,Xe=_,je=R,Ne=L,q%16===15)for(z=0;z<16;z++)K=e[z],G=i[z],V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=e[(z+9)%16],G=i[(z+9)%16],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,U=e[(z+1)%16],F=i[(z+1)%16],K=(U>>>1|F<<31)^(U>>>8|F<<24)^U>>>7,G=(F>>>1|U<<31)^(F>>>8|U<<24)^(F>>>7|U<<25),V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,U=e[(z+14)%16],F=i[(z+14)%16],K=(U>>>19|F<<13)^(F>>>29|U<<3)^U>>>6,G=(F>>>19|U<<13)^(U>>>29|F<<3)^(F>>>6|U<<26),V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,e[z]=N&65535|k<<16,i[z]=V&65535|H<<16;K=J,G=Ne,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[0],G=t[0],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[0]=J=N&65535|k<<16,t[0]=Ne=V&65535|H<<16,K=X,G=Je,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[1],G=t[1],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[1]=X=N&65535|k<<16,t[1]=Je=V&65535|H<<16,K=ie,G=ve,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[2],G=t[2],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[2]=ie=N&65535|k<<16,t[2]=ve=V&65535|H<<16,K=De,G=tA,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[3],G=t[3],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[3]=De=N&65535|k<<16,t[3]=tA=V&65535|H<<16,K=oe,G=fe,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[4],G=t[4],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[4]=oe=N&65535|k<<16,t[4]=fe=V&65535|H<<16,K=Se,G=Ie,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[5],G=t[5],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[5]=Se=N&65535|k<<16,t[5]=Ie=V&65535|H<<16,K=Be,G=Xe,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[6],G=t[6],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[6]=Be=N&65535|k<<16,t[6]=Xe=V&65535|H<<16,K=Re,G=je,V=G&65535,H=G>>>16,N=K&65535,k=K>>>16,K=n[7],G=t[7],V+=G&65535,H+=G>>>16,N+=K&65535,k+=K>>>16,H+=V>>>16,N+=H>>>16,k+=N>>>16,n[7]=Re=N&65535|k<<16,t[7]=je=V&65535|H<<16,be+=128,a-=128}return a}function NB(n,t,o){var a=new Int32Array(8),e=new Int32Array(8),i=new Uint8Array(256),A,r=o;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[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,TX(a,e,t,o),o%=128,A=0;A=0;--e)a=o[e/8|0]>>(e&7)&1,NX(n,t,a),VF(t,n),VF(n,n),NX(n,t,a)}function dD(n,t){var o=[dA(),dA(),dA(),dA()];Wc(o[0],DX),Wc(o[1],OX),Wc(o[2],mh),dt(o[3],DX,OX),GX(n,o,t)}var qF=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 $F(n,t){var o,a,e,i;for(a=63;a>=32;--a){for(o=0,e=a-32,i=a-12;e>8,t[e]-=o*256;t[e]+=o,t[a]=0}for(o=0,e=0;e<32;e++)t[e]+=o-(t[31]>>4)*qF[e],o=t[e]>>8,t[e]&=255;for(e=0;e<32;e++)t[e]-=o*qF[e];for(a=0;a<32;a++)t[a+1]+=t[a]>>8,n[a]=t[a]&255}function RB(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;$F(n,t)}function OKe(n,t,o,a){var e=new Uint8Array(64),i=new Uint8Array(64),A,r,s=new Float64Array(64),g=[dA(),dA(),dA(),dA()];for(A=0;A>7&&Yn(n[0],zF,n[0]),dt(n[3],n[0],n[1]),0)}function _Ke(n,t,o,a){var e,i,A=new Uint8Array(32),r=new Uint8Array(64),s=[dA(),dA(),dA(),dA()],g=[dA(),dA(),dA(),dA()];if(i=-1,o<64||MKe(g,a))return-1;for(e=0;e=0}xg.verify=PKe;function GKe(n){if(Zc(n),n.length!==32)throw new Error("wrong seed length");for(var t=new Uint8Array(32),o=new Uint8Array(32),a=0;a<32;a++)t[a]=n[a];return DKe(o,t),t[0]&=248,t[31]&=127,t[31]|=64,o[31]&=127,{public:o,private:t}}xg.generateKeyPair=GKe;xg.default={}});var Xc=ee(Dh=>{"use strict";var kB=LX(),wh=$e("crypto"),eL=Buffer.from([48,42,48,5,6,3,43,101,110,3,33,0]),AL=Buffer.from([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]),FKe=Buffer.from([5]),tL=function(n){return Buffer.concat([FKe,n])};function UX(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 HX(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 LKe(n){let t=new Uint8Array(n);return t[0]|=6,t[31]|=128,t[31]&=-65,t}Dh.getPublicFromPrivateKey=function(n){let t=LKe(n),o=kB.generateKeyPair(t);return tL(Buffer.from(o.public))};Dh.generateKeyPair=function(){try{let{publicKey:n,privateKey:t}=wh.generateKeyPairSync("x25519",{publicKeyEncoding:{format:"der",type:"spki"},privateKeyEncoding:{format:"der",type:"pkcs8"}}),o=n.slice(eL.length,eL.length+32),a=t.slice(AL.length,AL.length+32);return{pubKey:tL(o),privKey:a}}catch{let t=kB.generateKeyPair(wh.randomBytes(32));return{privKey:Buffer.from(t.private),pubKey:tL(Buffer.from(t.public))}}};Dh.calculateAgreement=function(n,t){if(n=HX(n),UX(t),!n||n.byteLength!=32)throw new Error("Invalid public key");if(typeof wh.diffieHellman=="function"){let o=wh.createPrivateKey({key:Buffer.concat([AL,t]),format:"der",type:"pkcs8"}),a=wh.createPublicKey({key:Buffer.concat([eL,n]),format:"der",type:"spki"});return wh.diffieHellman({privateKey:o,publicKey:a})}else{let o=kB.sharedKey(t,n);return Buffer.from(o)}};Dh.calculateSignature=function(n,t){if(UX(n),!t)throw new Error("Invalid message");return Buffer.from(kB.sign(n,t))};Dh.verifySignature=function(n,t,o,a){if(n=HX(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 a?!0:kB.verify(n,t,o)}});var xX=ee(vB=>{var hD=Xc(),UKe=$e("crypto");function KX(n){return typeof n=="number"&&n%1===0&&n>=0}vB.generateIdentityKeyPair=hD.generateKeyPair;vB.generateRegistrationId=function(){var n=Uint16Array.from(UKe.randomBytes(2))[0];return n&16383};vB.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(!KX(t))throw new TypeError("Invalid argument for signedKeyId: "+t);let o=hD.generateKeyPair(),a=hD.calculateSignature(n.privKey,o.pubKey);return{keyId:t,keyPair:o,signature:a}};vB.generatePreKey=function(n){if(!KX(n))throw new TypeError("Invalid argument for keyId: "+n);let t=hD.generateKeyPair();return{keyId:n,keyPair:t}}});var iL=ee((ymA,YX)=>{var rL=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}};YX.exports=rL});var aL=ee((mmA,jX)=>{var HKe={OURS:1,THEIRS:2};jX.exports=HKe});var oL=ee((SmA,JX)=>{var KKe={SENDING:1,RECEIVING:2};JX.exports=KKe});var BD=ee((wmA,zX)=>{var xKe=aL(),YKe=40,qX="v1";function uD(n){if(!Buffer.isBuffer(n))throw new TypeError("Buffer required")}var CD=class{constructor(){this._chains={}}toString(){return``}inspect(){return this.toString()}addChain(t,o){uD(t);let a=t.toString("base64");if(this._chains.hasOwnProperty(a))throw new Error("Overwrite attempt");this._chains[a]=o}getChain(t){return uD(t),this._chains[t.toString("base64")]}deleteChain(t){uD(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 a of Object.keys(t)){let e=t[a],i={};for(let[A,r]of Object.entries(e.messageKeys))i[A]=r.toString("base64");o[a]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&e.chainKey.key.toString("base64")},chainType:e.chainType,messageKeys:i}}return o}static _deserialize_chains(t){let o={};for(let a of Object.keys(t)){let e=t[a],i={};for(let[A,r]of Object.entries(e.messageKeys))i[A]=Buffer.from(r,"base64");o[a]={chainKey:{counter:e.chainKey.counter,key:e.chainKey.key&&Buffer.from(e.chainKey.key,"base64")},chainType:e.chainType,messageKeys:i}}return o}},ED=[{version:"v1",migrate:function(t){let o=t._sessions;if(t.registrationId)for(let a in o)o[a].registrationId||(o[a].registrationId=t.registrationId);else for(let a in o)o[a].indexInfo.closed===-1&&console.error("V1 session storage migration error: registrationId",t.registrationId,"for open session version",t.version)}}],nL=class{static createEntry(){return new CD}static migrate(t){let o=t.version===void 0;for(let a=0;a{let a=t.indexInfo.used||0,e=o.indexInfo.used||0;return a===e?0:aYKe;){let t,o;for(let[a,e]of Object.entries(this.sessions))e.indexInfo.closed!==-1&&(!o||e.indexInfo.closed{ks.SignalError=class extends Error{};ks.UntrustedIdentityKeyError=class extends ks.SignalError{constructor(t,o){super(),this.name="UntrustedIdentityKeyError",this.addr=t,this.identityKey=o}};ks.SessionError=class extends ks.SignalError{constructor(t){super(t),this.name="SessionError"}};ks.MessageCounterError=class extends ks.SessionError{constructor(t){super(t),this.name="MessageCounterError"}};ks.PreKeyError=class extends ks.SessionError{constructor(t){super(t),this.name="PreKeyError"}}});var sL=ee((NmA,WX)=>{"use strict";var QD=new Map,VX=1e4;async function jKe(n,t){let o=0;for(;;){let a=Math.min(n.length,VX);for(let e=o;e=VX?(n.splice(0,a),o=0):o=a;else break}t()}WX.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;QD.has(n)||(QD.set(n,[]),o=!0);let a=QD.get(n),e=new Promise((i,A)=>a.push({awaitable:t,resolve:i,reject:A}));return o&&jKe(a,()=>QD.delete(n)),e}});var cL=ee((RmA,e7)=>{"use strict";var ZX=aL(),JKe=oL(),XX=BD(),$X=Kl(),$c=Xc(),yD=fD(),qKe=sL(),gL=class{constructor(t,o){this.addr=o,this.storage=t}async initOutgoing(t){let o=this.addr.toString();return await qKe(o,async()=>{if(!await this.storage.isTrustedIdentity(this.addr.id,t.identityKey))throw new yD.UntrustedIdentityKeyError(this.addr.id,t.identityKey);$c.verifySignature(t.identityKey,t.signedPreKey.publicKey,t.signedPreKey.signature,!0);let a=$c.generateKeyPair(),e=t.preKey&&t.preKey.publicKey,i=await this.initSession(!0,a,void 0,t.identityKey,e,t.signedPreKey.publicKey,t.registrationId);i.pendingPreKey={signedKeyId:t.signedPreKey.keyId,baseKey:a.pubKey},t.preKey&&(i.pendingPreKey.preKeyId=t.preKey.keyId);let A=await this.storage.loadSession(o);if(!A)A=new XX;else{let r=A.getOpenSession();r&&A.closeSession(r)}A.setSession(i),await this.storage.storeSession(o,A)})}async initIncoming(t,o){let a=this.addr.toString();if(!await this.storage.isTrustedIdentity(a,o.identityKey))throw new yD.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 yD.PreKeyError("Invalid PreKey ID");let i=await this.storage.loadSignedPreKey(o.signedPreKeyId);if(!i)throw new yD.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,i,o.identityKey,o.baseKey,void 0,o.registrationId)),o.preKeyId}async initSession(t,o,a,e,i,A,r){if(t){if(a)throw new Error("Invalid call to initSession");a=o}else{if(A)throw new Error("Invalid call to initSession");A=i}let s;!o||!i?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=$c.calculateAgreement(A,c.privKey),p=$c.calculateAgreement(e,a.privKey),B=$c.calculateAgreement(A,a.privKey);if(t?(s.set(new Uint8Array(I),32),s.set(new Uint8Array(p),64)):(s.set(new Uint8Array(I),64),s.set(new Uint8Array(p),32)),s.set(new Uint8Array(B),96),o&&i){let y=$c.calculateAgreement(i,o.privKey);s.set(new Uint8Array(y),128)}let f=$X.deriveSecrets(Buffer.from(s),Buffer.alloc(32),Buffer.from("WhisperText")),Q=XX.createEntry();return Q.registrationId=r,Q.currentRatchet={rootKey:f[0],ephemeralKeyPair:t?$c.generateKeyPair():a,lastRemoteEphemeralKey:A,previousCounter:0},Q.indexInfo={created:Date.now(),used:Date.now(),remoteIdentityKey:e,baseKey:t?o.pubKey:i,baseKeyType:t?ZX.OURS:ZX.THEIRS,closed:-1},t&&this.calculateSendingRatchet(Q,A),Q}calculateSendingRatchet(t,o){let a=t.currentRatchet,e=$c.calculateAgreement(o,a.ephemeralKeyPair.privKey),i=$X.deriveSecrets(e,a.rootKey,Buffer.from("WhisperRatchet"));t.addChain(a.ephemeralKeyPair.pubKey,{messageKeys:{},chainKey:{counter:-1,key:i[1]},chainType:JKe.SENDING}),a.rootKey=i[0]}};e7.exports=gL});var t7=ee((kmA,A7)=>{"use strict";var eI=tS(),en=eI.Reader,IL=eI.Writer,nA=eI.util,jn=eI.roots.default||(eI.roots.default={});jn.textsecure=(function(){var n={};return n.WhisperMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 1:A.ephemeralKey=a.bytes();break;case 2:A.counter=a.uint32();break;case 3:A.previousCounter=a.uint32();break;case 4:A.ciphertext=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof en||(a=new en(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&!(a.ephemeralKey&&typeof a.ephemeralKey.length=="number"||nA.isString(a.ephemeralKey))?"ephemeralKey: buffer expected":a.counter!=null&&a.hasOwnProperty("counter")&&!nA.isInteger(a.counter)?"counter: integer expected":a.previousCounter!=null&&a.hasOwnProperty("previousCounter")&&!nA.isInteger(a.previousCounter)?"previousCounter: integer expected":a.ciphertext!=null&&a.hasOwnProperty("ciphertext")&&!(a.ciphertext&&typeof a.ciphertext.length=="number"||nA.isString(a.ciphertext))?"ciphertext: buffer expected":null},t.fromObject=function(a){if(a instanceof jn.textsecure.WhisperMessage)return a;var e=new jn.textsecure.WhisperMessage;return a.ephemeralKey!=null&&(typeof a.ephemeralKey=="string"?nA.base64.decode(a.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(a.ephemeralKey)),0):a.ephemeralKey.length&&(e.ephemeralKey=a.ephemeralKey)),a.counter!=null&&(e.counter=a.counter>>>0),a.previousCounter!=null&&(e.previousCounter=a.previousCounter>>>0),a.ciphertext!=null&&(typeof a.ciphertext=="string"?nA.base64.decode(a.ciphertext,e.ciphertext=nA.newBuffer(nA.base64.length(a.ciphertext)),0):a.ciphertext.length&&(e.ciphertext=a.ciphertext)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(e.bytes===String?i.ephemeralKey="":(i.ephemeralKey=[],e.bytes!==Array&&(i.ephemeralKey=nA.newBuffer(i.ephemeralKey))),i.counter=0,i.previousCounter=0,e.bytes===String?i.ciphertext="":(i.ciphertext=[],e.bytes!==Array&&(i.ciphertext=nA.newBuffer(i.ciphertext)))),a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&(i.ephemeralKey=e.bytes===String?nA.base64.encode(a.ephemeralKey,0,a.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(a.ephemeralKey):a.ephemeralKey),a.counter!=null&&a.hasOwnProperty("counter")&&(i.counter=a.counter),a.previousCounter!=null&&a.hasOwnProperty("previousCounter")&&(i.previousCounter=a.previousCounter),a.ciphertext!=null&&a.hasOwnProperty("ciphertext")&&(i.ciphertext=e.bytes===String?nA.base64.encode(a.ciphertext,0,a.ciphertext.length):e.bytes===Array?Array.prototype.slice.call(a.ciphertext):a.ciphertext),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,eI.util.toJSONOptions)},t})(),n.PreKeyWhisperMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 5:A.registrationId=a.uint32();break;case 1:A.preKeyId=a.uint32();break;case 6:A.signedPreKeyId=a.uint32();break;case 2:A.baseKey=a.bytes();break;case 3:A.identityKey=a.bytes();break;case 4:A.message=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof en||(a=new en(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.registrationId!=null&&a.hasOwnProperty("registrationId")&&!nA.isInteger(a.registrationId)?"registrationId: integer expected":a.preKeyId!=null&&a.hasOwnProperty("preKeyId")&&!nA.isInteger(a.preKeyId)?"preKeyId: integer expected":a.signedPreKeyId!=null&&a.hasOwnProperty("signedPreKeyId")&&!nA.isInteger(a.signedPreKeyId)?"signedPreKeyId: integer expected":a.baseKey!=null&&a.hasOwnProperty("baseKey")&&!(a.baseKey&&typeof a.baseKey.length=="number"||nA.isString(a.baseKey))?"baseKey: buffer expected":a.identityKey!=null&&a.hasOwnProperty("identityKey")&&!(a.identityKey&&typeof a.identityKey.length=="number"||nA.isString(a.identityKey))?"identityKey: buffer expected":a.message!=null&&a.hasOwnProperty("message")&&!(a.message&&typeof a.message.length=="number"||nA.isString(a.message))?"message: buffer expected":null},t.fromObject=function(a){if(a instanceof jn.textsecure.PreKeyWhisperMessage)return a;var e=new jn.textsecure.PreKeyWhisperMessage;return a.registrationId!=null&&(e.registrationId=a.registrationId>>>0),a.preKeyId!=null&&(e.preKeyId=a.preKeyId>>>0),a.signedPreKeyId!=null&&(e.signedPreKeyId=a.signedPreKeyId>>>0),a.baseKey!=null&&(typeof a.baseKey=="string"?nA.base64.decode(a.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(a.baseKey)),0):a.baseKey.length&&(e.baseKey=a.baseKey)),a.identityKey!=null&&(typeof a.identityKey=="string"?nA.base64.decode(a.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(a.identityKey)),0):a.identityKey.length&&(e.identityKey=a.identityKey)),a.message!=null&&(typeof a.message=="string"?nA.base64.decode(a.message,e.message=nA.newBuffer(nA.base64.length(a.message)),0):a.message.length&&(e.message=a.message)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(i.preKeyId=0,e.bytes===String?i.baseKey="":(i.baseKey=[],e.bytes!==Array&&(i.baseKey=nA.newBuffer(i.baseKey))),e.bytes===String?i.identityKey="":(i.identityKey=[],e.bytes!==Array&&(i.identityKey=nA.newBuffer(i.identityKey))),e.bytes===String?i.message="":(i.message=[],e.bytes!==Array&&(i.message=nA.newBuffer(i.message))),i.registrationId=0,i.signedPreKeyId=0),a.preKeyId!=null&&a.hasOwnProperty("preKeyId")&&(i.preKeyId=a.preKeyId),a.baseKey!=null&&a.hasOwnProperty("baseKey")&&(i.baseKey=e.bytes===String?nA.base64.encode(a.baseKey,0,a.baseKey.length):e.bytes===Array?Array.prototype.slice.call(a.baseKey):a.baseKey),a.identityKey!=null&&a.hasOwnProperty("identityKey")&&(i.identityKey=e.bytes===String?nA.base64.encode(a.identityKey,0,a.identityKey.length):e.bytes===Array?Array.prototype.slice.call(a.identityKey):a.identityKey),a.message!=null&&a.hasOwnProperty("message")&&(i.message=e.bytes===String?nA.base64.encode(a.message,0,a.message.length):e.bytes===Array?Array.prototype.slice.call(a.message):a.message),a.registrationId!=null&&a.hasOwnProperty("registrationId")&&(i.registrationId=a.registrationId),a.signedPreKeyId!=null&&a.hasOwnProperty("signedPreKeyId")&&(i.signedPreKeyId=a.signedPreKeyId),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,eI.util.toJSONOptions)},t})(),n.KeyExchangeMessage=(function(){function t(o){if(o)for(var a=Object.keys(o),e=0;e>>3){case 1:A.id=a.uint32();break;case 2:A.baseKey=a.bytes();break;case 3:A.ephemeralKey=a.bytes();break;case 4:A.identityKey=a.bytes();break;case 5:A.baseKeySignature=a.bytes();break;default:a.skipType(r&7);break}}return A},t.decodeDelimited=function(a){return a instanceof en||(a=new en(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":a.id!=null&&a.hasOwnProperty("id")&&!nA.isInteger(a.id)?"id: integer expected":a.baseKey!=null&&a.hasOwnProperty("baseKey")&&!(a.baseKey&&typeof a.baseKey.length=="number"||nA.isString(a.baseKey))?"baseKey: buffer expected":a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&!(a.ephemeralKey&&typeof a.ephemeralKey.length=="number"||nA.isString(a.ephemeralKey))?"ephemeralKey: buffer expected":a.identityKey!=null&&a.hasOwnProperty("identityKey")&&!(a.identityKey&&typeof a.identityKey.length=="number"||nA.isString(a.identityKey))?"identityKey: buffer expected":a.baseKeySignature!=null&&a.hasOwnProperty("baseKeySignature")&&!(a.baseKeySignature&&typeof a.baseKeySignature.length=="number"||nA.isString(a.baseKeySignature))?"baseKeySignature: buffer expected":null},t.fromObject=function(a){if(a instanceof jn.textsecure.KeyExchangeMessage)return a;var e=new jn.textsecure.KeyExchangeMessage;return a.id!=null&&(e.id=a.id>>>0),a.baseKey!=null&&(typeof a.baseKey=="string"?nA.base64.decode(a.baseKey,e.baseKey=nA.newBuffer(nA.base64.length(a.baseKey)),0):a.baseKey.length&&(e.baseKey=a.baseKey)),a.ephemeralKey!=null&&(typeof a.ephemeralKey=="string"?nA.base64.decode(a.ephemeralKey,e.ephemeralKey=nA.newBuffer(nA.base64.length(a.ephemeralKey)),0):a.ephemeralKey.length&&(e.ephemeralKey=a.ephemeralKey)),a.identityKey!=null&&(typeof a.identityKey=="string"?nA.base64.decode(a.identityKey,e.identityKey=nA.newBuffer(nA.base64.length(a.identityKey)),0):a.identityKey.length&&(e.identityKey=a.identityKey)),a.baseKeySignature!=null&&(typeof a.baseKeySignature=="string"?nA.base64.decode(a.baseKeySignature,e.baseKeySignature=nA.newBuffer(nA.base64.length(a.baseKeySignature)),0):a.baseKeySignature.length&&(e.baseKeySignature=a.baseKeySignature)),e},t.toObject=function(a,e){e||(e={});var i={};return e.defaults&&(i.id=0,e.bytes===String?i.baseKey="":(i.baseKey=[],e.bytes!==Array&&(i.baseKey=nA.newBuffer(i.baseKey))),e.bytes===String?i.ephemeralKey="":(i.ephemeralKey=[],e.bytes!==Array&&(i.ephemeralKey=nA.newBuffer(i.ephemeralKey))),e.bytes===String?i.identityKey="":(i.identityKey=[],e.bytes!==Array&&(i.identityKey=nA.newBuffer(i.identityKey))),e.bytes===String?i.baseKeySignature="":(i.baseKeySignature=[],e.bytes!==Array&&(i.baseKeySignature=nA.newBuffer(i.baseKeySignature)))),a.id!=null&&a.hasOwnProperty("id")&&(i.id=a.id),a.baseKey!=null&&a.hasOwnProperty("baseKey")&&(i.baseKey=e.bytes===String?nA.base64.encode(a.baseKey,0,a.baseKey.length):e.bytes===Array?Array.prototype.slice.call(a.baseKey):a.baseKey),a.ephemeralKey!=null&&a.hasOwnProperty("ephemeralKey")&&(i.ephemeralKey=e.bytes===String?nA.base64.encode(a.ephemeralKey,0,a.ephemeralKey.length):e.bytes===Array?Array.prototype.slice.call(a.ephemeralKey):a.ephemeralKey),a.identityKey!=null&&a.hasOwnProperty("identityKey")&&(i.identityKey=e.bytes===String?nA.base64.encode(a.identityKey,0,a.identityKey.length):e.bytes===Array?Array.prototype.slice.call(a.identityKey):a.identityKey),a.baseKeySignature!=null&&a.hasOwnProperty("baseKeySignature")&&(i.baseKeySignature=e.bytes===String?nA.base64.encode(a.baseKeySignature,0,a.baseKeySignature.length):e.bytes===Array?Array.prototype.slice.call(a.baseKeySignature):a.baseKeySignature),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,eI.util.toJSONOptions)},t})(),n})();A7.exports=jn});var lL=ee((vmA,r7)=>{"use strict";var{textsecure:{WhisperMessage:zKe,PreKeyWhisperMessage:VKe}}=t7();r7.exports={WhisperMessage:zKe,PreKeyWhisperMessage:VKe}});var n7=ee((PmA,o7)=>{var mD=oL(),WKe=iL(),ZKe=cL(),i7=BD(),Yg=Kl(),a7=Xc(),vs=fD(),Oh=lL(),XKe=sL(),AI=3;function SD(n){if(!(n instanceof Buffer))throw TypeError(`Expected Buffer instead of: ${n.constructor.name}`);return n}var pL=class{constructor(t,o){if(!(o instanceof WKe))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 i7))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 XKe(this.addr.toString(),t)}async encrypt(t){SD(t);let o=await this.storage.getOurIdentity();return await this.queueJob(async()=>{let a=await this.getRecord();if(!a)throw new vs.SessionError("No sessions");let e=a.getOpenSession();if(!e)throw new vs.SessionError("No open session");let i=e.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,i))throw new vs.UntrustedIdentityKeyError(this.addr.id,i);let A=e.getChain(e.currentRatchet.ephemeralKeyPair.pubKey);if(A.chainType===mD.RECEIVING)throw new Error("Tried to encrypt on a receiving chain");this.fillMessageKeys(A,A.chainKey.counter+1);let r=Yg.deriveSecrets(A.messageKeys[A.chainKey.counter],Buffer.alloc(32),Buffer.from("WhisperMessageKeys"));delete A.messageKeys[A.chainKey.counter];let s=Oh.WhisperMessage.create();s.ephemeralKey=e.currentRatchet.ephemeralKeyPair.pubKey,s.counter=A.chainKey.counter,s.previousCounter=e.currentRatchet.previousCounter,s.ciphertext=Yg.encrypt(r[0],t,r[2].slice(0,16));let g=Oh.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(AI,AI),c.set(g,67);let I=Yg.calculateMAC(r[1],c),p=Buffer.alloc(g.byteLength+9);p[0]=this._encodeTupleByte(AI,AI),p.set(g,1),p.set(I.slice(0,8),g.byteLength+1),await this.storeRecord(a);let B,f;if(e.pendingPreKey){B=3;let Q=Oh.PreKeyWhisperMessage.create({identityKey:o.pubKey,registrationId:await this.storage.getOurRegistrationId(),baseKey:e.pendingPreKey.baseKey,signedPreKeyId:e.pendingPreKey.signedKeyId,message:p});e.pendingPreKey.preKeyId&&(Q.preKeyId=e.pendingPreKey.preKeyId),f=Buffer.concat([Buffer.from([this._encodeTupleByte(AI,AI)]),Buffer.from(Oh.PreKeyWhisperMessage.encode(Q).finish())])}else B=1,f=p;return{type:B,body:f,registrationId:e.registrationId}})}async decryptWithSessions(t,o){if(!o.length)throw new vs.SessionError("No sessions available");let a=[];for(let e of o){let i;try{return i=await this.doDecryptWhisperMessage(t,e),e.indexInfo.used=Date.now(),{session:e,plaintext:i}}catch(A){a.push(A)}}console.error("Failed to decrypt message with any known session...");for(let e of a)console.error("Session error:"+e,e.stack);throw new vs.SessionError("No matching sessions found for message")}async decryptWhisperMessage(t){return SD(t),await this.queueJob(async()=>{let o=await this.getRecord();if(!o)throw new vs.SessionError("No session record");let a=await this.decryptWithSessions(t,o.getSessions()),e=a.session.indexInfo.remoteIdentityKey;if(!await this.storage.isTrustedIdentity(this.addr.id,e))throw new vs.UntrustedIdentityKeyError(this.addr.id,e);return o.isClosed(a.session)&&console.warn("Decrypted message with closed session."),await this.storeRecord(o),a.plaintext})}async decryptPreKeyWhisperMessage(t){SD(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 a=await this.getRecord(),e=Oh.PreKeyWhisperMessage.decode(t.slice(1));if(!a){if(e.registrationId==null)throw new Error("No registrationId");a=new i7}let A=await new ZKe(this.storage,this.addr).initIncoming(a,e),r=a.getSession(e.baseKey),s=await this.doDecryptWhisperMessage(e.message,r);return await this.storeRecord(a),A&&await this.storage.removePreKey(A),s})}async doDecryptWhisperMessage(t,o){if(SD(t),!o)throw new TypeError("session required");let a=this._decodeTupleByte(t[0]);if(a[1]>3||a[0]<3)throw new Error("Incompatible version number on WhisperMessage");let e=t.slice(1,-8),i=Oh.WhisperMessage.decode(e);this.maybeStepRatchet(o,i.ephemeralKey,i.previousCounter);let A=o.getChain(i.ephemeralKey);if(A.chainType===mD.SENDING)throw new Error("Tried to decrypt on a sending chain");if(this.fillMessageKeys(A,i.counter),!A.messageKeys.hasOwnProperty(i.counter))throw new vs.MessageCounterError("Key used already or never filled");let r=A.messageKeys[i.counter];delete A.messageKeys[i.counter];let s=Yg.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(AI,AI),c.set(e,67),Yg.verifyMAC(c,s[1],t.slice(-8),8);let I=Yg.decrypt(s[0],i.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 vs.SessionError("Over 2000 messages into the future!");if(t.chainKey.key===void 0)throw new vs.SessionError("Chain closed");let a=t.chainKey.key;return t.messageKeys[t.chainKey.counter+1]=Yg.calculateMAC(a,Buffer.from([1])),t.chainKey.key=Yg.calculateMAC(a,Buffer.from([2])),t.chainKey.counter+=1,this.fillMessageKeys(t,o)}maybeStepRatchet(t,o,a){if(t.getChain(o))return;let e=t.currentRatchet,i=t.getChain(e.lastRemoteEphemeralKey);i&&(this.fillMessageKeys(i,a),delete i.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=a7.generateKeyPair(),this.calculateRatchet(t,o,!0),e.lastRemoteEphemeralKey=o}calculateRatchet(t,o,a){let e=t.currentRatchet,i=a7.calculateAgreement(o,e.ephemeralKeyPair.privKey),A=Yg.deriveSecrets(i,e.rootKey,Buffer.from("WhisperRatchet"),2),r=a?e.ephemeralKeyPair.pubKey:o;t.addChain(r,{messageKeys:{},chainKey:{counter:-1,key:A[1]},chainType:a?mD.SENDING:mD.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))}})}};o7.exports=pL});var s7=ee(jg=>{"use strict";jg.crypto=Kl();jg.curve=Xc();jg.keyhelper=xX();jg.ProtocolAddress=iL();jg.SessionBuilder=cL();jg.SessionCipher=n7();jg.SessionRecord=BD();Object.assign(jg,fD())});var hL=ee((HmA,p7)=>{"use strict";p7.exports=function(...n){try{return JSON.stringify(...n)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var EL=ee((d7,h7)=>{"use strict";var axe=hL();h7.exports=class extends Error{constructor(n){let t=n.filter(o=>o!=="").map(o=>typeof o=="string"?o:o instanceof Error?o.message:axe(o));super(t.join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,d7.assert)}}});var xl=ee((xmA,E7)=>{"use strict";var oxe=EL();E7.exports=function(n,...t){if(!n)throw t.length===1&&t[0]instanceof Error?t[0]:new oxe(t)}});var FB=ee((YmA,C7)=>{"use strict";var uL=xl(),u7={};C7.exports=function(n,t,o){if(t===!1||t===null||t===void 0)return n;o=o||{},typeof o=="string"&&(o={separator:o});let a=Array.isArray(t);uL(!a||!o.separator,"Separator option is not valid for array-based chain");let e=a?t:t.split(o.separator||"."),i=n;for(let A=0;A{"use strict";var B7={};Ba=f7.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};B7.typeMap=new Map([["[object Error]",Ba.error],["[object Map]",Ba.map],["[object Promise]",Ba.promise],["[object Set]",Ba.set],["[object WeakMap]",Ba.weakMap],["[object WeakSet]",Ba.weakSet]]);Ba.getInternalProto=function(n){if(Array.isArray(n))return Ba.array;if(Buffer&&n instanceof Buffer)return Ba.buffer;if(n instanceof Date)return Ba.date;if(n instanceof RegExp)return Ba.regex;if(n instanceof Error)return Ba.error;let t=Object.prototype.toString.call(n);return B7.typeMap.get(t)||Ba.generic}});var DD=ee(Q7=>{"use strict";Q7.keys=function(n,t={}){return t.symbols!==!1?Reflect.ownKeys(n):Object.getOwnPropertyNames(n)}});var OD=ee((JmA,y7)=>{"use strict";var nxe=FB(),Co=CL(),sxe=DD(),qg={needsProtoHack:new Set([Co.set,Co.map,Co.weakSet,Co.weakMap])};y7.exports=qg.clone=function(n,t={},o=null){if(typeof n!="object"||n===null)return n;let a=qg.clone,e=o;if(t.shallow){if(t.shallow!==!0)return qg.cloneWithShallow(n,t);a=s=>s}else if(e){let s=e.get(n);if(s)return s}else e=new Map;let i=Co.getInternalProto(n);if(i===Co.buffer)return Buffer&&Buffer.from(n);if(i===Co.date)return new Date(n.getTime());if(i===Co.regex)return new RegExp(n);let A=qg.base(n,i,t);if(A===n)return n;if(e&&e.set(n,A),i===Co.set)for(let s of n)A.add(a(s,t,e));else if(i===Co.map)for(let[s,g]of n)A.set(s,a(g,t,e));let r=sxe.keys(n,t);for(let s of r){if(s==="__proto__")continue;if(i===Co.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]=a(n[s],t,e):Object.defineProperty(A,s,{enumerable:!1,writable:!0,configurable:!0,value:a(n[s],t,e)}):Object.defineProperty(A,s,{enumerable:!0,writable:!0,configurable:!0,value:a(n[s],t,e)})}return A};qg.cloneWithShallow=function(n,t){let o=t.shallow;t=Object.assign({},t),t.shallow=!1;let a=new Map;for(let e of o){let i=nxe(n,e);(typeof i=="object"||typeof i=="function")&&a.set(i,i)}return qg.clone(n,t,a)};qg.base=function(n,t,o){if(o.prototype===!1)return qg.needsProtoHack.has(t)?new t.constructor:t===Co.array?[]:{};let a=Object.getPrototypeOf(n);if(a&&a.isImmutable)return n;if(t===Co.array){let e=[];return a!==t&&Object.setPrototypeOf(e,a),e}if(qg.needsProtoHack.has(t)){let e=new a.constructor;return a!==t&&Object.setPrototypeOf(e,a),e}return Object.create(a)}});var fL=ee((qmA,w7)=>{"use strict";var BL=xl(),m7=OD(),gxe=DD(),S7={};w7.exports=S7.merge=function(n,t,o){if(BL(n&&typeof n=="object","Invalid target value: must be an object"),BL(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)){BL(Array.isArray(n),"Cannot merge array onto an object"),o.mergeArrays||(n.length=0);for(let e=0;e{"use strict";var bD=xl(),O7=OD(),b7=fL(),D7=FB(),MD={};M7.exports=function(n,t,o={}){if(bD(n&&typeof n=="object","Invalid defaults value: must be an object"),bD(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),bD(typeof o=="object","Invalid options: must be an object"),!t)return null;if(o.shallow)return MD.applyToDefaultsWithShallow(n,t,o);let a=O7(n);if(t===!0)return a;let e=o.nullOverride!==void 0?o.nullOverride:!1;return b7(a,t,{nullOverride:e,mergeArrays:!1})};MD.applyToDefaultsWithShallow=function(n,t,o){let a=o.shallow;bD(Array.isArray(a),"Invalid keys");let e=new Map,i=t===!0?null:new Set;for(let s of a){s=Array.isArray(s)?s:s.split(".");let g=D7(n,s);g&&typeof g=="object"?e.set(g,i&&D7(t,s)||g):i&&i.add(s)}let A=O7(n,{},e);if(!i)return A;for(let s of i)MD.reachCopy(A,t,s);let r=o.nullOverride!==void 0?o.nullOverride:!1;return b7(A,t,{nullOverride:r,mergeArrays:!1})};MD.reachCopy=function(n,t,o){for(let i of o){if(!(i in t))return;let A=t[i];if(typeof A!="object"||A===null)return;t=A}let a=t,e=n;for(let i=0;i{"use strict";var QL={};T7.exports=QL.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=QL.Bench.now()}elapsed(){return QL.Bench.now()-this.ts}static now(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}}});var yL=ee((ZmA,R7)=>{"use strict";R7.exports=function(){}});var v7=ee((XmA,k7)=>{"use strict";var cxe=yL();k7.exports=function(){return new Promise(cxe)}});var mL=ee(($mA,P7)=>{"use strict";var Ps=CL(),sa={mismatched:null};P7.exports=function(n,t,o){return o=Object.assign({prototype:!0},o),!!sa.isDeepEqual(n,t,o,[])};sa.isDeepEqual=function(n,t,o,a){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 i=sa.getSharedType(n,t,!!o.prototype);switch(i){case Ps.buffer:return Buffer&&Buffer.prototype.equals.call(n,t);case Ps.promise:return n===t;case Ps.regex:return n.toString()===t.toString();case sa.mismatched:return!1}for(let A=a.length-1;A>=0;--A)if(a[A].isSame(n,t))return!0;a.push(new sa.SeenEntry(n,t));try{return!!sa.isDeepEqualObj(i,n,t,o,a)}finally{a.pop()}};sa.getSharedType=function(n,t,o){if(o)return Object.getPrototypeOf(n)!==Object.getPrototypeOf(t)?sa.mismatched:Ps.getInternalProto(n);let a=Ps.getInternalProto(n);return a!==Ps.getInternalProto(t)?sa.mismatched:a};sa.valueOf=function(n){let t=n.valueOf;if(t===void 0)return n;try{return t.call(n)}catch(o){return o}};sa.hasOwnEnumerableProperty=function(n,t){return Object.prototype.propertyIsEnumerable.call(n,t)};sa.isSetSimpleEqual=function(n,t){for(let o of Set.prototype.values.call(n))if(!Set.prototype.has.call(t,o))return!1;return!0};sa.isDeepEqualObj=function(n,t,o,a,e){let{isDeepEqual:i,valueOf:A,hasOwnEnumerableProperty:r}=sa,{keys:s,getOwnPropertySymbols:g}=Object;if(n===Ps.array)if(a.part){for(let f of t)for(let Q of o)if(i(f,Q,a,e))return!0}else{if(t.length!==o.length)return!1;for(let f=0;f{"use strict";G7.exports=function(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var L7=ee((tSA,F7)=>{"use strict";var _D=xl(),Ixe=mL(),lxe=SL(),pxe=DD(),Bo={};F7.exports=function(n,t,o={}){return typeof t!="object"&&(t=[t]),_D(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof n=="string"?Bo.string(n,t,o):Array.isArray(n)?Bo.array(n,t,o):(_D(typeof n=="object","Reference must be string or an object"),Bo.object(n,t,o))};Bo.array=function(n,t,o){if(Array.isArray(t)||(t=[t]),!n.length||o.only&&o.once&&n.length!==t.length)return!1;let a,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{a=a||Bo.compare(o);let r=!1;for(let[s,g]of e.entries())if(a(s,A)){++g.allowed,r=!0;break}r||e.set(A,{allowed:1,hits:0})}let i=0;for(let A of n){let r;if(!o.deep||!A||typeof A!="object")r=e.get(A);else{a=a||Bo.compare(o);for(let[s,g]of e.entries())if(a(s,A)){r=g;break}}if(r&&(++r.hits,++i,o.once&&r.hits>r.allowed))return!1}if(o.only&&i!==n.length)return!1;for(let A of e.values())if(A.hits!==A.allowed&&A.hitst.propertyIsEnumerable(s)),i=[...Object.keys(t),...e],A=Bo.compare(o),r=new Set(i);for(let s of a){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 a=new Map,e=[];for(let s of t)if(_D(typeof s=="string","Cannot compare string reference to non-string value"),s){let g=a.get(s);g?++g.allowed:(a.set(s,{allowed:1,hits:0}),e.push(lxe(s)))}else if(o.once||o.only)return!1;if(!e.length)return!0;let i=new RegExp(`(${e.join("|")})`,"g"),A=n.replace(i,(s,g)=>(++a.get(g).hits,""));if(o.only&&A)return!1;let r=!1;for(let s of a.values())if(s.hits&&(r=!0),s.hits!==s.allowed&&(s.hitsIxe(e,i,a)};Bo.shallow=function(n,t){return n===t}});var H7=ee((rSA,U7)=>{"use strict";var dxe=xl();U7.exports=function(n){return dxe(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(n),"Bad attribute value ("+n+")"),n.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var x7=ee((iSA,K7)=>{"use strict";var rI={};K7.exports=function(n){if(!n)return"";let t="";for(let o=0;o=256?"&#"+n+";":`&#x${n.toString(16).padStart(2,"0")};`)};rI.isSafe=function(n){return rI.safeCharCodes.has(n)};rI.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]);rI.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 j7=ee((aSA,Y7)=>{"use strict";var TD={};Y7.exports=function(n){return n?n.replace(/[<>&\u2028\u2029]/g,TD.escape):""};TD.escape=function(n){return TD.replacements.get(n)};TD.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var z7=ee((oSA,q7)=>{"use strict";var J7={};q7.exports=J7.flatten=function(n,t){let o=t||[];for(let a of n)Array.isArray(a)?J7.flatten(a,o):o.push(a);return o}});var Z7=ee((nSA,W7)=>{"use strict";var V7={};W7.exports=function(n,t,o={}){if(!n||!t)return o.first?null:[];let a=[],e=Array.isArray(n)?new Set(n):n,i=new Set;for(let A of t)if(V7.has(e,A)&&!i.has(A)){if(o.first)return A;a.push(A),i.add(A)}return o.first?null:a};V7.has=function(n,t){return typeof n.has=="function"?n.has(t):n[t]!==void 0}});var $7=ee((sSA,X7)=>{"use strict";X7.exports=function(n){return!!n&&typeof n.then=="function"}});var t$=ee((gSA,A$)=>{"use strict";var e$={wrapped:Symbol("wrapped")};A$.exports=function(n){if(n[e$.wrapped])return n;let t=!1,o=function(...a){t||(t=!0,n(...a))};return o[e$.wrapped]=!0,o}});var i$=ee((cSA,r$)=>{"use strict";var hxe=FB();r$.exports=function(n,t,o){return t.replace(/{([^{}]+)}/g,(a,e)=>{let i=hxe(n,e,o);return i??""})}});var o$=ee((ISA,a$)=>{"use strict";var Exe={maxTimer:2147483647};a$.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(a=>{let e=o?o.setTimeout:setTimeout,i=()=>{let A=Math.min(n,Exe.maxTimer);n-=A,e(()=>n>0?i():a(t),A)};n!==1/0&&i()})}});var n$=ee(Er=>{"use strict";Er.applyToDefaults=_7();Er.assert=xl();Er.Bench=N7();Er.block=v7();Er.clone=OD();Er.contain=L7();Er.deepEqual=mL();Er.Error=EL();Er.escapeHeaderAttribute=H7();Er.escapeHtml=x7();Er.escapeJson=j7();Er.escapeRegex=SL();Er.flatten=z7();Er.ignore=yL();Er.intersect=Z7();Er.isPromise=$7();Er.merge=fL();Er.once=t$();Er.reach=FB();Er.reachTemplate=i$();Er.stringify=hL();Er.wait=o$()});var Jr=ee(Pe=>{"use strict";var Yl=n$(),Wa={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"]])};Pe.Boom=class extends Error{constructor(n,t={}){if(n instanceof Error)return Pe.boomify(Yl.clone(n),t);let{statusCode:o=500,data:a=null,ctor:e=Pe.Boom}=t,i=new Error(n||void 0);Error.captureStackTrace(i,e),i.data=a;let A=Wa.initialize(i,o);return Object.defineProperty(A,"typeof",{value:e}),t.decorate&&Object.assign(A,t.decorate),A}static[Symbol.hasInstance](n){return this===Pe.Boom?Pe.isBoom(n):this.prototype.isPrototypeOf(n)}};Pe.isBoom=function(n,t){return n instanceof Error&&!!n.isBoom&&(!t||n.output.statusCode===t)};Pe.boomify=function(n,t){return Yl.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:Wa.initialize(n,t.statusCode||n.output.statusCode,t.message):Wa.initialize(n,t.statusCode||500,t.message)};Pe.badRequest=function(n,t){return new Pe.Boom(n,{statusCode:400,data:t,ctor:Pe.badRequest})};Pe.unauthorized=function(n,t,o){let a=new Pe.Boom(n,{statusCode:401,ctor:Pe.unauthorized});if(!t)return a;if(typeof t!="string")return a.output.headers["WWW-Authenticate"]=t.join(", "),a;let e=`${t}`;return(o||n)&&(a.output.payload.attributes={}),o&&(typeof o=="string"?(e+=" "+Yl.escapeHeaderAttribute(o),a.output.payload.attributes=o):e+=" "+Object.keys(o).map(i=>{let A=o[i];return A==null&&(A=""),a.output.payload.attributes[i]=A,`${i}="${Yl.escapeHeaderAttribute(A.toString())}"`}).join(", ")),n?(o&&(e+=","),e+=` error="${Yl.escapeHeaderAttribute(n)}"`,a.output.payload.attributes.error=n):a.isMissing=!0,a.output.headers["WWW-Authenticate"]=e,a};Pe.paymentRequired=function(n,t){return new Pe.Boom(n,{statusCode:402,data:t,ctor:Pe.paymentRequired})};Pe.forbidden=function(n,t){return new Pe.Boom(n,{statusCode:403,data:t,ctor:Pe.forbidden})};Pe.notFound=function(n,t){return new Pe.Boom(n,{statusCode:404,data:t,ctor:Pe.notFound})};Pe.methodNotAllowed=function(n,t,o){let a=new Pe.Boom(n,{statusCode:405,data:t,ctor:Pe.methodNotAllowed});return typeof o=="string"&&(o=[o]),Array.isArray(o)&&(a.output.headers.Allow=o.join(", ")),a};Pe.notAcceptable=function(n,t){return new Pe.Boom(n,{statusCode:406,data:t,ctor:Pe.notAcceptable})};Pe.proxyAuthRequired=function(n,t){return new Pe.Boom(n,{statusCode:407,data:t,ctor:Pe.proxyAuthRequired})};Pe.clientTimeout=function(n,t){return new Pe.Boom(n,{statusCode:408,data:t,ctor:Pe.clientTimeout})};Pe.conflict=function(n,t){return new Pe.Boom(n,{statusCode:409,data:t,ctor:Pe.conflict})};Pe.resourceGone=function(n,t){return new Pe.Boom(n,{statusCode:410,data:t,ctor:Pe.resourceGone})};Pe.lengthRequired=function(n,t){return new Pe.Boom(n,{statusCode:411,data:t,ctor:Pe.lengthRequired})};Pe.preconditionFailed=function(n,t){return new Pe.Boom(n,{statusCode:412,data:t,ctor:Pe.preconditionFailed})};Pe.entityTooLarge=function(n,t){return new Pe.Boom(n,{statusCode:413,data:t,ctor:Pe.entityTooLarge})};Pe.uriTooLong=function(n,t){return new Pe.Boom(n,{statusCode:414,data:t,ctor:Pe.uriTooLong})};Pe.unsupportedMediaType=function(n,t){return new Pe.Boom(n,{statusCode:415,data:t,ctor:Pe.unsupportedMediaType})};Pe.rangeNotSatisfiable=function(n,t){return new Pe.Boom(n,{statusCode:416,data:t,ctor:Pe.rangeNotSatisfiable})};Pe.expectationFailed=function(n,t){return new Pe.Boom(n,{statusCode:417,data:t,ctor:Pe.expectationFailed})};Pe.teapot=function(n,t){return new Pe.Boom(n,{statusCode:418,data:t,ctor:Pe.teapot})};Pe.badData=function(n,t){return new Pe.Boom(n,{statusCode:422,data:t,ctor:Pe.badData})};Pe.locked=function(n,t){return new Pe.Boom(n,{statusCode:423,data:t,ctor:Pe.locked})};Pe.failedDependency=function(n,t){return new Pe.Boom(n,{statusCode:424,data:t,ctor:Pe.failedDependency})};Pe.tooEarly=function(n,t){return new Pe.Boom(n,{statusCode:425,data:t,ctor:Pe.tooEarly})};Pe.preconditionRequired=function(n,t){return new Pe.Boom(n,{statusCode:428,data:t,ctor:Pe.preconditionRequired})};Pe.tooManyRequests=function(n,t){return new Pe.Boom(n,{statusCode:429,data:t,ctor:Pe.tooManyRequests})};Pe.illegal=function(n,t){return new Pe.Boom(n,{statusCode:451,data:t,ctor:Pe.illegal})};Pe.internal=function(n,t,o=500){return Wa.serverError(n,t,o,Pe.internal)};Pe.notImplemented=function(n,t){return Wa.serverError(n,t,501,Pe.notImplemented)};Pe.badGateway=function(n,t){return Wa.serverError(n,t,502,Pe.badGateway)};Pe.serverUnavailable=function(n,t){return Wa.serverError(n,t,503,Pe.serverUnavailable)};Pe.gatewayTimeout=function(n,t){return Wa.serverError(n,t,504,Pe.gatewayTimeout)};Pe.badImplementation=function(n,t){let o=Wa.serverError(n,t,500,Pe.badImplementation);return o.isDeveloperError=!0,o};Wa.initialize=function(n,t,o){let a=parseInt(t,10);if(Yl.assert(!isNaN(a)&&a>=400,"First argument must be a number (400+):",t),n.isBoom=!0,n.isServer=a>=500,n.hasOwnProperty("data")||(n.data=null),n.output={statusCode:a,payload:{},headers:{}},Object.defineProperty(n,"reformat",{value:Wa.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");Yl.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};Wa.reformat=function(n=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=Wa.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)};Wa.serverError=function(n,t,o,a){return t instanceof Error&&!t.isBoom?Pe.boomify(t,{statusCode:o,message:n}):new Pe.Boom(n,{statusCode:o,data:t,ctor:a})}});var cee,Wxe,Zxe,Xxe,$xe,eYe,AYe,tYe,rYe,iYe,aYe,oYe,nYe,sYe,gYe,O,Fs=ue(()=>{cee=n=>typeof n<"u"&&n!==null,Wxe=n=>typeof n=="object",Zxe=n=>Object.prototype.toString.call(n)==="[object Object]",Xxe=n=>typeof n=="function",$xe=n=>typeof n=="boolean",eYe=n=>n instanceof Buffer,AYe=n=>{if(cee(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},tYe=n=>n instanceof ArrayBuffer,rYe=n=>typeof n=="string"&&n.length>0,iYe=n=>typeof n=="number"&&Number.isFinite(n),aYe=n=>Number.isInteger(n),oYe=(n,t,o)=>n>=t&&n<=o,nYe=(n,t)=>t.includes(n),sYe=(n,t,o)=>new Error(`Expected ${t} for ${n} but received ${o} of type ${typeof o}`),gYe=(n,t)=>(t.message=n.message,t),O={defined:cee,object:Wxe,plainObject:Zxe,fn:Xxe,bool:$xe,buffer:eYe,typedArray:AYe,arrayBuffer:tYe,string:rYe,number:iYe,integer:aYe,inRange:oYe,inArray:nYe,invalidParameterError:sYe,nativeError:gYe}});var pee=ee((ywA,lee)=>{"use strict";var Iee=()=>process.platform==="linux",qD=null,cYe=()=>{if(!qD)if(Iee()&&process.report){let n=process.report.excludeNetwork;process.report.excludeNetwork=!0,qD=process.report.getReport(),process.report.excludeNetwork=n}else qD={};return qD};lee.exports={isLinux:Iee,getReport:cYe}});var hee=ee((mwA,dee)=>{"use strict";var Fh=$e("fs"),IYe="/usr/bin/ldd",lYe="/proc/self/exe",zD=2048,pYe=n=>{let t=Fh.openSync(n,"r"),o=Buffer.alloc(zD),a=Fh.readSync(t,o,0,zD,0);return Fh.close(t,()=>{}),o.subarray(0,a)},dYe=n=>new Promise((t,o)=>{Fh.open(n,"r",(a,e)=>{if(a)o(a);else{let i=Buffer.alloc(zD);Fh.read(e,i,0,zD,0,(A,r)=>{t(i.subarray(0,r)),Fh.close(e,()=>{})})}})});dee.exports={LDD_PATH:IYe,SELF_PATH:lYe,readFileSync:pYe,readFile:dYe}});var uee=ee((SwA,Eee)=>{"use strict";var hYe=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),a=n.readUInt16LE(56);for(let e=0;e{"use strict";var Bee=$e("child_process"),{isLinux:Lh,getReport:fee}=pee(),{LDD_PATH:VD,SELF_PATH:Qee,readFile:FL,readFileSync:LL}=hee(),{interpreterPath:yee}=uee(),Ls,Us,Hs,mee="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",cI="",See=()=>cI||new Promise(n=>{Bee.exec(mee,(t,o)=>{cI=t?" ":o,n(cI)})}),wee=()=>{if(!cI)try{cI=Bee.execSync(mee,{encoding:"utf8"})}catch{cI=" "}return cI},Xg="glibc",Dee=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,Wl="musl",EYe=n=>n.includes("libc.musl-")||n.includes("ld-musl-"),Oee=()=>{let n=fee();return n.header&&n.header.glibcVersionRuntime?Xg:Array.isArray(n.sharedObjects)&&n.sharedObjects.some(EYe)?Wl:null},bee=n=>{let[t,o]=n.split(/[\r\n]+/);return t&&t.includes(Xg)?Xg:o&&o.includes(Wl)?Wl:null},Mee=n=>{if(n){if(n.includes("/ld-musl-"))return Wl;if(n.includes("/ld-linux-"))return Xg}return null},_ee=n=>(n=n.toString(),n.includes("musl")?Wl:n.includes("GNU C Library")?Xg:null),uYe=async()=>{if(Us!==void 0)return Us;Us=null;try{let n=await FL(VD);Us=_ee(n)}catch{}return Us},CYe=()=>{if(Us!==void 0)return Us;Us=null;try{let n=LL(VD);Us=_ee(n)}catch{}return Us},BYe=async()=>{if(Ls!==void 0)return Ls;Ls=null;try{let n=await FL(Qee),t=yee(n);Ls=Mee(t)}catch{}return Ls},fYe=()=>{if(Ls!==void 0)return Ls;Ls=null;try{let n=LL(Qee),t=yee(n);Ls=Mee(t)}catch{}return Ls},Tee=async()=>{let n=null;if(Lh()&&(n=await BYe(),!n&&(n=await uYe(),n||(n=Oee()),!n))){let t=await See();n=bee(t)}return n},Nee=()=>{let n=null;if(Lh()&&(n=fYe(),!n&&(n=CYe(),n||(n=Oee()),!n))){let t=wee();n=bee(t)}return n},QYe=async()=>Lh()&&await Tee()!==Xg,yYe=()=>Lh()&&Nee()!==Xg,mYe=async()=>{if(Hs!==void 0)return Hs;Hs=null;try{let t=(await FL(VD)).match(Dee);t&&(Hs=t[1])}catch{}return Hs},SYe=()=>{if(Hs!==void 0)return Hs;Hs=null;try{let t=LL(VD).match(Dee);t&&(Hs=t[1])}catch{}return Hs},Ree=()=>{let n=fee();return n.header&&n.header.glibcVersionRuntime?n.header.glibcVersionRuntime:null},Cee=n=>n.trim().split(/\s+/)[1],kee=n=>{let[t,o,a]=n.split(/[\r\n]+/);return t&&t.includes(Xg)?Cee(t):o&&a&&o.includes(Wl)?Cee(a):null},wYe=async()=>{let n=null;if(Lh()&&(n=await mYe(),n||(n=Ree()),!n)){let t=await See();n=kee(t)}return n},DYe=()=>{let n=null;if(Lh()&&(n=SYe(),n||(n=Ree()),!n)){let t=wee();n=kee(t)}return n};vee.exports={GLIBC:Xg,MUSL:Wl,family:Tee,familySync:Nee,isNonGlibcLinux:QYe,isNonGlibcLinuxSync:yYe,version:wYe,versionSync:DYe}});var Uh=ee((DwA,Pee)=>{"use strict";var OYe="2.0.0",bYe=Number.MAX_SAFE_INTEGER||9007199254740991,MYe=16,_Ye=250,TYe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Pee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:MYe,MAX_SAFE_BUILD_LENGTH:_Ye,MAX_SAFE_INTEGER:bYe,RELEASE_TYPES:TYe,SEMVER_SPEC_VERSION:OYe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var XB=ee((OwA,Gee)=>{"use strict";var NYe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};Gee.exports=NYe});var Hh=ee((Ks,Fee)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:UL,MAX_SAFE_BUILD_LENGTH:RYe,MAX_LENGTH:kYe}=Uh(),vYe=XB();Ks=Fee.exports={};var PYe=Ks.re=[],GYe=Ks.safeRe=[],gA=Ks.src=[],FYe=Ks.safeSrc=[],cA=Ks.t={},LYe=0,HL="[a-zA-Z0-9-]",UYe=[["\\s",1],["\\d",kYe],[HL,RYe]],HYe=n=>{for(let[t,o]of UYe)n=n.split(`${t}*`).join(`${t}{0,${o}}`).split(`${t}+`).join(`${t}{1,${o}}`);return n},JA=(n,t,o)=>{let a=HYe(t),e=LYe++;vYe(n,e,t),cA[n]=e,gA[e]=t,FYe[e]=a,PYe[e]=new RegExp(t,o?"g":void 0),GYe[e]=new RegExp(a,o?"g":void 0)};JA("NUMERICIDENTIFIER","0|[1-9]\\d*");JA("NUMERICIDENTIFIERLOOSE","\\d+");JA("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${HL}*`);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",`${HL}+`);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,${UL}})(?:\\.(\\d{1,${UL}}))?(?:\\.(\\d{1,${UL}}))?`);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);Ks.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);Ks.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);Ks.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 ZD=ee((bwA,Lee)=>{"use strict";var KYe=Object.freeze({loose:!0}),xYe=Object.freeze({}),YYe=n=>n?typeof n!="object"?KYe:n:xYe;Lee.exports=YYe});var KL=ee((MwA,Kee)=>{"use strict";var Uee=/^[0-9]+$/,Hee=(n,t)=>{if(typeof n=="number"&&typeof t=="number")return n===t?0:nHee(t,n);Kee.exports={compareIdentifiers:Hee,rcompareIdentifiers:jYe}});var Pi=ee((_wA,Yee)=>{"use strict";var XD=XB(),{MAX_LENGTH:xee,MAX_SAFE_INTEGER:$D}=Uh(),{safeRe:eO,t:AO}=Hh(),JYe=ZD(),{compareIdentifiers:xL}=KL(),qYe=(n,t)=>{let o=t.split(".");if(o.length>n.length)return!1;for(let a=0;axee)throw new TypeError(`version is longer than ${xee} characters`);XD("SemVer",t,o),this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease;let a=t.trim().match(o.loose?eO[AO.LOOSE]:eO[AO.FULL]);if(!a)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>$D||this.major<0)throw new TypeError("Invalid major version");if(this.minor>$D||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>$D||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let i=+e;if(i>=0&&i<$D)return i}return e}):this.prerelease=[],this.build=a[5]?a[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(XD("SemVer.compare",this.version,this.options,t),!(t instanceof n)){if(typeof t=="string"&&t===this.version)return 0;t=new n(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof n||(t=new n(t,this.options)),this.majort.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 a=this.prerelease[o],e=t.prerelease[o];if(XD("prerelease compare",o,a,e),a===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(a===void 0)return-1;if(a===e)continue;return xL(a,e)}while(++o)}compareBuild(t){t instanceof n||(t=new n(t,this.options));let o=0;do{let a=this.build[o],e=t.build[o];if(XD("build compare",o,a,e),a===void 0&&e===void 0)return 0;if(e===void 0)return 1;if(a===void 0)return-1;if(a===e)continue;return xL(a,e)}while(++o)}inc(t,o,a){if(t.startsWith("pre")){if(!o&&a===!1)throw new Error("invalid increment argument: identifier is empty");if(o){let e=`-${o}`.match(this.options.loose?eO[AO.PRERELEASELOOSE]:eO[AO.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,a);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",o,a);break;case"prepatch":this.prerelease.length=0,this.inc("patch",o,a),this.inc("pre",o,a);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",o,a),this.inc("pre",o,a);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(a)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(o===this.prerelease.join(".")&&a===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(o){let i=[o,e];if(a===!1&&(i=[o]),qYe(this.prerelease,o)){let A=this.prerelease[o.split(".").length];isNaN(A)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Yee.exports=YL});var II=ee((TwA,Jee)=>{"use strict";var jee=Pi(),zYe=(n,t,o=!1)=>{if(n instanceof jee)return n;try{return new jee(n,t)}catch(a){if(!o)return null;throw a}};Jee.exports=zYe});var zee=ee((NwA,qee)=>{"use strict";var VYe=II(),WYe=(n,t)=>{let o=VYe(n,t);return o?o.version:null};qee.exports=WYe});var Wee=ee((RwA,Vee)=>{"use strict";var ZYe=II(),XYe=(n,t)=>{let o=ZYe(n.trim().replace(/^[=v]+/,""),t);return o?o.version:null};Vee.exports=XYe});var $ee=ee((kwA,Xee)=>{"use strict";var Zee=Pi(),$Ye=(n,t,o,a,e)=>{typeof o=="string"&&(e=a,a=o,o=void 0);try{return new Zee(n instanceof Zee?n.version:n,o).inc(t,a,e).version}catch{return null}};Xee.exports=$Ye});var tAe=ee((vwA,AAe)=>{"use strict";var eAe=II(),e1e=(n,t)=>{let o=eAe(n,null,!0),a=eAe(t,null,!0),e=o.compare(a);if(e===0)return null;let i=e>0,A=i?o:a,r=i?a: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!==a.major?c+"major":o.minor!==a.minor?c+"minor":o.patch!==a.patch?c+"patch":"prerelease"};AAe.exports=e1e});var iAe=ee((PwA,rAe)=>{"use strict";var A1e=Pi(),t1e=(n,t)=>new A1e(n,t).major;rAe.exports=t1e});var oAe=ee((GwA,aAe)=>{"use strict";var r1e=Pi(),i1e=(n,t)=>new r1e(n,t).minor;aAe.exports=i1e});var sAe=ee((FwA,nAe)=>{"use strict";var a1e=Pi(),o1e=(n,t)=>new a1e(n,t).patch;nAe.exports=o1e});var cAe=ee((LwA,gAe)=>{"use strict";var n1e=II(),s1e=(n,t)=>{let o=n1e(n,t);return o&&o.prerelease.length?o.prerelease:null};gAe.exports=s1e});var tn=ee((UwA,lAe)=>{"use strict";var IAe=Pi(),g1e=(n,t,o)=>new IAe(n,o).compare(new IAe(t,o));lAe.exports=g1e});var dAe=ee((HwA,pAe)=>{"use strict";var c1e=tn(),I1e=(n,t,o)=>c1e(t,n,o);pAe.exports=I1e});var EAe=ee((KwA,hAe)=>{"use strict";var l1e=tn(),p1e=(n,t)=>l1e(n,t,!0);hAe.exports=p1e});var tO=ee((xwA,CAe)=>{"use strict";var uAe=Pi(),d1e=(n,t,o)=>{let a=new uAe(n,o),e=new uAe(t,o);return a.compare(e)||a.compareBuild(e)};CAe.exports=d1e});var fAe=ee((YwA,BAe)=>{"use strict";var h1e=tO(),E1e=(n,t)=>n.sort((o,a)=>h1e(o,a,t));BAe.exports=E1e});var yAe=ee((jwA,QAe)=>{"use strict";var u1e=tO(),C1e=(n,t)=>n.sort((o,a)=>u1e(a,o,t));QAe.exports=C1e});var $B=ee((JwA,mAe)=>{"use strict";var B1e=tn(),f1e=(n,t,o)=>B1e(n,t,o)>0;mAe.exports=f1e});var rO=ee((qwA,SAe)=>{"use strict";var Q1e=tn(),y1e=(n,t,o)=>Q1e(n,t,o)<0;SAe.exports=y1e});var jL=ee((zwA,wAe)=>{"use strict";var m1e=tn(),S1e=(n,t,o)=>m1e(n,t,o)===0;wAe.exports=S1e});var JL=ee((VwA,DAe)=>{"use strict";var w1e=tn(),D1e=(n,t,o)=>w1e(n,t,o)!==0;DAe.exports=D1e});var iO=ee((WwA,OAe)=>{"use strict";var O1e=tn(),b1e=(n,t,o)=>O1e(n,t,o)>=0;OAe.exports=b1e});var aO=ee((ZwA,bAe)=>{"use strict";var M1e=tn(),_1e=(n,t,o)=>M1e(n,t,o)<=0;bAe.exports=_1e});var qL=ee((XwA,MAe)=>{"use strict";var T1e=jL(),N1e=JL(),R1e=$B(),k1e=iO(),v1e=rO(),P1e=aO(),G1e=(n,t,o,a)=>{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 T1e(n,o,a);case"!=":return N1e(n,o,a);case">":return R1e(n,o,a);case">=":return k1e(n,o,a);case"<":return v1e(n,o,a);case"<=":return P1e(n,o,a);default:throw new TypeError(`Invalid operator: ${t}`)}};MAe.exports=G1e});var TAe=ee(($wA,_Ae)=>{"use strict";var F1e=Pi(),L1e=II(),{safeRe:oO,t:nO}=Hh(),U1e=(n,t)=>{if(n instanceof F1e)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?oO[nO.COERCEFULL]:oO[nO.COERCE]);else{let s=t.includePrerelease?oO[nO.COERCERTLFULL]:oO[nO.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 a=o[2],e=o[3]||"0",i=o[4]||"0",A=t.includePrerelease&&o[5]?`-${o[5]}`:"",r=t.includePrerelease&&o[6]?`+${o[6]}`:"";return L1e(`${a}.${e}.${i}${A}${r}`,t)};_Ae.exports=U1e});var RAe=ee((eDA,NAe)=>{"use strict";var H1e=II(),K1e=Uh(),x1e=Pi(),Y1e=(n,t,o)=>{if(!K1e.RELEASE_TYPES.includes(t))return null;let a=j1e(n,o);return a&&J1e(a,t)},j1e=(n,t)=>{let o=n instanceof x1e?n.version:n;return H1e(o,t)},J1e=(n,t)=>{if(q1e(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()},q1e=n=>n.startsWith("pre");NAe.exports=Y1e});var vAe=ee((ADA,kAe)=>{"use strict";var zL=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}};kAe.exports=zL});var rn=ee((tDA,LAe)=>{"use strict";var z1e=/\s+/g,VL=class n{constructor(t,o){if(o=W1e(o),t instanceof n)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new n(t.raw,o);if(t instanceof WL)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(z1e," "),this.set=this.raw.split("||").map(a=>this.parseRange(a.trim())).filter(a=>a.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let a=this.set[0];if(this.set=this.set.filter(e=>!GAe(e[0])),this.set.length===0)this.set=[a];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&a3e(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 a=0;a0&&(this.formatted+=" "),this.formatted+=o[a].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(i3e,"");let a=((this.options.includePrerelease&&t3e)|(this.options.loose&&r3e))+":"+t,e=PAe.get(a);if(e)return e;let i=this.options.loose,A=i?fa[Gi.HYPHENRANGELOOSE]:fa[Gi.HYPHENRANGE];t=t.replace(A,E3e(this.options.includePrerelease)),Xt("hyphen replace",t),t=t.replace(fa[Gi.COMPARATORTRIM],$1e),Xt("comparator trim",t),t=t.replace(fa[Gi.TILDETRIM],e3e),Xt("tilde trim",t),t=t.replace(fa[Gi.CARETTRIM],A3e),Xt("caret trim",t);let r=t.split(" ").map(I=>o3e(I,this.options)).join(" ").split(/\s+/).map(I=>h3e(I,this.options));i&&(r=r.filter(I=>(Xt("loose invalid filter",I,this.options),!!I.match(fa[Gi.COMPARATORLOOSE])))),Xt("range list",r);let s=new Map,g=r.map(I=>new WL(I,this.options));for(let I of g){if(GAe(I))return[I];s.set(I.value,I)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return PAe.set(a,c),c}intersects(t,o){if(!(t instanceof n))throw new TypeError("a Range is required");return this.set.some(a=>FAe(a,o)&&t.set.some(e=>FAe(e,o)&&a.every(i=>e.every(A=>i.intersects(A,o)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new Z1e(t,this.options)}catch{return!1}for(let o=0;on.value==="<0.0.0-0",a3e=n=>n.value==="",FAe=(n,t)=>{let o=!0,a=n.slice(),e=a.pop();for(;o&&a.length;)o=a.every(i=>e.intersects(i,t)),e=a.pop();return o},o3e=(n,t)=>(n=n.replace(fa[Gi.BUILD],""),Xt("comp",n,t),n=c3e(n,t),Xt("caret",n),n=s3e(n,t),Xt("tildes",n),n=l3e(n,t),Xt("xrange",n),n=d3e(n,t),Xt("stars",n),n),Wr=n=>!n||n.toLowerCase()==="x"||n==="*",n3e=(n,t,o)=>Wr(n)&&!Wr(t)||Wr(t)&&o&&!Wr(o),s3e=(n,t)=>n.trim().split(/\s+/).map(o=>g3e(o,t)).join(" "),g3e=(n,t)=>{let o=t.loose?fa[Gi.TILDELOOSE]:fa[Gi.TILDE],a=t.includePrerelease?"-0":"";return n.replace(o,(e,i,A,r,s)=>{Xt("tilde",n,e,i,A,r,s);let g;return Wr(i)?g="":Wr(A)?g=`>=${i}.0.0${a} <${+i+1}.0.0-0`:Wr(r)?g=`>=${i}.${A}.0${a} <${i}.${+A+1}.0-0`:s?(Xt("replaceTilde pr",s),g=`>=${i}.${A}.${r}-${s} <${i}.${+A+1}.0-0`):g=`>=${i}.${A}.${r} <${i}.${+A+1}.0-0`,Xt("tilde return",g),g})},c3e=(n,t)=>n.trim().split(/\s+/).map(o=>I3e(o,t)).join(" "),I3e=(n,t)=>{Xt("caret",n,t);let o=t.loose?fa[Gi.CARETLOOSE]:fa[Gi.CARET],a=t.includePrerelease?"-0":"";return n.replace(o,(e,i,A,r,s)=>{Xt("caret",n,e,i,A,r,s);let g;return Wr(i)?g="":Wr(A)?g=`>=${i}.0.0${a} <${+i+1}.0.0-0`:Wr(r)?i==="0"?g=`>=${i}.${A}.0${a} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.0${a} <${+i+1}.0.0-0`:s?(Xt("replaceCaret pr",s),i==="0"?A==="0"?g=`>=${i}.${A}.${r}-${s} <${i}.${A}.${+r+1}-0`:g=`>=${i}.${A}.${r}-${s} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.${r}-${s} <${+i+1}.0.0-0`):(Xt("no pr"),i==="0"?A==="0"?g=`>=${i}.${A}.${r} <${i}.${A}.${+r+1}-0`:g=`>=${i}.${A}.${r} <${i}.${+A+1}.0-0`:g=`>=${i}.${A}.${r} <${+i+1}.0.0-0`),Xt("caret return",g),g})},l3e=(n,t)=>(Xt("replaceXRanges",n,t),n.split(/\s+/).map(o=>p3e(o,t)).join(" ")),p3e=(n,t)=>{n=n.trim();let o=t.loose?fa[Gi.XRANGELOOSE]:fa[Gi.XRANGE];return n.replace(o,(a,e,i,A,r,s)=>{if(Xt("xRange",n,a,e,i,A,r,s),n3e(i,A,r))return n;let g=Wr(i),c=g||Wr(A),I=c||Wr(r),p=I;return e==="="&&p&&(e=""),s=t.includePrerelease?"-0":"",g?e===">"||e==="<"?a="<0.0.0-0":a="*":e&&p?(c&&(A=0),r=0,e===">"?(e=">=",c?(i=+i+1,A=0,r=0):(A=+A+1,r=0)):e==="<="&&(e="<",c?i=+i+1:A=+A+1),e==="<"&&(s="-0"),a=`${e+i}.${A}.${r}${s}`):c?a=`>=${i}.0.0${s} <${+i+1}.0.0-0`:I&&(a=`>=${i}.${A}.0${s} <${i}.${+A+1}.0-0`),Xt("xRange return",a),a})},d3e=(n,t)=>(Xt("replaceStars",n,t),n.trim().replace(fa[Gi.STAR],"")),h3e=(n,t)=>(Xt("replaceGTE0",n,t),n.trim().replace(fa[t.includePrerelease?Gi.GTE0PRE:Gi.GTE0],"")),E3e=n=>(t,o,a,e,i,A,r,s,g,c,I,p)=>(Wr(a)?o="":Wr(e)?o=`>=${a}.0.0${n?"-0":""}`:Wr(i)?o=`>=${a}.${e}.0${n?"-0":""}`:A?o=`>=${o}`:o=`>=${o}${n?"-0":""}`,Wr(g)?s="":Wr(c)?s=`<${+g+1}.0.0-0`:Wr(I)?s=`<${g}.${+c+1}.0-0`:p?s=`<=${g}.${c}.${I}-${p}`:n?s=`<${g}.${c}.${+I+1}-0`:s=`<=${s}`,`${o} ${s}`.trim()),u3e=(n,t,o)=>{for(let a=0;a0){let e=n[a].semver;if(e.major===t.major&&e.minor===t.minor&&e.patch===t.patch)return!0}return!1}return!0}});var ef=ee((rDA,jAe)=>{"use strict";var Af=Symbol("SemVer ANY"),$L=class n{static get ANY(){return Af}constructor(t,o){if(o=UAe(o),t instanceof n){if(t.loose===!!o.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),XL("comparator",t,o),this.options=o,this.loose=!!o.loose,this.parse(t),this.semver===Af?this.value="":this.value=this.operator+this.semver.version,XL("comp",this)}parse(t){let o=this.options.loose?HAe[KAe.COMPARATORLOOSE]:HAe[KAe.COMPARATOR],a=t.match(o);if(!a)throw new TypeError(`Invalid comparator: ${t}`);this.operator=a[1]!==void 0?a[1]:"",this.operator==="="&&(this.operator=""),a[2]?this.semver=new xAe(a[2],this.options.loose):this.semver=Af}toString(){return this.value}test(t){if(XL("Comparator.test",t,this.options.loose),this.semver===Af||t===Af)return!0;if(typeof t=="string")try{t=new xAe(t,this.options)}catch{return!1}return ZL(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 YAe(t.value,o).test(this.value):t.operator===""?t.value===""?!0:new YAe(this.value,o).test(t.semver):(o=UAe(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("=")||ZL(this.semver,"<",t.semver,o)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||ZL(this.semver,">",t.semver,o)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};jAe.exports=$L;var UAe=ZD(),{safeRe:HAe,t:KAe}=Hh(),ZL=qL(),XL=XB(),xAe=Pi(),YAe=rn()});var tf=ee((iDA,JAe)=>{"use strict";var C3e=rn(),B3e=(n,t,o)=>{try{t=new C3e(t,o)}catch{return!1}return t.test(n)};JAe.exports=B3e});var zAe=ee((aDA,qAe)=>{"use strict";var f3e=rn(),Q3e=(n,t)=>new f3e(n,t).set.map(o=>o.map(a=>a.value).join(" ").trim().split(" "));qAe.exports=Q3e});var WAe=ee((oDA,VAe)=>{"use strict";var y3e=Pi(),m3e=rn(),S3e=(n,t,o)=>{let a=null,e=null,i=null;try{i=new m3e(t,o)}catch{return null}return n.forEach(A=>{i.test(A)&&(!a||e.compare(A)===-1)&&(a=A,e=new y3e(a,o))}),a};VAe.exports=S3e});var XAe=ee((nDA,ZAe)=>{"use strict";var w3e=Pi(),D3e=rn(),O3e=(n,t,o)=>{let a=null,e=null,i=null;try{i=new D3e(t,o)}catch{return null}return n.forEach(A=>{i.test(A)&&(!a||e.compare(A)===1)&&(a=A,e=new w3e(a,o))}),a};ZAe.exports=O3e});var Ate=ee((sDA,ete)=>{"use strict";var e2=Pi(),b3e=rn(),$Ae=$B(),M3e=(n,t)=>{n=new b3e(n,t);let o=new e2("0.0.0");if(n.test(o)||(o=new e2("0.0.0-0"),n.test(o)))return o;o=null;for(let a=0;a{let r=new e2(A.semver.version);switch(A.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!i||$Ae(r,i))&&(i=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),i&&(!o||$Ae(o,i))&&(o=i)}return o&&n.test(o)?o:null};ete.exports=M3e});var rte=ee((gDA,tte)=>{"use strict";var _3e=rn(),T3e=(n,t)=>{try{return new _3e(n,t).range||"*"}catch{return null}};tte.exports=T3e});var sO=ee((cDA,nte)=>{"use strict";var N3e=Pi(),ote=ef(),{ANY:R3e}=ote,k3e=rn(),v3e=tf(),ite=$B(),ate=rO(),P3e=aO(),G3e=iO(),F3e=(n,t,o,a)=>{n=new N3e(n,a),t=new k3e(t,a);let e,i,A,r,s;switch(o){case">":e=ite,i=P3e,A=ate,r=">",s=">=";break;case"<":e=ate,i=G3e,A=ite,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(v3e(n,t,a))return!1;for(let g=0;g{B.semver===R3e&&(B=new ote(">=0.0.0")),I=I||B,p=p||B,e(B.semver,I.semver,a)?I=B:A(B.semver,p.semver,a)&&(p=B)}),I.operator===r||I.operator===s||(!p.operator||p.operator===r)&&i(n,p.semver))return!1;if(p.operator===s&&A(n,p.semver))return!1}return!0};nte.exports=F3e});var gte=ee((IDA,ste)=>{"use strict";var L3e=sO(),U3e=(n,t,o)=>L3e(n,t,">",o);ste.exports=U3e});var Ite=ee((lDA,cte)=>{"use strict";var H3e=sO(),K3e=(n,t,o)=>H3e(n,t,"<",o);cte.exports=K3e});var dte=ee((pDA,pte)=>{"use strict";var lte=rn(),x3e=(n,t,o)=>(n=new lte(n,o),t=new lte(t,o),n.intersects(t,o));pte.exports=x3e});var Ete=ee((dDA,hte)=>{"use strict";var Y3e=tf(),j3e=tn();hte.exports=(n,t,o)=>{let a=[],e=null,i=null,A=n.sort((c,I)=>j3e(c,I,o));for(let c of A)Y3e(c,t,o)?(i=c,e||(e=c)):(i&&a.push([e,i]),i=null,e=null);e&&a.push([e,null]);let r=[];for(let[c,I]of a)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 ute=rn(),r2=ef(),{ANY:A2}=r2,t2=tf(),i2=tn(),J3e=(n,t,o={})=>{if(n===t)return!0;n=new ute(n,o),t=new ute(t,o);let a=!1;e:for(let e of n.set){for(let i of t.set){let A=z3e(e,i,o);if(a=a||A!==null,A)continue e}if(a)return!1}return!0},q3e=[new r2(">=0.0.0-0")],Cte=[new r2(">=0.0.0")],z3e=(n,t,o)=>{if(n===t)return!0;if(n.length===1&&n[0].semver===A2){if(t.length===1&&t[0].semver===A2)return!0;o.includePrerelease?n=q3e:n=Cte}if(t.length===1&&t[0].semver===A2){if(o.includePrerelease)return!0;t=Cte}let a=new Set,e,i;for(let B of n)B.operator===">"||B.operator===">="?e=Bte(e,B,o):B.operator==="<"||B.operator==="<="?i=fte(i,B,o):a.add(B.semver);if(a.size>1)return null;let A;if(e&&i){if(A=i2(e.semver,i.semver,o),A>0)return null;if(A===0&&(e.operator!==">="||i.operator!=="<="))return null}for(let B of a){if(e&&!t2(B,String(e),o)||i&&!t2(B,String(i),o))return null;for(let f of t)if(!t2(B,String(f),o))return!1;return!0}let r,s,g,c,I=i&&!o.includePrerelease&&i.semver.prerelease.length?i.semver:!1,p=e&&!o.includePrerelease&&e.semver.prerelease.length?e.semver:!1;I&&I.prerelease.length===1&&i.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(p&&B.semver.prerelease&&B.semver.prerelease.length&&B.semver.major===p.major&&B.semver.minor===p.minor&&B.semver.patch===p.patch&&(p=!1),B.operator===">"||B.operator===">="){if(r=Bte(e,B,o),r===B&&r!==e)return!1}else if(e.operator===">="&&!B.test(e.semver))return!1}if(i){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=fte(i,B,o),s===B&&s!==i)return!1}else if(i.operator==="<="&&!B.test(i.semver))return!1}if(!B.operator&&(i||e)&&A!==0)return!1}return!(e&&g&&!i&&A!==0||i&&c&&!e&&A!==0||p||I)},Bte=(n,t,o)=>{if(!n)return t;let a=i2(n.semver,t.semver,o);return a>0?n:a<0||t.operator===">"&&n.operator===">="?t:n},fte=(n,t,o)=>{if(!n)return t;let a=i2(n.semver,t.semver,o);return a<0?n:a>0||t.operator==="<"&&n.operator==="<="?t:n};Qte.exports=J3e});var gO=ee((EDA,wte)=>{"use strict";var a2=Hh(),mte=Uh(),V3e=Pi(),Ste=KL(),W3e=II(),Z3e=zee(),X3e=Wee(),$3e=$ee(),eje=tAe(),Aje=iAe(),tje=oAe(),rje=sAe(),ije=cAe(),aje=tn(),oje=dAe(),nje=EAe(),sje=tO(),gje=fAe(),cje=yAe(),Ije=$B(),lje=rO(),pje=jL(),dje=JL(),hje=iO(),Eje=aO(),uje=qL(),Cje=TAe(),Bje=RAe(),fje=ef(),Qje=rn(),yje=tf(),mje=zAe(),Sje=WAe(),wje=XAe(),Dje=Ate(),Oje=rte(),bje=sO(),Mje=gte(),_je=Ite(),Tje=dte(),Nje=Ete(),Rje=yte();wte.exports={parse:W3e,valid:Z3e,clean:X3e,inc:$3e,diff:eje,major:Aje,minor:tje,patch:rje,prerelease:ije,compare:aje,rcompare:oje,compareLoose:nje,compareBuild:sje,sort:gje,rsort:cje,gt:Ije,lt:lje,eq:pje,neq:dje,gte:hje,lte:Eje,cmp:uje,coerce:Cje,truncate:Bje,Comparator:fje,Range:Qje,satisfies:yje,toComparators:mje,maxSatisfying:Sje,minSatisfying:wje,minVersion:Dje,validRange:Oje,outside:bje,gtr:Mje,ltr:_je,intersects:Tje,simplifyRange:Nje,subset:Rje,SemVer:V3e,re:a2.re,src:a2.src,tokens:a2.t,SEMVER_SPEC_VERSION:mte.SEMVER_SPEC_VERSION,RELEASE_TYPES:mte.RELEASE_TYPES,compareIdentifiers:Ste.compareIdentifiers,rcompareIdentifiers:Ste.rcompareIdentifiers}});var $g,cO=ue(()=>{$g={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 rf}from"node:child_process";import{createHash as vje}from"node:crypto";var af,n2,Pje,Ote,Gje,s2,Fje,bte,Lje,Kh,Uje,Hje,Kje,xje,Mte,Yje,Dte,jje,Jje,_te,qje,zje,Tte,o2,Vje,IO,g2=ue(()=>{af=ze(gO(),1),n2=ze(WD(),1);cO();Pje=process.env.npm_package_config_libvips||$g.config.libvips,Ote=af.default.coerce(Pje).version,Gje=["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"],s2={encoding:"utf8",shell:!0},Fje=n=>{n instanceof Error?console.error(`sharp: Installation error: ${n.message}`):console.log(`sharp: ${n}`)},bte=()=>n2.default.isNonGlibcLinuxSync()?n2.default.familySync():"",Lje=()=>`${process.platform}${bte()}-${process.arch}`,Kh=()=>{if(Mte())return"wasm32";let{npm_config_arch:n,npm_config_platform:t,npm_config_libc:o}=process.env,a=typeof o=="string"?o:bte();return`${t||process.platform}${a}-${n||process.arch}`},Uje=()=>{try{return $e(`@img/sharp-libvips-dev-${Kh()}/include`)}catch{try{return $e("@img/sharp-libvips-dev/include")}catch{}}return""},Hje=()=>{try{return $e("@img/sharp-libvips-dev/cplusplus")}catch{}return""},Kje=()=>{try{return $e(`@img/sharp-libvips-dev-${Kh()}/lib`)}catch{try{return $e(`@img/sharp-libvips-${Kh()}/lib`)}catch{}}return""},xje=()=>{if(process.release?.name==="node"&&process.versions&&!af.default.satisfies(process.versions.node,$g.engines.node))return{found:process.versions.node,expected:$g.engines.node}},Mte=()=>{let{CC:n}=process.env;return!!n?.endsWith("/emcc")},Yje=()=>process.platform==="darwin"&&process.arch==="x64"?(rf("sysctl sysctl.proc_translated",s2).stdout||"").trim()==="sysctl.proc_translated: 1":!1,Dte=n=>vje("sha512").update(n).digest("hex"),jje=()=>{try{let n=Dte(`imgsharp-libvips-${Kh()}`),t=af.default.coerce($g.optionalDependencies[`@img/sharp-libvips-${Kh()}`],{includePrerelease:!0}).version;return Dte(`${n}npm:${t}`).slice(0,10)}catch{}return""},Jje=()=>rf(`node-gyp rebuild --directory=src ${Mte()?"--nodedir=emscripten":""}`,{...s2,stdio:"inherit"}).status,_te=()=>process.platform!=="win32"?(rf("pkg-config --modversion vips-cpp",{...s2,env:{...process.env,PKG_CONFIG_PATH:Tte()}}).stdout||"").trim():"",qje=()=>{try{let n=(rf("brew",["--prefix"],{encoding:"utf8"}).stdout||"").trim();if(n)return`${n}/lib/pkgconfig`}catch{}},zje=()=>{try{let n=(rf("pkg-config",["--variable","pc_path","pkg-config"],{encoding:"utf8"}).stdout||"").trim();if(n)return n}catch{}},Tte=()=>process.platform!=="win32"?[qje(),zje(),process.env.PKG_CONFIG_PATH].filter(Boolean).join(":"):"",o2=(n,t,o)=>(o&&o(`Detected ${t}, skipping search for globally-installed libvips`),n),Vje=n=>{if(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)return o2(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",n);if(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)return o2(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",n);if(Yje())return o2(!1,"Rosetta",n);let t=_te();return!!t&&af.default.gte(t,Ote)},IO={minimumLibvipsVersion:Ote,prebuiltPlatforms:Gje,buildPlatformArch:Kh,buildSharpLibvipsIncludeDir:Uje,buildSharpLibvipsCPlusPlusDir:Hje,buildSharpLibvipsLibDir:Kje,isUnsupportedNodeRuntime:xje,runtimePlatformArch:Lje,log:Fje,yarnLocator:jje,spawnRebuild:Jje,globalLibvipsVersion:_te,pkgConfigPath:Tte,useGlobalLibvips:Vje}});import{createRequire as Wje}from"node:module";var lO,Zr,Rte,Zje,Nte,Xje,$je,ec,Kt,lI,Dt,of=ue(()=>{lO=ze(WD(),1);g2();cO();Zr=Wje(import.meta.url),{version:Rte}=$g,{runtimePlatformArch:Zje,isUnsupportedNodeRuntime:Nte,prebuiltPlatforms:Xje,minimumLibvipsVersion:$je}=IO,ec=Zje(),lI=[];try{Kt=Zr(`../src/build/Release/sharp-${ec}-${Rte}.node`)}catch(n){lI.push(n)}if(!Kt)try{Kt=Zr(`../src/build/Release/sharp-wasm32-${Rte}.node`)}catch(n){lI.push(n)}if(!Kt)try{switch(ec){case"darwin-arm64":Kt=Zr("@img/sharp-darwin-arm64/sharp.node");break;case"darwin-x64":Kt=Zr("@img/sharp-darwin-x64/sharp.node");break;case"linux-arm":Kt=Zr("@img/sharp-linux-arm/sharp.node");break;case"linux-arm64":Kt=Zr("@img/sharp-linux-arm64/sharp.node");break;case"linux-ppc64":Kt=Zr("@img/sharp-linux-ppc64/sharp.node");break;case"linux-riscv64":Kt=Zr("@img/sharp-linux-riscv64/sharp.node");break;case"linux-s390x":Kt=Zr("@img/sharp-linux-s390x/sharp.node");break;case"linux-x64":Kt=Zr("@img/sharp-linux-x64/sharp.node");break;case"linuxmusl-arm64":Kt=Zr("@img/sharp-linuxmusl-arm64/sharp.node");break;case"linuxmusl-x64":Kt=Zr("@img/sharp-linuxmusl-x64/sharp.node");break;case"win32-arm64":Kt=Zr("@img/sharp-win32-arm64/sharp.node");break;case"win32-ia32":Kt=Zr("@img/sharp-win32-ia32/sharp.node");break;case"win32-x64":Kt=Zr("@img/sharp-win32-x64/sharp.node");break;case"freebsd-arm64":case"freebsd-x64":Kt=Zr("@img/sharp-freebsd-wasm32/sharp.node");break;case"linux-wasm32":Kt=Zr("@img/sharp-webcontainers-wasm32/sharp.node");break}if(Kt&&["linux-x64","linuxmusl-x64"].includes(ec)&&!Kt._isUsingX64V2()){let n=new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");n.code="Unsupported CPU",lI.push(n),Kt=null}Kt&&process.versions.electron&&ec.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){lI.push(n)}if(!Kt)try{Kt=Zr("@img/sharp-wasm32/sharp.node")}catch(n){lI.push(n)}if(!Kt){let[n,t,o]=["linux","darwin","win32"].map(i=>ec.startsWith(i)),a=[`Could not load the "sharp" module using the ${ec} runtime`];lI.forEach(i=>{i.code.endsWith("MODULE_NOT_FOUND")||a.push(`${i.code}: ${i.message}`)});let e=lI.map(i=>i.message).join(" ");if(a.push("Possible solutions:"),Nte()){let{found:i,expected:A}=Nte();a.push("- Please upgrade Node.js:",` Found ${i}`,` Requires ${A}`)}else if(Xje.includes(ec)){let[i,A]=ec.split("-"),r=i.endsWith("musl")?" --libc=musl":"";a.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=${i.replace("musl","")}${r} --cpu=${A} sharp`)}else a.push(`- Manually install libvips >= ${$je}`," 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:i}=Zr(`@img/sharp-libvips-${ec}/package`),A=`${(0,lO.familySync)()} ${(0,lO.versionSync)()}`,r=`${i.musl?"musl":"glibc"} ${i.musl||i.glibc}`;a.push("- Update your OS:",` Found ${A}`,` Requires ${r}`)}catch{}throw n&&/\/snap\/core[0-9]{2}/.test(e)&&a.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),t&&/Incompatible library version/.test(e)&&a.push("- Update Homebrew:"," brew update && brew upgrade vips"),lI.some(i=>i.code==="ERR_DLOPEN_DISABLED")&&a.push("- Run Node.js without using the --no-addons flag"),o&&/The specified procedure could not be found/.test(e)&&a.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"),a.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(a.join(` +`))}Dt=Kt});import eJe from"node:util";import c2 from"node:stream";function rJe(){let n=this.constructor.call(),{debuglog:t,queueListener:o,...a}=this.options;return n.options=structuredClone(a),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 AJe,tJe,Zl,xs,kte=ue(()=>{Fs();of();AJe=eJe.debuglog("sharp"),tJe=n=>{Zl.queue.emit("change",n)},Zl=function(n,t){if(arguments.length===1&&!O.defined(n))throw new Error("Invalid input");return this instanceof Zl?(c2.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),AJe(o)},queueListener:tJe},this.options.input=this._createInputDescriptor(n,t,{allowStream:!0}),this):new Zl(n,t)};Object.setPrototypeOf(Zl.prototype,c2.Duplex.prototype);Object.setPrototypeOf(Zl,c2.Duplex);Object.assign(Zl.prototype,{clone:rJe});xs=Zl});function vte(n){let t=aJe.filter(o=>O.defined(n[o])).map(o=>[o,n[o]]);return t.length?Object.fromEntries(t):void 0}function oJe(n,t,o){let a={autoOrient:!1,failOn:"warning",limitInputPixels:268402689,limitInputChannels:5,ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(O.string(n))a.file=n;else if(O.buffer(n)){if(n.length===0)throw Error("Input Buffer is empty");a.buffer=n}else if(O.arrayBuffer(n)){if(n.byteLength===0)throw Error("Input bit Array is empty");a.buffer=Buffer.from(n,0,n.byteLength)}else if(O.typedArray(n)){if(n.length===0)throw Error("Input Bit Array is empty");a.buffer=Buffer.from(n.buffer,n.byteOffset,n.byteLength)}else if(O.plainObject(n)&&!O.defined(t))t=n,vte(t)&&(a.buffer=[]);else if(!O.defined(n)&&!O.defined(t)&&O.object(o)&&o.allowStream)a.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"]))a.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))a.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))a.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))a.ignoreIcc=t.ignoreIcc;else throw O.invalidParameterError("ignoreIcc","boolean",t.ignoreIcc);if(O.defined(t.limitInputPixels))if(O.bool(t.limitInputPixels))a.limitInputPixels=t.limitInputPixels?16383**2:0;else if(O.integer(t.limitInputPixels)&&O.inRange(t.limitInputPixels,0,Number.MAX_SAFE_INTEGER))a.limitInputPixels=t.limitInputPixels;else throw O.invalidParameterError("limitInputPixels","positive integer",t.limitInputPixels);if(O.defined(t.limitInputChannels))if(O.bool(t.limitInputChannels))a.limitInputChannels=t.limitInputChannels?5:0;else if(O.integer(t.limitInputChannels)&&O.inRange(t.limitInputChannels,0,Number.MAX_SAFE_INTEGER))a.limitInputChannels=t.limitInputChannels;else throw O.invalidParameterError("limitInputChannels","positive integer",t.limitInputChannels);if(O.defined(t.unlimited))if(O.bool(t.unlimited))a.unlimited=t.unlimited;else throw O.invalidParameterError("unlimited","boolean",t.unlimited);if(O.defined(t.sequentialRead))if(O.bool(t.sequentialRead))a.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(a.rawWidth=t.raw.width,a.rawHeight=t.raw.height,a.rawChannels=t.raw.channels,n.constructor){case Uint8Array:case Uint8ClampedArray:a.rawDepth="uchar";break;case Int8Array:a.rawDepth="char";break;case Uint16Array:a.rawDepth="ushort";break;case Int16Array:a.rawDepth="short";break;case Uint32Array:a.rawDepth="uint";break;case Int32Array:a.rawDepth="int";break;case Float32Array:a.rawDepth="float";break;case Float64Array:a.rawDepth="double";break;default:a.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(a.rawPremultiplied=!1,O.defined(t.raw.premultiplied))if(O.bool(t.raw.premultiplied))a.rawPremultiplied=t.raw.premultiplied;else throw O.invalidParameterError("raw.premultiplied","boolean",t.raw.premultiplied);if(a.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}`);a.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))a.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))a.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))a.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))a.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))a.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))a.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))a.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))a.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))a.svgHighBitdepth=t.svg.highBitdepth;else throw O.invalidParameterError("svg.highBitdepth","boolean",t.svg.highBitdepth)}if(O.object(t.pdf)&&O.defined(t.pdf.background)?a.pdfBackground=this._getBackgroundColourOption(t.pdf.background):O.defined(t.pdfBackground)&&(a.pdfBackground=this._getBackgroundColourOption(t.pdfBackground)),O.object(t.jp2)&&O.defined(t.jp2.oneshot))if(O.bool(t.jp2.oneshot))a.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(a.createWidth=t.create.width,a.createHeight=t.create.height,a.createChannels=t.create.channels,a.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}`);a.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(a.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(a.createNoiseMean=128,O.defined(t.create.noise.mean))if(O.number(t.create.noise.mean)&&O.inRange(t.create.noise.mean,0,1e4))a.createNoiseMean=t.create.noise.mean;else throw O.invalidParameterError("create.noise.mean","number between 0 and 10000",t.create.noise.mean);if(a.createNoiseSigma=30,O.defined(t.create.noise.sigma))if(O.number(t.create.noise.sigma)&&O.inRange(t.create.noise.sigma,0,1e4))a.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);a.createBackground=this._getBackgroundColourOption(t.create.background)}else throw new Error("Expected valid noise or background to create a new input image");delete a.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(a.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))a.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))a.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))a.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))a.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]))a.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))a.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))a.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))a.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))a.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"]))a.textWrap=t.text.wrap;else throw O.invalidParameterError("text.wrap","one of: word, char, word-char, none",t.text.wrap);delete a.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))a.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))a.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))a.joinShim=t.join.shim;else throw O.invalidParameterError("join.shim","integer between 0 and 100000",t.join.shim);if(O.defined(t.join.background)&&(a.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]))a.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]))a.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 a}function nJe(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 sJe(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function gJe(){return Array.isArray(this.options.input.buffer)}function cJe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Dt.metadata(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)})}):Dt.metadata(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)}),this):this._isStreamInput()?new Promise((o,a)=>{let e=()=>{this._flattenBufferIn(),Dt.metadata(this.options,(i,A)=>{i?a(O.nativeError(i,t)):o(A)})};this.writableFinished?e():this.once("finish",e)}):new Promise((o,a)=>{Dt.metadata(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}function IJe(n){let t=Error();return O.fn(n)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Dt.stats(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)})}):Dt.stats(this.options,(o,a)=>{o?n(O.nativeError(o,t)):n(null,a)}),this):this._isStreamInput()?new Promise((o,a)=>{this.on("finish",function(){this._flattenBufferIn(),Dt.stats(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}):new Promise((o,a)=>{Dt.stats(this.options,(e,i)=>{e?a(O.nativeError(e,t)):o(i)})})}var iJe,aJe,Pte,Gte=ue(()=>{Fs();of();iJe={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},aJe=["failOn","limitInputPixels","limitInputChannels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","openSlideLevel","pdfBackground","tiffSubifd"];Pte=n=>{Object.assign(n.prototype,{_inputOptionsFromObject:vte,_createInputDescriptor:oJe,_write:nJe,_flattenBufferIn:sJe,_isStreamInput:gJe,metadata:cJe,stats:IJe}),n.align=iJe}});function l2(n){return n.angle%360!==0||n.rotationAngle!==0}function pO(n){return n.width!==-1||n.height!==-1}function dJe(n,t,o){if(pO(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 a=pJe[o.fit];if(O.string(a))this.options.canvas=a;else throw O.invalidParameterError("fit","valid fit",o.fit)}if(O.defined(o.position)){let a=O.integer(o.position)?o.position:Hte[o.position]||Ute[o.position]||Lte[o.position];if(O.integer(a)&&(O.inRange(a,0,8)||O.inRange(a,16,17)))this.options.position=a;else throw O.invalidParameterError("position","valid position/gravity/strategy",o.position)}if(this._setBackgroundColourOption("resizeBackground",o.background),O.defined(o.kernel))if(O.string(I2[o.kernel]))this.options.kernel=I2[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 l2(this.options)&&pO(this.options)&&(this.options.rotateBefore=!0),this}function hJe(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(Fte[n.extendWith]))this.options.extendWith=Fte[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 EJe(n){let t=pO(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 a=n[o];if(O.integer(a)&&O.inRange(a,0,1e8))this.options[o+(o==="left"||o==="top"?"Offset":"")+t]=a;else throw O.invalidParameterError(o,"integer between 0 and 100000000",a)},this),l2(this.options)&&!pO(this.options)&&(this.options.widthPre===-1||this.options.widthPost===-1)&&(this.options.rotateBefore=!0),this.options.input.autoOrient&&(this.options.orientBefore=!0),this}function uJe(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 l2(this.options)&&(this.options.rotateBefore=!0),this}var Lte,Ute,Fte,Hte,I2,lJe,pJe,Kte,xte=ue(()=>{Fs();Lte={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},Ute={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},Fte={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},Hte={entropy:16,attention:17},I2={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},lJe={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},pJe={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};Kte=n=>{Object.assign(n.prototype,{resize:dJe,extend:hJe,extract:EJe,trim:uJe}),n.gravity=Lte,n.strategy=Hte,n.kernel=I2,n.fit=lJe,n.position=Ute}});function CJe(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),a={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(p2[t.blend]))a.blend=p2[t.blend];else throw O.invalidParameterError("blend","valid blend name",t.blend);if(O.defined(t.tile))if(O.bool(t.tile))a.tile=t.tile;else throw O.invalidParameterError("tile","boolean",t.tile);if(O.defined(t.left))if(O.integer(t.left))a.left=t.left;else throw O.invalidParameterError("left","integer",t.left);if(O.defined(t.top))if(O.integer(t.top))a.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(a.hasOffset=O.integer(t.top)&&O.integer(t.left),O.defined(t.gravity))if(O.integer(t.gravity)&&O.inRange(t.gravity,0,8))a.gravity=t.gravity;else if(O.string(t.gravity)&&O.integer(this.constructor.gravity[t.gravity]))a.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))a.premultiplied=t.premultiplied;else throw O.invalidParameterError("premultiplied","boolean",t.premultiplied);return a}),this}var p2,Yte,jte=ue(()=>{Fs();p2={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"};Yte=n=>{n.prototype.composite=CJe,n.blend=p2}});function BJe(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 fJe(){return this.options.input.autoOrient=!0,this}function QJe(n){return this.options.flip=O.bool(n)?n:!0,this}function yJe(n){return this.options.flop=O.bool(n)?n:!0,this}function mJe(n,t){let a=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(a.length===4&&a.every(O.number))this.options.affineMatrix=a;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 SJe(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 wJe(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 DJe(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(Jte[n.precision]))this.options.precision=Jte[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 OJe(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 bJe(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 MJe(n){return this.options.flatten=O.bool(n)?n:!0,O.object(n)&&this._setBackgroundColourOption("flattenBackground",n.background),this}function _Je(){return this.options.unflatten=!0,this}function TJe(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 NJe(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 RJe(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 kJe(n){return this.normalise(n)}function vJe(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 PJe(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 GJe(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 FJe(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 LJe(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 UJe(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(a=>Array.isArray(a)&&a.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 HJe(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 Jte,qte,zte=ue(()=>{Fs();Jte={integer:"integer",float:"float",approximate:"approximate"};qte=n=>{Object.assign(n.prototype,{autoOrient:fJe,rotate:BJe,flip:QJe,flop:yJe,affine:mJe,sharpen:SJe,erode:bJe,dilate:OJe,median:wJe,blur:DJe,flatten:MJe,unflatten:_Je,gamma:TJe,negate:NJe,normalise:RJe,normalize:kJe,clahe:vJe,convolve:PJe,threshold:GJe,boolean:FJe,linear:LJe,recomb:UJe,modulate:HJe})}});var ere=ee((HDA,$te)=>{var C2=Object.defineProperty,KJe=Object.getOwnPropertyDescriptor,xJe=Object.getOwnPropertyNames,YJe=Object.prototype.hasOwnProperty,jJe=(n,t)=>{for(var o in t)C2(n,o,{get:t[o],enumerable:!0})},JJe=(n,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of xJe(t))!YJe.call(n,e)&&e!==o&&C2(n,e,{get:()=>t[e],enumerable:!(a=KJe(t,e))||a.enumerable});return n},qJe=n=>JJe(C2({},"__esModule",{value:!0}),n),Vte={};jJe(Vte,{default:()=>nqe});$te.exports=qJe(Vte);var d2={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 d2)Object.freeze(d2[n]);var Ys=Object.freeze(d2),Wte=Object.create(null);for(let n in Ys)Object.hasOwn(Ys,n)&&(Wte[Ys[n]]=n);var Xa={to:{},get:{}};Xa.get=function(n){let t=n.slice(0,3).toLowerCase(),o,a;switch(t){case"hsl":{o=Xa.get.hsl(n),a="hsl";break}case"hwb":{o=Xa.get.hwb(n),a="hwb";break}default:{o=Xa.get.rgb(n),a="rgb";break}}return o?{model:a,value:o}:null};Xa.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,a=/^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,i=/^(\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(a)){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(i))?r[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Ys,r[1])?(A=Ys[r[1]].slice(),A[3]=1,A):null:null;for(s=0;s<3;s++)A[s]=pI(A[s],0,255);return A[3]=pI(A[3],0,1),A};Xa.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 a=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,i=pI(Number.parseFloat(o[2]),0,100),A=pI(Number.parseFloat(o[3]),0,100),r=pI(Number.isNaN(a)?1:a,0,1);return[e,i,A,r]}return null};Xa.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 a=Number.parseFloat(o[4]),e=(Number.parseFloat(o[1])%360+360)%360,i=pI(Number.parseFloat(o[2]),0,100),A=pI(Number.parseFloat(o[3]),0,100),r=pI(Number.isNaN(a)?1:a,0,1);return[e,i,A,r]}return null};Xa.to.hex=function(...n){return"#"+dO(n[0])+dO(n[1])+dO(n[2])+(n[3]<1?dO(Math.round(n[3]*255)):"")};Xa.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]+")"};Xa.to.rgb.percent=function(...n){let t=Math.round(n[0]/255*100),o=Math.round(n[1]/255*100),a=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+t+"%, "+o+"%, "+a+"%)":"rgba("+t+"%, "+o+"%, "+a+"%, "+n[3]+")"};Xa.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]+")"};Xa.to.hwb=function(...n){let t="";return n.length>=4&&n[3]!==1&&(t=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+t+")"};Xa.to.keyword=function(...n){return Wte[n.slice(0,3)]};function pI(n,t,o){return Math.min(Math.max(t,n),o)}function dO(n){let t=Math.round(n).toString(16).toUpperCase();return t.length<2?"0"+t:t}var xh=Xa,Zte={};for(let n of Object.keys(Ys))Zte[Ys[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"]}},Xl=sA,Ac=(6/29)**3;function jh(n){let t=n>.0031308?1.055*n**.4166666666666667-.055:n*12.92;return Math.min(Math.max(0,t),1)}function Jh(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,a=n[2]/255,e=Math.min(t,o,a),i=Math.max(t,o,a),A=i-e,r,s;switch(i){case e:{r=0;break}case t:{r=(o-a)/A;break}case o:{r=2+(a-t)/A;break}case a:{r=4+(t-o)/A;break}}r=Math.min(r*60,360),r<0&&(r+=360);let g=(e+i)/2;return i===e?s=0:g<=.5?s=A/(i+e):s=A/(2-i-e),[r,s*100,g*100]};sA.rgb.hsv=function(n){let t,o,a,e,i,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(p){return(g-p)/6/c+1/2};if(c===0)e=0,i=0;else{switch(i=c/g,t=I(A),o=I(r),a=I(s),g){case A:{e=a-o;break}case r:{e=1/3+t-a;break}case s:{e=2/3+o-t;break}}e<0?e+=1:e>1&&(e-=1)}return[e*360,i*100,g*100]};sA.rgb.hwb=function(n){let t=n[0],o=n[1],a=n[2],e=sA.rgb.hsl(n)[0],i=1/255*Math.min(t,Math.min(o,a));return a=1-1/255*Math.max(t,Math.max(o,a)),[e,i*100,a*100]};sA.rgb.oklab=function(n){let t=Jh(n[0]/255),o=Jh(n[1]/255),a=Jh(n[2]/255),e=Math.cbrt(.4122214708*t+.5363325363*o+.0514459929*a),i=Math.cbrt(.2119034982*t+.6806995451*o+.1073969566*a),A=Math.cbrt(.0883024619*t+.2817188376*o+.6299787005*a),r=.2104542553*e+.793617785*i-.0040720468*A,s=1.9779984951*e-2.428592205*i+.4505937099*A,g=.0259040371*e+.7827717662*i-.808675766*A;return[r*100,s*100,g*100]};sA.rgb.cmyk=function(n){let t=n[0]/255,o=n[1]/255,a=n[2]/255,e=Math.min(1-t,1-o,1-a),i=(1-t-e)/(1-e)||0,A=(1-o-e)/(1-e)||0,r=(1-a-e)/(1-e)||0;return[i*100,A*100,r*100,e*100]};function zJe(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=Zte[n];if(t)return t;let o=Number.POSITIVE_INFINITY,a;for(let e of Object.keys(Ys)){let i=Ys[e],A=zJe(n,i);AAc?o**(1/3):7.787*o+16/116,a=a>Ac?a**(1/3):7.787*a+16/116,e=e>Ac?e**(1/3):7.787*e+16/116;let i=116*a-16,A=500*(o-a),r=200*(a-e);return[i,A,r]};sA.hsl.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100,e,i;if(o===0)return i=a*255,[i,i,i];let A=a<.5?a*(1+o):a+o-a*o,r=2*a-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?i=r+(A-r)*6*e:2*e<1?i=A:3*e<2?i=r+(A-r)*(2/3-e)*6:i=r,s[g]=i*255;return s};sA.hsl.hsv=function(n){let t=n[0],o=n[1]/100,a=n[2]/100,e=o,i=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,e*=i<=1?i:2-i;let A=(a+o)/2,r=a===0?2*e/(i+e):2*o/(a+o);return[t,r*100,A*100]};sA.hsv.rgb=function(n){let t=n[0]/60,o=n[1]/100,a=n[2]/100,e=Math.floor(t)%6,i=t-Math.floor(t),A=255*a*(1-o),r=255*a*(1-o*i),s=255*a*(1-o*(1-i));switch(a*=255,e){case 0:return[a,s,A];case 1:return[r,a,A];case 2:return[A,a,s];case 3:return[A,r,a];case 4:return[s,A,a];case 5:return[a,A,r]}};sA.hsv.hsl=function(n){let t=n[0],o=n[1]/100,a=n[2]/100,e=Math.max(a,.01),i,A;A=(2-o)*a;let r=(2-o)*e;return i=o*e,i/=r<=1?r:2-r,i=i||0,A/=2,[t,i*100,A*100]};sA.hwb.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100,e=o+a,i;e>1&&(o/=e,a/=e);let A=Math.floor(6*t),r=1-a;i=6*t-A,(A&1)!==0&&(i=1-i);let s=o+i*(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,a=n[2]/100,e=n[3]/100,i=1-Math.min(1,t*(1-e)+e),A=1-Math.min(1,o*(1-e)+e),r=1-Math.min(1,a*(1-e)+e);return[i*255,A*255,r*255]};sA.xyz.rgb=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e,i,A;return e=t*3.2404542+o*-1.5371385+a*-.4985314,i=t*-.969266+o*1.8760108+a*.041556,A=t*.0556434+o*-.2040259+a*1.0572252,e=jh(e),i=jh(i),A=jh(A),[e*255,i*255,A*255]};sA.xyz.lab=function(n){let t=n[0],o=n[1],a=n[2];t/=95.047,o/=100,a/=108.883,t=t>Ac?t**(1/3):7.787*t+16/116,o=o>Ac?o**(1/3):7.787*o+16/116,a=a>Ac?a**(1/3):7.787*a+16/116;let e=116*o-16,i=500*(t-o),A=200*(o-a);return[e,i,A]};sA.xyz.oklab=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=Math.cbrt(.8189330101*t+.3618667424*o-.1288597137*a),i=Math.cbrt(.0329845436*t+.9293118715*o+.0361456387*a),A=Math.cbrt(.0482003018*t+.2643662691*o+.633851707*a),r=.2104542553*e+.793617785*i-.0040720468*A,s=1.9779984951*e-2.428592205*i+.4505937099*A,g=.0259040371*e+.7827717662*i-.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,a=n[2]/100,e=(.999999998*t+.396337792*o+.215803758*a)**3,i=(1.000000008*t-.105561342*o-.063854175*a)**3,A=(1.000000055*t-.089484182*o-1.291485538*a)**3,r=1.227013851*e-.55779998*i+.281256149*A,s=-.040580178*e+1.11225687*i-.071676679*A,g=-.076381285*e-.421481978*i+1.58616322*A;return[r*100,s*100,g*100]};sA.oklab.rgb=function(n){let t=n[0]/100,o=n[1]/100,a=n[2]/100,e=(t+.3963377774*o+.2158037573*a)**3,i=(t-.1055613458*o-.0638541728*a)**3,A=(t-.0894841775*o-1.291485548*a)**3,r=jh(4.0767416621*e-3.3077115913*i+.2309699292*A),s=jh(-1.2684380046*e+2.6097574011*i-.3413193965*A),g=jh(-.0041960863*e-.7034186147*i+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],a=n[2],e,i,A;i=(t+16)/116,e=o/500+i,A=i-a/200;let r=i**3,s=e**3,g=A**3;return i=r>Ac?r:(i-16/116)/7.787,e=s>Ac?s:(e-16/116)/7.787,A=g>Ac?g:(A-16/116)/7.787,e*=95.047,i*=100,A*=108.883,[e,i,A]};sA.lab.lch=function(n){let t=n[0],o=n[1],a=n[2],e;e=Math.atan2(a,o)*360/2/Math.PI,e<0&&(e+=360);let A=Math.sqrt(o*o+a*a);return[t,A,e]};sA.lch.lab=function(n){let t=n[0],o=n[1],e=n[2]/360*2*Math.PI,i=o*Math.cos(e),A=o*Math.sin(e);return[t,i,A]};sA.rgb.ansi16=function(n,t=null){let[o,a,e]=n,i=t===null?sA.rgb.hsv(n)[2]:t;if(i=Math.round(i/50),i===0)return 30;let A=30+(Math.round(e/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return i===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],a=n[2];return t>>4===o>>4&&o>>4===a>>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(a/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,a=(t&1)*o*255,e=(t>>1&1)*o*255,i=(t>>2&1)*o*255;return[a,e,i]};sA.ansi256.rgb=function(n){if(n=n[0],n>=232){let i=(n-232)*10+8;return[i,i,i]}n-=16;let t,o=Math.floor(n/36)/5*255,a=Math.floor((t=n%36)/6)/5*255,e=t%6/5*255;return[o,a,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 a=Number.parseInt(o,16),e=a>>16&255,i=a>>8&255,A=a&255;return[e,i,A]};sA.rgb.hcg=function(n){let t=n[0]/255,o=n[1]/255,a=n[2]/255,e=Math.max(Math.max(t,o),a),i=Math.min(Math.min(t,o),a),A=e-i,r,s=A<1?i/(1-A):0;return A<=0?r=0:e===t?r=(o-a)/A%6:e===o?r=2+(a-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,a=o<.5?2*t*o:2*t*(1-o),e=0;return a<1&&(e=(o-.5*a)/(1-a)),[n[0],a*100,e*100]};sA.hsv.hcg=function(n){let t=n[1]/100,o=n[2]/100,a=t*o,e=0;return a<1&&(e=(o-a)/(1-a)),[n[0],a*100,e*100]};sA.hcg.rgb=function(n){let t=n[0]/360,o=n[1]/100,a=n[2]/100;if(o===0)return[a*255,a*255,a*255];let e=[0,0,0],i=t%1*6,A=i%1,r=1-A,s=0;switch(Math.floor(i)){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)*a,[(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,a=t+o*(1-t),e=0;return a>0&&(e=t/a),[n[0],e*100,a*100]};sA.hcg.hsl=function(n){let t=n[1]/100,a=n[2]/100*(1-t)+.5*t,e=0;return a>0&&a<.5?e=t/(2*a):a>=.5&&a<1&&(e=t/(2*(1-a))),[n[0],e*100,a*100]};sA.hcg.hwb=function(n){let t=n[1]/100,o=n[2]/100,a=t+o*(1-t);return[n[0],(a-t)*100,(1-a)*100]};sA.hwb.hcg=function(n){let t=n[1]/100,a=1-n[2]/100,e=a-t,i=0;return e<1&&(i=(a-e)/(1-e)),[n[0],e*100,i*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,a=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(a.length)+a};sA.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]};function VJe(){let n={},t=Object.keys(Xl);for(let{length:o}=t,a=0;a0;){let a=o.pop(),e=Object.keys(Xl[a]);for(let{length:i}=e,A=0;A1&&(o=a),n(o))};return"conversion"in n&&(t.conversion=n.conversion),t}function rqe(n){let t=function(...o){let a=o[0];if(a==null)return a;a.length>1&&(o=a);let e=n(o);if(typeof e=="object")for(let{length:i}=e,A=0;A0){this.model=t||"rgb",a=fo[this.model].channels;let e=Array.prototype.slice.call(n,0,a);this.color=u2(e,a),this.valpha=typeof n[a]=="number"?n[a]: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 i=e.sort().join("");if(!(i in h2))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=h2[i];let{labels:A}=fo[this.model],r=[];for(o=0;o(n%360+360)%360),saturationl:Mr("hsl",1,Xr(100)),lightness:Mr("hsl",2,Xr(100)),saturationv:Mr("hsv",1,Xr(100)),value:Mr("hsv",2,Xr(100)),chroma:Mr("hcg",1,Xr(100)),gray:Mr("hcg",2,Xr(100)),white:Mr("hwb",1,Xr(100)),wblack:Mr("hwb",2,Xr(100)),cyan:Mr("cmyk",0,Xr(100)),magenta:Mr("cmyk",1,Xr(100)),yellow:Mr("cmyk",2,Xr(100)),black:Mr("cmyk",3,Xr(100)),x:Mr("xyz",0,Xr(95.047)),y:Mr("xyz",1,Xr(100)),z:Mr("xyz",2,Xr(108.833)),l:Mr("lab",0,Xr(100)),a:Mr("lab",1),b:Mr("lab",2),keyword(n){return n!==void 0?new Bi(n):fo[this.model].keyword(this.color)},hex(n){return n!==void 0?new Bi(n):xh.to.hex(...this.rgb().round().color)},hexa(n){if(n!==void 0)return new Bi(n);let t=this.rgb().round().color,o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),xh.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,a]of n.entries()){let e=a/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 Bi.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(),a=this.rgb(),e=t===void 0?.5:t,i=2*e-1,A=o.alpha()-a.alpha(),r=((i*A===-1?i:(i+A)/(1+i*A))+1)/2,s=1-r;return Bi.rgb(r*o.red()+s*a.red(),r*o.green()+s*a.green(),r*o.blue()+s*a.blue(),o.alpha()*e+a.alpha()*(1-e))}};for(let n of Object.keys(fo)){if(Xte.includes(n))continue;let{channels:t}=fo[n];Bi.prototype[n]=function(...o){return this.model===n?new Bi(this):o.length>0?new Bi(o,n):new Bi([...oqe(fo[this.model][n].raw(this.color)),this.valpha],n)},Bi[n]=function(...o){let a=o[0];return typeof a=="number"&&(a=u2(o,t)),new Bi(a,n)}}function iqe(n,t){return Number(n.toFixed(t))}function aqe(n){return function(t){return iqe(t,n)}}function Mr(n,t,o){n=Array.isArray(n)?n:[n];for(let a of n)(E2[a]||=[])[t]=o;return n=n[0],function(a){let e;return a!==void 0?(o&&(a=o(a)),e=this[n](),e.color[t]=a,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 oqe(n){return Array.isArray(n)?n:[n]}function u2(n,t){for(let o=0;o{Are.exports=ere().default});function sqe(n){return this._setBackgroundColourOption("tint",n),this}function gqe(n){return this.options.greyscale=O.bool(n)?n:!0,this}function cqe(n){return this.greyscale(n)}function Iqe(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspacePipeline=n,this}function lqe(n){return this.pipelineColourspace(n)}function pqe(n){if(!O.string(n))throw O.invalidParameterError("colourspace","string",n);return this.options.colourspace=n,this}function dqe(n){return this.toColourspace(n)}function are(n){if(O.object(n)||O.string(n)&&n.length>=3&&n.length<=200){let t=(0,ire.default)(n),o=t.red(),a=t.green(),e=t.blue(),i=Math.round(t.alpha()*255);for(let[A,r]of[["red",o],["green",a],["blue",e],["alpha",i]])if(!O.number(r))throw O.invalidParameterError(`background.${A}`,"number",r);return[o,a,e,i]}else throw O.invalidParameterError("background","object or string",n)}function hqe(n,t){O.defined(t)&&(this.options[n]=are(t))}var ire,rre,ore,nre=ue(()=>{ire=ze(tre(),1);Fs();rre={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};ore=n=>{Object.assign(n.prototype,{tint:sqe,greyscale:gqe,grayscale:cqe,pipelineColourspace:Iqe,pipelineColorspace:lqe,toColourspace:pqe,toColorspace:dqe,_getBackgroundColourOption:are,_setBackgroundColourOption:hqe}),n.colourspace=rre,n.colorspace=rre}});function uqe(){return this.options.removeAlpha=!0,this}function Cqe(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 Bqe(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 fqe(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 Qqe(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 Eqe,sre,gre=ue(()=>{Fs();Eqe={and:"and",or:"or",eor:"eor"};sre=n=>{Object.assign(n.prototype,{removeAlpha:uqe,ensureAlpha:Cqe,extractChannel:Bqe,joinChannel:fqe,bandbool:Qqe}),n.bool=Eqe}});import B2 from"node:path";function mqe(n,t){let o;if(O.string(n)?O.string(this.options.input.file)&&B2.resolve(this.options.input.file)===B2.resolve(n)?o=new Error("Cannot use same file for input and output"):yqe.test(B2.extname(n))&&!this.constructor.format.jp2.output.file&&(o=Ire()):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 a=Error();return this._pipeline(t,a)}return this}function Sqe(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 wqe(){this.options.resolveWithObject=!0,this.options.typedArrayOut=!0;let n=Error();return this._pipeline(null,n)}function Dqe(n){if(O.number(n)&&n>0)this.options.withMetadataDensity=n;else throw O.invalidParameterError("density","positive number",n);return this.keepExif()}function Oqe(){return this.options.keepMetadata|=1,this}function bqe(n){if(O.object(n))for(let[t,o]of Object.entries(n))if(O.object(o))for(let[a,e]of Object.entries(o))if(O.string(e))this.options.withExif[`exif-${t.toLowerCase()}-${a}`]=e;else throw O.invalidParameterError(`${t}.${a}`,"string",e);else throw O.invalidParameterError(t,"object",o);else throw O.invalidParameterError("exif","object",n);return this.options.withExifMerge=!1,this.keepExif()}function Mqe(n){return this.withExif(n),this.options.withExifMerge=!0,this}function _qe(){return this.options.keepMetadata|=8,this}function Tqe(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 Nqe(){return this.options.keepGainMap=!0,this.options.withGainMap=!1,this.options.keepMetadata|=32,this}function Rqe(){return this.options.withGainMap=!0,this.options.keepGainMap=!1,this.options.colourspace="scrgb",this}function kqe(){return this.options.keepMetadata|=2,this}function vqe(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 Pqe(){return this.options.keepMetadata|=31,this}function Gqe(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 Fqe(n,t){let o=cre.get((O.object(n)&&O.string(n.id)?n.id:n).toLowerCase());if(!o)throw O.invalidParameterError("format",`one of: ${[...cre.keys()].join(", ")}`,n);return this[o](t)}function Lqe(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 a=O.bool(n.optimizeScans)?n.optimizeScans:n.optimiseScans;O.defined(a)&&(this._setBooleanOption("jpegOptimiseScans",a),a&&(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 Uqe(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=lre(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 Hqe(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 f2(n,this.options),this._updateFormatOut("webp",n)}function Kqe(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=lre(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 f2(n,this.options),this._updateFormatOut("gif",n)}function xqe(n){if(!this.constructor.format.jp2.output.buffer)throw Ire();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 f2(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 Yqe(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 jqe(n){return this.heif({...n,compression:"av1"})}function Jqe(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 qqe(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 f2(n,this.options),this._updateFormatOut("jxl",n)}function zqe(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 Vqe(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 Wqe(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 Zqe(n,t){return O.object(t)&&t.force===!1||(this.options.formatOut=n),this}function Xqe(n,t){if(O.bool(t))this.options[n]=t;else throw O.invalidParameterError(n,"boolean",t)}function $qe(){if(!this.options.streamOut){this.options.streamOut=!0;let n=Error();this._pipeline(void 0,n)}}function e4e(n,t){return typeof n=="function"?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),Dt.pipeline(this.options,(o,a,e)=>{o?n(O.nativeError(o,t)):n(null,a,e)})}):Dt.pipeline(this.options,(o,a,e)=>{o?n(O.nativeError(o,t)):n(null,a,e)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),Dt.pipeline(this.options,(o,a,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(a)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):Dt.pipeline(this.options,(o,a,e)=>{o?this.emit("error",O.nativeError(o,t)):(this.emit("info",e),this.push(a)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((o,a)=>{this.once("finish",()=>{this._flattenBufferIn(),Dt.pipeline(this.options,(e,i,A)=>{e?a(O.nativeError(e,t)):this.options.resolveWithObject?o({data:i,info:A}):o(i)})})}):new Promise((o,a)=>{Dt.pipeline(this.options,(e,i,A)=>{e?a(O.nativeError(e,t)):this.options.resolveWithObject?o({data:i,info:A}):o(i)})})}var cre,yqe,Ire,lre,pre,dre=ue(()=>{Fs();of();cre=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"]]),yqe=/\.(jp[2x]|j2[kc])$/i,Ire=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),lre=n=>1<<31-Math.clz32(Math.ceil(Math.log2(n)));pre=n=>{Object.assign(n.prototype,{toFile:mqe,toBuffer:Sqe,toUint8Array:wqe,withDensity:Dqe,keepExif:Oqe,withExif:bqe,withExifMerge:Mqe,keepIccProfile:_qe,withIccProfile:Tqe,keepGainMap:Nqe,withGainMap:Rqe,keepXmp:kqe,withXmp:vqe,keepMetadata:Pqe,withMetadata:Gqe,toFormat:Fqe,jpeg:Lqe,jp2:xqe,png:Uqe,webp:Hqe,tiff:Yqe,avif:jqe,heif:Jqe,jxl:qqe,gif:Kqe,raw:zqe,tile:Vqe,timeout:Wqe,_updateFormatOut:Zqe,_setBooleanOption:Xqe,_read:$qe,_pipeline:e4e})}});import A4e from"node:events";import{createRequire as t4e}from"node:module";import{availableParallelism as r4e}from"node:os";function Ere(n){if(O.bool(n))return n?Dt.cache(50,20,100):Dt.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 Dt.cache(n.memory,n.files,n.items)}else return Dt.cache()}function a4e(n){return Dt.concurrency(O.integer(n)?n:null)}function n4e(){return Dt.counters()}function s4e(n){return Dt.simd(O.bool(n)?n:null)}function g4e(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))Dt.block(n.operation,!0);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}function c4e(n){if(O.object(n))if(Array.isArray(n.operation)&&n.operation.every(O.string))Dt.block(n.operation,!1);else throw O.invalidParameterError("operation","Array",n.operation);else throw O.invalidParameterError("options","object",n)}var nf,Q2,hre,y2,dI,i4e,qh,o4e,ure,Cre=ue(()=>{nf=ze(WD(),1);Fs();g2();of();cO();Q2=t4e(import.meta.url),hre=IO.runtimePlatformArch(),y2=Dt.libvipsVersion(),dI=Dt.format();dI.heif.output.alias=["avif","heic"];dI.jpeg.output.alias=["jpe","jpg"];dI.tiff.output.alias=["tif"];dI.jp2.output.alias=["j2c","j2k","jp2","jpx"];i4e={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},qh={vips:y2.semver};if(!y2.isGlobal)if(y2.isWasm)try{qh=Q2("@img/sharp-wasm32/versions")}catch{}else try{qh=Q2(`@img/sharp-${hre}/versions`)}catch{try{qh=Q2(`@img/sharp-libvips-${hre}/versions`)}catch{}}qh.sharp=$g.version;qh.heif&&dI.heif&&(dI.heif.input.fileSuffix=[".avif"],dI.heif.output.alias=["avif"]);Ere(!0);!process.env.MALLOC_ARENA_MAX&&nf.default.familySync()===nf.default.GLIBC&&!Dt._isUsingJemalloc()?Dt.concurrency(1):nf.default.familySync()===nf.default.MUSL&&Dt.concurrency()===1024&&Dt.concurrency(r4e());o4e=new A4e.EventEmitter;ure=n=>{n.cache=Ere,n.concurrency=a4e,n.counters=n4e,n.simd=s4e,n.format=dI,n.interpolators=i4e,n.versions=qh,n.queue=o4e,n.block=g4e,n.unblock=c4e}});var Bre={};Lr(Bre,{default:()=>I4e});var I4e,fre=ue(()=>{kte();Gte();xte();jte();zte();nre();gre();dre();Cre();Pte(xs);Kte(xs);Yte(xs);qte(xs);ore(xs);sre(xs);pre(xs);ure(xs);I4e=xs});var l4e,kA,hI,sf=ue(()=>{l4e="End-Of-Stream",kA=class extends Error{constructor(){super(l4e),this.name="EndOfStreamError"}},hI=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}});var hO,Qre=ue(()=>{hO=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((t,o)=>{this.reject=o,this.resolve=t})}}});var EI,EO=ue(()=>{sf();EI=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(t,o=!1){let a=await this.read(t,o);return this.peekQueue.push(t.subarray(0,a)),a}async read(t,o=!1){if(t.length===0)return 0;let a=this.readFromPeekBuffer(t);if(this.endOfStream||(a+=await this.readRemainderFromStream(t.subarray(a),o)),a===0&&!o)throw new kA;return a}readFromPeekBuffer(t){let o=t.length,a=0;for(;this.peekQueue.length>0&&o>0;){let e=this.peekQueue.pop();if(!e)throw new Error("peekData should be defined");let i=Math.min(e.length,o);t.set(e.subarray(0,i),a),a+=i,o-=i,i{sf();Qre();EO();gf=class extends EI{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 a=this.s.read(t.length);if(a)return t.set(a),a.length;let e={buffer:t,mayBeLess:o,deferred:new hO};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 hI)}async close(){return this.abort()}}});var uO,mre=ue(()=>{EO();uO=class extends EI{constructor(t){super(),this.reader=t}async abort(){return this.close()}async close(){this.reader.releaseLock()}}});var cf,m2=ue(()=>{mre();cf=class extends uO{async readFromStream(t,o){if(t.length===0)return 0;let a=await this.reader.read(new Uint8Array(t.length),{min:o?void 0:t.length});return a.done&&(this.endOfStream=a.done),a.value?(t.set(a.value),a.value.length):0}}});var zh,S2=ue(()=>{sf();EO();zh=class extends EI{constructor(t){super(),this.reader=t,this.buffer=null}writeChunk(t,o){let a=Math.min(o.length,t.length);return t.set(o.subarray(0,a)),a{m2();S2()});var uI=ue(()=>{sf();yre();m2();S2();Sre()});var Zn,Vh=ue(()=>{uI();Zn=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 a=new Uint8Array(t.len);if(await this.readBuffer(a,{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{Vh();uI();p4e=256e3,If=class extends Zn{constructor(t,o){super(o),this.streamReader=t,this.fileInfo=o?.fileInfo??{}}async readBuffer(t,o){let a=this.normalizeOptions(t,o),e=a.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(a.length===0)return 0;let i=await this.streamReader.read(t.subarray(0,a.length),a.mayBeLess);if(this.position+=i,(!o||!o.mayBeLess)&&i0){let A=new Uint8Array(a.length+i);return e=await this.peekBuffer(A,{mayBeLess:a.mayBeLess}),t.set(A.subarray(i)),e-i}if(i<0)throw new Error("Cannot peek from a negative offset in a stream")}if(a.length>0){try{e=await this.streamReader.peek(t.subarray(0,a.length),a.mayBeLess)}catch(i){if(o?.mayBeLess&&i instanceof kA)return 0;throw i}if(!a.mayBeLess&&e{uI();Vh();CO=class extends Zn{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 a=await this.peekBuffer(t,o);return this.position+=a,a}async peekBuffer(t,o){let a=this.normalizeOptions(t,o),e=Math.min(this.uint8Array.length-a.position,a.length);if(!a.mayBeLess&&e{uI();Vh();BO=class extends Zn{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 a=await this.peekBuffer(t,o);return this.position+=a,a}async peekBuffer(t,o){let a=this.normalizeOptions(t,o),e=Math.min(this.blob.size-a.position,a.length);if(!a.mayBeLess&&e{if(await o.close(),e)return e()},new If(o,a)}function fO(n,t){let o=w2(n),a=t??{},e=a.onClose;return a.onClose=async()=>{if(await o.close(),e)return e()},new If(o,a)}function Qo(n,t){return new CO(n,t)}function QO(n,t){return new BO(n,t)}var yO=ue(()=>{uI();wre();Dre();Ore();uI();Vh()});import{open as h4e}from"node:fs/promises";var Wh,D2=ue(()=>{Vh();uI();Wh=class n extends Zn{static async fromFile(t){let o=await h4e(t,"r"),a=await o.stat();return new n(o,{fileInfo:{path:t,size:a.size}})}constructor(t,o){super(o),this.fileHandle=t,this.fileInfo=o.fileInfo}async readBuffer(t,o){let a=this.normalizeOptions(t,o);if(this.position=a.position,a.length===0)return 0;let e=await this.fileHandle.read(t,0,a.length,a.position);if(this.position+=e.bytesRead,e.bytesRead{yO();D2();D2();yO();Mre=Wh.fromFile});var _re=ee(b2=>{b2.read=function(n,t,o,a,e){var i,A,r=e*8-a-1,s=(1<>1,c=-7,I=o?e-1:0,p=o?-1:1,B=n[t+I];for(I+=p,i=B&(1<<-c)-1,B>>=-c,c+=r;c>0;i=i*256+n[t+I],I+=p,c-=8);for(A=i&(1<<-c)-1,i>>=-c,c+=a;c>0;A=A*256+n[t+I],I+=p,c-=8);if(i===0)i=1-g;else{if(i===s)return A?NaN:(B?-1:1)*(1/0);A=A+Math.pow(2,a),i=i-g}return(B?-1:1)*A*Math.pow(2,i-a)};b2.write=function(n,t,o,a,e,i){var A,r,s,g=i*8-e-1,c=(1<>1,p=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=a?0:i-1,f=a?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+=p/s:t+=p*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 u4e(){if(!(typeof globalThis.TextDecoder>"u"))return mO??(mO=new globalThis.TextDecoder("utf-8"))}function C4e(){if(!(typeof globalThis.TextEncoder>"u"))return SO??(SO=new globalThis.TextEncoder)}function Tr(n,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=u4e();return o?o.decode(n):f4e(n)}case"utf-16le":return Q4e(n);case"us-ascii":case"ascii":return y4e(n);case"latin1":case"iso-8859-1":return m4e(n);case"windows-1252":return S4e(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function Nre(n="",t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let o=C4e();return o?o.encode(n):w4e(n)}case"utf-16le":return D4e(n);case"us-ascii":case"ascii":return O4e(n);case"latin1":case"iso-8859-1":return b4e(n);case"windows-1252":return M4e(n);default:throw new RangeError(`Encoding '${t}' not supported`)}}function _2(n,t){t.length!==0&&(n.push(String.fromCharCode.apply(null,t)),t.length=0)}function Pr(n,t,o){t.push(o),t.length>=Zh&&_2(n,t)}function B4e(n,t,o){if(o<=65535){Pr(n,t,o);return}o-=65536,Pr(n,t,55296+(o>>10)),Pr(n,t,56320+(o&1023))}function f4e(n){let t=[],o=[],a=0;for(n.length>=3&&n[0]===239&&n[1]===187&&n[2]===191&&(a=3);a244){Pr(t,o,Fi),a++;continue}if(e<=223){if(a+1>=n.length){Pr(t,o,Fi),a++;continue}let c=n[a+1];if((c&192)!==128){Pr(t,o,Fi),a++;continue}let I=(e&31)<<6|c&63;Pr(t,o,I),a+=2;continue}if(e<=239){if(a+2>=n.length){Pr(t,o,Fi),a++;continue}let c=n[a+1],I=n[a+2];if(!((c&192)===128&&(I&192)===128&&!(e===224&&c<160)&&!(e===237&&c>=160))){Pr(t,o,Fi),a++;continue}let B=(e&15)<<12|(c&63)<<6|I&63;Pr(t,o,B),a+=3;continue}if(a+3>=n.length){Pr(t,o,Fi),a++;continue}let i=n[a+1],A=n[a+2],r=n[a+3];if(!((i&192)===128&&(A&192)===128&&(r&192)===128&&!(e===240&&i<144)&&!(e===244&&i>143))){Pr(t,o,Fi),a++;continue}let g=(e&7)<<18|(i&63)<<12|(A&63)<<6|r&63;B4e(t,o,g),a+=4}return _2(t,o),t.join("")}function Q4e(n){let t=[],o=[],a=n.length,e=0;for(;e+1=55296&&i<=56319){if(e+1=56320&&A<=57343?(Pr(t,o,i),Pr(t,o,A),e+=2):Pr(t,o,Fi)}else Pr(t,o,Fi);continue}if(i>=56320&&i<=57343){Pr(t,o,Fi);continue}Pr(t,o,i)}return e=128&&e<=159?Tre[e]:void 0;o+=i??String.fromCharCode(e),o.length>=Zh&&(t.push(o),o="")}return o&&t.push(o),t.join("")}function w4e(n){let t=[];for(let o=0;o=55296&&a<=56319)if(o+1=56320&&e<=57343?(a=65536+(a-55296<<10)+(e-56320),o++):a=Fi}else a=Fi;else a>=56320&&a<=57343&&(a=Fi);a<128?t.push(a):a<2048?t.push(192|a>>6,128|a&63):a<65536?t.push(224|a>>12,128|a>>6&63,128|a&63):t.push(240|a>>18,128|a>>12&63,128|a>>6&63,128|a&63)}return new Uint8Array(t)}function D4e(n){let t=[];for(let a=0;a=55296&&e<=56319){if(a+1=56320&&i<=57343?(t.push(e,i),a++):t.push(Fi)}else t.push(Fi);continue}if(e>=56320&&e<=57343){t.push(Fi);continue}t.push(e)}let o=new Uint8Array(t.length*2);for(let a=0;a>>8}return o}function O4e(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 Tre,M2,mO,SO,Zh,Fi,js=ue(()=>{Tre={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"},M2={};for(let[n,t]of Object.entries(Tre))M2[t]=Number.parseInt(n,10);Zh=32*1024,Fi=65533});var VA={};Lr(VA,{AnsiStringType:()=>N2,Float16_BE:()=>N4e,Float16_LE:()=>R4e,Float32_BE:()=>k2,Float32_LE:()=>k4e,Float64_BE:()=>DO,Float64_LE:()=>v4e,Float80_BE:()=>P4e,Float80_LE:()=>G4e,INT16_BE:()=>on,INT16_LE:()=>_4e,INT24_BE:()=>wO,INT24_LE:()=>T4e,INT32_BE:()=>Qa,INT32_LE:()=>ur,INT64_BE:()=>R2,INT64_LE:()=>df,INT8:()=>qs,IgnoreType:()=>T2,StringType:()=>We,UINT16_BE:()=>LA,UINT16_LE:()=>SA,UINT24_BE:()=>Gr,UINT24_LE:()=>pf,UINT32_BE:()=>xe,UINT32_LE:()=>Le,UINT64_BE:()=>zs,UINT64_LE:()=>Fr,UINT8:()=>QA,Uint8ArrayType:()=>bt});function zA(n){return new DataView(n.buffer,n.byteOffset)}var Js,QA,SA,LA,pf,Gr,Le,xe,qs,on,_4e,T4e,wO,Qa,ur,Fr,df,zs,R2,N4e,R4e,k2,k4e,DO,v4e,P4e,G4e,T2,bt,We,N2,DA=ue(()=>{Js=ze(_re(),1);js();QA={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}},pf={len:3,get(n,t){let o=zA(n);return o.getUint8(t)+(o.getUint16(t+1,!0)<<8)},put(n,t,o){let a=zA(n);return a.setUint8(t,o&255),a.setUint16(t+1,o>>8,!0),t+3}},Gr={len:3,get(n,t){let o=zA(n);return(o.getUint16(t)<<8)+o.getUint8(t+2)},put(n,t,o){let a=zA(n);return a.setUint16(t,o>>8),a.setUint8(t+2,o&255),t+3}},Le={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}},qs={len:1,get(n,t){return zA(n).getInt8(t)},put(n,t,o){return zA(n).setInt8(t,o),t+1}},on={len:2,get(n,t){return zA(n).getInt16(t)},put(n,t,o){return zA(n).setInt16(t,o),t+2}},_4e={len:2,get(n,t){return zA(n).getInt16(t,!0)},put(n,t,o){return zA(n).setInt16(t,o,!0),t+2}},T4e={len:3,get(n,t){let o=pf.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let a=zA(n);return a.setUint8(t,o&255),a.setUint16(t+1,o>>8,!0),t+3}},wO={len:3,get(n,t){let o=Gr.get(n,t);return o>8388607?o-16777216:o},put(n,t,o){let a=zA(n);return a.setUint16(t,o>>8),a.setUint8(t+2,o&255),t+3}},Qa={len:4,get(n,t){return zA(n).getInt32(t)},put(n,t,o){return zA(n).setInt32(t,o),t+4}},ur={len:4,get(n,t){return zA(n).getInt32(t,!0)},put(n,t,o){return zA(n).setInt32(t,o,!0),t+4}},Fr={len:8,get(n,t){return zA(n).getBigUint64(t,!0)},put(n,t,o){return zA(n).setBigUint64(t,o,!0),t+8}},df={len:8,get(n,t){return zA(n).getBigInt64(t,!0)},put(n,t,o){return zA(n).setBigInt64(t,o,!0),t+8}},zs={len:8,get(n,t){return zA(n).getBigUint64(t)},put(n,t,o){return zA(n).setBigUint64(t,o),t+8}},R2={len:8,get(n,t){return zA(n).getBigInt64(t)},put(n,t,o){return zA(n).setBigInt64(t,o),t+8}},N4e={len:2,get(n,t){return Js.read(n,t,!1,10,this.len)},put(n,t,o){return Js.write(n,o,t,!1,10,this.len),t+this.len}},R4e={len:2,get(n,t){return Js.read(n,t,!0,10,this.len)},put(n,t,o){return Js.write(n,o,t,!0,10,this.len),t+this.len}},k2={len:4,get(n,t){return zA(n).getFloat32(t)},put(n,t,o){return zA(n).setFloat32(t,o),t+4}},k4e={len:4,get(n,t){return zA(n).getFloat32(t,!0)},put(n,t,o){return zA(n).setFloat32(t,o,!0),t+4}},DO={len:8,get(n,t){return zA(n).getFloat64(t)},put(n,t,o){return zA(n).setFloat64(t,o),t+8}},v4e={len:8,get(n,t){return zA(n).getFloat64(t,!0)},put(n,t,o){return zA(n).setFloat64(t,o,!0),t+8}},P4e={len:10,get(n,t){return Js.read(n,t,!1,63,this.len)},put(n,t,o){return Js.write(n,o,t,!1,63,this.len),t+this.len}},G4e={len:10,get(n,t){return Js.read(n,t,!0,63,this.len)},put(n,t,o){return Js.write(n,o,t,!0,63,this.len),t+this.len}},T2=class{constructor(t){this.len=t}get(t,o){}},bt=class{constructor(t){this.len=t}get(t,o){return t.subarray(o,o+this.len)}},We=class{constructor(t,o){this.len=t,this.encoding=o}get(t,o=0){let a=t.subarray(o,o+this.len);return Tr(a,this.encoding)}},N2=class extends We{constructor(t){super(t,"windows-1252")}}});var $l,v2,Rre,kre,vre,Pre=ue(()=>{DA();$l={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},v2={get(n){return{signature:Le.get(n,0),compressedSize:Le.get(n,8),uncompressedSize:Le.get(n,12)}},len:16},Rre={get(n){let t=SA.get(n,6);return{signature:Le.get(n,0),minVersion:SA.get(n,4),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,8),compressedSize:Le.get(n,18),uncompressedSize:Le.get(n,22),filenameLength:SA.get(n,26),extraFieldLength:SA.get(n,28),filename:null}},len:30},kre={get(n){return{signature:Le.get(n,0),nrOfThisDisk:SA.get(n,4),nrOfThisDiskWithTheStart:SA.get(n,6),nrOfEntriesOnThisDisk:SA.get(n,8),nrOfEntriesOfSize:SA.get(n,10),sizeOfCd:Le.get(n,12),offsetOfStartOfCd:Le.get(n,16),zipFileCommentLength:SA.get(n,20)}},len:22},vre={get(n){let t=SA.get(n,8);return{signature:Le.get(n,0),minVersion:SA.get(n,6),dataDescriptor:!!(t&8),compressedMethod:SA.get(n,10),compressedSize:Le.get(n,20),uncompressedSize:Le.get(n,24),filenameLength:SA.get(n,28),extraFieldLength:SA.get(n,30),fileCommentLength:SA.get(n,32),relativeOffsetOfLocalHeader:Le.get(n,42),filename:null}},len:46}});function Fre(n){let t=new Uint8Array(Le.len);return Le.put(t,0,n),t}function L4e(n,t){let o=n.length,a=t.length;if(a>o)return-1;for(let e=0;e<=o-a;e++){let i=!0;for(let A=0;Ae+i.length,0),o=new Uint8Array(t),a=0;for(let e of n)o.set(e,a),a+=e.length;return o}var Gre,Vs,P2,F4e,OO,ep,Lre=ue(()=>{DA();Gre=ze(lt(),1);Pre();Vs=(0,Gre.default)("tokenizer:inflate"),P2=256*1024,F4e=Fre($l.DataDescriptor),OO=Fre($l.EndOfCentralDirectory),ep=class n{constructor(t){this.tokenizer=t,this.syncBuffer=new Uint8Array(P2)}async isZip(){return await this.peekSignature()===$l.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(Le)}async findEndOfCentralDirectoryLocator(){let t=this.tokenizer,o=Math.min(16*1024,t.fileInfo.size),a=this.syncBuffer.subarray(0,o);await this.tokenizer.readBuffer(a,{position:t.fileInfo.size-o});for(let e=a.length-4;e>=0;e--)if(a[e]===OO[0]&&a[e+1]===OO[1]&&a[e+2]===OO[2]&&a[e+3]===OO[3])return t.fileInfo.size-o+e;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){Vs("Cannot reading central-directory without random-read support");return}Vs("Reading central-directory...");let t=this.tokenizer.position,o=await this.findEndOfCentralDirectoryLocator();if(o>0){Vs("Central-directory 32-bit signature found");let a=await this.tokenizer.readToken(kre,o),e=[];this.tokenizer.setPosition(a.offsetOfStartOfCd);for(let i=0;i=0?g:s;if(i.handler){let I=new Uint8Array(c);await this.tokenizer.readBuffer(I),r.push(I)}else await this.tokenizer.ignore(c)}Vs(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),i.handler&&await this.inflate(e,U4e(r),i.handler)}else i.handler?(Vs(`Reading compressed-file-data: ${e.compressedSize} bytes`),A=new Uint8Array(e.compressedSize),await this.tokenizer.readBuffer(A),await this.inflate(e,A,i.handler)):(Vs(`Ignoring compressed-file-data: ${e.compressedSize} bytes`),await this.tokenizer.ignore(e.compressedSize));if(Vs(`Reading data-descriptor at pos=${this.tokenizer.position}`),e.dataDescriptor&&(await this.tokenizer.readToken(v2)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-v2.len}`)}while(!a)}async iterateOverCentralDirectory(t,o){for(let a of t){let e=o(a);if(e.handler){this.tokenizer.setPosition(a.relativeOffsetOfLocalHeader);let i=await this.readLocalFileHeader();if(i){await this.tokenizer.ignore(i.extraFieldLength);let A=new Uint8Array(a.compressedSize);await this.tokenizer.readBuffer(A),await this.inflate(i,A,e.handler)}}if(e.stop)break}}async inflate(t,o,a){if(t.compressedMethod===0)return a(o);if(t.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${t.compressedMethod}`);Vs(`Decompress filename=${t.filename}, compressed-size=${o.length}`);let e=await n.decompressDeflateRaw(o);return a(e)}static async decompressDeflateRaw(t){let o=new ReadableStream({start(i){i.enqueue(t),i.close()}}),a=new DecompressionStream("deflate-raw"),e=o.pipeThrough(a);try{let A=await new Response(e).arrayBuffer();return new Uint8Array(A)}catch(i){let A=i instanceof Error?`Failed to deflate ZIP entry: ${i.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(A)}}async readLocalFileHeader(){let t=await this.tokenizer.peekToken(Le);if(t===$l.LocalFileHeader){let o=await this.tokenizer.readToken(Rre);return o.filename=await this.tokenizer.readToken(new We(o.filenameLength,"utf-8")),o}if(t===$l.CentralFileHeader)return!1;throw t===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}}});var hf,Ure=ue(()=>{hf=class{constructor(t){this.tokenizer=t}inflate(){let t=this.tokenizer;return new ReadableStream({async pull(o){let a=new Uint8Array(1024),e=await t.readBuffer(a,{mayBeLess:!0});if(e===0){o.close();return}o.enqueue(a.subarray(0,e))}}).pipeThrough(new DecompressionStream("gzip"))}}});var Hre=ue(()=>{Lre();Ure()});function x4e(n,t,o){return n?n.constructor===t?!0:H4e.call(n)===o:!1}function Y4e(n){return x4e(n,Uint8Array,K4e)}function j4e(n){if(!Y4e(n))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof n}\``)}function bO(n){j4e(n);let t="";for(let o=0;o{H4e=Object.prototype.toString,K4e="[object Uint8Array]";ybA={utf8:new globalThis.TextDecoder("utf8")},mbA=new globalThis.TextEncoder,J4e=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"))});function Kre(n,t){if(t==="utf-16le"){let o=[];for(let a=0;a>8&255)}return o}if(t==="utf-16be"){let o=[];for(let a=0;a>8&255,e&255)}return o}return[...n].map(o=>o.charCodeAt(0))}function xre(n,t=0){let o=Number.parseInt(new We(6).get(n,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(o))return!1;let a=256;for(let e=t;e{DA();Yre={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4}});var Jre,qre,zre=ue(()=>{Jre=["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"],qre=["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 o8e(n){let t=n?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return n;let{reader:o}=t,a=async()=>{await o.cancel(),o.releaseLock()};return t.close=a,t.abort=async()=>{t.interrupted=!0,await a()},n}function U2(n,t,o){if(!Number.isFinite(n)||n<0||n>t)throw new tc(`${o} has invalid size ${n} (maximum ${t} bytes)`);return n}async function CI(n,t,{maximumLength:o=nn,reason:a="skip"}={}){let e=U2(t,o,a);await n.ignore(e)}async function F2(n,t,o,{maximumLength:a=t.length,reason:e="read"}={}){let i=o?.length??t.length,A=U2(i,a,e);return n.readBuffer(t,{...o,length:A})}async function n8e(n,{maximumLength:t=Zs}={}){let e=new ReadableStream({start(g){g.enqueue(n),g.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),i=[],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`);i.push(c)}}finally{e.releaseLock()}let r=new Uint8Array(A),s=0;for(let g of i)r.set(g,s),s+=g.length;return r}function g8e(n,t){if(n.length=0?0:r===e?Math.min(s8e,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),i.push(I)}else await n.tokenizer.ignore(c);if(s>=0)break}if(ya(n.tokenizer)||(n.knownSizeDescriptorScannedBytes+=A),!!t)return I8e(i,A)}function p8e(n,t){return ya(n.tokenizer)?Math.max(0,nn-(n.tokenizer.position-t)):Math.max(0,Zs-n.knownSizeDescriptorScannedBytes)}async function d8e(n,t,{shouldBuffer:o,maximumDescriptorLength:a=Zs}={}){if(t.dataDescriptor&&t.compressedSize===0)return l8e(n,{shouldBuffer:o,maximumLength:a});if(!o){await CI(n.tokenizer,t.compressedSize,{maximumLength:ya(n.tokenizer)?Zs:n.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let e=f8e(n.tokenizer);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>e)throw new Error(`ZIP entry compressed data exceeds ${e} bytes`);let i=new Uint8Array(t.compressedSize);return await n.tokenizer.readBuffer(i),i}function h8e(n,t){let o=n.getReader(),a=0,e=!1,i=!1,A=async r=>{e||i||(i=!0,await o.cancel(r))};return new ReadableStream({async pull(r){if(a>=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-a;if(g.length>c){r.enqueue(g.subarray(0,c)),a+=c,r.close(),await A();return}r.enqueue(g),a+=g.length},async cancel(r){await A(r)}})}async function ff(n,t){return new L2(t).fromBuffer(n)}function iie(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 Ws(n,t,o){o={offset:0,...o};for(let[a,e]of t.entries())if(o.mask){if(e!==(o.mask[a]&n[a+o.offset]))return!1}else if(e!==n[a+o.offset])return!1;return!0}function E8e(n){return Number.isFinite(n)?Math.max(1,Math.trunc(n)):Cf}function u8e(n,t,o){return o===void 0?n.read(t):(o.throwIfAborted(),new Promise((a,e)=>{let i=()=>{o.removeEventListener("abort",A)},A=()=>{let r=o.reason;i(),(async()=>{try{await n.cancel(r)}catch{}})(),e(r)};o.addEventListener("abort",A,{once:!0}),(async()=>{try{let r=await n.read(t);i(),a(r)}catch(r){i(),e(r)}})()}))}function C8e(n){return Number.isFinite(n)?Math.max(0,Math.min(q4e,Math.trunc(n))):0}function B8e(n){return Number.isFinite(n)?Math.max(0,n):Number.MAX_SAFE_INTEGER}function ya(n){let t=n.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function Bf(n,t,o){return ya(n)&&n.position-t>o}function f8e(n){let t=n.fileInfo.size,o=Number.isFinite(t)?Math.max(0,t-n.position):Number.MAX_SAFE_INTEGER;return Math.min(o,z4e)}function Q8e(n){if(n instanceof kA||n instanceof tc)return!0;if(!(n instanceof Error))return!1;if(r8e.has(n.message)||a8e.has(n.code))return!0;for(let t of i8e)if(n.message.startsWith(t))return!0;return!1}function aie(n,t=Zs){let o=[n.compressedSize,n.uncompressedSize];for(let a of o)if(!Number.isFinite(a)||a<0||a>t)return!1;return!0}function y8e(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function m8e(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 oie(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 S8e(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),a=o.lastIndexOf('"');return o.slice(a+1)}var Cf,q4e,Zs,Vre,z4e,nn,_O,Wre,V4e,W4e,Zre,G2,Xre,$re,Z4e,X4e,$4e,e8e,A8e,eie,Aie,tie,t8e,rie,r8e,i8e,a8e,tc,nie,MO,s8e,L2,w8e,D8e,sie=ue(()=>{DA();yO();Hre();uf();jre();zre();Cf=4100,q4e=Cf-2,Zs=1024*1024,Vre=1024,z4e=2**31-1,nn=16*1024*1024,_O=Zs,Wre=Zs,V4e=nn,W4e=1,Zre=100,G2=nn,Xre=64,$re=_O,Z4e=256,X4e=512,$4e=nn,e8e=512,A8e=512,eie=256,Aie=_O,tie=_O,t8e=_O,rie=nn,r8e=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),i8e=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],a8e=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),tc=class extends Error{};nie=134695760,MO=16,s8e=MO-1;ep.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 a=await n8e(t,{maximumLength:Zs});return o(a)};ep.prototype.unzip=async function(n){let t=!1,o=0,a=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(Bf(this.tokenizer,a,nn))throw new tc(`ZIP stream probing exceeds ${nn} bytes`);let e=await this.readLocalFileHeader();if(!e)break;if(o++,o>Vre)throw new Error(`ZIP entry count exceeds ${Vre}`);let i=n(e);t=!!i.stop,await this.tokenizer.ignore(e.extraFieldLength);let A=await d8e(this,e,{shouldBuffer:!!i.handler,maximumDescriptorLength:Math.min(Zs,p8e(this,a))});if(i.handler&&await this.inflate(e,A,i.handler),e.dataDescriptor){let r=new Uint8Array(MO);if(await this.tokenizer.readBuffer(r),Le.get(r,0)!==nie)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-r.length}`)}if(Bf(this.tokenizer,a,nn))throw new tc(`ZIP stream probing exceeds ${nn} bytes`)}while(!t)};L2=class n{constructor(t){let o=C8e(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 o8e(fO(t,this.getTokenizerOptions()))}async parseTokenizer(t,o=0){this.detectionReentryCount=o;let a=t.position;for(let e of this.detectors){let i;try{i=await e.detect(t)}catch(A){if(A instanceof kA||A instanceof tc)return;throw A}if(i)return i;if(a!==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(Qo(o,this.getTokenizerOptions()))}async fromBlob(t){this.options.signal?.throwIfAborted();let o=QO(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 a=E8e(o?.sampleSize??Cf),e,i,A=t.getReader({mode:"byob"});try{let{value:g,done:c}=await u8e(A,new Uint8Array(a),this.options.signal);if(i=g,!c&&g)try{e=await this.fromBuffer(g.subarray(0,a))}catch(I){if(!(I instanceof kA))throw I;e=void 0}i=g}finally{A.releaseLock()}let r=new TransformStream({async start(g){g.enqueue(i)},transform(g,c){c.enqueue(g)}}),s=t.pipeThrough(r);return s.fileType=e,s}async detectGzip(t){if(this.gzipProbeDepth>=W4e)return{ext:"gz",mime:"application/gzip"};let o=new hf(t),a=h8e(o.inflate(),V4e),e=ya(t),i,A,r,s;if(e){let g=new AbortController;i=setTimeout(()=>{g.abort(new DOMException(`Operation timed out after ${Zre} ms`,"TimeoutError"))},Zre),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(a)}catch(g){if(g?.name==="AbortError"&&A?.reason?.name!=="TimeoutError")throw g}finally{clearTimeout(i),e||this.gzipProbeDepth--}return s?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(t,o){return Ws(this.buffer,t,o)}checkString(t,o){return this.check(Kre(t,o?.encoding),o)}detectConfident=async t=>{if(this.buffer=new Uint8Array(Cf),t.fileInfo.size===void 0&&(t.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=t,ya(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>=eie?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 CI(t,6,{maximumLength:6,reason:"ID3 header prefix"});let o=await t.readToken(Yre),a=ya(t);if(!Number.isFinite(o)||o<0||a&&(o>G2||t.position+o>G2))return;if(t.position+o>t.fileInfo.size)return a?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await CI(t,o,{maximumLength:a?G2:t.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof kA)return;throw e}return this.detectionReentryCount>=eie?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,a=y8e();try{await new ep(t).unzip(e=>{m8e(a,e.filename);let i=e.filename==="[Content_Types].xml",A=oie(a);if(!i&&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 aie(e,Wre)?{async handler(r){let s=new TextDecoder("utf-8").decode(r).trim();o=iie(s)},stop:!0}:{};case"[Content_Types].xml":return a.hasContentTypesEntry=!0,aie(e,Wre)?(a.isParsingContentTypes=!0,{async handler(r){let s=new TextDecoder("utf-8").decode(r),g=S8e(s);g&&(o=iie(g)),a.hasParsedContentTypesEntry=!0,a.isParsingContentTypes=!1},stop:!0}):(a.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(e.filename)?(o={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(e){if(!Q8e(e))throw e;a.isParsingContentTypes&&(a.isParsingContentTypes=!1,a.hasUnparseableContentTypes=!0)}return o??oie(a)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await t.ignore(28);let o=new Uint8Array(8);return await t.readBuffer(o),Ws(o,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:Ws(o,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:Ws(o,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:Ws(o,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:Ws(o,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:Ws(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(QA),g=128,c=0;for(;(s&g)===0&&g!==0;)++c,g>>=1;let I=new Uint8Array(c+1);return await F2(t,I,void 0,{maximumLength:I.length,reason:"EBML field"}),I}async function a(){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),p=new DataView(g.buffer,g.length-c,c);return{id:Ef(I),len:Ef(p)}}async function e(s){let g=0;for(;s>0;){if(g++,g>Z4e||Bf(t,A,nn))return;let c=t.position,I=await a();if(I.id===17026){if(I.len>Xre)return;let p=U2(I.len,Xre,"EBML DocType");return(await t.readToken(new We(p))).replaceAll(/\00.*$/g,"")}if(ya(t)&&(!Number.isFinite(I.len)||I.len<0||I.len>$re)||(await CI(t,I.len,{maximumLength:ya(t)?$re:t.fileInfo.size,reason:"EBML payload"}),--s,t.position<=c))return}}let i=await a(),A=t.position;switch(await e(i.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),a=LA.get(this.buffer,6);if(o>0&&o<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(a>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 We(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"},a={ext:"apng",mime:"image/apng"};await t.ignore(8);async function e(){return{length:await t.readToken(Qa),type:await t.readToken(new We(4,"latin1"))}}let i=ya(t),A=t.position,r=0,s=!1;do{if(r++,r>X4e||Bf(t,A,$4e))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 a;default:if(!s&&c.type!=="CgBI")return;if(i&&c.length>Aie)return s&&c8e(c.type)?o:void 0;try{await CI(t,c.length+4,{maximumLength:i?Aie+4:t.fileInfo.size,reason:"PNG chunk payload"})}catch(I){if(!i&&(I instanceof tc||I instanceof kA))return o;throw I}}if(t.position<=g)break}while(t.position+8e8e||Bf(t,i,nn)));){let r=t.position,s=await a(),g=s.size-24;if(!Number.isFinite(g)||g<0){o=!0;break}if(Ws(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 F2(t,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),Ws(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(Ws(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>tie){o=!0;break}if(await CI(t,g,{maximumLength:e?tie:t.fileInfo.size,reason:"ASF header payload"}),t.position<=r){o=!0;break}}}catch(a){if(a instanceof kA||a instanceof tc)ya(t)&&(o=!0);else throw a}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 We(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 a=new TextDecoder().decode(this.buffer.subarray(16,o+16));if(JSON.parse(a).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})&&xre(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(Cf);let o=B8e(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 a=0;a<=this.options.mpegOffsetTolerance;++a){let e=this.scanMpeg(a);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>A8e)&&!(ya(this.tokenizer)&&2+o*12>rie))for(let a=0;a=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(ya(this.tokenizer)&&e>t8e)return o;let i=ya(this.tokenizer)?rie:this.tokenizer.fileInfo.size;try{await CI(this.tokenizer,e,{maximumLength:i,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(a===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"}}}},w8e=new Set(Jre),D8e=new Set(qre)});var H2=ue(()=>{an();sie()});var hie=ee(TO=>{"use strict";Object.defineProperty(TO,"__esModule",{value:!0});TO.format=_8e;TO.parse=T8e;var O8e=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,cie=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,b8e=/[\\"]/g,M8e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Iie=(()=>{let n=function(){};return n.prototype=Object.create(null),n})();function _8e(n){let{type:t,parameters:o}=n;if(!t||!M8e.test(t))throw new TypeError(`Invalid type: ${t}`);let a=t;if(o)for(let e of Object.keys(o)){if(!cie.test(e))throw new TypeError(`Invalid parameter name: ${e}`);a+=`; ${e}=${P8e(o[e])}`}return a}function T8e(n,t){let o=t?.comma===!0?k8e:65536,a=n.length,e=x2(n,t?.start??0,a),i=e;e=K2(n,e,a,o);let A=Y2(n,i,e),r=n.slice(i,A).toLowerCase();return t?.parameters===!1?{type:r,index:e,parameters:new Iie}:v8e(n,r,e,a,o)}var lie=32,pie=9,die=59,N8e=61,gie=34,R8e=92,k8e=44;function v8e(n,t,o,a,e){let i=new Iie;e:for(;ot;){let a=n.charCodeAt(o-1);if(a!==lie&&a!==pie)break;o--}return o}function P8e(n){if(cie.test(n))return n;if(O8e.test(n))return`"${n.replace(b8e,"\\$&")}"`;throw new TypeError(`Invalid parameter value: ${n}`)}});function Eie(n){if(!G8e.test(n))throw new TypeError(`Invalid media type: ${n}`);let t=n.indexOf("/"),o=n.slice(0,t).toLowerCase(),a=n.slice(t+1).toLowerCase(),e,i=a.lastIndexOf("+");return i!==-1&&(e=a.slice(i+1),a=a.slice(0,i)),{type:o,subtype:a,suffix:e}}var G8e,uie=ue(()=>{G8e=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/});var Cie,fi,j2,J2=ue(()=>{Cie={10:"shot",20:"scene",30:"track",40:"part",50:"album",60:"edition",70:"collection"},fi={video:1,audio:2,complex:3,logo:4,subtitle:17,button:18,control:32},j2={[fi.video]:"video",[fi.audio]:"audio",[fi.complex]:"complex",[fi.logo]:"logo",[fi.subtitle]:"subtitle",[fi.button]:"button",[fi.control]:"control"}});var Xh,BI,fI,q2,sn,Ap,mt,or=ue(()=>{Xh=n=>class extends Error{constructor(o){super(o),this.name=n}},BI=class extends Xh("CouldNotDetermineFileTypeError"){},fI=class extends Xh("UnsupportedFileTypeError"){},q2=class extends Xh("UnexpectedFileContentError"){constructor(t,o){super(o),this.fileType=t}toString(){return`${this.name} (FileType: ${this.fileType}): ${this.message}`}},sn=class extends Xh("FieldDecodingError"){},Ap=class extends Xh("InternalParserError"){},mt=n=>class extends q2{constructor(t){super(n,t)}}});function GA(n,t,o){return(n[t]&1<>i;let r=8-i,s=a-r;return s<0?A>>=8-i-a:s>0&&(A<<=s,A|=XA(n,t,o+r,s)),A}function Li(n,t,o){return XA(n,t,o,1)===1}function fie(n){let t=[];for(let o=0,a=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:L8e(o)}:{dB:F8e(o),ratio:o}}}function z2(n){if(n.length===0)throw new Error("decodeUintBE: empty Uint8Array");let t=new DataView(n.buffer,n.byteOffset,n.byteLength);return Ef(t)}var nr=ue(()=>{DA();or();uf()});var $h,eE,AE,V2,Qf,W2,tE,RO,Z2,QI=ue(()=>{DA();nr();$h={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"},eE={other:0,lyrics:1,text:2,movement_part:3,events:4,chord:5,trivia_pop:6},AE={notSynchronized:0,mpegFrameNumber:1,milliseconds:2},V2={get:(n,t)=>n[t+3]&127|n[t+2]<<7|n[t+1]<<14|n[t]<<21,len:4},Qf={len:10,get:(n,t)=>({fileIdentifier:new We(3,"ascii").get(n,t),version:{major:qs.get(n,t+3),revision:qs.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:V2.get(n,t+6)})},W2={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)})},tE={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}}}},RO={len:4,get:(n,t)=>({encoding:tE.get(n,t),language:new We(3,"latin1").get(n,t+1)})},Z2={len:6,get:(n,t)=>{let o=RO.get(n,t);return{encoding:o.encoding,language:o.language,timeStampFormat:QA.get(n,t+4),contentType:QA.get(n,t+5)}}}});var tp=ue(()=>{J2();QI()});function yie(n){return kO[n]&&!kO[n].multiple}function mie(n){return!kO[n].multiple||kO[n].unique||!1}var AA,kO,Sie=ue(()=>{AA={multiple:!1},kO={year:AA,track:AA,disk:AA,title:AA,artist:AA,artists:{multiple:!0,unique:!0},albumartist:AA,albumartists:{multiple:!0,unique:!0},album:AA,date:AA,originaldate:AA,originalyear:AA,releasedate:AA,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:AA,subtitle:{multiple:!0},discsubtitle:AA,totaltracks:AA,totaldiscs:AA,compilation:AA,rating:{multiple:!0},bpm:AA,mood:AA,media:AA,catalognumber:{multiple:!0,unique:!0},tvShow:AA,tvShowSort:AA,tvSeason:AA,tvEpisode:AA,tvEpisodeId:AA,tvNetwork:AA,podcast:AA,podcasturl:AA,releasestatus:AA,releasetype:{multiple:!0},releasecountry:AA,script:AA,language:AA,copyright:AA,license:AA,encodedby:AA,encodersettings:AA,gapless:AA,barcode:AA,isrc:{multiple:!0},asin:AA,musicbrainz_recordingid:AA,musicbrainz_trackid:AA,musicbrainz_albumid:AA,musicbrainz_artistid:{multiple:!0},musicbrainz_albumartistid:{multiple:!0},musicbrainz_releasegroupid:AA,musicbrainz_workid:AA,musicbrainz_trmid:AA,musicbrainz_discid:AA,acoustid_id:AA,acoustid_fingerprint:AA,musicip_puid:AA,musicip_fingerprint:AA,website:AA,"performer:instrument":{multiple:!0,unique:!0},averageLevel:AA,peakLevel:AA,notes:{multiple:!0,unique:!1},key:AA,originalalbum:AA,originalartist:AA,discogs_artist_id:{multiple:!0,unique:!0},discogs_release_id:AA,discogs_label_id:AA,discogs_master_release_id:AA,discogs_votes:AA,discogs_rating:AA,replaygain_track_peak:AA,replaygain_track_gain:AA,replaygain_album_peak:AA,replaygain_album_gain:AA,replaygain_track_minmax:AA,replaygain_album_minmax:AA,replaygain_undo:AA,description:{multiple:!0},longDescription:AA,category:{multiple:!0},hdVideo:AA,keywords:{multiple:!0},movement:AA,movementIndex:AA,movementTotal:AA,podcastId:AA,showMovement:AA,stik:AA,playCounter:AA}});var Cr,rc=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 a=this.getCommonName(t.id);return a?{id:a,value:t.value}:null}getCommonName(t){return this.tagMap[t]}postMap(t,o){}};Cr.maxRatingScore=1});var U8e,vO,wie=ue(()=>{rc();U8e={title:"title",artist:"artist",album:"album",year:"year",comment:"comment",track:"track",genre:"genre"},vO=class extends Cr{constructor(){super(["ID3v1"],U8e)}}});var cn,rE=ue(()=>{rc();cn=class extends Cr{constructor(t,o){let a={};for(let e of Object.keys(o))a[e.toUpperCase()]=o[e];super(t,a)}getCommonName(t){return this.tagMap[t.toUpperCase()]}}});var H8e,PO,Die=ue(()=>{DA();rc();rE();nr();H8e={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"},PO=class n extends cn{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"],H8e)}postMap(t,o){switch(t.id){case"UFID":{let a=t.value;a.owner_identifier==="http://musicbrainz.org"&&(t.id+=`:${a.owner_identifier}`,t.value=Qi(a.identifier,"latin1"))}break;case"PRIV":{let a=t.value;switch(a.owner_identifier){case"AverageLevel":case"PeakValue":t.id+=`:${a.owner_identifier}`,t.value=a.data.length===4?Le.get(a.data,0):null,t.value===null&&o.addWarning("Failed to parse PRIV:PeakValue");break;default:o.addWarning(`Unknown PRIV owner-identifier: ${a.data}`)}}break;case"POPM":t.value=n.toRating(t.value);break;default:break}}}});var K8e,GO,Oie=ue(()=>{rc();K8e={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"},GO=class n extends Cr{static toRating(t){return{rating:Number.parseFloat(t+1)/5}}constructor(){super(["asf"],K8e)}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 x8e,FO,bie=ue(()=>{rE();x8e={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"},FO=class extends cn{constructor(){super(["ID3v2.2"],x8e)}}});var Y8e,LO,Mie=ue(()=>{rE();Y8e={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"},LO=class extends cn{constructor(){super(["APEv2"],Y8e)}}});var j8e,J8e,yf,_ie=ue(()=>{rE();j8e={"\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"},J8e="iTunes",yf=class extends cn{constructor(){super([J8e],j8e)}postMap(t,o){switch(t.id){case"rate":t.value={source:void 0,rating:Number.parseFloat(t.value)/100};break}}}});var q8e,UO,Tie=ue(()=>{rc();q8e={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"},UO=class n extends Cr{static toRating(t,o,a){return{source:t?t.toLowerCase():void 0,rating:Number.parseFloat(o)/a*Cr.maxRatingScore}}constructor(){super(["vorbis"],q8e)}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 z8e,HO,Nie=ue(()=>{rc();z8e={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"},HO=class extends Cr{constructor(){super(["exif"],z8e)}}});var V8e,KO,Rie=ue(()=>{rE();V8e={"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"},KO=class extends cn{constructor(){super(["matroska"],V8e)}}});var W8e,xO,kie=ue(()=>{rc();W8e={NAME:"title",AUTH:"artist","(c) ":"copyright",ANNO:"comment"},xO=class extends Cr{constructor(){super(["AIFF"],W8e)}}});var YO,vie=ue(()=>{wie();Die();Oie();bie();Mie();_ie();Tie();Nie();Rie();kie();or();YO=class{constructor(){this.tagMappers={},[new vO,new FO,new PO,new yf,new yf,new UO,new LO,new GO,new HO,new KO,new xO].forEach(t=>{this.registerTagMapper(t)})}mapTag(t,o,a){if(this.tagMappers[t])return this.tagMappers[t].mapGenericTag(o,a);throw new Ap(`No generic tag mapper defined for tag-format: ${t}`)}registerTagMapper(t){for(let o of t.tagTypes)this.tagMappers[o]=t}}});function Pie(n){return X2.test(n)?X8e(n):Z8e(n)}function Z8e(n){return{contentType:eE.lyrics,timeStampFormat:AE.notSynchronized,text:n.trim(),syncText:[]}}function X8e(n){let t=n.split(` +`),o=[];for(let a of t){let e=a.match(X2);if(e){let i=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=(i*60+A)*1e3+r,g=a.replace(X2,"").trim();o.push({timestamp:s,text:g})}}return{contentType:eE.lyrics,timeStampFormat:AE.milliseconds,text:o.map(a=>a.text).join(` +`),syncText:o}}var X2,Gie=ue(()=>{tp();X2=/\[(\d{2}):(\d{2})\.(\d{2,3})]/});function eze(n){return n.length>2?`${n.slice(0,n.length-1).join(", ")} & ${n[n.length-1]}`:n.join(" & ")}var Fie,rp,$8e,jO,Lie=ue(()=>{tp();Fie=ze(lt(),1);Sie();vie();rc();nr();H2();Gie();rp=(0,Fie.default)("music-metadata:collector"),$8e=["matroska","APEv2","vorbis","ID3v2.4","ID3v2.3","ID3v2.2","exif","asf","iTunes","AIFF","ID3v1"],jO=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 YO,this.opts=t;let o=1;for(let a of $8e)this.originPriority[a]=o++;this.originPriority.artificial=500,this.originPriority.id3v1=600}hasAny(){return Object.keys(this.native).length>0}addStreamInfo(t){rp(`streamInfo: type=${t.type?j2[t.type]:"?"}, codec=${t.codecName}`),this.format.trackInfo.push(t)}setFormat(t,o){rp(`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,a){rp(`tag ${t}.${o} = ${a}`),this.native[t]||(this.format.tagTypes.push(t),this.native[t]=[]),this.native[t].push({id:o,value:a}),await this.toCommon(t,o,a)}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(a=>{a!==null&&(o.value=a,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 a=this.common[o.id].of;this.common[o.id]=Cr.normalizeTrack(o.value),this.common[o.id].of=a??this.common[o.id].of;return}case"bpm":case"year":case"originalyear":o.value=Number.parseInt(o.value,10);break;case"date":{let a=Number.parseInt(o.value.substr(0,4),10);Number.isNaN(a)||(this.common.year=a);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=Qie(o.value);break;case"replaygain_track_minmax":o.value=o.value.split(",").map(a=>Number.parseInt(a,10));break;case"replaygain_undo":{let a=o.value.split(",").map(e=>Number.parseInt(e,10));o.value={leftChannel:a[0],rightChannel:a[1]};break}case"gapless":case"compilation":case"podcast":case"showMovement":o.value=o.value==="1"||o.value===1;break;case"isrc":{let a=this.common[o.id];if(a&&a.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=Pie(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,a,e){if(this.commonOrigin[a]===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,a,e){if((!this.common[a]||this.commonOrigin[a]===this.originPriority.artificial)&&(!this.common[e]||this.common[e].indexOf(o.value)===-1)){let i=(this.common[e]||[]).concat([o.value]),A=eze(i);this.setGenericTag("artificial",{id:a,value:A})}this.setGenericTag(t,o)}async postFixPicture(t){if(t.data&&t.data.length>0){if(!t.format){let o=await ff(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,a){let e={id:o,value:a},i=this.tagMapper.mapTag(t,e,this);i&&await this.postMap(t,i)}setGenericTag(t,o){rp(`common.${o.id} = ${o.value}`);let a=this.commonOrigin[o.id]||1e3,e=this.originPriority[t];if(yie(o.id))if(e<=a)this.common[o.id]=o.value,this.commonOrigin[o.id]=e;else return rp(`Ignore native tag (singleton): ${t}.${o.id} = ${o.value}`);else if(e===a)!mie(o.id)||this.common[o.id].indexOf(o.value)===-1?this.common[o.id].push(o.value):rp(`Ignore duplicate value: ${t}.${o.id} = ${o.value}`);else if(e{Gt=class{constructor(t,o,a){this.metadata=t,this.tokenizer=o,this.options=a}}});var Aze,at,ma=ue(()=>{js();nr();or();Aze=/^[\x21-\x7e©][\x20-\x7e\x00()]{3}/,at={len:4,get:(n,t)=>{let o=Tr(n.subarray(t,t+at.len),"latin1");if(!o.match(Aze))throw new sn(`FourCC contains invalid characters: ${fie(o)} "${o}"`);return o},put:(n,t,o)=>{let a=Nre(o,"latin1");if(a.length!==4)throw new Ap("Invalid length");return n.set(a,t),t+4}}});function Hie(n){return{containsHeader:JO(n,31),containsFooter:JO(n,30),isHeader:JO(n,29),readOnly:JO(n,0),dataType:(n&6)>>1}}function JO(n,t){return(n&1<{DA();ma();mf={text_utf8:0,binary:1,external_info:2,reserved:3},$2={len:52,get:(n,t)=>({ID:at.get(n,t),version:Le.get(n,t+4)/1e3,descriptorBytes:Le.get(n,t+8),headerBytes:Le.get(n,t+12),seekTableBytes:Le.get(n,t+16),headerDataBytes:Le.get(n,t+20),apeFrameDataBytes:Le.get(n,t+24),apeFrameDataBytesHigh:Le.get(n,t+28),terminatingDataBytes:Le.get(n,t+32),fileMD5:new bt(16).get(n,t+36)})},Uie={len:24,get:(n,t)=>({compressionLevel:SA.get(n,t),formatFlags:SA.get(n,t+2),blocksPerFrame:Le.get(n,t+4),finalFrameBlocks:Le.get(n,t+8),totalFrames:Le.get(n,t+12),bitsPerSample:SA.get(n,t+16),channel:SA.get(n,t+18),sampleRate:Le.get(n,t+20)})},eo={len:32,get:(n,t)=>({ID:new We(8,"ascii").get(n,t),version:Le.get(n,t+8),size:Le.get(n,t+12),fields:Le.get(n,t+16),flags:Hie(Le.get(n,t+20))})},qO={len:8,get:(n,t)=>({size:Le.get(n,t),flags:Hie(Le.get(n,t+4))})}});var Jie={};Lr(Jie,{APEv2Parser:()=>mI,ApeContentError:()=>iE,tryParseApeHeader:()=>ip});function ip(n,t,o){return new mI(n,t,o).tryParseApeHeader()}var jie,yI,xie,Yie,iE,mI,ap=ue(()=>{jie=ze(lt(),1);an();DA();nr();$a();Kie();or();js();yI=(0,jie.default)("music-metadata:parser:APEv2"),xie="APEv2",Yie="APETAGEX",iE=class extends mt("APEv2"){};mI=class n extends Gt{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 a=new Uint8Array(eo.len),e=t.position;if(o<=eo.len){yI(`Offset is too small to read APE footer: offset=${o}`);return}if(o>eo.len){await t.readBuffer(a,{position:o-eo.len}),t.setPosition(e);let i=eo.get(a,0);if(i.ID==="APETAGEX")return i.flags.isHeader?yI(`APE Header found at offset=${o-eo.len}`):(yI(`APE Footer found at offset=${o-eo.len}`),o-=i.size),{footer:i,offset:o}}}static parseTagFooter(t,o,a){let e=eo.get(o,o.length-eo.len);if(e.ID!==Yie)throw new iE("Unexpected APEv2 Footer ID preamble value");return Qo(o),new n(t,Qo(o),a).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(a.forwardBytes),this.tryParseApeHeader()}async parseTags(t){let o=new Uint8Array(256),a=t.size-eo.len;yI(`Parse APE tags at offset=${this.tokenizer.position}, size=${a}`);for(let e=0;ethis.metadata.addTag(xie,r,c)));break}case mf.binary:if(this.options.skipCovers)await this.tokenizer.ignore(i.size);else{let s=new Uint8Array(i.size);await this.tokenizer.readBuffer(s),A=Xs(s);let g=Tr(s.subarray(0,A),"utf-8"),c=s.subarray(A+1);await this.metadata.addTag(xie,r,{description:g,data:c})}break;case mf.external_info:yI(`Ignore external info ${r}`),await this.tokenizer.ignore(i.size);break;case mf.reserved:yI(`Ignore external info ${r}`),this.metadata.addWarning(`APEv2 header declares a reserved datatype for "${r}"`),await this.tokenizer.ignore(i.size);break}}}async parseDescriptorExpansion(t){return await this.tokenizer.ignore(t),this.parseHeader()}async parseHeader(){let t=await this.tokenizer.readToken(Uie);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 iE("Missing APE descriptor");return{forwardBytes:this.ape.descriptor.seekTableBytes+this.ape.descriptor.headerDataBytes+this.ape.descriptor.apeFrameDataBytes+this.ape.descriptor.terminatingDataBytes}}}});async function zie(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),Tr(t,"latin1")==="TAG"}return!1}var qie,zO,aE,VO,SI,WO,Sf=ue(()=>{qie=ze(lt(),1);DA();nr();$a();ap();js();zO=(0,qie.default)("music-metadata:parser:ID3v1"),aE=["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"],VO={len:128,get:(n,t)=>{let o=new SI(3).get(n,t);return o==="TAG"?{header:o,title:new SI(30).get(n,t+3),artist:new SI(30).get(n,t+33),album:new SI(30).get(n,t+63),year:new SI(4).get(n,t+93),comment:new SI(28).get(n,t+97),zeroByte:QA.get(n,t+127),track:QA.get(n,t+126),genre:QA.get(n,t+127)}:null}},SI=class{constructor(t){this.len=t,this.stringType=new We(t,"latin1")}get(t,o){let a=this.stringType.get(t,o);return a=NO(a),a=a.trim(),a.length>0?a:void 0}},WO=class n extends Gt{constructor(t,o,a){super(t,o,a),this.apeHeader=a.apeHeader}static getGenre(t){if(tt){zO("Already consumed the last 128 bytes");return}let o=await this.tokenizer.readToken(VO,t);if(o){zO("ID3v1 header found at: pos=%s",this.tokenizer.fileInfo.size-VO.len);let a=["title","artist","album","comment","track","year"];for(let i of a)o[i]&&o[i]!==""&&await this.addTag(i,o[i]);let e=n.getGenre(o.genre);e&&await this.addTag("genre",e)}else zO("ID3v1 header not found at: pos=%s",this.tokenizer.fileInfo.size-VO.len)}async addTag(t,o){await this.metadata.addTag("ID3v1",t,o)}}});var eU,Vie=ue(()=>{DA();eU={len:16,get:(n,t)=>{let o=xe.get(n,t+8),a=xe.get(n,t+12);return{startTime:xe.get(n,t),endTime:xe.get(n,t+4),startOffset:o===4294967295?void 0:o,endOffset:a===4294967295?void 0:a}}}});function wf(n){switch(n){case 2:return 6;case 3:case 4:return 10;default:throw Wie(n)}}function tze(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 Df(n,t,o){switch(t){case 2:return rze(n,t,o);case 3:case 4:return ize(n,t,o);default:throw Wie(t)}}function rze(n,t,o){let a={id:Tr(n.subarray(0,3),"ascii"),length:Gr.get(n,3)};return a.id.match(/^[A-Z0-9]{3}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${a.id}`),a}function ize(n,t,o){let a={id:Tr(n.subarray(0,4),"ascii"),length:(t===4?V2:xe).get(n,4),flags:tze(n.subarray(8,10),t)};return a.id.match(/^[A-Z0-9]{4}$/)||o.addWarning(`Invalid ID3v2.${t} frame-header-ID: ${a.id}`),a}function Wie(n){throw new wI(`Unexpected majorVer: ${n}`)}var AU=ue(()=>{DA();nr();QI();js();tU()});function aze(n){let t=[],o,a="";for(let e of n)if(typeof o=="string")if(e==="("&&o==="")a+="(",o=void 0;else if(e===")"){a!==""&&(t.push(a),a="");let i=Zie(o);i&&t.push(i),o=void 0}else o+=e;else e==="("?o="":a+=e;return a&&(t.length===0&&a.match(/^\d*$/)&&(a=Zie(a)),a&&t.push(a)),t}function Zie(n){if(n==="RX")return"Remix";if(n==="CR")return"Cover";if(n.match(/^\d*$/))return aE[Number.parseInt(n,10)]}function oze(n){throw new wI(`Unexpected majorVer: ${n}`)}var Xie,ZO,In,rU,XO,wI,tU=ue(()=>{Xie=ze(lt(),1);DA();nr();QI();Sf();or();nr();Vie();AU();ZO=(0,Xie.default)("music-metadata:id3v2:frame-parser"),In="latin1",rU={encoding:In,bom:!1};XO=class n{constructor(t,o){this.major=t,this.warningCollector=o}readData(t,o,a){if(t.length===0){this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${o}`);return}let{encoding:e,bom:i}=tE.get(t,0),A=t.length,r=0,s=[],g=n.getNullTerminatorLength(e),c;switch(ZO(`Parsing tag type=${o}, encoding=${e}, bom=${i}`),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(Qi(t.subarray(1),e))}catch(p){if(p instanceof Error){this.warningCollector.addWarning(`id3v2.${this.major} type=${o} header has invalid string value: ${p.message}`);break}throw p}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(p=>aze(p)).reduce((p,B)=>p.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,Qi(I.data,e).replace(/\x00+$/,""))};break}case"PIC":case"APIC":if(a){let I={};switch(t=t.subarray(1),this.major){case 2:I.format=Qi(t.subarray(0,3),"latin1"),t=t.subarray(3);break;case 3:case 4:c=Xs(t,In),I.format=Qi(t.subarray(0,c),In),t=t.subarray(c+1);break;default:throw oze(this.major)}I.format=n.fixPictureMimeType(I.format),I.type=$h[t[0]],t=t.subarray(1),c=Xs(t,e),I.description=Qi(t.subarray(0,c),e),t=t.subarray(c+g),I.data=t,s=I}break;case"CNT":case"PCNT":s=z2(t);break;case"SYLT":{let I=Z2.get(t,0);t=t.subarray(Z2.len);let p={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),p.syncText.push({text:f.text,timestamp:Q})}else p.descriptor=f.text,B=!0}s=p;break}case"ULT":case"USLT":case"COM":case"COMM":{let I=RO.get(t,r);r+=RO.len;let p=n.readNullTerminatedString(t.subarray(r),I.encoding);r+=p.len;let B=n.readNullTerminatedString(t.subarray(r),I.encoding);s={language:I.language,descriptor:p.text,text:B.text};break}case"UFID":{let I=n.readIdentifierAndData(t,In);s={owner_identifier:I.id,identifier:I.data};break}case"PRIV":{let I=n.readIdentifierAndData(t,In);s={owner_identifier:I.id,data:I.data};break}case"POPM":{t=t.subarray(r);let I=n.readNullTerminatedString(t,rU),p=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:p,rating:0,counter:void 0};break}let B=QA.get(t,0),f=t.subarray(QA.len);s={email:p,rating:B,counter:f.length>0?z2(f):void 0};break}case"GEOB":{let I=tE.get(t,0);t=t.subarray(1);let p=n.readNullTerminatedString(t,rU),B=p.text;t=t.subarray(p.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,rU).text;break;case"WXXX":{let I=tE.get(t,0);t=t.subarray(1);let p=n.readNullTerminatedString(t,I),B=p.text;t=t.subarray(p.len),s={description:B,url:n.trimNullPadding(Qi(t,In))};break}case"WFD":case"WFED":{let I=tE.get(t,0);t=t.subarray(1),s=n.readNullTerminatedString(t,I).text;break}case"MCDI":{s=t.subarray(0,A);break}case"CHAP":{ZO("Reading CHAP"),c=Xs(t,In);let I={label:Qi(t.subarray(0,c),In),info:eU.get(t,c+1),frames:new Map};for(r+=c+1+eU.len;r=i.length)return{text:Qi(t,o.encoding),len:e};let r=t.subarray(0,a+A);return{text:Qi(r,o.encoding),len:a+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 a=0;a+11?this.warningCollector.addWarning(`ID3v2.${this.major} ${t} uses non standard null-separator.`):a=o.split(/\//g)):a=o.split(/\x00/g),n.trimArray(a)}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 a=n.readNullTerminatedString(t,{encoding:o,bom:!1});return{id:a.text,data:t.subarray(a.len)}}static getNullTerminatorLength(t){return t.startsWith("utf-16")?2:1}},wI=class extends mt("id3v2"){}});function nze(n){throw new wI(`Unexpected majorVer: ${n}`)}var ln,oE=ue(()=>{DA();tU();QI();AU();ln=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,a=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 bt(t));for(let a of this.parseMetadata(o))switch(a.id){case"TXXX":a.value&&await this.handleTag(a,a.value.text,()=>a.value.description);break;default:await(Array.isArray(a.value)?Promise.all(a.value.map(e=>this.addTag(a.id,e))):this.addTag(a.id,a.value))}}async handleTag(t,o,a,e=i=>i){await Promise.all(o.map(i=>this.addTag(n.makeDescriptionTagName(t.id,a(i)),e(i))))}async addTag(t,o){await this.metadata.addTag(this.headerType,t,o)}parseMetadata(t){let o=0,a=[];for(;o!==t.length;){let e=wf(this.id3Header.version.major);if(o+e>t.length){this.metadata.addWarning("Illegal ID3v2 tag length");break}let i=t.subarray(o,o+e);o+=e;let A=Df(i,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&&a.push({id:A.id,value:s})}return a}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),i=new Map;for(let g of o)i.set(g.value.label,g.value);let A=e?.value.childElementIds,r=[],s=A??[...i.keys()];for(let g of s){let c=i.get(g);if(!c)continue;let I=c.frames,p=I.get("TIT2");p&&r.push({id:g,title:p,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 $ie,iU,$s,Of=ue(()=>{an();$ie=ze(lt(),1);QI();oE();Sf();$a();iU=(0,$ie.default)("music-metadata:parser:ID3"),$s=class extends Gt{constructor(){super(...arguments),this.id3parser=new ln}static async startsWithID3v2Header(t){return(await t.peekToken(Qf)).fileIdentifier==="ID3"}async parse(){try{await this.parseID3v2()}catch(t){if(t instanceof kA)iU("End-of-stream");else throw t}}finalize(){}async parseID3v2(){await this.tryReadId3v2Headers(),iU("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 WO(this.metadata,this.tokenizer,this.options).parse(),this.finalize())}async tryReadId3v2Headers(){if((await this.tokenizer.peekToken(Qf)).fileIdentifier==="ID3")return iU("Found ID3v2 header, pos=%s",this.tokenizer.position),await this.id3parser.parse(this.metadata,this.tokenizer,this.options),this.tryReadId3v2Headers()}}});var aU,eae=ue(()=>{nr();aU={len:2,get:(n,t)=>{let o=XA(n,t,0,3),a=XA(n,t,6,1),e=XA(n,t,7,9)/10;if(o>0)return{type:XA(n,t,0,3),origin:XA(n,t,3,3),adjustment:a?-e:e}}}});var Aae,tae=ue(()=>{DA();nr();eae();Aae={len:27,get:(n,t)=>{let o=xe.get(n,t+2);return{revision:XA(n,t,0,4),vbr_method:XA(n,t,4,4),lowpass_filter:100*QA.get(n,t+1),track_peak:o===0?null:o/2**23,track_gain:aU.get(n,6),album_gain:aU.get(n,8),music_length:xe.get(n,t+20),music_crc:QA.get(n,t+24),header_crc:LA.get(n,t+24)}}}});async function rae(n){let t=await n.readToken(sze),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 We(4,"ascii"))==="LAME"){await n.ignore(4),o.lame={version:await n.readToken(new We(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(Aae))}}return o}var oU,$O,sze,iae=ue(()=>{DA();nr();tae();oU=new We(4,"ascii"),$O=new We(6,"ascii"),sze={len:4,get:(n,t)=>({frames:Li(n,t,31),bytes:Li(n,t,30),toc:Li(n,t,29),vbrScale:Li(n,t,28)})}});var gae={};Lr(gae,{MpegContentError:()=>op,MpegParser:()=>nU});function cze(n){return`V${Math.floor((100-n)/10)}`}var sae,yo,op,aae,oae,gze,mo,nae,nU,cae=ue(()=>{DA();an();sae=ze(lt(),1);nr();Of();iae();or();yo=(0,sae.default)("music-metadata:parser:mpeg"),op=class extends mt("MPEG"){},aae=1024,oae={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]},gze=[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"]],mo=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=XA(t,o+1,3,2),this.layer=n.LayerDescription[XA(t,o+1,5,2)],this.versionIndex>1&&this.layer===0?this.parseAdtsHeader(t,o):this.parseMpegHeader(t,o),this.isProtectedByCRC=!Li(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=XA(t,o+2,0,4),this.sampRateFreqIndex=XA(t,o+2,4,2),this.padding=Li(t,o+2,6),this.privateBit=Li(t,o+2,7),this.channelModeIndex=XA(t,o+3,0,2),this.modeExtension=XA(t,o+3,2,2),this.isCopyrighted=Li(t,o+3,4),this.isOriginalMedia=Li(t,o+3,5),this.emphasis=XA(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 a=this.calcBitrate();if(!a)throw new op("Cannot determine bit-rate");if(this.bitrate=a*1e3,this.samplingRate=this.calcSamplingRate(),this.samplingRate==null)throw new op("Cannot determine sampling-rate")}parseAdtsHeader(t,o){yo("layer=0 => ADTS"),this.version=this.versionIndex===2?4:2,this.container=`ADTS/MPEG-${this.version}`;let a=XA(t,o+2,0,2);this.codec="AAC",this.codecProfile=oae.AudioObjectTypes[a],yo(`MPEG-4 audio-codec=${this.codec}`);let e=XA(t,o+2,2,4);this.samplingRate=oae.SamplingFrequencies[e],yo(`sampling-rate=${this.samplingRate}`);let i=XA(t,o+2,7,3);this.mp4ChannelConfig=gze[i],yo(`channel-config=${this.mp4ChannelConfig?this.mp4ChannelConfig.join("+"):"?"}`),this.frameLength=XA(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]}};mo.SyncByte1=255;mo.SyncByte2=224;mo.VersionID=[2.5,null,2,1];mo.LayerDescription=[0,3,2,1];mo.ChannelMode=["stereo","joint_stereo","dual_channel","mono"];mo.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}};mo.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}};mo.samplesInFrameTable=[[0,384,1152,1152],[0,384,1152,576]];nae={len:4,get:(n,t)=>new mo(n,t)};nU=class extends $s{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(aae),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(yo("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 a=o/this.metadata.format.sampleRate;yo(`Calculate duration at EOF: ${a} sec.`,a),this.metadata.setFormat("duration",a)}}}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 a=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);t.codecProfile&&t.codecProfile[0]==="V"&&this.metadata.setFormat("bitrate",a*8/t.duration)}if(this.tokenizer.fileInfo.size&&t.codecProfile==="CBR"){let a=this.tokenizer.fileInfo.size-this.mpegOffset-(o?128:0);if(this.frame_size!==null&&this.samplesPerFrame!==null){let e=Math.round(a/this.frame_size)*this.samplesPerFrame;if(this.metadata.setFormat("numberOfSamples",e),t.sampleRate&&!t.duration){let i=e/t.sampleRate;yo("Calculate CBR duration based on file size: %s",i),this.metadata.setFormat("duration",i)}}}}}async sync(){let t=!1;for(;;){let o=0;if(this.syncPeek.len=await this.tokenizer.peekBuffer(this.syncPeek.buf,{length:aae,mayBeLess:!0}),this.syncPeek.len<=163)throw new kA;for(;;){if(t&&(this.syncPeek.buf[o]&224)===224){this.buf_frame_header[0]=mo.SyncByte1,this.buf_frame_header[1]=this.syncPeek.buf[o],await this.tokenizer.ignore(o),yo(`Sync at offset=${this.tokenizer.position-1}, frameCount=${this.frameCount}`),this.syncFrameCount===this.frameCount&&(yo(`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(mo.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&&yo("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 op("invalid slot_size");let a=t.calcSamplesPerFrame();yo(`samples_per_frame=${a}`);let e=a/8;if(t.bitrate!==null&&t.samplingRate!=null){let i=e*t.bitrate/t.samplingRate+(t.padding?o:0);this.frame_size=Math.floor(i)}if(this.audioFrameHeader=t,t.bitrate!==null&&this.bitrates.push(t.bitrate),this.frameCount===1)return this.offset=nae.len,await this.skipSideInformation(),!1;if(this.frameCount===4){if(this.areAllSame(this.bitrates)){if(this.samplesPerFrame=a,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=a,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+=XA(o,0,0,11),this.totalDataLength+=t.frameLength,this.samplesPerFrame=1024,t.samplingRate!==null){let a=t.samplingRate/this.samplesPerFrame,i=8*(this.frameCount===0?0:this.totalDataLength/this.frameCount)*a+.5;this.metadata.setFormat("bitrate",i),yo(`frame-count=${this.frameCount}, size=${t.frameLength} bytes, bit-rate=${i}`)}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(on.len),this.offset+=on.len,this.skipSideInformation()}async skipSideInformation(){if(this.audioFrameHeader){let t=this.audioFrameHeader.calculateSideInfoLength();if(t!==null){await this.tokenizer.readToken(new bt(t)),this.offset+=t,await this.readXtraInfoHeader();return}}}async readXtraInfoHeader(){let t=await this.tokenizer.readToken(oU);switch(this.offset+=oU.len,t){case"Info":return this.metadata.setFormat("codecProfile","CBR"),this.readXingInfoHeader();case"Xing":{let a=await this.readXingInfoHeader();if(a.vbrScale!==null){let e=cze(a.vbrScale);this.metadata.setFormat("codecProfile",e)}return null}case"Xtra":break;case"LAME":{let a=await this.tokenizer.readToken($O);if(this.frame_size!==null&&this.frame_size>=this.offset+$O.len)return this.offset+=$O.len,this.metadata.setFormat("tool",`LAME ${a}`),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 rae(this.tokenizer);if(this.offset+=this.tokenizer.position-t,o.lame&&(this.metadata.setFormat("tool",`LAME ${gn(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),yo("Get duration from Xing header: %s",this.metadata.format.duration),o}let a=this.frame_size-this.offset;return await this.skipFrameData(a),o}async skipFrameData(t){if(t<0)throw new op("frame-data-left cannot be negative");await this.tokenizer.ignore(t)}areAllSame(t){let o=t[0];return t.every(a=>a===o)}}});var Iae,lae=ue(()=>{Iae={parserType:"mpeg",extensions:[".mp2",".mp3",".m2a",".aac","aacp"],mimeTypes:["audio/mpeg","audio/mp3","audio/aacs","audio/aacp"],async load(){return(await Promise.resolve().then(()=>(cae(),gae))).MpegParser}}});var pae,dae=ue(()=>{pae={parserType:"apev2",extensions:[".ape"],mimeTypes:["audio/ape","audio/monkeys-audio"],async load(){return(await Promise.resolve().then(()=>(ap(),Jie))).APEv2Parser}}});function sU(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,a=new Uint8Array(16);o=parseInt(t.slice(0,8),16),a[0]=o&255,a[1]=o>>>8&255,a[2]=o>>>16&255,a[3]=o>>>24&255,o=parseInt(t.slice(9,13),16),a[4]=o&255,a[5]=o>>>8&255,o=parseInt(t.slice(14,18),16),a[6]=o&255,a[7]=o>>>8&255,o=parseInt(t.slice(19,23),16),a[8]=o>>>8&255,a[9]=o&255,o=parseInt(t.slice(24,32),16),a[10]=o>>>24&255,a[11]=o>>>16&255,a[12]=o>>>8&255,a[13]=o&255,o=parseInt(t.slice(32,36),16),a[14]=o>>>8&255,a[15]=o&255;for(let e=0;e<16;e++)if(!Number.isFinite(a[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 a}var eb,hae=ue(()=>{eb=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(sU(t))}toString(){let t=this.bytes,o=s=>s.toString(16).padStart(2,"0"),a=o(t[3])+o(t[2])+o(t[1])+o(t[0]),e=o(t[5])+o(t[4]),i=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`${a}-${e}-${i}-${A}-${r}`.toUpperCase()}equals(t,o=0){if(o<0||t.length-o<16)return!1;let a=this.bytes;for(let e=0;e<16;e++)if(t[o+e]!==a[e])return!1;return!0}}});var Ye,sr,gU=ue(()=>{hae();Ye=class n{static fromBin(t,o=0){return new n(n.decode(t,o))}static decode(t,o=0){return new eb(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 sU(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");sr=Ye});function uae(n){return Ize[n]}function bf(n){return gn(Qi(n,"utf-16le"))}function Eae(n){return new Uint8Array(n)}function lze(n,t=0){return Cae(n,t)===1}function pze(n,t=0){return Le.get(n,t)}function dze(n,t=0){return Fr.get(n,t)}function Cae(n,t=0){return SA.get(n,t)}var Ize,Bae=ue(()=>{DA();nr();Ize=[bf,Eae,lze,pze,dze,Cae,Eae]});async function fae(n){let t=await n.readNumber(SA);return(await n.readToken(new We(t*2,"utf-16le"))).replace("\0","")}async function yae(n){let t=await n.readToken(hze),o=[];for(let a=0;a{DA();nr();gU();Bae();QI();or();nE=class extends mt("ASF"){},Qae={len:30,get:(n,t)=>({objectId:sr.fromBin(n,t),objectSize:Number(Fr.get(n,t+16)),numberOfHeaderObjects:Le.get(n,t+24)})},DI={len:24,get:(n,t)=>({objectId:sr.fromBin(n,t),objectSize:Number(Fr.get(n,t+16))})},ic=class{constructor(t){this.len=Number(t.objectSize)-DI.len}postProcessTag(t,o,a,e){if(o==="WM/Picture")t.push({id:o,value:cU.fromBuffer(e)});else{let i=uae(a);if(!i)throw new nE(`unexpected value headerType: ${a}`);t.push({id:o,value:i(e)})}}},Mf=class extends ic{get(t,o){return null}},sE=class extends ic{get(t,o){return{fileId:sr.fromBin(t,o),fileSize:Fr.get(t,o+16),creationDate:Fr.get(t,o+24),dataPacketsCount:Fr.get(t,o+32),playDuration:Fr.get(t,o+40),sendDuration:Fr.get(t,o+48),preroll:Fr.get(t,o+56),flags:{broadcast:GA(t,o+64,24),seekable:GA(t,o+64,25)},minimumDataPacketSize:Le.get(t,o+68),maximumDataPacketSize:Le.get(t,o+72),maximumBitrate:Le.get(t,o+76)}}};sE.guid=sr.FilePropertiesObject;gE=class extends ic{get(t,o){return{streamType:sr.decodeMediaType(sr.fromBin(t,o)),errorCorrectionType:sr.fromBin(t,o+8)}}};gE.guid=sr.StreamPropertiesObject;cE=class{constructor(){this.len=22}get(t,o){let a=new DataView(t.buffer,o);return{reserved1:sr.fromBin(t,o),reserved2:a.getUint16(16,!0),extensionDataSize:a.getUint16(18,!0)}}};cE.guid=sr.HeaderExtensionObject;hze={len:20,get:(n,t)=>({entryCount:new DataView(n.buffer,t).getUint16(16,!0)})};np=class n extends ic{get(t,o){let a=[],e=new DataView(t.buffer,o),i=10;for(let A=0;A0){let s=n.contentDescTags[A],g=i+r;a.push({id:s,value:bf(t.subarray(o+i,o+g))}),i=g}}return a}};np.guid=sr.ContentDescriptionObject;np.contentDescTags=["Title","Author","Copyright","Description","Rating"];IE=class extends ic{get(t,o){let a=[],e=new DataView(t.buffer,o),i=e.getUint16(0,!0),A=2;for(let r=0;rpU});var mae,lU,Bze,pU,wae=ue(()=>{mae=ze(lt(),1);tp();gU();IU();$a();IU();lU=(0,mae.default)("music-metadata:parser:ASF"),Bze="asf",pU=class extends Gt{async parse(){let t=await this.tokenizer.readToken(Qae);if(!t.objectId.equals(sr.HeaderObject))throw new nE(`expected asf header; but was not found; got: ${t.objectId.str}`);await this.parseObjectHeader(t.numberOfHeaderObjects)}async parseObjectHeader(t){let o;do{let a=await this.tokenizer.readToken(DI);switch(lU("header GUID=%s",a.objectId.str),a.objectId.str){case sE.guid.str:{let e=await this.tokenizer.readToken(new sE(a));this.metadata.setFormat("duration",Number(e.playDuration/BigInt(1e3))/1e4-Number(e.preroll)/1e3),this.metadata.setFormat("bitrate",e.maximumBitrate);break}case gE.guid.str:{let e=await this.tokenizer.readToken(new gE(a));this.metadata.setFormat("container",`ASF/${e.streamType}`);break}case cE.guid.str:{let e=await this.tokenizer.readToken(new cE);await this.parseExtensionObject(e.extensionDataSize);break}case np.guid.str:o=await this.tokenizer.readToken(new np(a)),await this.addTags(o);break;case IE.guid.str:o=await this.tokenizer.readToken(new IE(a)),await this.addTags(o);break;case sr.CodecListObject.str:{let e=await yae(this.tokenizer);e.forEach(A=>{this.metadata.addStreamInfo({type:A.type.videoCodec?fi.video:fi.audio,codecName:A.codecName})});let i=e.filter(A=>A.type.audioCodec).map(A=>A.codecName).join("/");this.metadata.setFormat("codec",i);break}case sr.StreamBitratePropertiesObject.str:await this.tokenizer.ignore(a.objectSize-DI.len);break;case sr.PaddingObject.str:lU("Padding: %s bytes",a.objectSize-DI.len),await this.tokenizer.ignore(a.objectSize-DI.len);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${a.objectId.str}`),lU("Ignore ASF-Object-GUID: %s",a.objectId.str),await this.tokenizer.readToken(new Mf(a))}}while(--t)}async addTags(t){await Promise.all(t.map(({id:o,value:a})=>this.metadata.addTag(Bze,o,a)))}async parseExtensionObject(t){do{let o=await this.tokenizer.readToken(DI),a=o.objectSize-DI.len;if(a<0)throw new nE(`Invalid ASF header object size: ${o.objectSize}`);switch(o.objectId.str){case lE.guid.str:await this.tokenizer.readToken(new lE(o));break;case sp.guid.str:{let e=await this.tokenizer.readToken(new sp(o));await this.addTags(e);break}case pE.guid.str:{let e=await this.tokenizer.readToken(new pE(o));await this.addTags(e);break}case sr.PaddingObject.str:await this.tokenizer.ignore(a);break;case sr.CompatibilityObject.str:await this.tokenizer.ignore(a);break;case sr.ASF_Index_Placeholder_Object.str:await this.tokenizer.ignore(a);break;default:this.metadata.addWarning(`Ignore ASF-Object-GUID: ${o.objectId.str}`),await this.tokenizer.readToken(new Mf(o));break}t-=o.objectSize}while(t>0)}}});var Dae,Oae=ue(()=>{Dae={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(()=>(wae(),Sae))).AsfParser}}});var gp,bae=ue(()=>{DA();ma();gp={len:12,get:(n,t)=>({chunkID:at.get(n,t),chunkSize:R2.get(n,t+4)})}});var _ae={};Lr(_ae,{DsdiffContentParseError:()=>dE,DsdiffParser:()=>dU});var Mae,Sa,dE,dU,Tae=ue(()=>{DA();Mae=ze(lt(),1);an();ma();$a();oE();bae();or();Sa=(0,Mae.default)("music-metadata:parser:aiff"),dE=class extends mt("DSDIFF"){},dU=class extends Gt{async parse(){let t=await this.tokenizer.readToken(gp);if(t.chunkID!=="FRM8")throw new dE("Unexpected chunk-ID");this.metadata.setAudioOnly();let o=(await this.tokenizer.readToken(at)).trim();switch(o){case"DSD":return this.metadata.setFormat("container",`DSDIFF/${o}`),this.metadata.setFormat("lossless",!0),this.readFmt8Chunks(t.chunkSize-BigInt(at.len));default:throw new dE(`Unsupported DSDIFF type: ${o}`)}}async readFmt8Chunks(t){for(;t>=gp.len;){let o=await this.tokenizer.readToken(gp);Sa(`Chunk id=${o.chunkID}`),await this.readData(o),t-=BigInt(gp.len)+o.chunkSize}}async readData(t){Sa(`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(Le);Sa(`DSDIFF version=${e}`);break}case"PROP":{if(await this.tokenizer.readToken(at)!=="SND ")throw new dE("Unexpected PROP-chunk ID");await this.handleSoundPropertyChunks(t.chunkSize-BigInt(at.len));break}case"ID3":{let e=await this.tokenizer.readToken(new bt(Number(t.chunkSize))),i=Qo(e);await new ln().parse(this.metadata,i,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:Sa(`Ignore chunk[ID=${t.chunkID}, size=${t.chunkSize}]`);break}let a=t.chunkSize-BigInt(this.tokenizer.position-o);a>0&&(Sa(`After Parsing chunk, remaining ${a} bytes`),await this.tokenizer.ignore(Number(a)))}async handleSoundPropertyChunks(t){for(Sa(`Parsing sound-property-chunks, remainingSize=${t}`);t>0;){let o=await this.tokenizer.readToken(gp);Sa(`Sound-property-chunk[ID=${o.chunkID}, size=${o.chunkSize}]`);let a=this.tokenizer.position;switch(o.chunkID.trim()){case"FS":{let i=await this.tokenizer.readToken(xe);this.metadata.setFormat("sampleRate",i);break}case"CHNL":{let i=await this.tokenizer.readToken(LA);this.metadata.setFormat("numberOfChannels",i),await this.handleChannelChunks(o.chunkSize-BigInt(LA.len));break}case"CMPR":{let i=(await this.tokenizer.readToken(at)).trim(),A=await this.tokenizer.readToken(QA),r=await this.tokenizer.readToken(new We(A,"ascii"));i==="DSD"&&(this.metadata.setFormat("lossless",!0),this.metadata.setFormat("bitsPerSample",1)),this.metadata.setFormat("codec",`${i} (${r})`);break}case"ABSS":{let i=await this.tokenizer.readToken(LA),A=await this.tokenizer.readToken(QA),r=await this.tokenizer.readToken(QA),s=await this.tokenizer.readToken(xe);Sa(`ABSS ${i}:${A}:${r}.${s}`);break}case"LSCO":{let i=await this.tokenizer.readToken(LA);Sa(`LSCO lsConfig=${i}`);break}default:Sa(`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-a);e>0&&(Sa(`After Parsing sound-property-chunk ${o.chunkSize}, remaining ${e} bytes`),await this.tokenizer.ignore(Number(e))),t-=BigInt(gp.len)+o.chunkSize,Sa(`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){Sa(`Parsing channel-chunks, remainingSize=${t}`);let o=[];for(;t>=at.len;){let a=await this.tokenizer.readToken(at);Sa(`Channel[ID=${a}]`),o.push(a),t-=BigInt(at.len)}return Sa(`Channels: ${o.join(", ")}`),o}}});var Nae,Rae=ue(()=>{Nae={parserType:"dsdiff",extensions:[".dff"],mimeTypes:["audio/dsf","audio/dsd"],async load(){return(await Promise.resolve().then(()=>(Tae(),_ae))).DsdiffParser}}});var kae,OI,Ab,hU=ue(()=>{DA();ma();or();kae={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 "},OI=class extends mt("AIFF"){},Ab=class{constructor(t,o){this.isAifc=o;let a=o?22:18;if(t.chunkSize>Math.abs(a):e<22){let A=QA.get(t,o+22);if(A>0){let r=(A+1)%2;if(23+A+r===this.len)i.compressionName=new We(A,"latin1").get(t,o+23);else throw new OI("Illegal pstring length")}else i.compressionName=void 0}}else i.compressionName="PCM";return i}}});var tb,vae=ue(()=>{DA();ma();tb={len:8,get:(n,t)=>({chunkID:at.get(n,t),chunkSize:Number(BigInt(xe.get(n,t+4)))})}});var Gae={};Lr(Gae,{AIFFParser:()=>uU});var Pae,EU,uU,Fae=ue(()=>{DA();Pae=ze(lt(),1);an();oE();ma();$a();hU();hU();vae();EU=(0,Pae.default)("music-metadata:parser:aiff"),uU=class extends Gt{constructor(){super(...arguments),this.isCompressed=null}async parse(){if((await this.tokenizer.readToken(tb)).chunkID!=="FORM")throw new OI("Invalid Chunk-ID, expected 'FORM'");let o=await this.tokenizer.readToken(at);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 OI(`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>=tb.len;){EU(`Reading AIFF chunk at offset=${this.tokenizer.position}`);let a=await this.tokenizer.readToken(tb),e=2*Math.round(a.chunkSize/2),i=await this.readData(a);await this.tokenizer.ignore(e-i)}}catch(a){if(a instanceof kA)EU("End-of-stream");else throw a}}async readData(t){switch(t.chunkID){case"COMM":{if(this.isCompressed===null)throw new OI("Failed to parse AIFF.COMM chunk when compression type is unknown");let o=await this.tokenizer.readToken(new Ab(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??kae[o.compressionType]),t.chunkSize}case"ID3 ":{let o=await this.tokenizer.readToken(new bt(t.chunkSize)),a=Qo(o);return await new ln().parse(this.metadata,a,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 EU(`Ignore chunk id=${t.chunkID}, size=${t.chunkSize}`),0}}async readTextChunk(t){let a=(await this.tokenizer.readToken(new We(t.chunkSize,"ascii"))).split("\0").map(e=>e.trim()).filter(e=>e?.length);return await Promise.all(a.map(e=>this.metadata.addTag("AIFF",t.chunkID,e))),t.chunkSize}}});var Lae,Uae=ue(()=>{Lae={parserType:"aiff",extensions:[".aif","aiff","aifc"],mimeTypes:["audio/aiff","audio/aif","audio/aifc","application/aiff"],async load(){return(await Promise.resolve().then(()=>(Fae(),Gae))).AIFFParser}}});var _f,Hae,Kae,xae=ue(()=>{DA();ma();_f={len:12,get:(n,t)=>({id:at.get(n,t),size:Fr.get(n,t+4)})},Hae={len:16,get:(n,t)=>({fileSize:df.get(n,t),metadataPointer:df.get(n,t+8)})},Kae={len:40,get:(n,t)=>({formatVersion:ur.get(n,t),formatID:ur.get(n,t+4),channelType:ur.get(n,t+8),channelNum:ur.get(n,t+12),samplingFrequency:ur.get(n,t+16),bitsPerSample:ur.get(n,t+20),sampleCount:df.get(n,t+24),blockSizePerChannel:ur.get(n,t+32)})}});var jae={};Lr(jae,{DsdContentParseError:()=>rb,DsfParser:()=>BU});var Yae,CU,rb,BU,Jae=ue(()=>{Yae=ze(lt(),1);Of();xae();oE();or();CU=(0,Yae.default)("music-metadata:parser:DSF"),rb=class extends mt("DSD"){},BU=class extends $s{async postId3v2Parse(){let t=this.tokenizer.position,o=await this.tokenizer.readToken(_f);if(o.id!=="DSD ")throw new rb("Invalid chunk signature");this.metadata.setFormat("container","DSF"),this.metadata.setFormat("lossless",!0),this.metadata.setAudioOnly();let a=await this.tokenizer.readToken(Hae);if(a.metadataPointer===BigInt(0))CU("No ID3v2 tag present");else return CU(`expect ID3v2 at offset=${a.metadataPointer}`),await this.parseChunks(a.fileSize-o.size),await this.tokenizer.ignore(Number(a.metadataPointer)-this.tokenizer.position-t),new ln().parse(this.metadata,this.tokenizer,this.options)}async parseChunks(t){for(;t>=_f.len;){let o=await this.tokenizer.readToken(_f);switch(CU(`Parsing chunk name=${o.id} size=${o.size}`),o.id){case"fmt ":{let a=await this.tokenizer.readToken(Kae);this.metadata.setFormat("numberOfChannels",a.channelNum),this.metadata.setFormat("sampleRate",a.samplingFrequency),this.metadata.setFormat("bitsPerSample",a.bitsPerSample),this.metadata.setFormat("numberOfSamples",a.sampleCount),this.metadata.setFormat("duration",Number(a.sampleCount)/a.samplingFrequency);let e=a.bitsPerSample*a.samplingFrequency*a.channelNum;this.metadata.setFormat("bitrate",e);return}default:this.tokenizer.ignore(Number(o.size)-_f.len);break}t-=o.size}}}});var qae,zae=ue(()=>{qae={parserType:"dsf",extensions:[".dsf"],mimeTypes:["audio/dsf"],async load(){return(await Promise.resolve().then(()=>(Jae(),jae))).DsfParser}}});var bI,Tf,Vae,ib=ue(()=>{DA();QI();bI=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 a=$h[xe.get(t,o)];o+=4;let e=xe.get(t,o);o+=4;let i=new We(e,"utf-8").get(t,o);o+=e;let A=xe.get(t,o);o+=4;let r=new We(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 p=xe.get(t,o);o+=4;let B=t.slice(o,o+p);return{type:a,format:i,description:r,width:s,height:g,colour_depth:c,indexed_color:I,data:B}}},Tf={len:7,get:(n,t)=>({packetType:QA.get(n,t),vorbis:new We(6,"ascii").get(n,t+1)})},Vae={len:23,get:(n,t)=>({version:Le.get(n,t+0),channelMode:QA.get(n,t+4),sampleRate:Le.get(n,t+5),bitrateMax:Le.get(n,t+9),bitrateNominal:Le.get(n,t+13),bitrateMin:Le.get(n,t+17)})}});var hE,fU=ue(()=>{DA();js();hE=class{constructor(t,o){this.data=t,this.offset=o}readInt32(){let t=Le.get(this.data,this.offset);return this.offset+=4,t}readStringUtf8(){let t=this.readInt32(),o=Tr(this.data.subarray(this.offset,this.offset+t),"utf-8");return this.offset+=t,o}parseUserComment(){let t=this.offset,o=this.readStringUtf8(),a=o.indexOf("=");return{key:o.substring(0,a).toUpperCase(),value:o.substring(a+1),len:this.offset-t}}}});var Wae,EE,Nf,eg,Rf=ue(()=>{DA();Wae=ze(lt(),1);fU();ib();or();EE=(0,Wae.default)("music-metadata:parser:ogg:vorbis1"),Nf=class extends mt("Vorbis"){},eg=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 Nf("Cannot continue on previous page");this.pageSegments.push(o)}if(t.headerType.lastPage||!t.headerType.continued){if(this.pageSegments.length>0){let a=n.mergeUint8Arrays(this.pageSegments);await this.parseFullPage(a)}this.pageSegments=t.headerType.lastPage?[]:[o]}}}static mergeUint8Arrays(t){let o=t.reduce((e,i)=>e+i.length,0),a=new Uint8Array(o);return t.forEach((e,i,A)=>{let r=A.slice(0,i).reduce((s,g)=>s+g.length,0);a.set(e,r)}),a}async flush(){await this.parseFullPage(n.mergeUint8Arrays(this.pageSegments))}async parseUserComment(t,o){let e=new hE(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){EE("Ignore picture");return}o=bI.fromBase64(o),EE(`Push picture: id=${t}, format=${o.format}`)}else EE(`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),EE("Parse first page");let a=Tf.get(o,0);if(a.vorbis!=="vorbis")throw new Nf("Metadata does not look like Vorbis");if(a.packetType===1){let e=Vae.get(o,Tf.len);this.metadata.setFormat("sampleRate",e.sampleRate),this.metadata.setFormat("bitrate",e.bitrateNominal),this.metadata.setFormat("numberOfChannels",e.channelMode),EE("sample-rate=%s[hz], bitrate=%s[b/s], channel-mode=%s",e.sampleRate,e.bitrateNominal,e.channelMode)}else throw new Nf("First Ogg page should be type 1: the identification header")}async parseFullPage(t){let o=Tf.get(t,0);switch(EE("Parse full page: type=%s, byteLength=%s",o.packetType,t.byteLength),o.packetType){case 3:return this.parseUserCommentList(t,Tf.len);case 1:case 5:break}}async parseUserCommentList(t,o){let a=Le.get(t,o);o+=4,o+=a;let e=Le.get(t,o);for(o+=4;e-- >0;)o+=await this.parseUserComment(t,o)}}});var wa,kf,vf,QU=ue(()=>{nr();DA();wa={STREAMINFO:0,PADDING:1,APPLICATION:2,SEEKTABLE:3,VORBIS_COMMENT:4,CUESHEET:5,PICTURE:6},kf={len:4,get:(n,t)=>({lastBlock:GA(n,t,7),type:XA(n,t,1,7),length:Gr.get(n,t+1)})},vf={len:34,get:(n,t)=>({minimumBlockSize:LA.get(n,t),maximumBlockSize:LA.get(n,t+2)/1e3,minimumFrameSize:Gr.get(n,t+4),maximumFrameSize:Gr.get(n,t+7),sampleRate:Gr.get(n,t+10)>>4,channels:XA(n,t+12,4,3)+1,bitsPerSample:XA(n,t+12,7,5)+1,totalSamples:XA(n,t+13,4,36),fileMD5:new bt(16).get(n,t+18)})}});var $ae={};Lr($ae,{FlacParser:()=>Pf});var Xae,yze,ab,Pf,yU=ue(()=>{Xae=ze(lt(),1);DA();ib();Of();ma();Rf();fU();or();QU();yze=(0,Xae.default)("music-metadata:parser:FLAC"),ab=class extends mt("FLAC"){},Pf=class extends $s{constructor(){super(...arguments),this.vorbisParser=new eg(this.metadata,this.options)}async postId3v2Parse(){if((await this.tokenizer.readToken(at)).toString()!=="fLaC")throw new ab("Invalid FLAC preamble");let o;do o=await this.tokenizer.readToken(kf),await this.parseDataBlock(o);while(!o.lastBlock);if(this.tokenizer.fileInfo.size&&this.metadata.format.duration){let a=this.tokenizer.fileInfo.size-this.tokenizer.position;this.metadata.setFormat("bitrate",8*a/this.metadata.format.duration)}}async parseDataBlock(t){switch(yze(`blockHeader type=${t.type}, length=${t.length}`),t.type){case wa.STREAMINFO:return this.readBlockStreamInfo(t.length);case wa.PADDING:break;case wa.APPLICATION:break;case wa.SEEKTABLE:break;case wa.VORBIS_COMMENT:return this.readComment(t.length);case wa.CUESHEET:break;case wa.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!==vf.len)throw new ab("Unexpected block-stream-info length");let o=await this.tokenizer.readToken(vf);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 bt(t));return this.parseComment(o)}async parseComment(t){let o=new hE(t,0),a=o.readStringUtf8();a.length>0&&this.metadata.setFormat("tool",a);let e=o.readInt32(),i=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 bI(t)))}addPictureTag(t){return this.addTag("METADATA_BLOCK_PICTURE",t)}addTag(t,o){return this.vorbisParser.addTag(t,o)}}});var eoe,Aoe=ue(()=>{eoe={parserType:"flac",extensions:[".flac"],mimeTypes:["audio/flac"],async load(){return(await Promise.resolve().then(()=>(yU(),$ae))).FlacParser}}});var _e,mU=ue(()=>{_e={string:0,uint:1,uid:2,bool:3,binary:4,float:5}});var toe,roe=ue(()=>{mU();toe={name:"dtd",container:{440786851:{name:"ebml",container:{17030:{name:"ebmlVersion",value:_e.uint},17143:{name:"ebmlReadVersion",value:_e.uint},17138:{name:"ebmlMaxIDWidth",value:_e.uint},17139:{name:"ebmlMaxSizeWidth",value:_e.uint},17026:{name:"docType",value:_e.string},17031:{name:"docTypeVersion",value:_e.uint},17029:{name:"docTypeReadVersion",value:_e.uint}}},408125543:{name:"segment",container:{290298740:{name:"seekHead",container:{19899:{name:"seek",multiple:!0,container:{21419:{name:"id",value:_e.binary},21420:{name:"position",value:_e.uint}}}}},357149030:{name:"info",container:{29604:{name:"uid",value:_e.uid},29572:{name:"filename",value:_e.string},3979555:{name:"prevUID",value:_e.uid},3965867:{name:"prevFilename",value:_e.string},4110627:{name:"nextUID",value:_e.uid},4096955:{name:"nextFilename",value:_e.string},2807729:{name:"timecodeScale",value:_e.uint},17545:{name:"duration",value:_e.float},17505:{name:"dateUTC",value:_e.uint},31657:{name:"title",value:_e.string},19840:{name:"muxingApp",value:_e.string},22337:{name:"writingApp",value:_e.string}}},524531317:{name:"cluster",multiple:!0,container:{231:{name:"timecode",value:_e.uid},22743:{name:"silentTracks ",multiple:!0},167:{name:"position",value:_e.uid},171:{name:"prevSize",value:_e.uid},160:{name:"blockGroup"},163:{name:"simpleBlock"}}},374648427:{name:"tracks",container:{174:{name:"entries",multiple:!0,container:{215:{name:"trackNumber",value:_e.uint},29637:{name:"uid",value:_e.uid},131:{name:"trackType",value:_e.uint},185:{name:"flagEnabled",value:_e.bool},136:{name:"flagDefault",value:_e.bool},21930:{name:"flagForced",value:_e.bool},156:{name:"flagLacing",value:_e.bool},28135:{name:"minCache",value:_e.uint},28136:{name:"maxCache",value:_e.uint},2352003:{name:"defaultDuration",value:_e.uint},2306383:{name:"timecodeScale",value:_e.float},21358:{name:"name",value:_e.string},2274716:{name:"language",value:_e.string},134:{name:"codecID",value:_e.string},25506:{name:"codecPrivate",value:_e.binary},2459272:{name:"codecName",value:_e.string},3839639:{name:"codecSettings",value:_e.string},3883072:{name:"codecInfoUrl",value:_e.string},2536e3:{name:"codecDownloadUrl",value:_e.string},170:{name:"codecDecodeAll",value:_e.bool},28587:{name:"trackOverlay",value:_e.uint},224:{name:"video",container:{154:{name:"flagInterlaced",value:_e.bool},21432:{name:"stereoMode",value:_e.uint},176:{name:"pixelWidth",value:_e.uint},186:{name:"pixelHeight",value:_e.uint},21680:{name:"displayWidth",value:_e.uint},21690:{name:"displayHeight",value:_e.uint},21683:{name:"aspectRatioType",value:_e.uint},3061028:{name:"colourSpace",value:_e.uint},3126563:{name:"gammaValue",value:_e.float}}},225:{name:"audio",container:{181:{name:"samplingFrequency",value:_e.float},30901:{name:"outputSamplingFrequency",value:_e.float},159:{name:"channels",value:_e.uint},148:{name:"channels",value:_e.uint},32123:{name:"channelPositions",value:_e.binary},25188:{name:"bitDepth",value:_e.uint}}},28032:{name:"contentEncodings",container:{25152:{name:"contentEncoding",container:{20529:{name:"order",value:_e.uint},20530:{name:"scope",value:_e.bool},20531:{name:"type",value:_e.uint},20532:{name:"contentEncoding",container:{16980:{name:"contentCompAlgo",value:_e.uint},16981:{name:"contentCompSettings",value:_e.binary}}},20533:{name:"contentEncoding",container:{18401:{name:"contentEncAlgo",value:_e.uint},18402:{name:"contentEncKeyID",value:_e.binary},18403:{name:"contentSignature ",value:_e.binary},18404:{name:"ContentSigKeyID ",value:_e.binary},18405:{name:"contentSigAlgo ",value:_e.uint},18406:{name:"contentSigHashAlgo ",value:_e.uint}}},25188:{name:"bitDepth",value:_e.uint}}}}}}}}},475249515:{name:"cues",container:{187:{name:"cuePoint",container:{179:{name:"cueTime",value:_e.uid},183:{name:"positions",container:{247:{name:"track",value:_e.uint},241:{name:"clusterPosition",value:_e.uint},21368:{name:"blockNumber",value:_e.uint},234:{name:"codecState",value:_e.uint},219:{name:"reference",container:{150:{name:"time",value:_e.uint},151:{name:"cluster",value:_e.uint},21343:{name:"number",value:_e.uint},235:{name:"codecState",value:_e.uint}}},240:{name:"relativePosition",value:_e.uint}}}}}}},423732329:{name:"attachments",container:{24999:{name:"attachedFiles",multiple:!0,container:{18046:{name:"description",value:_e.string},18030:{name:"name",value:_e.string},18016:{name:"mimeType",value:_e.string},18012:{name:"data",value:_e.binary},18094:{name:"uid",value:_e.uid}}}}},272869232:{name:"chapters",container:{17849:{name:"editionEntry",container:{182:{name:"chapterAtom",container:{29636:{name:"uid",value:_e.uid},145:{name:"timeStart",value:_e.uint},146:{name:"timeEnd",value:_e.uid},152:{name:"hidden",value:_e.bool},17816:{name:"enabled",value:_e.uid},143:{name:"track",container:{137:{name:"trackNumber",value:_e.uid},128:{name:"display",container:{133:{name:"string",value:_e.string},17276:{name:"language ",value:_e.string},17278:{name:"country ",value:_e.string}}}}}}}}}}},307544935:{name:"tags",container:{29555:{name:"tag",multiple:!0,container:{25536:{name:"target",container:{25541:{name:"tagTrackUID",value:_e.uid},25540:{name:"tagChapterUID",value:_e.uint},25542:{name:"tagAttachmentUID",value:_e.uid},25546:{name:"targetType",value:_e.string},26826:{name:"targetTypeValue",value:_e.uint},25545:{name:"tagEditionUID",value:_e.uid}}},26568:{name:"simpleTags",multiple:!0,container:{17827:{name:"name",value:_e.string},17543:{name:"string",value:_e.string},17541:{name:"binary",value:_e.binary},17530:{name:"language",value:_e.string},17531:{name:"languageIETF",value:_e.string},17540:{name:"default",value:_e.bool}}}}}}}}}}}});function SU(n,t){return Number(mze(n,t))}function mze(n,t){let o=new Uint8Array(8),a=n.subarray(0,t);try{return o.set(a,8-t),zs.get(o,0)}catch{return BigInt(-1)}}function aoe(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,aoe(t)}),n}function cp(n){let t="";return n.parent&&n.parent.name!=="dtd"&&(t+=`${cp(n.parent)}/`),t+n.name}var ioe,uE,ob,Ag,nb,ooe=ue(()=>{DA();ioe=ze(lt(),1);an();mU();DA();or();uE=(0,ioe.default)("music-metadata:parser:ebml"),ob=class extends mt("EBML"){},Ag={ReadNext:0,IgnoreElement:2,SkipSiblings:3,TerminateParsing:4,SkipElement:5},nb=class{constructor(t){this.parserMap=new Map,this.ebmlMaxIDLength=4,this.ebmlMaxSizeLength=8,this.tokenizer=t,this.parserMap.set(_e.uint,o=>this.readUint(o)),this.parserMap.set(_e.string,o=>this.readString(o)),this.parserMap.set(_e.binary,o=>this.readBuffer(o)),this.parserMap.set(_e.uid,async o=>this.readBuffer(o)),this.parserMap.set(_e.bool,o=>this.readFlag(o)),this.parserMap.set(_e.float,o=>this.readFloat(o))}async iterate(t,o,a){return this.parseContainer(aoe(t),o,a)}async parseContainer(t,o,a){let e={};for(;this.tokenizer.position=0?this.tokenizer.position+i.len:-1,a);r.multiple?(e[r.name]||(e[r.name]=[]),e[r.name].push(g)):e[r.name]=g,await a.elementValue(r,g,A)}else{let g=this.parserMap.get(r.value);if(typeof g=="function"){let c=await g(i);e[r.name]=c,await a.elementValue(r,c,A)}}break;case Ag.SkipElement:uE(`Go to next element: name=${cp(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`);break;case Ag.IgnoreElement:uE(`Ignore element: name=${cp(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(i.len);break;case Ag.SkipSiblings:uE(`Ignore remaining container, at: name=${cp(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),await this.tokenizer.ignore(o-this.tokenizer.position);break;case Ag.TerminateParsing:return uE(`Terminate parsing at element: name=${cp(r)}, element.id=0x${i.id}, container=${!!r.container} at position=${A}`),e}else switch(i.id){case 236:await this.tokenizer.ignore(i.len);break;default:uE(`parseEbml: parent=${cp(t)}, unknown child: id=${i.id.toString(16)} at position=${A}`),await this.tokenizer.ignore(i.len)}}return e}async readVintData(t){let o=await this.tokenizer.peekNumber(QA),a=128,e=1;for(;(o&a)===0;){if(e>t)throw new ob("VINT value exceeding maximum size");++e,a>>=1}let i=new Uint8Array(e);return await this.tokenizer.readBuffer(i),i}async readElement(){let t=await this.readVintData(this.ebmlMaxIDLength),o=await this.readVintData(this.ebmlMaxSizeLength);return o[0]^=128>>o.length-1,{id:SU(t,t.length),len:SU(o,o.length)}}async readFloat(t){switch(t.len){case 0:return 0;case 4:return this.tokenizer.readNumber(k2);case 8:return this.tokenizer.readNumber(DO);case 10:return this.tokenizer.readNumber(DO);default:throw new ob(`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 SU(o,t.len)}async readString(t){return(await this.tokenizer.readToken(new We(t.len,"utf-8"))).replace(/\x00.*$/g,"")}async readBuffer(t){let o=new Uint8Array(t.len);return await this.tokenizer.readBuffer(o),o}}});var soe={};Lr(soe,{MatroskaParser:()=>wU});var noe,sb,wU,goe=ue(()=>{noe=ze(lt(),1);$a();roe();J2();ooe();sb=(0,noe.default)("music-metadata:parser:matroska"),wU=class extends Gt{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 nb(this.tokenizer);sb("Initializing DTD end MatroskaIterator"),await o.iterate(toe,t,{startNext:a=>{switch(a.id){case 475249515:return sb(`Skip element: name=${a.name}, id=0x${a.id.toString(16)}`),Ag.IgnoreElement;case 524531317:if(this.flagUseIndexToSkipClusters&&this.seekHead){let e=this.seekHead.seek.find(i=>i.position+this.seekHeadOffset>this.tokenizer.position);if(e){let i=e.position+this.seekHeadOffset-this.tokenizer.position;return sb(`Use index to go to next position, ignoring ${i} bytes`),this.tokenizer.ignore(i),Ag.SkipElement}}return Ag.IgnoreElement;default:return Ag.ReadNext}},elementValue:async(a,e,i)=>{switch(sb(`Received: name=${a.name}, value=${e}`),a.id){case 17026:this.metadata.setFormat("container",`EBML/${e}`);break;case 290298740:this.seekHead=e,this.seekHeadOffset=i;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===fi.audio).reduce((s,g)=>!s||g.flagDefault&&!s.flagDefault||g.trackNumber{let s=r.target,g=s?.targetTypeValue?Cie[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 coe,Ioe=ue(()=>{coe={parserType:"matroska",extensions:[".mka",".mkv",".mk3d",".mks","webm"],mimeTypes:["audio/matroska","video/matroska","audio/webm","video/webm"],async load(){return(await Promise.resolve().then(()=>(goe(),soe))).MatroskaParser}}});function Eoe(n,t,o,a,e){if(OU(`remainingLen=${a}, numberOfEntries=${e} * token-len=${t.len}`),a===0)return[];if(a!==e*t.len)throw new ac("mismatch number-of-entries with remaining atom-length");let i=[];for(let A=0;A{DA();poe=ze(lt(),1);ma();or();nr();or();OU=(0,poe.default)("music-metadata:parser:MP4:atom"),ac=class extends mt("MP4"){},Ip={len:8,get:(n,t)=>{let o=xe.get(n,t);if(o<0)throw new ac("Invalid atom header length");return{length:BigInt(o),name:new We(4,"latin1").get(n,t+4)}},put:(n,t,o)=>(xe.put(n,t,Number(o.length)),at.put(n,t+4,o.name))},doe=zs,bU={len:4,get:(n,t)=>({type:new We(4,"ascii").get(n,t)})},gb=class{constructor(t,o,a){if(to&&OU(`Warning: atom ${a} expected to be ${o}, but was actually ${t} bytes long.`),this.len=t}},CE={len:4,get:(n,t)=>{let o=xe.get(n,t)-2082844800;return new Date(o*1e3)}},BE={len:8,get:(n,t)=>{let o=Number(zs.get(n,t))-2082844800;return new Date(o*1e3)}},cb=class extends gb{constructor(t){super(t,24,"mdhd")}get(t,o){let a=QA.get(t,o+0),e=Gr.get(t,o+1);switch(a){case 0:return{version:a,flags:e,creationTime:CE.get(t,o+4),modificationTime:CE.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:a,flags:e,creationTime:BE.get(t,o+4),modificationTime:BE.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(zs.get(t,o+24)),language:LA.get(t,o+32),quality:LA.get(t,o+34)};default:throw new sn("Invalid mdhd version header")}}},Ib=class extends gb{constructor(t){super(t,100,"mvhd")}get(t,o){let a=QA.get(t,o),e=Gr.get(t,o+1);return a===1?{version:a,flags:e,creationTime:BE.get(t,o+4),modificationTime:BE.get(t,o+12),timeScale:xe.get(t,o+20),duration:Number(zs.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:a,flags:e,creationTime:CE.get(t,o+4),modificationTime:CE.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)}}},lb=class{constructor(t){this.len=t}get(t,o){return{type:{set:QA.get(t,o+0),type:Gr.get(t,o+1)},locale:Gr.get(t,o+4),value:new bt(this.len-8).get(t,o+8)}}},pb=class{constructor(t){this.len=t}get(t,o){return{version:QA.get(t,o),flags:Gr.get(t,o+1),name:new We(this.len-4,"utf-8").get(t,o+4)}}},db=class{constructor(t){this.len=t}get(t,o){let a=QA.get(t,o),e=Gr.get(t,o+1);switch(a){case 0:return{version:a,flags:e,creationTime:CE.get(t,o+4),modificationTime:CE.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:a,flags:e,creationTime:BE.get(t,o+4),modificationTime:BE.get(t,o+12),trackId:xe.get(t,o+20),duration:Number(zs.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 sn("Invalid tkhd version header")}}},loe={len:8,get:(n,t)=>({version:QA.get(n,t),flags:Gr.get(n,t+1),numberOfEntries:xe.get(n,t+4)})},DU=class{constructor(t){this.len=t}get(t,o){let a=this.len-12;return{dataFormat:at.get(t,o),dataReferenceIndex:LA.get(t,o+10),description:a>0?new bt(a).get(t,o+12):void 0}}},Gf=class{constructor(t){this.len=t}get(t,o){let a=loe.get(t,o);o+=loe.len;let e=[];for(let i=0;i=this.len){OU("TrackRunBox size mismatch");break}let r={};e.flags.sampleDurationPresent&&(r.sampleDuration=xe.get(t,i),i+=4),e.flags.sampleSizePresent&&(r.sampleSize=xe.get(t,i),i+=4),e.flags.sampleFlagsPresent&&(r.sampleFlags=xe.get(t,i),i+=4),e.flags.sampleCompositionTimeOffsetsPresent&&(r.sampleCompositionTimeOffset=xe.get(t,i),i+=4),e.samples.push(r)}return e}},Qb=class{constructor(t){this.len=t}get(t,o){let a=o+1,e=new We(4,"utf-8");return{version:qs.get(t,o),flags:Gr.get(t,o+1),componentType:e.get(t,o+4),handlerType:e.get(t,o+8),componentName:new We(this.len-28,"utf-8").get(t,o+28)}}},yb=class{constructor(t){this.len=t}get(t,o){let a=0,e=[];for(;a{Boe=ze(lt(),1);Uf();Uf();Coe=(0,Boe.default)("music-metadata:parser:MP4:Atom"),mb=class n{static async readAtom(t,o,a,e){let i=t.position;Coe(`Reading next token on offset=${i}...`);let A=await t.readToken(Ip),r=A.length===1n;r&&(A.length=await t.readToken(doe));let s=new n(A,r,a),g=s.getPayloadLength(e);return Coe(`parse atom name=${s.atomPath}, extended=${s.extended}, offset=${i}, len=${s.header.length}`),await s.readData(t,o,g),s}constructor(t,o,a){this.header=t,this.extended=o,this.parent=a,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,a){for(;a>0;){let e=await n.readAtom(t,o,this,a);this.children.push(e),a-=e.header.length===0n?a:Number(e.header.length)}}async readData(t,o,a){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(a));case"meta":{let i=(await t.peekToken(Ip)).name==="hdlr"?0:4;return await t.ignore(i),this.readAtoms(t,o,this.getPayloadLength(a)-i)}default:return o(this,a)}}}});var Soe={};Lr(Soe,{MP4Parser:()=>_U});function yoe(n,t,o){return o.indexOf(n)===t}var moe,Ao,Dze,Qoe,_U,woe=ue(()=>{moe=ze(lt(),1);DA();$a();Sf();foe();Uf();Uf();tp();uf();js();Ao=(0,moe.default)("music-metadata:parser:MP4"),Dze="iTunes",Qoe={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"}};_U=class n extends Gt{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 Ib(t));this.metadata.setFormat("creationTime",o.creationTime),this.metadata.setFormat("modificationTime",o.modificationTime)},chap:async t=>{let o=this.getTrackDescription(),a=[];for(;t>=xe.len;)a.push(await this.tokenizer.readNumber(xe)),t-=xe.len;o.chapterList=a},mdat:async t=>{if(this.options.includeChapters){let o=[...this.tracks.values()].filter(a=>a.chapterList);if(o.length===1){let a=o[0].chapterList,e=[...this.tracks.values()].filter(i=>a.indexOf(i.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(bU);t-=bU.len;let i=e.type.replace(/\W/g,"");i.length>0&&o.push(i)}Ao(`ftyp: ${o.join("/")}`);let a=o.filter(yoe).join("/");this.metadata.setFormat("container",a)},stsd:async t=>{let o=await this.tokenizer.readToken(new Gf(t)),a=this.getTrackDescription();a.soundSampleDescription=o.table.map(e=>this.parseSoundSampleDescription(e))},stsz:async t=>{let o=await this.tokenizer.readToken(new Lf(t)),a=this.getTrackDescription();a.sampleSize=o.sampleSize,a.sampleSizeTable=o.entries},date:async t=>{let o=await this.tokenizer.readToken(new We(t,"utf-8"));await this.addTag("date",o)}}}static read_BE_Integer(t,o){let a=(o?"INT":"UINT")+t.length*8+(t.length>1?"_BE":""),e=VA[a];if(!e)throw new ac(`Token for integer type not found: "${a}"`);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(Ip)).name==="\0\0\0\0"){let A=`Error at offset=${this.tokenizer.position}: box.id=0`;Ao(A),this.addWarning(A);break}}catch(i){if(i instanceof Error){let A=`Error at offset=${this.tokenizer.position}: ${i.message}`;Ao(A),this.addWarning(A)}else throw i;break}let e=await mb.readAtom(this.tokenizer,(i,A)=>this.handleAtom(i,A),null,t);t-=e.header.length===BigInt(0)?t:Number(e.header.length)}let o=[];this.tracks.forEach(e=>{let i=[];e.soundSampleDescription.forEach(A=>{let r={},s=Qoe[A.dataFormat];if(s?(i.push(s.format),r.codecName=s.format):r.codecName=`<${A.dataFormat}>`,A.description){let{description:g}=A;g.sampleRate>0&&(r.type=fi.audio,r.audio={samplingFrequency:g.sampleRate,bitDepth:g.sampleSize,channels:g.numAudioChannels})}this.metadata.addStreamInfo(r)}),i.length>=1&&o.push(i.join("/"))}),o.length>0&&this.metadata.setFormat("codec",o.filter(yoe).join("+"));let a=[...this.tracks.values()].filter(e=>e.soundSampleDescription.length>=1&&e.soundSampleDescription[0].description&&e.soundSampleDescription[0].description.numAudioChannels>0);for(let e of a){if(e.media.header&&e.media.header.timeScale>0)if(e.sampleRate=e.media.header.timeScale,e.media.header.duration>0&&(Ao("Using duration defined on audio track"),e.samples=e.media.header.duration,e.duration=e.samples/e.sampleRate),e.fragments.length>0){Ao("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 i=e.soundSampleDescription[0];if(i.description&&e.media.header&&(this.metadata.setFormat("sampleRate",i.description.sampleRate),this.metadata.setFormat("bitsPerSample",i.description.sampleSize),this.metadata.setFormat("numberOfChannels",i.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/i.description.sampleRate}let A=Qoe[i.dataFormat];A&&this.metadata.setFormat("lossless",!A.lossy)}if(a.length>=1){let e=a[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);Ao(`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(Dze,t,o)}addWarning(t){Ao(`Warning: ${t}`),this.metadata.addWarning(t)}parseMetadataItemData(t){let o=t.header.name;return t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"data":return this.parseValueAtom(o,a);case"name":case"mean":case"rate":{let A=await this.tokenizer.readToken(new pb(i));o+=`:${A.name}`;break}default:{let A=await this.tokenizer.readToken(new bt(i));this.addWarning(`Unsupported meta-item: ${o}[${a.header.name}] => value=${bO(A)} ascii=${Tr(A,"ascii")}`)}}},t.getPayloadLength(0))}async parseValueAtom(t,o){let a=await this.tokenizer.readToken(new lb(Number(o.header.length)-Ip.len));if(a.type.set!==0)throw new ac(`Unsupported type-set != 0: ${a.type.set}`);switch(a.type.type){case 0:switch(t){case"trkn":case"disk":{let e=QA.get(a.value,3),i=QA.get(a.value,5);await this.addTag(t,`${e}/${i}`);break}case"gnre":{let e=QA.get(a.value,1),i=aE[e-1];await this.addTag(t,i);break}case"rate":{let e=Tr(a.value,"ascii");await this.addTag(t,e);break}default:Ao(`unknown proprietary value type for: ${o.atomPath}`)}break;case 1:case 18:await this.addTag(t,Tr(a.value));break;case 13:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/jpeg",data:Uint8Array.from(a.value)});break;case 14:if(this.options.skipCovers)break;await this.addTag(t,{format:"image/png",data:Uint8Array.from(a.value)});break;case 21:await this.addTag(t,n.read_BE_Integer(a.value,!0));break;case 22:await this.addTag(t,n.read_BE_Integer(a.value,!1));break;case 65:await this.addTag(t,QA.get(a.value,0));break;case 66:await this.addTag(t,LA.get(a.value,0));break;case 67:await this.addTag(t,xe.get(a.value,0));break;default:this.addWarning(`atom key=${t}, has unknown well-known-type (data-type): ${a.type.type}`)}}async parseTrackBox(t){let o={media:{},fragments:[]};await t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"chap":{let A=await this.tokenizer.readToken(new yb(e));o.chapterList=A;break}case"tkhd":o.header=await this.tokenizer.readToken(new db(i));break;case"hdlr":o.handler=await this.tokenizer.readToken(new Qb(i)),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 cb(i));o.media.header=A;break}case"stco":{let A=await this.tokenizer.readToken(new ub(i));o.chunkOffsetTable=A.entries;break}case"stsc":{let A=await this.tokenizer.readToken(new Eb(i));o.sampleToChunkTable=A.entries;break}case"stsd":{let A=await this.tokenizer.readToken(new Gf(i));o.soundSampleDescription=A.table.map(r=>this.parseSoundSampleDescription(r));break}case"stts":{let A=await this.tokenizer.readToken(new hb(i));o.timeToSampleTable=A.entries;break}case"stsz":{let A=await this.tokenizer.readToken(new Lf(i));o.sampleSize=A.sampleSize,o.sampleSizeTable=A.entries;break}case"dinf":case"vmhd":case"smhd":Ao(`Ignoring: ${a.header.name}`),await this.tokenizer.ignore(i);break;default:Ao(`Unexpected track box: ${a.header.name}`),await this.tokenizer.ignore(i)}},t.getPayloadLength(0)),this.tracks.set(o.header.trackId,o)}parseTrackFragmentBox(t){let o;return t.readAtoms(this.tokenizer,async(a,e)=>{let i=a.getPayloadLength(e);switch(a.header.name){case"tfhd":{let A=new Bb(a.getPayloadLength(e));o=await this.tokenizer.readToken(A);break}case"tfdt":await this.tokenizer.ignore(i);break;case"trun":{let A=new fb(i),r=await this.tokenizer.readToken(A);o&&this.tracks.get(o.trackId)?.fragments.push({header:o,trackRun:r});break}default:Ao(`Unexpected box: ${a.header.name}`),await this.tokenizer.ignore(i)}},t.getPayloadLength(0))}parseSoundSampleDescription(t){let o={dataFormat:t.dataFormat,dataReferenceIndex:t.dataReferenceIndex},a=0;if(t.description){let e=MU.get(t.description,a);a+=MU.len,e.version===0||e.version===1?o.description=hoe.get(t.description,a):Ao(`Warning: sound-sample-description ${e} not implemented`)}return o}async parseChapterTrack(t,o,a){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 i=0;i0;++i){let A=t.timeToSampleTable.slice(0,i).reduce((p,B)=>p+B.duration,0),s=t.chunkOffsetTable[i]-this.tokenizer.position,g=t.sampleSize>0?t.sampleSize:t.sampleSizeTable[i];if(a-=s+g,a<0)throw new ac("Chapter chunk exceeding token length");await this.tokenizer.ignore(s);let c=await this.tokenizer.readToken(new Cb(g));Ao(`Chapter ${i+1}: ${c}`);let I={title:c,timeScale:t.media.header?t.media.header.timeScale:0,start:A,sampleOffset:this.findSampleOffset(o,this.tokenizer.position)};Ao(`Chapter title=${I.title}, offset=${I.sampleOffset}/${o.header.duration}`),e.push(I)}this.metadata.setFormat("chapters",e),await this.tokenizer.ignore(a)}findSampleOffset(t,o){let a=0;for(;a=o[a].firstChunk&&t{Doe={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(()=>(woe(),Soe))).MP4Parser}}});var Toe,boe,Oze,Moe,_oe,Sb,Noe=ue(()=>{DA();Toe=ze(lt(),1);nr();boe=(0,Toe.default)("music-metadata:parser:musepack:sv8"),Oze=new We(2,"latin1"),Moe={len:5,get:(n,t)=>({crc:Le.get(n,t),streamVersion:QA.get(n,t+4)})},_oe={len:2,get:(n,t)=>({sampleFrequency:[44100,48e3,37800,32e3][XA(n,t,0,3)],maxUsedBands:XA(n,t,3,5),channelCount:XA(n,t+1,0,4)+1,msUsed:Li(n,t+1,4),audioBlockFrames:XA(n,t+1,5,3)})},Sb=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(Oze),o=await this.readVariableSizeField();return{key:t,payloadLength:o.value-2-o.len}}async readStreamHeader(t){let o={};boe(`Reading SH at offset=${this.tokenizer.position}`);let a=await this.tokenizer.readToken(Moe);t-=Moe.len,Object.assign(o,a),boe(`SH.streamVersion = ${a.streamVersion}`);let e=await this.readVariableSizeField();t-=e.len,o.sampleCount=e.value;let i=await this.readVariableSizeField();t-=i.len,o.beginningOfSilence=i.value;let A=await this.tokenizer.readToken(_oe);return t-=_oe.len,Object.assign(o,A),await this.tokenizer.ignore(t),o}async readVariableSizeField(t=1,o=0){let a=await this.tokenizer.readNumber(QA);return(a&128)===0?{len:t,value:o+a}:(a&=127,a+=o,this.readVariableSizeField(t+1,a<<7))}}});var oc,wb=ue(()=>{or();oc=class extends mt("Musepack"){}});var Roe,Mze,Db,koe=ue(()=>{Roe=ze(lt(),1);$a();ap();ma();Noe();wb();Mze=(0,Roe.default)("music-metadata:parser:musepack"),Db=class extends Gt{constructor(){super(...arguments),this.audioLength=0}async parse(){if(await this.tokenizer.readToken(at)!=="MPCK")throw new oc("Invalid Magic number");return this.metadata.setFormat("container","Musepack, SV8"),this.parsePacket()}async parsePacket(){let t=new Sb(this.tokenizer);do{let o=await t.readPacketHeader();switch(Mze(`packet-header key=${o.key}, payloadLength=${o.payloadLength}`),o.key){case"SH":{let a=await t.readStreamHeader(o.payloadLength);this.metadata.setFormat("numberOfSamples",a.sampleCount),this.metadata.setFormat("sampleRate",a.sampleFrequency),this.metadata.setFormat("duration",a.sampleCount/a.sampleFrequency),this.metadata.setFormat("numberOfChannels",a.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),ip(this.metadata,this.tokenizer,this.options);default:throw new oc(`Unexpected header: ${o.key}`)}}while(!0)}}});var Ob,voe=ue(()=>{DA();Ob=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(Le);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,a=(t-o)/32;return await this.tokenizer.ignore(a*4),this.read(o)}}});var Poe,Goe=ue(()=>{DA();nr();js();Poe={len:24,get:(n,t)=>{let o={signature:Tr(n.subarray(t,t+3),"latin1"),streamMinorVersion:XA(n,t+3,0,4),streamMajorVersion:XA(n,t+3,4,4),frameCount:Le.get(n,t+4),maxLevel:SA.get(n,t+8),sampleFrequency:[44100,48e3,37800,32e3][XA(n,t+10,0,2)],link:XA(n,t+10,2,2),profile:XA(n,t+10,4,4),maxBand:XA(n,t+11,0,6),intensityStereo:Li(n,t+11,6),midSideStereo:Li(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:Le.get(n,t+20)>>>20&2047,trueGapless:Li(n,t+23,0)};return o.lastFrameLength=o.trueGapless?Le.get(n,20)>>>20&2047:0,o}}});var Loe,Foe,bb,Uoe=ue(()=>{Loe=ze(lt(),1);$a();ap();voe();Goe();wb();Foe=(0,Loe.default)("music-metadata:parser:musepack"),bb=class extends Gt{constructor(){super(...arguments),this.bitreader=null,this.audioLength=0,this.duration=null}async parse(){let t=await this.tokenizer.readToken(Poe);if(t.signature!=="MP+")throw new oc("Unexpected magic number");Foe(`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 Ob(this.tokenizer),this.metadata.setFormat("numberOfChannels",t.midSideStereo||t.intensityStereo?2:1);let a=await this.bitreader.read(8);return this.metadata.setFormat("codec",(a/100).toFixed(2)),await this.skipAudioData(t.frameCount),Foe(`End of audio stream, switching to APEv2, offset=${this.tokenizer.position}`),ip(this.metadata,this.tokenizer,this.options)}async skipAudioData(t){for(;t-- >0;){let a=await this.bitreader.read(20);this.audioLength+=20+a,await this.bitreader.ignore(a)}let o=await this.bitreader.read(11);this.audioLength+=o,this.duration!==null&&this.metadata.setFormat("bitrate",this.audioLength/this.duration)}}});var xoe={};Lr(xoe,{MusepackParser:()=>TU});var Koe,Hoe,TU,Yoe=ue(()=>{Koe=ze(lt(),1);DA();Of();koe();Uoe();wb();Hoe=(0,Koe.default)("music-metadata:parser:musepack"),TU=class extends $s{async postId3v2Parse(){let t=await this.tokenizer.peekToken(new We(3,"latin1")),o;switch(t){case"MP+":{Hoe("Stream-version 7"),o=new bb(this.metadata,this.tokenizer,this.options);break}case"MPC":{Hoe("Stream-version 8"),o=new Db(this.metadata,this.tokenizer,this.options);break}default:throw new oc("Invalid signature prefix")}return this.metadata.setAudioOnly(),o.parse()}}});var joe,Joe=ue(()=>{joe={parserType:"musepack",extensions:[".mpc"],mimeTypes:["audio/musepack"],async load(){return(await Promise.resolve().then(()=>(Yoe(),xoe))).MusepackParser}}});var Hf,Mb,NU=ue(()=>{DA();or();Hf=class extends mt("Opus"){},Mb=class{constructor(t){if(t<19)throw new Hf("ID-header-page 0 should be at least 19 bytes long");this.len=t}get(t,o){return{magicSignature:new We(8,"ascii").get(t,o+0),version:QA.get(t,o+8),channelCount:QA.get(t,o+9),preSkip:SA.get(t,o+10),inputSampleRate:Le.get(t,o+12),outputGain:SA.get(t,o+16),channelMapping:QA.get(t,o+18)}}}});var _b,qoe=ue(()=>{DA();Rf();NU();NU();_b=class extends eg{constructor(t,o,a){super(t,o),this.idHeader=null,this.lastPos=-1,this.tokenizer=a,this.durationOnLastPage=!0}parseFirstPage(t,o){if(this.metadata.setFormat("codec","Opus"),this.idHeader=new Mb(o.length).get(o,0),this.idHeader.magicSignature!=="OpusHead")throw new Hf("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 We(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 a=this.tokenizer.fileInfo.size-this.lastPos;this.metadata.setFormat("bitrate",8*a/this.metadata.format.duration)}}}}});var zoe,Voe=ue(()=>{DA();nr();zoe={len:80,get:(n,t)=>({speex:new We(8,"ascii").get(n,t+0),version:NO(new We(20,"ascii").get(n,t+8)),version_id:ur.get(n,t+28),header_size:ur.get(n,t+32),rate:ur.get(n,t+36),mode:ur.get(n,t+40),mode_bitstream_version:ur.get(n,t+44),nb_channels:ur.get(n,t+48),bitrate:ur.get(n,t+52),frame_size:ur.get(n,t+56),vbr:ur.get(n,t+60),frames_per_packet:ur.get(n,t+64),extra_headers:ur.get(n,t+68),reserved1:ur.get(n,t+72),reserved2:ur.get(n,t+76)})}});var Woe,Rze,Tb,Zoe=ue(()=>{Woe=ze(lt(),1);Rf();Voe();Rze=(0,Woe.default)("music-metadata:parser:ogg:speex"),Tb=class extends eg{constructor(t,o,a){super(t,o)}parseFirstPage(t,o){Rze("First Ogg/Speex page");let a=zoe.get(o,0);this.metadata.setFormat("codec",`Speex ${a.version}`),this.metadata.setFormat("numberOfChannels",a.nb_channels),this.metadata.setFormat("sampleRate",a.rate),a.bitrate!==-1&&this.metadata.setFormat("bitrate",a.bitrate),this.metadata.setAudioOnly()}}});var Xoe,$oe=ue(()=>{DA();Xoe={len:42,get:(n,t)=>({id:new We(7,"ascii").get(n,t),vmaj:QA.get(n,t+7),vmin:QA.get(n,t+8),vrev:QA.get(n,t+9),vmbw:LA.get(n,t+10),vmbh:LA.get(n,t+17),nombr:Gr.get(n,t+37),nqual:QA.get(n,t+40)})}});var Ane,ene,Nb,tne=ue(()=>{Ane=ze(lt(),1);$oe();ene=(0,Ane.default)("music-metadata:parser:ogg:theora"),Nb=class{constructor(t,o,a){this.durationOnLastPage=!1,this.metadata=t}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){ene("duration calculation not implemented")}async parseFirstPage(t,o){ene("First Ogg/Theora page"),this.metadata.setFormat("codec","Theora");let a=Xoe.get(o,0);this.metadata.setFormat("bitrate",a.nombr),this.metadata.setFormat("hasVideo",!0)}flush(){return Promise.resolve()}}});var rne,Rb,ine=ue(()=>{DA();nr();DA();rne={len:27,get:(n,t)=>({capturePattern:new We(4,"latin1").get(n,t),version:QA.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(Fr.get(n,t+6)),streamSerialNumber:Le.get(n,t+14),pageSequenceNo:Le.get(n,t+18),pageChecksum:Le.get(n,t+22),page_segments:QA.get(n,t+26)})},Rb=class n{static sum(t,o,a){let e=new DataView(t.buffer,0),i=0;for(let A=o;A{ane=ze(lt(),1);QU();yU();ma();ib();RU=(0,ane.default)("music-metadata:parser:ogg:theora"),kb=class{constructor(t,o,a){this.durationOnLastPage=!1,this.metadata=t,this.options=o,this.tokenizer=a,this.flacParser=new Pf(this.metadata,this.tokenizer,o)}async parsePage(t,o){t.headerType.firstPage&&await this.parseFirstPage(t,o)}calculateDuration(){RU("duration calculation not implemented")}async parseFirstPage(t,o){if(RU("First Ogg/FLAC page"),(await at.get(o,9)).toString()!=="fLaC")throw new Error("Invalid FLAC preamble");let e=await kf.get(o,13);await this.parseDataBlock(e,o.subarray(13+kf.len))}async parseDataBlock(t,o){switch(RU(`blockHeader type=${t.type}, length=${t.length}`),t.type){case wa.STREAMINFO:{let a=vf.get(o,0);return this.flacParser.processsStreamInfo(a)}case wa.PADDING:break;case wa.APPLICATION:break;case wa.SEEKTABLE:break;case wa.VORBIS_COMMENT:return this.flacParser.parseComment(o);case wa.PICTURE:if(!this.options.skipCovers){let a=new bI(o.length).get(o,0);return this.flacParser.addPictureTag(a)}break;default:this.metadata.addWarning(`Unknown block type: ${t.type}`)}return this.tokenizer.ignore(t.length).then()}flush(){return Promise.resolve()}}});var sne={};Lr(sne,{OggContentError:()=>fE,OggParser:()=>vU});var nne,fE,tg,kU,vU,gne=ue(()=>{DA();an();nne=ze(lt(),1);$a();Rf();qoe();Zoe();tne();or();ine();one();fE=class extends mt("Ogg"){},tg=(0,nne.default)("music-metadata:parser:ogg"),kU=class{constructor(t,o,a){this.pageNumber=0,this.closed=!1,this.metadata=t,this.streamSerial=o,this.options=a}async parsePage(t,o){this.pageNumber=o.pageSequenceNo,tg("serial=%s page#=%s, Ogg.id=%s",o.streamSerialNumber,o.pageSequenceNo,o.capturePattern);let a=await t.readToken(new Rb(o));tg("totalPageSize=%s",a.totalPageSize);let e=await t.readToken(new bt(a.totalPageSize));if(tg("firstPage=%s, lastPage=%s, continued=%s",o.headerType.firstPage,o.headerType.lastPage,o.headerType.continued),o.headerType.firstPage){this.metadata.setFormat("container","Ogg");let i=e.subarray(0,7),A=Array.from(i).filter(r=>r>=32&&r<=126).map(r=>String.fromCharCode(r)).join("");switch(A){case"vorbis":tg(`Set Ogg stream serial ${o.streamSerialNumber}, codec=Vorbis`),this.pageConsumer=new eg(this.metadata,this.options);break;case"OpusHea":tg("Set page consumer to Ogg/Opus"),this.pageConsumer=new _b(this.metadata,this.options,t);break;case"Speex ":tg("Set page consumer to Ogg/Speex"),this.pageConsumer=new Tb(this.metadata,this.options,t);break;case"fishead":case"theora":tg("Set page consumer to Ogg/Theora"),this.pageConsumer=new Nb(this.metadata,this.options,t);break;case"FLAC":tg("Set page consumer to Vorbis"),this.pageConsumer=new kb(this.metadata,this.options,t);break;default:throw new fE(`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")}},vU=class extends Gt{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(rne),o.capturePattern!=="OggS")throw new fE("Invalid Ogg capture pattern");let a=this.streams.get(o.streamSerialNumber);if(a||(a=new kU(this.metadata,o.streamSerialNumber,this.options),this.streams.set(o.streamSerialNumber,a)),await a.parsePage(this.tokenizer,o),a.pageNumber>12&&!(this.options.duration&&[...this.streams.values()].find(e=>e.pageConsumer?.durationOnLastPage))){tg("Stop processing Ogg stream");break}}while(![...this.streams.values()].every(a=>a.closed))}catch(a){if(a instanceof kA)tg("Reached end-of-stream"),t=!0;else if(a instanceof fE)this.metadata.addWarning(`Corrupt Ogg content at ${this.tokenizer.position}`);else throw a}for(let a of this.streams.values())a.closed||(this.metadata.addWarning(`End-of-stream reached before reaching last page in Ogg stream serial=${a.streamSerial}`),await a.pageConsumer?.flush()),a.pageConsumer?.calculateDuration(t)}}});var cne,Ine=ue(()=>{cne={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(()=>(gne(),sne))).OggParser}}});function rg(n,t){return vb(n,t,1)===1}function vb(n,t,o){return n>>>t&4294967295>>>32-o}var kze,Kf,Pb,lne=ue(()=>{DA();ma();kze=[6e3,8e3,9600,11025,12e3,16e3,22050,24e3,32e3,44100,48e3,64e3,88200,96e3,192e3,-1],Kf={len:32,get:(n,t)=>{let o=Le.get(n,t+24),a={BlockID:at.get(n,t),blockSize:Le.get(n,t+4),version:SA.get(n,t+8),totalSamples:Le.get(n,t+12),blockIndex:Le.get(n,t+16),blockSamples:Le.get(n,t+20),flags:{bitsPerSample:(1+vb(o,0,2))*8,isMono:rg(o,2),isHybrid:rg(o,3),isJointStereo:rg(o,4),crossChannel:rg(o,5),hybridNoiseShaping:rg(o,6),floatingPoint:rg(o,7),samplingRate:kze[vb(o,23,4)],isDSD:rg(o,31)},crc:new bt(4).get(n,t+28)};return a.flags.isDSD&&(a.totalSamples*=8),a}},Pb={len:1,get:(n,t)=>({functionId:vb(n[t],0,6),isOptional:rg(n[t],5),isOddSize:rg(n[t],6),largeBlock:rg(n[t],7)})}});var dne={};Lr(dne,{WavPackContentError:()=>QE,WavPackParser:()=>PU});var pne,lp,QE,PU,hne=ue(()=>{DA();ap();ma();$a();lne();pne=ze(lt(),1);uf();or();lp=(0,pne.default)("music-metadata:parser:WavPack"),QE=class extends mt("WavPack"){},PU=class extends Gt{constructor(){super(...arguments),this.audioDataSize=0}async parse(){return this.metadata.setAudioOnly(),this.audioDataSize=0,await this.parseWavPackBlocks(),ip(this.metadata,this.tokenizer,this.options)}async parseWavPackBlocks(){do{if(await this.tokenizer.peekToken(at)!=="wvpk")break;let o=await this.tokenizer.readToken(Kf);if(o.BlockID!=="wvpk")throw new QE("Invalid WavPack Block-ID");lp(`WavPack header blockIndex=${o.blockIndex}, len=${Kf.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 a=o.blockSize-(Kf.len-8);await(o.blockIndex===0?this.parseMetadataSubBlock(o,a):this.tokenizer.ignore(a)),o.blockSamples>0&&(this.audioDataSize+=o.blockSize)}while(!this.tokenizer.fileInfo.size||this.tokenizer.fileInfo.size-this.tokenizer.position>=Kf.len);this.metadata.format.duration&&this.metadata.setFormat("bitrate",this.audioDataSize*8/this.metadata.format.duration)}async parseMetadataSubBlock(t,o){let a=o;for(;a>Pb.len;){let e=await this.tokenizer.readToken(Pb),i=await this.tokenizer.readNumber(e.largeBlock?pf:QA),A=new Uint8Array(i*2-(e.isOddSize?1:0));switch(await this.tokenizer.readBuffer(A),lp(`Metadata Sub-Blocks functionId=0x${e.functionId.toString(16)}, id.largeBlock=${e.largeBlock},data-size=${A.length}`),e.functionId){case 0:break;case 14:{lp("ID_DSD_BLOCK");let r=1<{Ene={parserType:"wavpack",extensions:[".wv",".wvp"],mimeTypes:["audio/wavpack"],async load(){return(await Promise.resolve().then(()=>(hne(),dne))).WavPackParser}}});var yE,Gb,Cne=ue(()=>{DA();yE={len:8,get:(n,t)=>({chunkID:new We(4,"latin1").get(n,t),chunkSize:Le.get(n,t+4)})},Gb=class{constructor(t){this.tagHeader=t,this.len=t.chunkSize,this.len+=this.len&1}get(t,o){return new We(this.tagHeader.chunkSize,"ascii").get(t,o)}}});var pp,yi,Bne,Fb,Lb,GU=ue(()=>{DA();or();pp=class extends mt("Wave"){},yi={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},Bne={[yi.PCM]:"PCM",[yi.ADPCM]:"ADPCM",[yi.IEEE_FLOAT]:"IEEE_FLOAT",[yi.ALAW]:"ALAW",[yi.MULAW]:"MULAW",[yi.DVI_ADPCM]:"DVI_ADPCM",[yi.GSM610]:"GSM610",[yi.MPEG_ADTS_AAC]:"MPEG_ADTS_AAC",[yi.MPEG_LOAS]:"MPEG_LOAS",[yi.RAW_AAC1]:"RAW_AAC1",[yi.DOLBY_AC3_SPDIF]:"DOLBY_AC3_SPDIF",[yi.DVM]:"DVM",[yi.RAW_SPORT]:"RAW_SPORT",[yi.ESST_AC3]:"ESST_AC3",[yi.DRM]:"DRM",[yi.DTS2]:"DTS2",[yi.MPEG]:"MPEG",[yi.MPEGLAYER3]:"MPEGLAYER3"},Fb=class{constructor(t){if(t.chunkSize<16)throw new pp("Invalid chunk size");this.len=t.chunkSize}get(t,o){return{wFormatTag:SA.get(t,o),nChannels:SA.get(t,o+2),nSamplesPerSec:Le.get(t,o+4),nAvgBytesPerSec:Le.get(t,o+8),nBlockAlign:SA.get(t,o+12),wBitsPerSample:SA.get(t,o+14)}}},Lb=class{constructor(t){if(t.chunkSize<4)throw new pp("Invalid fact chunk size.");this.len=t.chunkSize}get(t,o){return{dwSampleLength:Le.get(t,o)}}}});var FU,fne=ue(()=>{DA();nr();FU={len:420,get:(n,t)=>({description:gn(new We(256,"ascii").get(n,t)).trim(),originator:gn(new We(32,"ascii").get(n,t+256)).trim(),originatorReference:gn(new We(32,"ascii").get(n,t+288)).trim(),originationDate:gn(new We(10,"ascii").get(n,t+320)).trim(),originationTime:gn(new We(8,"ascii").get(n,t+330)).trim(),timeReferenceLow:Le.get(n,t+338),timeReferenceHigh:Le.get(n,t+342),version:SA.get(n,t+346),umid:new bt(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 yne={};Lr(yne,{WaveParser:()=>LU});var Qne,MI,LU,mne=ue(()=>{an();DA();Qne=ze(lt(),1);Cne();GU();oE();nr();ma();$a();fne();GU();MI=(0,Qne.default)("music-metadata:parser:RIFF"),LU=class extends Gt{constructor(){super(...arguments),this.blockAlign=0,this.avgBytesPerSec=0}async parse(){let t=await this.tokenizer.readToken(yE);if(MI(`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(at);switch(this.metadata.setFormat("container",o),o){case"WAVE":return this.readWaveChunk(t-at.len);default:throw new pp(`Unsupported RIFF format: RIFF/${o}`)}}async readWaveChunk(t){for(;t>=yE.len;){let o=await this.tokenizer.readToken(yE);switch(t-=yE.len+o.chunkSize,o.chunkSize>t&&this.metadata.addWarning("Data chunk size exceeds file size"),this.header=o,MI(`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 Lb(o));break;case"fmt ":{let a=await this.tokenizer.readToken(new Fb(o)),e=Bne[a.wFormatTag];e||(MI(`WAVE/non-PCM format=${a.wFormatTag}`),e=`non-PCM (${a.wFormatTag})`),this.metadata.setFormat("codec",e),this.metadata.setFormat("bitsPerSample",a.wBitsPerSample),this.metadata.setFormat("sampleRate",a.nSamplesPerSec),this.metadata.setFormat("numberOfChannels",a.nChannels),this.blockAlign=a.nBlockAlign,this.avgBytesPerSec=a.nAvgBytesPerSec;break}case"id3 ":case"ID3 ":{let a=await this.tokenizer.readToken(new bt(o.chunkSize)),e=Qo(a);await new ln().parse(this.metadata,e,this.options);break}case"data":{this.metadata.format.lossless!==!1&&this.metadata.setFormat("lossless",!0);let a=o.chunkSize;if(this.tokenizer.fileInfo.size){let i=this.tokenizer.fileInfo.size-this.tokenizer.position;i0?this.metadata.setFormat("bitrate",this.avgBytesPerSec*8):this.metadata.format.duration&&this.metadata.setFormat("bitrate",a*8/this.metadata.format.duration),await this.tokenizer.ignore(o.chunkSize);break}case"bext":{let a=await this.tokenizer.readToken(FU);Object.keys(a).forEach(i=>{this.metadata.addTag("exif",`bext.${i}`,a[i])});let e=o.chunkSize-FU.len;await this.tokenizer.ignore(e);break}case"\0\0\0\0":MI(`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:MI(`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&&(MI("Read odd padding byte"),await this.tokenizer.ignore(1))}}async parseListTag(t){let o=await this.tokenizer.readToken(new We(4,"latin1"));switch(MI("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}`),MI(`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(yE),a=new Gb(o),e=await this.tokenizer.readToken(a);this.addTag(o.chunkID,gn(e)),t-=8+a.len}if(t!==0)throw new pp(`Illegal remaining size: ${t}`)}addTag(t,o){this.metadata.addTag("exif",t,o)}}});var Sne,wne=ue(()=>{Sne={parserType:"riff",extensions:[".wav","wave",".bwf"],mimeTypes:["audio/vnd.wave","audio/wav","audio/wave"],async load(){return(await Promise.resolve().then(()=>(mne(),yne))).WaveParser}}});function Gze(n){let t=Dne.default.parse(n),o=Eie(t.type);return{type:o.type,subtype:o.subtype,suffix:o.suffix,parameters:t.parameters}}function Fze(n){let t=n.lastIndexOf(".");return t===-1?"":n.substring(t)}var Dne,One,dp,hp,UU=ue(()=>{H2();Dne=ze(hie(),1);uie();One=ze(lt(),1);Lie();tp();lae();or();dae();Oae();Rae();Uae();zae();Aoe();Ioe();Ooe();Joe();Ine();une();wne();Ub();dp=(0,One.default)("music-metadata:parser:factory");hp=class{constructor(){this.parsers=[],[eoe,Iae,pae,Doe,coe,Sne,cne,Dae,Lae,Ene,joe,qae,Nae].forEach(t=>{this.registerParser(t)})}registerParser(t){this.parsers.push(t)}async parse(t,o,a){if(t.supportsRandomAccess()?(dp("tokenizer supports random-access, scanning for appending headers"),await HU(t,a)):dp("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){dp("Guess parser on content..."),await t.peekBuffer(r,{mayBeLess:!0});let s=await ff(r,{mpegOffsetTolerance:10});if(!s||!s.mime)throw new BI("Failed to determine audio format");if(dp(`Guessed file type is mime=${s.mime}, extension=${s.ext}`),o=this.findLoaderForContentType(s.mime),!o)throw new fI(`Guessed MIME-type not supported: ${s.mime}`)}}dp(`Loading ${o.parserType} parser...`);let e=new jO(a),i=await o.load(),A=new i(e,t,a??{});return dp(`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===fi.audio)),e.format.hasVideo===void 0&&e.setFormat("hasVideo",!!e.format.trackInfo.find(r=>r.type===fi.video))),e.toCommonMetadata()}findLoaderForExtension(t){if(!t)return;let o=Fze(t).toLocaleLowerCase()||t;return this.parsers.find(a=>a.extensions.indexOf(o)!==-1)}findLoaderForContentType(t){let o;if(!t)return;try{o=Gze(t)}catch{dp(`Invalid HTTP Content-Type header value: ${t}`);return}let a=o.subtype.indexOf("x-")===0?o.subtype.substring(2):o.subtype;return this.parsers.find(e=>e.mimeTypes.find(i=>i.indexOf(`${o.type}/${a}`)!==-1))}getSupportedMimeTypes(){let t=new Set;return this.parsers.forEach(o=>{o.mimeTypes.forEach(a=>{t.add(a),t.add(a.replace("/","/x-"))})}),Array.from(t)}}});async function bne(n){let t=n.fileInfo.size;if(t>=143){let o=new Uint8Array(15),a=n.position;await n.readBuffer(o,{position:t-143}),n.setPosition(a);let e=Tr(o,"latin1");if(e.substring(6)===Lze)return Number.parseInt(e.substring(0,6),10)+15}return 0}var Lze,Mne=ue(()=>{js();Lze="LYRICS200"});async function Uze(n,t={}){let o=QO(n);try{return await mE(o,t)}finally{await o.close()}}async function Hze(n,t,o={}){let a=fO(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await mE(a,o)}finally{await a.close()}}async function Kze(n,t,o={}){let a=Qo(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});return mE(a,o)}function mE(n,t){return new hp().parse(n,void 0,t)}function xze(n){let t={};for(let{id:o,value:a}of n)(t[o]||(t[o]=[])).push(a);return t}function Yze(n){return n===void 0?0:1+Math.round(n*4)}function jze(n){return n?n.reduce((t,o)=>o.name&&o.name.toLowerCase()in["front","cover","cover (front)"]?o:t):null}async function HU(n,t={}){let o=n.fileInfo.size;if(await zie(n)){o-=128;let a=await bne(n);o-=a}t.apeHeader=await mI.findApeFooterOffset(n,o)}function Jze(){return new hp().getSupportedMimeTypes()}var Ub=ue(()=>{an();UU();ap();Sf();Mne();tp();or();or()});var Nne={};Lr(Nne,{CouldNotDetermineFileTypeError:()=>BI,FieldDecodingError:()=>sn,InternalParserError:()=>Ap,LyricsContentType:()=>eE,TimestampFormat:()=>AE,UnsupportedFileTypeError:()=>fI,getSupportedMimeTypes:()=>Jze,makeParseError:()=>Xh,makeUnexpectedFileContentError:()=>mt,orderTags:()=>xze,parseBlob:()=>Uze,parseBuffer:()=>Kze,parseFile:()=>zze,parseFromTokenizer:()=>mE,parseStream:()=>qze,parseWebStream:()=>Hze,ratingToStars:()=>Yze,scanAppendingHeaders:()=>HU,selectCover:()=>jze});async function qze(n,t,o={}){let a=await O2(n,{fileInfo:typeof t=="string"?{mimeType:t}:t});try{return await mE(a,o)}finally{await a.close()}}async function zze(n,t={}){_ne(`parseFile: ${n}`);let o=await Mre(n),a=new hp;try{let e=a.findLoaderForExtension(n);e||_ne("Parser could not be determined by file extension");try{return await a.parse(o,e,t)}catch(i){throw(i instanceof BI||i instanceof fI)&&(i.message+=`: ${n}`),i}}finally{await o.close()}}var Tne,_ne,Rne=ue(()=>{an();Tne=ze(lt(),1);Ub();UU();Ub();_ne=(0,Tne.default)("music-metadata:parser")});var qse=ee((mvA,QH)=>{"use strict";var rWe=Object.prototype.hasOwnProperty,Da="~";function AQ(){}Object.create&&(AQ.prototype=Object.create(null),new AQ().__proto__||(Da=!1));function iWe(n,t,o){this.fn=n,this.context=t,this.once=o||!1}function Jse(n,t,o,a,e){if(typeof o!="function")throw new TypeError("The listener must be a function");var i=new iWe(o,a||n,e),A=Da?Da+t:t;return n._events[A]?n._events[A].fn?n._events[A]=[n._events[A],i]:n._events[A].push(i):(n._events[A]=i,n._eventsCount++),n}function eM(n,t){--n._eventsCount===0?n._events=new AQ:delete n._events[t]}function ga(){this._events=new AQ,this._eventsCount=0}ga.prototype.eventNames=function(){var t=[],o,a;if(this._eventsCount===0)return t;for(a in o=this._events)rWe.call(o,a)&&t.push(Da?a.slice(1):a);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};ga.prototype.listeners=function(t){var o=Da?Da+t:t,a=this._events[o];if(!a)return[];if(a.fn)return[a.fn];for(var e=0,i=a.length,A=new Array(i);e{"use strict";var aQ=n=>n&&typeof n.message=="string",vH=n=>{if(!n)return;let t=n.cause;if(typeof t=="function"){let o=n.cause();return aQ(o)?o:void 0}else return aQ(t)?t:void 0},Qge=(n,t)=>{if(!aQ(n))return"";let o=n.stack||"";if(t.has(n))return o+` +causes have become circular...`;let a=vH(n);return a?(t.add(n),o+` +caused by: `+Qge(a,t)):o},UWe=n=>Qge(n,new Set),yge=(n,t,o)=>{if(!aQ(n))return"";let a=o?"":n.message||"";if(t.has(n))return a+": ...";let e=vH(n);if(e){t.add(n);let i=typeof n.cause=="function";return a+(i?"":": ")+yge(e,t,i)}else return a},HWe=n=>yge(n,new Set);mge.exports={isErrorLike:aQ,getErrorCause:vH,stackWithCauses:UWe,messageWithCauses:HWe}});var GH=ee((XGA,wge)=>{"use strict";var KWe=Symbol("circular-ref-tag"),lM=Symbol("pino-raw-err-ref"),Sge=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[lM]},set:function(n){this[lM]=n}}});Object.defineProperty(Sge,lM,{writable:!0,value:{}});wge.exports={pinoErrProto:Sge,pinoErrorSymbols:{seen:KWe,rawSymbol:lM}}});var bge=ee(($GA,Oge)=>{"use strict";Oge.exports=LH;var{messageWithCauses:xWe,stackWithCauses:YWe,isErrorLike:Dge}=PH(),{pinoErrProto:jWe,pinoErrorSymbols:JWe}=GH(),{seen:FH}=JWe,{toString:qWe}=Object.prototype;function LH(n){if(!Dge(n))return n;n[FH]=void 0;let t=Object.create(jWe);t.type=qWe.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,t.message=xWe(n),t.stack=YWe(n),Array.isArray(n.errors)&&(t.aggregateErrors=n.errors.map(o=>LH(o)));for(let o in n)if(t[o]===void 0){let a=n[o];Dge(a)?o!=="cause"&&!Object.prototype.hasOwnProperty.call(a,FH)&&(t[o]=LH(a)):t[o]=a}return delete n[FH],t.raw=n,t}});var _ge=ee((eFA,Mge)=>{"use strict";Mge.exports=dM;var{isErrorLike:UH}=PH(),{pinoErrProto:zWe,pinoErrorSymbols:VWe}=GH(),{seen:pM}=VWe,{toString:WWe}=Object.prototype;function dM(n){if(!UH(n))return n;n[pM]=void 0;let t=Object.create(zWe);t.type=WWe.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=>dM(o))),UH(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,pM)&&(t.cause=dM(n.cause));for(let o in n)if(t[o]===void 0){let a=n[o];UH(a)?Object.prototype.hasOwnProperty.call(a,pM)||(t[o]=dM(a)):t[o]=a}return delete n[pM],t.raw=n,t}});var kge=ee((AFA,Rge)=>{"use strict";Rge.exports={mapHttpRequest:ZWe,reqSerializer:Nge};var HH=Symbol("pino-raw-req-ref"),Tge=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[HH]},set:function(n){this[HH]=n}}});Object.defineProperty(Tge,HH,{writable:!0,value:{}});function Nge(n){let t=n.info||n.socket,o=Object.create(Tge);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 a=n.path;o.url=typeof a=="string"?a: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 ZWe(n){return{req:Nge(n)}}});var Fge=ee((tFA,Gge)=>{"use strict";Gge.exports={mapHttpResponse:XWe,resSerializer:Pge};var KH=Symbol("pino-raw-res-ref"),vge=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[KH]},set:function(n){this[KH]=n}}});Object.defineProperty(vge,KH,{writable:!0,value:{}});function Pge(n){let t=Object.create(vge);return t.statusCode=n.headersSent?n.statusCode:null,t.headers=n.getHeaders?n.getHeaders():n._headers,t.raw=n,t}function XWe(n){return{res:Pge(n)}}});var YH=ee((rFA,Lge)=>{"use strict";var xH=bge(),$We=_ge(),hM=kge(),EM=Fge();Lge.exports={err:xH,errWithCause:$We,mapHttpRequest:hM.mapHttpRequest,mapHttpResponse:EM.mapHttpResponse,req:hM.reqSerializer,res:EM.resSerializer,wrapErrorSerializer:function(t){return t===xH?t:function(a){return t(xH(a))}},wrapRequestSerializer:function(t){return t===hM.reqSerializer?t:function(a){return t(hM.reqSerializer(a))}},wrapResponseSerializer:function(t){return t===EM.resSerializer?t:function(a){return t(EM.resSerializer(a))}}}});var jH=ee((iFA,Uge)=>{"use strict";function e6e(n,t){return t}Uge.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=e6e;let o=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(o))return;let a=o.slice(2),e=[];for(let i of a)i&&e.push(i.getFileName());return e}});var Jge=ee((aFA,jge)=>{"use strict";function JH(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,i);else if(i)xge(c,r);else{let p=typeof o=="function"?o(t6e(c,r),[...s.slice(0,I),...r]):o;Kge(c,r,p)}}if(A.length===0)g(n,0);else{let c=n;for(let I=0;I0)o?i===a&&(o=!1,a=""):(o=!0,a=i);else if(i==="["&&!o)t++;else if(i==="]"&&!o&&(t--,t<0))throw new Error(`Invalid redaction path (${n})`)}if(t!==0)throw new Error(`Invalid redaction path (${n})`)}function s6e(n){if(!Array.isArray(n))throw new TypeError("paths must be an array");for(let t of n)n6e(t)}function g6e(n={}){let{paths:t=[],censor:o="[REDACTED]",serialize:a=JSON.stringify,strict:e=!0,remove:i=!1}=n;s6e(t);let A=a6e(t);return function(s){if(e&&(s===null||typeof s!="object")&&(s==null||typeof s!="object"))return a?a(s):s;let g=o6e(s,A),c=s,I=o;return typeof o=="function"&&(I=o),r6e(g,t,I,i),a===!1?(g.restore=function(){return JH(c)},g):typeof a=="function"?a(g):JSON.stringify(g)}}jge.exports=g6e});var PE=ee((oFA,qge)=>{"use strict";var c6e=Symbol("pino.setLevel"),I6e=Symbol("pino.getLevel"),l6e=Symbol("pino.levelVal"),p6e=Symbol("pino.levelComp"),d6e=Symbol("pino.useLevelLabels"),h6e=Symbol("pino.useOnlyCustomLevels"),E6e=Symbol("pino.mixin"),u6e=Symbol("pino.lsCache"),C6e=Symbol("pino.chindings"),B6e=Symbol("pino.asJson"),f6e=Symbol("pino.write"),Q6e=Symbol("pino.redactFmt"),y6e=Symbol("pino.time"),m6e=Symbol("pino.timeSliceIndex"),S6e=Symbol("pino.stream"),w6e=Symbol("pino.stringify"),D6e=Symbol("pino.stringifySafe"),O6e=Symbol("pino.stringifiers"),b6e=Symbol("pino.end"),M6e=Symbol("pino.formatOpts"),_6e=Symbol("pino.messageKey"),T6e=Symbol("pino.errorKey"),N6e=Symbol("pino.nestedKey"),R6e=Symbol("pino.nestedKeyStr"),k6e=Symbol("pino.mixinMergeStrategy"),v6e=Symbol("pino.msgPrefix"),P6e=Symbol("pino.wildcardFirst"),G6e=Symbol.for("pino.serializers"),F6e=Symbol.for("pino.formatters"),L6e=Symbol.for("pino.hooks"),U6e=Symbol.for("pino.metadata");qge.exports={setLevelSym:c6e,getLevelSym:I6e,levelValSym:l6e,levelCompSym:p6e,useLevelLabelsSym:d6e,mixinSym:E6e,lsCacheSym:u6e,chindingsSym:C6e,asJsonSym:B6e,writeSym:f6e,serializersSym:G6e,redactFmtSym:Q6e,timeSym:y6e,timeSliceIndexSym:m6e,streamSym:S6e,stringifySym:w6e,stringifySafeSym:D6e,stringifiersSym:O6e,endSym:b6e,formatOptsSym:M6e,messageKeySym:_6e,errorKeySym:T6e,nestedKeySym:N6e,wildcardFirstSym:P6e,needsMetadataGsym:U6e,useOnlyCustomLevelsSym:h6e,formattersSym:F6e,hooksSym:L6e,nestedKeyStrSym:R6e,mixinMergeStrategySym:k6e,msgPrefixSym:v6e}});var zH=ee((nFA,Zge)=>{"use strict";var zge=Jge(),{redactFmtSym:H6e,wildcardFirstSym:CM}=PE(),qH=/[^.[\]]+|\[([^[\]]*?)\]/g,Vge="[Redacted]",Wge=!1;function K6e(n,t){let{paths:o,censor:a,remove:e}=x6e(n),i=o.reduce((s,g)=>{qH.lastIndex=0;let c=qH.exec(g),I=qH.exec(g),p=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(p==="*"&&(p=CM),I===null)return s[p]=null,s;if(s[p]===null)return s;let{index:B}=I,f=`${g.substr(B,g.length-1)}`;return s[p]=s[p]||[],p!==CM&&s[p].length===0&&s[p].push(...s[CM]||[]),p===CM&&Object.keys(s).forEach(function(Q){s[Q]&&s[Q].push(f)}),s[p].push(f),s},{}),A={[H6e]:zge({paths:o,censor:a,serialize:t,strict:Wge,remove:e})},r=(...s)=>t(typeof a=="function"?a(...s):a);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((s,g)=>{if(i[g]===null)s[g]=c=>r(c,[g]);else{let c=typeof a=="function"?(I,p)=>a(I,[g,...p]):a;s[g]=zge({paths:i[g],censor:c,serialize:t,strict:Wge,remove:e})}return s},A)}function x6e(n){if(Array.isArray(n))return n={paths:n,censor:Vge},n;let{paths:t,censor:o=Vge,remove:a}=n;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return a===!0&&(o=void 0),{paths:t,censor:o,remove:a}}Zge.exports=K6e});var ece=ee((sFA,$ge)=>{"use strict";var Y6e=()=>"",j6e=()=>`,"time":${Date.now()}`,J6e=()=>`,"time":${Math.round(Date.now()/1e3)}`,q6e=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,z6e=1000000n,Xge=1000000000n,V6e=BigInt(Date.now())*z6e,W6e=process.hrtime.bigint(),Z6e=()=>{let n=process.hrtime.bigint()-W6e,t=V6e+n,o=t/Xge,a=t%Xge,e=Number(o*1000n+a/1000000n),i=new Date(e),A=i.getUTCFullYear(),r=(i.getUTCMonth()+1).toString().padStart(2,"0"),s=i.getUTCDate().toString().padStart(2,"0"),g=i.getUTCHours().toString().padStart(2,"0"),c=i.getUTCMinutes().toString().padStart(2,"0"),I=i.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${A}-${r}-${s}T${g}:${c}:${I}.${a.toString().padStart(9,"0")}Z"`};$ge.exports={nullTime:Y6e,epochTime:j6e,unixTime:J6e,isoTime:q6e,isoTimeNano:Z6e}});var tce=ee((gFA,Ace)=>{"use strict";function X6e(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}Ace.exports=$6e;function $6e(n,t,o){var a=o&&o.stringify||X6e,e=1;if(typeof n=="object"&&n!==null){var i=t.length+e;if(i===1)return n;var A=new Array(i);A[0]=a(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+=a(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));VH.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 a=Date.now()+Number(t);for(;a>Date.now(););};VH.exports=n}});var cce=ee((IFA,gce)=>{"use strict";var $t=$e("fs"),e5e=$e("events"),A5e=$e("util").inherits,rce=$e("path"),XH=WH(),t5e=$e("assert"),BM=100,fM=Buffer.allocUnsafe(0),r5e=16*1024,ice="buffer",ace="utf8",[i5e,a5e]=(process.versions.node||"0.0").split(".").map(Number),o5e=i5e>=22&&a5e>=7;function oce(n,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function o(i,A){if(i){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",i)}):t.emit("error",i);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 a=t.append?"a":"w",e=t.mode;if(t.sync)try{t.mkdir&&$t.mkdirSync(rce.dirname(n),{recursive:!0});let i=$t.openSync(n,a,e);o(null,i)}catch(i){throw o(i),i}else t.mkdir?$t.mkdir(rce.dirname(n),{recursive:!0},i=>{if(i)return o(i);$t.open(n,a,e,o)}):$t.open(n,a,e,o)}function As(n){if(!(this instanceof As))return new As(n);let{fd:t,dest:o,minLength:a,maxLength:e,maxWrite:i,periodicFlush:A,sync:r,append:s=!0,mkdir:g,retryEAGAIN:c,fsync:I,contentMode:p,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(a||0,16387),this.file=null,this.destroyed=!1,this.minLength=a||0,this.maxLength=e||0,this.maxWrite=i||r5e,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(p===ice)this._writingBuf=fM,this.write=g5e,this.flush=I5e,this.flushSync=p5e,this._actualWrite=h5e,f=()=>$t.writeSync(this.fd,this._writingBuf),Q=()=>$t.write(this.fd,this._writingBuf,this.release);else if(p===void 0||p===ace)this._writingBuf="",this.write=s5e,this.flush=c5e,this.flushSync=l5e,this._actualWrite=d5e,f=()=>Buffer.isBuffer(this._writingBuf)?$t.writeSync(this.fd,this._writingBuf):$t.writeSync(this.fd,this._writingBuf,"utf8"),Q=()=>Buffer.isBuffer(this._writingBuf)?$t.write(this.fd,this._writingBuf,this.release):$t.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${ace}" and "${ice}", but passed ${p}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")oce(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{XH(BM),this.release(void 0,0)}catch(R){this.release(R)}else setTimeout(Q,BM);else this._writing=!1,this.emit("error",y);return}this.emit("write",m);let T=ZH(this._writingBuf,this._len,m);if(this._len=T.len,this._writingBuf=T.writingBuf,this._writingBuf.length){if(!this.sync){Q();return}try{do{let R=f(),L=ZH(this._writingBuf,this._len,R);this._len=L.len,this._writingBuf=L.writingBuf}while(this._writingBuf.length)}catch(R){this.release(R);return}}this._fsync&&$t.fsyncSync(this.fd);let _=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):_>this.minLength?this._actualWrite():this._ending?_>0?this._actualWrite():(this._writing=!1,QM(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(n5e,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 ZH(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 n5e(n){n.listenerCount("drain")>0&&(n._asyncDrainScheduled=!1,n.emit("drain"))}A5e(As,e5e);function nce(n,t){return n.length===0?fM:n.length===1?n[0]:Buffer.concat(n,t)}function s5e(n){if(this.destroyed)throw new Error("SonicBoom destroyed");n=""+n;let t=Buffer.byteLength(n),o=this._len+t,a=this._bufs;return this.maxLength&&o>this.maxLength?(this.emit("drop",n),this._lenthis.maxWrite?a.push(n):a[a.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]),a.push(n.length)):(o[o.length-1].push(n),a[a.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{$t.fsync(this.fd,a=>{this._flushPending=!1,n(a)})}catch(a){n(a)}this.off("error",o)},o=a=>{this._flushPending=!1,n(a),this.off("drain",t)};this.once("drain",t),this.once("error",o)}function c5e(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&&sce.call(this,n),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function I5e(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&&sce.call(this,n),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}As.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&&$t.close(t,o=>{if(o)return this.emit("error",o)})}),oce(this.file,this)};As.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():QM(this)))};function l5e(){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)?$t.writeSync(this.fd,n):$t.writeSync(this.fd,n,"utf8"),o=ZH(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;XH(BM)}}try{$t.fsyncSync(this.fd)}catch{}}function p5e(){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=fM);let n=fM;for(;this._bufs.length||n.length;){n.length<=0&&(n=nce(this._bufs[0],this._lens[0]));try{let t=$t.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;XH(BM)}}}As.prototype.destroy=function(){this.destroyed||QM(this)};function d5e(){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)?$t.writeSync(this.fd,this._writingBuf):$t.writeSync(this.fd,this._writingBuf,"utf8");n(null,t)}catch(t){n(t)}else $t.write(this.fd,this._writingBuf,n)}function h5e(){let n=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:nce(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=$t.writeSync(this.fd,this._writingBuf);n(null,t)}catch(t){n(t)}else o5e&&(this._writingBuf=Buffer.from(this._writingBuf)),$t.write(this.fd,this._writingBuf,n)}function QM(n){if(n.fd===-1){n.once("ready",QM.bind(null,n));return}n._periodicFlushTimer!==void 0&&clearInterval(n._periodicFlushTimer),n.destroyed=!0,n._bufs=[],n._lens=[],t5e(typeof n.fd=="number",`sonic.fd must be a number, got ${typeof n.fd}`);try{$t.fsync(n.fd,t)}catch{}function t(){n.fd!==1&&n.fd!==2?$t.close(n.fd,o):o()}function o(a){if(a){n.emit("error",a);return}n._ending&&!n._writing&&n.emit("finish"),n.emit("close")}}As.SonicBoom=As;As.default=As;gce.exports=As});var $H=ee((lFA,hce)=>{"use strict";var ts={exit:[],beforeExit:[]},Ice={exit:C5e,beforeExit:B5e},GE;function E5e(){GE===void 0&&(GE=new FinalizationRegistry(f5e))}function u5e(n){ts[n].length>0||process.on(n,Ice[n])}function lce(n){ts[n].length>0||(process.removeListener(n,Ice[n]),ts.exit.length===0&&ts.beforeExit.length===0&&(GE=void 0))}function C5e(){pce("exit")}function B5e(){pce("beforeExit")}function pce(n){for(let t of ts[n]){let o=t.deref(),a=t.fn;o!==void 0&&a(o,n)}ts[n]=[]}function f5e(n){for(let t of["exit","beforeExit"]){let o=ts[t].indexOf(n);ts[t].splice(o,o+1),lce(t)}}function dce(n,t,o){if(t===void 0)throw new Error("the object can't be undefined");u5e(n);let a=new WeakRef(t);a.fn=o,E5e(),GE.register(t,a),ts[n].push(a)}function Q5e(n,t){dce("exit",n,t)}function y5e(n,t){dce("beforeExit",n,t)}function m5e(n){if(GE!==void 0){GE.unregister(n);for(let t of["exit","beforeExit"])ts[t]=ts[t].filter(o=>{let a=o.deref();return a&&a!==n}),lce(t)}}hce.exports={register:Q5e,registerBeforeExit:y5e,unregister:m5e}});var Ece=ee((pFA,S5e)=>{S5e.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 Cce=ee((dFA,uce)=>{"use strict";function w5e(n,t,o,a,e){let i=Date.now()+a,A=Atomics.load(n,t);if(A===o){e(null,"ok");return}let r=A,s=g=>{Date.now()>i?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 D5e(n,t,o,a,e){let i=Date.now()+a,A=Atomics.load(n,t);if(A!==o){e(null,"ok");return}let r=s=>{Date.now()>i?e(null,"timed-out"):setTimeout(()=>{A=Atomics.load(n,t),A!==o?e(null,"ok"):r(s>=1e3?1e3:s*2)},s)};r(1)}uce.exports={wait:w5e,waitDiff:D5e}});var fce=ee((hFA,Bce)=>{"use strict";Bce.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var wce=ee((EFA,Sce)=>{"use strict";var{version:O5e}=Ece(),{EventEmitter:b5e}=$e("events"),{Worker:M5e}=$e("worker_threads"),{join:_5e}=$e("path"),{pathToFileURL:T5e}=$e("url"),{wait:N5e}=Cce(),{WRITE_INDEX:dn,READ_INDEX:to,SEQ_INDEX:eK}=fce(),R5e=$e("buffer"),k5e=$e("assert"),Te=Symbol("kImpl"),v5e=R5e.constants.MAX_STRING_LENGTH;function FE(n,t){Atomics.add(n[Te].state,eK,1),t(),Atomics.add(n[Te].state,eK,1),Atomics.notify(n[Te].state,eK)}var oQ=class{constructor(t){this._value=t}deref(){return this._value}},mM=class{register(){}unregister(){}},P5e=process.env.NODE_V8_COVERAGE?mM:global.FinalizationRegistry||mM,G5e=process.env.NODE_V8_COVERAGE?oQ:global.WeakRef||oQ,Qce=new P5e(n=>{n.exited||n.terminate()});function F5e(n,t){let{filename:o,workerData:a}=t,i=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||_5e(__dirname,"lib","worker.js"),A=new M5e(i,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:o.indexOf("file://")===0?o:T5e(o).href,dataBuf:n[Te].dataBuf,stateBuf:n[Te].stateBuf,workerData:{$context:{threadStreamVersion:O5e},...a}}});return A.stream=new oQ(n),A.on("message",L5e),A.on("exit",mce),Qce.register(n,A),A}function yce(n){k5e(!n[Te].sync),n[Te].needDrain&&(n[Te].needDrain=!1,n.emit("drain"))}function yM(n){let t=Atomics.load(n[Te].state,dn),o=n[Te].data.length-t;if(o>0){if(n[Te].buf.length===0){n[Te].flushing=!1,n[Te].ending?aK(n):n[Te].needDrain&&process.nextTick(yce,n);return}let a=n[Te].buf.slice(0,o),e=Buffer.byteLength(a);e<=o?(n[Te].buf=n[Te].buf.slice(o),SM(n,a,yM.bind(null,n))):n.flush(()=>{if(!n.destroyed){for(FE(n,()=>{Atomics.store(n[Te].state,to,0),Atomics.store(n[Te].state,dn,0)}),Atomics.notify(n[Te].state,to);e>n[Te].data.length;)o=o/2,a=n[Te].buf.slice(0,o),e=Buffer.byteLength(a);n[Te].buf=n[Te].buf.slice(o),SM(n,a,yM.bind(null,n))}})}else if(o===0){if(t===0&&n[Te].buf.length===0)return;n.flush(()=>{FE(n,()=>{Atomics.store(n[Te].state,to,0),Atomics.store(n[Te].state,dn,0)}),Atomics.notify(n[Te].state,to),yM(n)})}else ng(n,new Error("overwritten"))}function L5e(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 G5e(t),t.flush(()=>{t[Te].ready=!0,t.emit("ready")});break;case"ERROR":ng(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:ng(t,new Error("this should not happen: "+n.code))}}function mce(n){let t=this.stream.deref();t!==void 0&&(Qce.unregister(t),t.worker.exited=!0,t.worker.off("exit",mce),ng(t,n!==0?new Error("the worker thread exited"):null))}var tK=class extends b5e{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[Te]={},this[Te].stateBuf=new SharedArrayBuffer(128),this[Te].state=new Int32Array(this[Te].stateBuf),this[Te].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[Te].data=Buffer.from(this[Te].dataBuf),this[Te].sync=t.sync||!1,this[Te].ending=!1,this[Te].ended=!1,this[Te].needDrain=!1,this[Te].destroyed=!1,this[Te].flushing=!1,this[Te].ready=!1,this[Te].finished=!1,this[Te].errored=null,this[Te].closed=!1,this[Te].buf="",this.worker=F5e(this,t),this.on("message",(o,a)=>{this.worker.postMessage(o,a)})}write(t){if(this[Te].destroyed)return rK(this,new Error("the worker has exited")),!1;if(this[Te].ending)return rK(this,new Error("the worker is ending")),!1;if(this[Te].flushing&&this[Te].buf.length+t.length>=v5e)try{AK(this),this[Te].flushing=!0}catch(o){return ng(this,o),!1}if(this[Te].buf+=t,this[Te].sync)try{return AK(this),!0}catch(o){return ng(this,o),!1}return this[Te].flushing||(this[Te].flushing=!0,setImmediate(yM,this)),this[Te].needDrain=this[Te].data.length-this[Te].buf.length-Atomics.load(this[Te].state,dn)<=0,!this[Te].needDrain}end(){this[Te].destroyed||(this[Te].ending=!0,aK(this))}flush(t){if(this[Te].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let o=Atomics.load(this[Te].state,dn);N5e(this[Te].state,to,o,1/0,(a,e)=>{if(a){ng(this,a),process.nextTick(t,a);return}if(e==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[Te].destroyed||(AK(this),iK(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[Te].ready}get destroyed(){return this[Te].destroyed}get closed(){return this[Te].closed}get writable(){return!this[Te].destroyed&&!this[Te].ending}get writableEnded(){return this[Te].ending}get writableFinished(){return this[Te].finished}get writableNeedDrain(){return this[Te].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[Te].errored}};function rK(n,t){setImmediate(()=>{n.emit("error",t)})}function ng(n,t){n[Te].destroyed||(n[Te].destroyed=!0,t&&(n[Te].errored=t,rK(n,t)),n.worker.exited?setImmediate(()=>{n[Te].closed=!0,n.emit("close")}):n.worker.terminate().catch(()=>{}).then(()=>{n[Te].closed=!0,n.emit("close")}))}function SM(n,t,o){let a=Atomics.load(n[Te].state,dn),e=Buffer.byteLength(t);return n[Te].data.write(t,a),FE(n,()=>{Atomics.store(n[Te].state,dn,a+e)}),o(),!0}function aK(n){if(!(n[Te].ended||!n[Te].ending||n[Te].flushing)){n[Te].ended=!0;try{n.flushSync();let t=Atomics.load(n[Te].state,to);FE(n,()=>{Atomics.store(n[Te].state,dn,-1)});let o=0;for(;t!==-1;){if(Atomics.wait(n[Te].state,to,t,1e3),t=Atomics.load(n[Te].state,to),t===-2){ng(n,new Error("end() failed"));return}if(++o===10){ng(n,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{n[Te].finished=!0,n.emit("finish")})}catch(t){ng(n,t)}}}function AK(n){let t=()=>{n[Te].ending?aK(n):n[Te].needDrain&&process.nextTick(yce,n)};for(n[Te].flushing=!1;n[Te].buf.length!==0;){let o=Atomics.load(n[Te].state,dn),a=n[Te].data.length-o;if(a===0){iK(n),FE(n,()=>{Atomics.store(n[Te].state,to,0),Atomics.store(n[Te].state,dn,0)}),Atomics.notify(n[Te].state,to);continue}else if(a<0)throw new Error("overwritten");let e=n[Te].buf.slice(0,a),i=Buffer.byteLength(e);if(i<=a)n[Te].buf=n[Te].buf.slice(a),SM(n,e,t);else{for(iK(n),FE(n,()=>{Atomics.store(n[Te].state,to,0),Atomics.store(n[Te].state,dn,0)}),Atomics.notify(n[Te].state,to);i>n[Te].buf.length;)a=a/2,e=n[Te].buf.slice(0,a),i=Buffer.byteLength(e);n[Te].buf=n[Te].buf.slice(a),SM(n,e,t)}}}function iK(n){if(n[Te].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(n[Te].state,dn),o=0;for(;;){let a=Atomics.load(n[Te].state,to);if(a===-2)throw Error("_flushSync failed");if(a!==t)Atomics.wait(n[Te].state,to,a,1e3);else break;if(++o===10)throw new Error("_flushSync took too long (10s)")}}Sce.exports=tK});var sK=ee((uFA,Dce)=>{"use strict";var{createRequire:U5e}=$e("module"),H5e=jH(),{join:oK,isAbsolute:K5e,sep:x5e}=$e("node:path"),Y5e=WH(),nK=$H(),j5e=wce();function J5e(n){nK.register(n,z5e),nK.registerBeforeExit(n,V5e),n.on("close",function(){nK.unregister(n)})}function q5e(n,t,o,a){let e=new j5e({filename:n,workerData:t,workerOpts:o,sync:a});e.on("ready",i),e.on("close",function(){process.removeListener("exit",A)}),process.on("exit",A);function i(){process.removeListener("exit",A),e.unref(),o.autoEnd!==!1&&J5e(e)}function A(){e.closed||(e.flushSync(),Y5e(100),e.end())}return e}function z5e(n){n.ref(),n.flushSync(),n.end(),n.once("close",function(){n.unref()})}function V5e(n){n.flushSync()}function W5e(n){let{pipeline:t,targets:o,levels:a,dedupe:e,worker:i={},caller:A=H5e(),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"]||oK(__dirname,"worker.js"),s.targets=o.filter(B=>B.target).map(B=>({...B,target:p(B.target)})),s.pipelines=o.filter(B=>B.pipeline).map(B=>B.pipeline.map(f=>({...f,level:B.level,target:p(f.target)})))):t&&(I=c["pino-worker"]||oK(__dirname,"worker.js"),s.pipelines=[t.map(B=>({...B,target:p(B.target)}))]),a&&(s.levels=a),e&&(s.dedupe=e),s.pinoWillSendConfig=!0,q5e(p(I),s,i,r);function p(B){if(B=c[B]||B,K5e(B)||B.indexOf("file://")===0)return B;if(B==="pino/file")return oK(__dirname,"..","file.js");let f;for(let Q of g)try{let y=Q==="node:repl"?process.cwd()+x5e:Q;f=U5e(y).resolve(B);break}catch{continue}if(!f)throw new Error(`unable to determine transport target for "${B}"`);return f}}Dce.exports=W5e});var bM=ee((CFA,Lce)=>{"use strict";var Oce=$e("node:diagnostics_channel"),bce=tce(),{mapHttpRequest:Z5e,mapHttpResponse:X5e}=YH(),cK=cce(),Mce=$H(),{lsCacheSym:$5e,chindingsSym:Rce,writeSym:_ce,serializersSym:kce,formatOptsSym:Tce,endSym:eZe,stringifiersSym:vce,stringifySym:Pce,stringifySafeSym:IK,wildcardFirstSym:Gce,nestedKeySym:AZe,formattersSym:Fce,messageKeySym:tZe,errorKeySym:rZe,nestedKeyStrSym:iZe,msgPrefixSym:wM}=PE(),{isMainThread:aZe}=$e("worker_threads"),oZe=sK(),OM;typeof Oce.tracingChannel=="function"?OM=Oce.tracingChannel("pino_asJson"):OM={hasSubscribers:!1,traceSync(n,t,o,...a){return n.call(o,...a)}};function LE(){}function nZe(n,t){if(!t)return o;return function(...e){t.call(this,e,o,n)};function o(a,...e){if(typeof a=="object"){let i=a;a!==null&&(a.method&&a.headers&&a.socket?a=Z5e(a):typeof a.setHeader=="function"&&(a=X5e(a)));let A;i===null&&e.length===0?A=[null]:(i=e.shift(),A=e),typeof this[wM]=="string"&&i!==void 0&&i!==null&&(i=this[wM]+i),this[_ce](a,bce(i,A,this[Tce]),n)}else{let i=a===void 0?e.shift():a;typeof this[wM]=="string"&&i!==void 0&&i!==null&&(i=this[wM]+i),this[_ce](null,bce(i,e,this[Tce]),n)}}}function gK(n){let t="",o=0,a=!1,e=255,i=n.length;if(i>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,a=!0);return a?t+=n.slice(o):t=n,e<32?JSON.stringify(n):'"'+t+'"'}function sZe(n,t,o,a){if(OM.hasSubscribers===!1)return Nce.call(this,n,t,o,a);let e={instance:this,arguments};return OM.traceSync(Nce,e,this,n,t,o,a)}function Nce(n,t,o,a){let e=this[Pce],i=this[IK],A=this[vce],r=this[eZe],s=this[Rce],g=this[kce],c=this[Fce],I=this[tZe],p=this[rZe],B=this[$5e][o]+a;B=B+s;let f;c.log&&(n=c.log(n));let Q=A[Gce],y="";for(let T in n)if(f=n[T],Object.prototype.hasOwnProperty.call(n,T)&&f!==void 0){g[T]?f=g[T](f):T===p&&g.err&&(f=g.err(f));let _=A[T]||Q;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":_&&(f=_(f));break;case"string":f=(_||gK)(f);break;default:f=(_||e)(f,i)}if(f===void 0)continue;let R=gK(T);y+=","+R+":"+f}let m="";if(t!==void 0){f=g[I]?g[I](t):t;let T=A[I]||Q;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":T&&(f=T(f)),m=',"'+I+'":'+f;break;case"string":f=(T||gK)(f),m=',"'+I+'":'+f;break;default:f=(T||e)(f,i),m=',"'+I+'":'+f}}return this[AZe]&&y?B+this[iZe]+y.slice(1)+"}"+m+r:B+y+m+r}function gZe(n,t){let o,a=n[Rce],e=n[Pce],i=n[IK],A=n[vce],r=A[Gce],s=n[kce],g=n[Fce].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,i),o===void 0)continue;a+=',"'+c+'":'+o}return a}function cZe(n){return n.write!==n.constructor.prototype.write}function DM(n){let t=new cK(n);return t.on("error",o),!n.sync&&aZe&&(Mce.register(t,IZe),t.on("close",function(){Mce.unregister(t)})),t;function o(a){if(a.code==="EPIPE"){t.write=LE,t.end=LE,t.flushSync=LE,t.destroy=LE;return}t.removeListener("error",o),t.emit("error",a)}}function IZe(n,t){n.destroyed||(t==="beforeExit"?(n.flush(),n.on("drain",function(){n.end()})):n.flushSync())}function lZe(n){return function(o,a,e={},i){if(typeof e=="string")i=DM({dest:e}),e={};else if(typeof i=="string"){if(e&&e.transport)throw Error("only one of option.transport or stream can be specified");i=DM({dest:i})}else if(e instanceof cK||e.writable||e._writableState)i=e,e={};else if(e.transport){if(e.transport instanceof cK||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)),i=oZe({caller:a,...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=LE),i||(cZe(process.stdout)?i=process.stdout:i=DM({fd:process.stdout.fd||1})),{opts:e,stream:i}}}function pZe(n,t){try{return JSON.stringify(n)}catch{try{return(t||this[IK])(n)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function dZe(n,t,o){return{level:n,bindings:t,log:o}}function hZe(n){let t=Number(n);return typeof n=="string"&&Number.isFinite(t)?t:n===void 0?1:n}Lce.exports={noop:LE,buildSafeSonicBoom:DM,asChindings:gZe,asJson:sZe,genLog:nZe,createArgsNormalizer:lZe,stringify:pZe,buildFormatters:dZe,normalizeDestFileDescriptor:hZe}});var MM=ee((BFA,Uce)=>{var EZe={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},uZe={ASC:"ASC",DESC:"DESC"};Uce.exports={DEFAULT_LEVELS:EZe,SORTING_ORDER:uZe}});var dK=ee((fFA,Yce)=>{"use strict";var{lsCacheSym:CZe,levelValSym:lK,useOnlyCustomLevelsSym:BZe,streamSym:fZe,formattersSym:QZe,hooksSym:yZe,levelCompSym:Hce}=PE(),{noop:mZe,genLog:Sp}=bM(),{DEFAULT_LEVELS:sg,SORTING_ORDER:Kce}=MM(),xce={fatal:n=>{let t=Sp(sg.fatal,n);return function(...o){let a=this[fZe];if(t.call(this,...o),typeof a.flushSync=="function")try{a.flushSync()}catch{}}},error:n=>Sp(sg.error,n),warn:n=>Sp(sg.warn,n),info:n=>Sp(sg.info,n),debug:n=>Sp(sg.debug,n),trace:n=>Sp(sg.trace,n)},pK=Object.keys(sg).reduce((n,t)=>(n[sg[t]]=t,n),{}),SZe=Object.keys(pK).reduce((n,t)=>(n[t]='{"level":'+Number(t),n),{});function wZe(n){let t=n[QZe].level,{labels:o}=n.levels,a={};for(let e in o){let i=t(o[e],Number(e));a[e]=JSON.stringify(i).slice(0,-1)}return n[CZe]=a,n}function DZe(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 OZe(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 a=this[lK],e=this[lK]=o[n],i=this[BZe],A=this[Hce],r=this[yZe].logMethod;for(let s in o){if(A(o[s],e)===!1){this[s]=mZe;continue}this[s]=DZe(s,i)?xce[s](r):Sp(o[s],r)}this.emit("level-change",n,e,t[a],a,this)}function bZe(n){let{levels:t,levelVal:o}=this;return t&&t.labels?t.labels[o]:""}function MZe(n){let{values:t}=this.levels,o=t[n];return o!==void 0&&this[Hce](o,this[lK])}function _Ze(n,t,o){return n===Kce.DESC?t<=o:t>=o}function TZe(n){return typeof n=="string"?_Ze.bind(null,n):n}function NZe(n=null,t=!1){let o=n?Object.keys(n).reduce((i,A)=>(i[n[A]]=A,i),{}):null,a=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:pK,o),e=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:sg,n);return{labels:a,values:e}}function RZe(n,t,o){if(typeof n=="number"){if(![].concat(Object.keys(t||{}).map(i=>t[i]),o?[]:Object.keys(pK).map(i=>+i),1/0).includes(n))throw Error(`default level:${n} must be included in custom levels`);return}let a=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),o?null:sg,t);if(!(n in a))throw Error(`default level:${n} must be included in custom levels`)}function kZe(n,t){let{labels:o,values:a}=n;for(let e in t){if(e in a)throw Error("levels cannot be overridden");if(t[e]in o)throw Error("pre-existing level values cannot be used for new levels")}}function vZe(n){if(typeof n!="function"&&!(typeof n=="string"&&Object.values(Kce).includes(n)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Yce.exports={initialLsCache:SZe,genLsCache:wZe,levelMethods:xce,getLevel:bZe,setLevel:OZe,isLevelEnabled:MZe,mappings:NZe,assertNoLevelCollisions:kZe,assertDefaultLevelFound:RZe,genLevelComparison:TZe,assertLevelComparison:vZe}});var hK=ee((QFA,jce)=>{"use strict";jce.exports={version:"9.14.0"}});var $ce=ee((mFA,Xce)=>{"use strict";var{EventEmitter:PZe}=$e("node:events"),{lsCacheSym:GZe,levelValSym:FZe,setLevelSym:TM,getLevelSym:Jce,chindingsSym:NM,parsedChindingsSym:LZe,mixinSym:UZe,asJsonSym:zce,writeSym:HZe,mixinMergeStrategySym:KZe,timeSym:xZe,timeSliceIndexSym:YZe,streamSym:Vce,serializersSym:wp,formattersSym:nQ,errorKeySym:jZe,messageKeySym:JZe,useOnlyCustomLevelsSym:qZe,needsMetadataGsym:zZe,redactFmtSym:VZe,stringifySym:WZe,formatOptsSym:ZZe,stringifiersSym:XZe,msgPrefixSym:uK,hooksSym:$Ze}=PE(),{getLevel:e9e,setLevel:A9e,isLevelEnabled:t9e,mappings:r9e,initialLsCache:i9e,genLsCache:a9e,assertNoLevelCollisions:o9e}=dK(),{asChindings:CK,asJson:n9e,buildFormatters:EK,stringify:qce,noop:Wce}=bM(),{version:s9e}=hK(),g9e=zH(),c9e=class{},Zce={constructor:c9e,child:I9e,bindings:l9e,setBindings:p9e,flush:E9e,isLevelEnabled:t9e,version:s9e,get level(){return this[Jce]()},set level(n){this[TM](n)},get levelVal(){return this[FZe]},set levelVal(n){throw Error("levelVal is read-only")},get msgPrefix(){return this[uK]},get[Symbol.toStringTag](){return"Pino"},[GZe]:i9e,[HZe]:h9e,[zce]:n9e,[Jce]:e9e,[TM]:A9e};Object.setPrototypeOf(Zce,PZe.prototype);Xce.exports=function(){return Object.create(Zce)};var _M=n=>n;function I9e(n,t){if(!n)throw Error("missing bindings for child Pino");let o=this[wp],a=this[nQ],e=Object.create(this);if(t==null)return e[nQ].bindings!==_M&&(e[nQ]=EK(a.level,_M,a.log)),e[NM]=CK(e,n),e[TM](this.level),this.onChild!==Wce&&this.onChild(e),e;if(t.hasOwnProperty("serializers")===!0){e[wp]=Object.create(null);for(let c in o)e[wp][c]=o[c];let s=Object.getOwnPropertySymbols(o);for(var i=0;i{"use strict";var{hasOwnProperty:sQ}=Object.prototype,Op=QK();Op.configure=QK;Op.stringify=Op;Op.default=Op;yK.stringify=Op;yK.configure=QK;tIe.exports=Op;var u9e=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function kI(n){return n.length<5e3&&!u9e.test(n)?`"${n}"`:JSON.stringify(n)}function BK(n,t){if(n.length>200||t)return n.sort(t);for(let o=1;oa;)n[e]=n[e-1],e--;n[e]=a}return n}var C9e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function fK(n){return C9e.call(n)!==void 0&&n.length!==0}function eIe(n,t,o){n.length= 1`)}return o===void 0?1/0:o}function Dp(n){return n===1?"1 item":`${n} items`}function y9e(n){let t=new Set;for(let o of n)(typeof o=="string"||typeof o=="number")&&t.add(String(o));return t}function m9e(n){if(sQ.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 a=`Object can not safely be stringified. Received type ${typeof o}`;throw typeof o!="function"&&(a+=` (${o.toString()})`),new Error(a)}}}function QK(n){n={...n};let t=m9e(n);t&&(n.bigint===void 0&&(n.bigint=!1),"circularValue"in n||(n.circularValue=Error));let o=B9e(n),a=Q9e(n,"bigint"),e=f9e(n),i=typeof e=="function"?e:void 0,A=AIe(n,"maximumDepth"),r=AIe(n,"maximumBreadth");function s(B,f,Q,y,m,T){let _=f[B];switch(typeof _=="object"&&_!==null&&typeof _.toJSON=="function"&&(_=_.toJSON(B)),_=y.call(f,B,_),typeof _){case"string":return kI(_);case"object":{if(_===null)return"null";if(Q.indexOf(_)!==-1)return o;let R="",L=",",U=T;if(Array.isArray(_)){if(_.length===0)return"[]";if(Ar){let k=_.length-r-1;R+=`${L}"... ${Dp(k)} not stringified"`}return m!==""&&(R+=` +${U}`),Q.pop(),`[${R}]`}let F=Object.keys(_),q=F.length;if(q===0)return"{}";if(Ar){let V=q-r;R+=`${K}"...":${z}"${Dp(V)} not stringified"`,K=L}return m!==""&&K.length>1&&(R=` ${T}${R} -${F}`),Q.pop(),`{${R}}`}case"number":return isFinite(_)?String(_):t?t(_):"null";case"boolean":return _===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(_);default:return t?t(_):void 0}}function g(B,f,Q,y,m,T){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(B)),typeof f){case"string":return TI(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 G=f.length-r-1;R+=`${H}"... ${md(G)} not stringified"`}return m!==""&&(R+=` -${_}`),Q.pop(),`[${R}]`}Q.push(f);let F="";m!==""&&(T+=m,H=`, -${T}`,F=" ");let L="";for(let q of y){let z=g(q,f[q],Q,y,m,T);z!==void 0&&(R+=`${L}${TI(q)}:${F}${z}`,L=H)}return m!==""&&L.length>1&&(R=` +${U}`),Q.pop(),`{${R}}`}case"number":return isFinite(_)?String(_):t?t(_):"null";case"boolean":return _===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(_);default:return t?t(_):void 0}}function g(B,f,Q,y,m,T){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(B)),typeof f){case"string":return kI(f);case"object":{if(f===null)return"null";if(Q.indexOf(f)!==-1)return o;let _=T,R="",L=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let G=f.length-r-1;R+=`${L}"... ${Dp(G)} not stringified"`}return m!==""&&(R+=` +${_}`),Q.pop(),`[${R}]`}Q.push(f);let U="";m!==""&&(T+=m,L=`, +${T}`,U=" ");let F="";for(let q of y){let z=g(q,f[q],Q,y,m,T);z!==void 0&&(R+=`${F}${kI(q)}:${U}${z}`,F=L)}return m!==""&&F.length>1&&(R=` ${T}${R} -${_}`),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 TI(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 T=m;if(Array.isArray(f)){if(f.length===0)return"[]";if(Ar){let N=f.length-r-1;z+=`${K}"... ${md(N)} not stringified"`}return z+=` -${T}`,Q.pop(),`[${z}]`}let _=Object.keys(f),R=_.length;if(R===0)return"{}";if(Ar){let z=R-r;F+=`${L}"...": "${md(z)} not stringified"`,L=H}return L!==""&&(F=` -${m}${F} -${T}`),Q.pop(),`{${F}}`}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 TI(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 z=f.length-r-1;y+=`,"... ${md(z)} not stringified"`}return Q.pop(),`[${y}]`}let T=Object.keys(f),_=T.length;if(_===0)return"{}";if(Ar){let F=_-r;y+=`${R}"...":"${md(F)} 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,[],E9e(f),y,"")}if(y.length!==0)return c("",B,[],y,"")}return I("",B,[])}return d}});var AIe=ee((iFA,eIe)=>{"use strict";var CK=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:$ce}=SM(),C9e=$ce.info;function B9e(n,t){n=n||[],t=t||{dedupe:!1};let o=Object.create($ce);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,[CK]:!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=f9e(f.length,t.dedupe);y9e(m,f.length,t.dedupe);m=Q9e(m,t.dedupe))if(d=f[m],d.level<=B){if(Q!==0&&Q!==d.level)break;if(y=d.stream,y[CK]){let{lastTime:T,lastMsg:_,lastObj:R,lastLogger:H}=this;y.lastLevel=B,y.lastTime=T,y.lastMsg=_,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=C9e;let m={stream:B,level:y,levelVal:void 0,id:++i.lastId};return f.unshift(m),f.sort(Xce),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(Xce),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 m9e=$e("node:os"),gIe=LH(),S9e=UH(),w9e=xH(),cIe=zge(),D9e=qce(),IIe=_E(),{configure:O9e}=Zce(),{assertDefaultLevelFound:b9e,mappings:lIe,genLsCache:M9e,genLevelComparison:_9e,assertLevelComparison:T9e}=gK(),{DEFAULT_LEVELS:dIe,SORTING_ORDER:N9e}=SM(),{createArgsNormalizer:R9e,asChindings:k9e,buildSafeSonicBoom:tIe,buildFormatters:v9e,stringify:BK,normalizeDestFileDescriptor:rIe,noop:P9e}=mM(),{version:G9e}=cK(),{chindingsSym:aIe,redactFmtSym:F9e,serializersSym:iIe,timeSym:L9e,timeSliceIndexSym:U9e,streamSym:H9e,stringifySym:oIe,stringifySafeSym:fK,stringifiersSym:nIe,setLevelSym:K9e,endSym:x9e,formatOptsSym:Y9e,messageKeySym:j9e,errorKeySym:J9e,nestedKeySym:q9e,mixinSym:z9e,levelCompSym:V9e,useOnlyCustomLevelsSym:W9e,formattersSym:sIe,hooksSym:Z9e,nestedKeyStrSym:X9e,mixinMergeStrategySym:$9e,msgPrefixSym:eXe}=IIe,{epochTime:pIe,nullTime:AXe}=cIe,{pid:tXe}=process,rXe=m9e.hostname(),aXe=gIe.err,iXe={level:"info",levelComparison:N9e.ASC,levels:dIe,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:tXe,hostname:rXe},serializers:Object.assign(Object.create(null),{err:aXe}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:pIe,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},oXe=R9e(iXe),nXe=Object.assign(Object.create(null),gIe);function QK(...n){let t={},{opts:o,stream:i}=oXe(t,S9e(),...n);o.level&&typeof o.level=="string"&&dIe[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:T,formatters:_,hooks:R,depthLimit:H,edgeLimit:F,onChild:L,msgPrefix:q}=o,z=O9e({maximumDepth:H,maximumBreadth:F}),K=v9e(_.level,_.bindings,_.log),G=BK.bind({[fK]:z}),V=e?w9e(e,G):{},U=e?{stringify:V[F9e]}:{stringify:G},N="}"+(a?`\r +${m}`,G=Math.min(f.length,r),V=0;for(;Vr){let N=f.length-r-1;z+=`${K}"... ${Dp(N)} not stringified"`}return z+=` +${T}`,Q.pop(),`[${z}]`}let _=Object.keys(f),R=_.length;if(R===0)return"{}";if(Ar){let z=R-r;U+=`${F}"...": "${Dp(z)} not stringified"`,F=L}return F!==""&&(U=` +${m}${U} +${T}`),Q.pop(),`{${U}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(a)return String(f);default:return t?t(f):void 0}}function I(B,f,Q){switch(typeof f){case"string":return kI(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 z=f.length-r-1;y+=`,"... ${Dp(z)} not stringified"`}return Q.pop(),`[${y}]`}let T=Object.keys(f),_=T.length;if(_===0)return"{}";if(Ar){let U=_-r;y+=`${R}"...":"${Dp(U)} 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(a)return String(f);default:return t?t(f):void 0}}function p(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,[],y9e(f),y,"")}if(y.length!==0)return c("",B,[],y,"")}return I("",B,[])}return p}});var nIe=ee((SFA,oIe)=>{"use strict";var mK=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:aIe}=MM(),S9e=aIe.info;function w9e(n,t){n=n||[],t=t||{dedupe:!1};let o=Object.create(aIe);o.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(I=>{o[I]=t.levels[I]});let a={write:e,add:r,remove:s,emit:i,flushSync:A,end:g,minLevel:0,lastId:0,streams:[],clone:c,[mK]:!0,streamLevels:o};return Array.isArray(n)?n.forEach(r,a):r.call(a,n),n=null,a;function e(I){let p,B=this.lastLevel,{streams:f}=this,Q=0,y;for(let m=D9e(f.length,t.dedupe);b9e(m,f.length,t.dedupe);m=O9e(m,t.dedupe))if(p=f[m],p.level<=B){if(Q!==0&&Q!==p.level)break;if(y=p.stream,y[mK]){let{lastTime:T,lastMsg:_,lastObj:R,lastLogger:L}=this;y.lastLevel=B,y.lastTime=T,y.lastMsg=_,y.lastObj=R,y.lastLogger=L}y.write(I),t.dedupe&&(Q=p.level)}else if(!t.dedupe)break}function i(...I){for(let{stream:p}of this.streams)typeof p.emit=="function"&&p.emit(...I)}function A(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync()}function r(I){if(!I)return a;let p=typeof I.write=="function"||I.stream,B=I.write?I:I.stream;if(!p)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=S9e;let m={stream:B,level:y,levelVal:void 0,id:++a.lastId};return f.unshift(m),f.sort(iIe),this.minLevel=f[0].level,a}function s(I){let{streams:p}=this,B=p.findIndex(f=>f.id===I);return B>=0&&(p.splice(B,1),p.sort(iIe),this.minLevel=p.length>0?p[0].level:-1),a}function g(){for(let{stream:I}of this.streams)typeof I.flushSync=="function"&&I.flushSync(),I.end()}function c(I){let p=new Array(this.streams.length);for(let B=0;B=0:n{"use strict";var M9e=$e("node:os"),hIe=YH(),_9e=jH(),T9e=zH(),EIe=ece(),N9e=$ce(),uIe=PE(),{configure:R9e}=rIe(),{assertDefaultLevelFound:k9e,mappings:CIe,genLsCache:v9e,genLevelComparison:P9e,assertLevelComparison:G9e}=dK(),{DEFAULT_LEVELS:BIe,SORTING_ORDER:F9e}=MM(),{createArgsNormalizer:L9e,asChindings:U9e,buildSafeSonicBoom:sIe,buildFormatters:H9e,stringify:SK,normalizeDestFileDescriptor:gIe,noop:K9e}=bM(),{version:x9e}=hK(),{chindingsSym:cIe,redactFmtSym:Y9e,serializersSym:IIe,timeSym:j9e,timeSliceIndexSym:J9e,streamSym:q9e,stringifySym:lIe,stringifySafeSym:wK,stringifiersSym:pIe,setLevelSym:z9e,endSym:V9e,formatOptsSym:W9e,messageKeySym:Z9e,errorKeySym:X9e,nestedKeySym:$9e,mixinSym:eXe,levelCompSym:AXe,useOnlyCustomLevelsSym:tXe,formattersSym:dIe,hooksSym:rXe,nestedKeyStrSym:iXe,mixinMergeStrategySym:aXe,msgPrefixSym:oXe}=uIe,{epochTime:fIe,nullTime:nXe}=EIe,{pid:sXe}=process,gXe=M9e.hostname(),cXe=hIe.err,IXe={level:"info",levelComparison:F9e.ASC,levels:BIe,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:sXe,hostname:gXe},serializers:Object.assign(Object.create(null),{err:cXe}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:fIe,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},lXe=L9e(IXe),pXe=Object.assign(Object.create(null),hIe);function DK(...n){let t={},{opts:o,stream:a}=lXe(t,_9e(),...n);o.level&&typeof o.level=="string"&&BIe[o.level.toLowerCase()]!==void 0&&(o.level=o.level.toLowerCase());let{redact:e,crlf:i,serializers:A,timestamp:r,messageKey:s,errorKey:g,nestedKey:c,base:I,name:p,level:B,customLevels:f,levelComparison:Q,mixin:y,mixinMergeStrategy:m,useOnlyCustomLevels:T,formatters:_,hooks:R,depthLimit:L,edgeLimit:U,onChild:F,msgPrefix:q}=o,z=R9e({maximumDepth:L,maximumBreadth:U}),K=H9e(_.level,_.bindings,_.log),G=SK.bind({[wK]:z}),V=e?T9e(e,G):{},H=e?{stringify:V[Y9e]}:{stringify:G},N="}"+(i?`\r `:` -`),k=k9e.bind(null,{[aIe]:"",[iIe]:A,[nIe]:V,[oIe]:BK,[fK]:z,[sIe]:K}),J="";I!==null&&(d===void 0?J=k(I):J=k(Object.assign({},I,{name:d})));let X=r instanceof Function?r:r?pIe:AXe,ae=X().indexOf(":")+1;if(T&&!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"`);b9e(B,f,T);let De=lIe(f,T);typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:De,messageKey:s,errorKey:g}}),T9e(Q);let oe=_9e(Q);return Object.assign(t,{levels:De,[V9e]:oe,[W9e]:T,[H9e]:i,[L9e]:X,[U9e]:ae,[oIe]:BK,[fK]:z,[nIe]:V,[x9e]:N,[Y9e]:U,[j9e]:s,[J9e]:g,[q9e]:c,[X9e]:c?`,${JSON.stringify(c)}:{`:"",[iIe]:A,[z9e]:y,[$9e]:m,[aIe]:J,[sIe]:K,[Z9e]:R,silent:P9e,onChild:L,[eXe]:q}),Object.setPrototypeOf(t,D9e()),M9e(t),t[K9e](B),t}dn.exports=QK;dn.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=rIe(n.dest||process.stdout.fd),tIe(n)):tIe({dest:rIe(n),minLength:0});dn.exports.transport=rK();dn.exports.multistream=AIe();dn.exports.levels=lIe();dn.exports.stdSerializers=nXe;dn.exports.stdTimeFunctions=Object.assign({},cIe);dn.exports.symbols=IIe;dn.exports.version=G9e;dn.exports.default=QK;dn.exports.pino=QK});import{unlink as FBe}from"node:fs/promises";import{homedir as LBe}from"node:os";import{join as su,resolve as jI}from"node:path";import{createHash as sde,randomUUID as Ux}from"node:crypto";import{mkdir as gde,readFile as cde,rename as Ide,unlink as Lx,writeFile as lde}from"node:fs/promises";import{dirname as dde}from"node:path";var mx={"\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\u5E8F\u53F7\u6216\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","/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D":"/ws, /wsl, /workspaces Workspace command aliases","/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","/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"/sessionlist or /sessions [workspace index or absolute path] List session IDs and titles","/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD":"/sessionlist --limit N List only the first N sessions in the current workspace","/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","/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist or /presets 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 Sx={"\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 --limit N \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD\uFF08N \u4E3A\u6B63\u6574\u6570\uFF09\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=U9e.bind(null,{[cIe]:"",[IIe]:A,[pIe]:V,[lIe]:SK,[wK]:z,[dIe]:K}),J="";I!==null&&(p===void 0?J=k(I):J=k(Object.assign({},I,{name:p})));let X=r instanceof Function?r:r?fIe:nXe,ie=X().indexOf(":")+1;if(T&&!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"`);k9e(B,f,T);let De=CIe(f,T);typeof a.emit=="function"&&a.emit("message",{code:"PINO_CONFIG",config:{levels:De,messageKey:s,errorKey:g}}),G9e(Q);let oe=P9e(Q);return Object.assign(t,{levels:De,[AXe]:oe,[tXe]:T,[q9e]:a,[j9e]:X,[J9e]:ie,[lIe]:SK,[wK]:z,[pIe]:V,[V9e]:N,[W9e]:H,[Z9e]:s,[X9e]:g,[$9e]:c,[iXe]:c?`,${JSON.stringify(c)}:{`:"",[IIe]:A,[eXe]:y,[aXe]:m,[cIe]:J,[dIe]:K,[rXe]:R,silent:K9e,onChild:F,[oXe]:q}),Object.setPrototypeOf(t,N9e()),v9e(t),t[z9e](B),t}hn.exports=DK;hn.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=gIe(n.dest||process.stdout.fd),sIe(n)):sIe({dest:gIe(n),minLength:0});hn.exports.transport=sK();hn.exports.multistream=nIe();hn.exports.levels=CIe();hn.exports.stdSerializers=pXe;hn.exports.stdTimeFunctions=Object.assign({},EIe);hn.exports.symbols=uIe;hn.exports.version=x9e;hn.exports.default=DK;hn.exports.pino=DK});import{unlink as YBe}from"node:fs/promises";import{homedir as jBe}from"node:os";import{join as pu,resolve as VI}from"node:path";import{createHash as dpe,randomUUID as jx}from"node:crypto";import{mkdir as hpe,readFile as Epe,rename as upe,unlink as Yx,writeFile as Cpe}from"node:fs/promises";import{dirname as Bpe}from"node:path";var bx={"\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\u5E8F\u53F7\u6216\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","/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D":"/ws, /wsl, /workspaces Workspace command aliases","/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","/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898":"/sessionlist or /sessions [workspace index or absolute path] List session IDs and titles","/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD":"/sessionlist --limit N List only the first N sessions in the current workspace","/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","/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset":"/presetlist or /presets 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 Mx={"\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 --limit N \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD\uFF08N \u4E3A\u6B63\u6574\u6570\uFF09\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 --limit N List the first N Sessions in the current Workspace (N must be a positive integer) /sessionlist Workspace index List Sessions by /workspacelist index @@ -104,7 +104,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 wx={"/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.","\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B\u4E0D\u652F\u6301\u76F4\u63A5\u63A5\u6536\u56FE\u7247\u8F93\u5165\u3002\u7528\u6237\u53D1\u9001\u7684\u56FE\u7247\u5DF2\u4F5C\u4E3A\u6587\u4EF6\u4FDD\u5B58\u5230\u5DE5\u4F5C\u533A\uFF08\u89C1\u4E0B\u65B9\u6587\u4EF6\u6E05\u5355\uFF09\u3002\u8BF7\u4F7F\u7528\u53EF\u7528\u5DE5\u5177\u5206\u6790\u8FD9\u4E9B\u56FE\u7247\u6587\u4EF6\u540E\u56DE\u7B54\uFF0C\u4F8B\u5982 run_code \u6216 pwsh \u8BFB\u53D6\u5B57\u8282\u3001\u89E3\u6790\u5143\u6570\u636E\u3001\u8C03\u7528\u56FE\u50CF\u5904\u7406\u6216 OCR \u5E93\uFF1B\u4E0D\u8981\u5047\u8BBE\u81EA\u5DF1\u80FD\u76F4\u63A5\u770B\u5230\u56FE\u7247\u5185\u5BB9\u3002":"The current session model does not accept direct image input. The images sent by the user were saved into the workspace as files (see the file manifest below). Answer by analyzing those image files with the available tools \u2014 for example run_code or pwsh to read bytes, parse metadata, or call image-processing or OCR libraries \u2014 and do not assume you can see the images directly.","\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 _x={"/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.","\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B\u4E0D\u652F\u6301\u76F4\u63A5\u63A5\u6536\u56FE\u7247\u8F93\u5165\u3002\u7528\u6237\u53D1\u9001\u7684\u56FE\u7247\u5DF2\u4F5C\u4E3A\u6587\u4EF6\u4FDD\u5B58\u5230\u5DE5\u4F5C\u533A\uFF08\u89C1\u4E0B\u65B9\u6587\u4EF6\u6E05\u5355\uFF09\u3002\u8BF7\u4F7F\u7528\u53EF\u7528\u5DE5\u5177\u5206\u6790\u8FD9\u4E9B\u56FE\u7247\u6587\u4EF6\u540E\u56DE\u7B54\uFF0C\u4F8B\u5982 run_code \u6216 pwsh \u8BFB\u53D6\u5B57\u8282\u3001\u89E3\u6790\u5143\u6570\u636E\u3001\u8C03\u7528\u56FE\u50CF\u5904\u7406\u6216 OCR \u5E93\uFF1B\u4E0D\u8981\u5047\u8BBE\u81EA\u5DF1\u80FD\u76F4\u63A5\u770B\u5230\u56FE\u7247\u5185\u5BB9\u3002":"The current session model does not accept direct image input. The images sent by the user were saved into the workspace as files (see the file manifest below). Answer by analyzing those image files with the available tools \u2014 for example run_code or pwsh to read bytes, parse metadata, or call image-processing or OCR libraries \u2014 and do not assume you can see the images directly.","\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\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\u540E\u91CD\u8BD5\u3002":"Batch input commands support text only. Remove the image, file, or quoted message 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. @@ -112,7 +112,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.`,"\u4F60\u53EF\u4EE5\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u4F46\u6CA1\u6709\u6267\u884C\u547D\u4EE4\u7684\u6743\u9650\u3002":"You can send regular messages, but you do not have permission to run commands."};var Dx={"\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\u4F1A\u589E\u91CF\u6DFB\u52A0\u5F53\u524D\u7F3A\u5C11\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\uFF1Bim:resource\uFF08\u7528\u4E8E\u4E0A\u4F20\u673A\u5668\u4EBA\u53D1\u9001\u7684\u56FE\u7247\u6216\u6587\u4EF6\uFF09\uFF1B\u4EE5\u53CA\u539F\u751F\u547D\u4EE4\u9762\u677F\u6240\u9700\u7684 application:app_slash_command:read / write\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 incrementally adds the currently missing 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; im:resource, used to upload images or files sent by the bot; and application:app_slash_command:read / write for the native command panel. 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.`,"\u4F60\u53EF\u4EE5\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u4F46\u6CA1\u6709\u6267\u884C\u547D\u4EE4\u7684\u6743\u9650\u3002":"You can send regular messages, but you do not have permission to run commands."};var Tx={"\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\u4F1A\u589E\u91CF\u6DFB\u52A0\u5F53\u524D\u7F3A\u5C11\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\uFF1Bim:resource\uFF08\u7528\u4E8E\u4E0A\u4F20\u673A\u5668\u4EBA\u53D1\u9001\u7684\u56FE\u7247\u6216\u6587\u4EF6\uFF09\uFF1B\u4EE5\u53CA\u539F\u751F\u547D\u4EE4\u9762\u677F\u6240\u9700\u7684 application:app_slash_command:read / write\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 incrementally adds the currently missing 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; im:resource, used to upload images or files sent by the bot; and application:app_slash_command:read / write for the native command panel. 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 @@ -134,145 +134,145 @@ 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","\u2935\uFE0F \u6700\u7EC8\u7ED3\u679C\u89C1\u4E0B\u65B9":"\u2935\uFE0F Final result below",\u56DE\u7B54\u5B8C\u6210:"Answer complete","\u5185\u5BB9\u8F83\u957F\uFF0C\u751F\u6210\u5B8C\u6210\u540E\u5C06\u5206\u6BB5\u53D1\u9001\u5B8C\u6574\u56DE\u7B54\u3002":"This response is long. The complete answer will be sent in parts when generation finishes.",\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.","\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\u6216\u4E0D\u5B58\u5728\uFF0C\u65E0\u9700\u91CD\u590D\u64CD\u4F5C\u3002":"This approval has already been processed or does not exist; no need to repeat the action.","\u64CD\u4F5C\u53C2\u6570\uFF1A\n{operation}":`Operation parameters: -{operation}`,"\u2705 \u6279\u51C6":"\u2705 Approve","\u274C \u62D2\u7EDD":"\u274C Reject","\u{1F510} \u5DE5\u5177\u5BA1\u6279":"\u{1F510} Tool approval","\u2753 \u8BF7\u8865\u5145\u4FE1\u606F{progress}":"\u2753 Please provide more information{progress}"};var Ox={"\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.","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002":"The DingTalk Stream connection failed because proxy dependency agent-base 6.0.0 was detected.","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002":"Pin agent-base@6 to 6.0.2 in the DSH profile and reinstall dependencies, or upgrade pnpm and re-resolve the lockfile.","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002":"The plugin could not connect to the local Harness.","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Make sure dsh web is running, then find the matching reference in the dsh web log.","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002":"The DingTalk Stream SDK could not be loaded.","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Reinstall plugin dependencies in the current DSH profile, then find the matching reference in the dsh web log.","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002":"DingTalk rejected the current app credentials.","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002":"Verify the app credentials and bot permissions, then try again.","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002":"The DingTalk Stream connection timed out.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network, proxy, and firewall, then try again. Find details in the dsh web log using the reference.","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002":"The DingTalk service address could not be resolved.","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check DNS, network, and proxy settings. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002":"TLS validation failed for the DingTalk Stream connection.","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check system certificates, proxy certificates, or the HTTPS interception proxy. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002":"DingTalk Stream could not connect through the current proxy.","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check HTTP_PROXY, HTTPS_PROXY, NO_PROXY, and proxy connectivity. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002":"The DingTalk Stream message connection could not be established.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network and bot configuration. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002":"DingTalk Stream message-listener initialization failed.","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Make sure dsh-im and dingtalk-stream are compatible, then inspect the dsh web log using the reference.","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002":"The DingTalk bot runtime could not be initialized.","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Check the DSH data directory, workspace, and plugin dependencies, then inspect the dsh web log using the reference.","\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002":"Find the matching reference in the dsh web log for the redacted error details.","\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 bx={"\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 Mx={"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 _x={"\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 Tx={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 Nx={\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 Rx={"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 kx={"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 vx={"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 Px=Object.freeze(Object.assign({},mx,Sx,wx,Dx,Ox,bx,Mx,_x,Tx,Nx,Rx,kx,vx));var Gx="zh";function Fx(n){let t=typeof n=="string"?n.trim().toLowerCase():"";Gx=t==="english"||/^en(?:[-_].*)?$/u.test(t)?"en":"zh"}function w(n,t){if(typeof n!="string")return n;let o=Gx==="en"?Px[n]??n:n;return t==null?o:o.replace(/\{(\w+)\}/g,(i,e)=>Object.hasOwn(t,e)?String(t[e]):i)}var n_=Object.freeze({version:1,bots:Object.freeze([])}),pde=new Set(["clientId","secretRef","approvedSenders"]);function Cn(n){return typeof n=="string"&&n.trim()?n.trim():null}function hde(n){return sde("sha256").update(n).digest("hex")}function Hx(n){let t=Cn(n);return t&&/^dt_[a-f0-9]{24}$/.test(t)?t:null}function Ede(n){let t=Cn(n);return t&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(t)?t:null}function ude(n){let t=Cn(n);return t&&/^dt_sender_[a-f0-9]{32}$/.test(t)?t:null}function Cde(n){let t=typeof n=="string"?{staffId:n}:n;if(!t||typeof t!="object"||Array.isArray(t))return null;let o=ude(t.senderKey),i=Cn(t.staffId);return!o||!i?null:Object.freeze({senderKey:o,staffId:i,displayName:Cn(t.displayName),approvedAt:Cn(t.approvedAt)})}function Bde(n){if(!Array.isArray(n))return null;let t=n.map(Cde);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 OQ(n){let t=Cn(n);if(!t)throw new TypeError("clientId is required");let o=hde(t).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function Kx(){return`dt_sender_${Ux().replaceAll("-","")}`}function s_(n){return Cn(n)?w("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):w("\u9489\u9489\u7528\u6237")}function g_(n){let t=Cn(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)}`:w("\u9489\u9489\u673A\u5668\u4EBA")}function xx(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=>!pde.has(r)))return null;let o=Cn(n.clientId),i=Ede(n.secretRef),e=Bde(n.approvedSenders??[]);if(!o||!i||!e)return null;let a=OQ(o);return a.secretRef!==i||(n.botId===void 0?a.botId:Hx(n.botId))!==a.botId?null:Object.freeze({botId:a.botId,clientId:o,secretRef:i,approvedSenders:e})}function fde(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let t=n.bots.map(a=>xx(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 Qde(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 DQ=class{#e;#A=n_;#t=Promise.resolve();constructor(t){if(!Cn(t))throw new TypeError("config path is required");this.#e=t}async load(){try{let t=fde(JSON.parse(await cde(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=n_}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=xx(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(!Hx(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 Lx(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=n_});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.#l(a),this.#A=a});return this.#t=i.then(()=>{},()=>{}),await i,o}async#l(t){await gde(dde(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${Ux()}.tmp`;try{await lde(o,`${JSON.stringify(Qde(t),null,2)} -`,{encoding:"utf8",flag:"wx",mode:384}),await Ide(o,this.#e)}catch(i){try{await Lx(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([i,e])}throw i}}};var jx="https://oapi.dingtalk.com",yde="DING_DWS_CLAW";function Bn(n){return typeof n=="string"&&n.trim()?n.trim():null}function Yx(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function mde(n){let t;try{t=new URL(Bn(n)??jx)}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 Sde(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 wde(n,t){if(!n||typeof n!="object"||Array.isArray(n))throw new rs("invalid-response",`DingTalk ${t} returned an invalid response`,t);if(Number(n.errcode)!==0)throw new rs("api-error",`DingTalk ${t} request was rejected`,t);return n}var rs=class extends Error{constructor(t,o,i,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=t,this.action=i}},bQ=class{#e;#A;#t;#r;constructor({fetch:t=globalThis.fetch,clock:o=Date,baseUrl:i=jx,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=mde(i),this.#r=e}async start({signal:t}={}){let o=await this.#l("/app/registration/init",{source:yde},"initialization",t),i=Bn(o.nonce);if(!i)throw new rs("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#l("/app/registration/begin",{nonce:i},"begin",t),a=Bn(e.device_code),A=Bn(e.verification_uri_complete);if(!a||!A)throw new rs("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=Yx(e.expires_in,7200),s=Yx(e.interval,5)*1e3;return Object.freeze({deviceCode:a,verificationUrl:A,verificationUri:Bn(e.verification_uri),userCode:Bn(e.user_code),expiresAt:Sde(this.#A)+r*1e3,pollIntervalMs:s})}async poll(t){let o=Bn(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.#l("/app/registration/poll",{device_code:o},"poll",i),a=Bn(e.status)?.toUpperCase(),A=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(a)?a:"UNKNOWN";return Object.freeze({status:A,clientId:Bn(e.client_id),clientSecret:Bn(e.client_secret),failReason:Bn(e.fail_reason)})}async#l(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 rs("timeout",`DingTalk ${i} request timed out`,i,{cause:g}):g?.name==="AbortError"?g:new rs("network-error",`DingTalk ${i} request could not be completed`,i,{cause:g})}if(!a||a.ok===!1||typeof a.json!="function")throw new rs("http-error",`DingTalk ${i} request failed`,i);let s;try{s=await a.json()}catch(g){throw new rs("invalid-json",`DingTalk ${i} returned invalid JSON`,i,{cause:g})}return wde(s,i)}};import{randomUUID as qde}from"node:crypto";var Jx=new WeakMap,c_=Symbol("dsh-im.connection-test-state-identity");function qx(n){return n?.[c_]??n}function Dde(n){return typeof n=="string"&&n.trim()?n.trim():null}function Do(n,t){if(!n||!t||typeof t!="object")return!1;try{return Jx.set(qx(n),structuredClone(t)),!0}catch{return!1}}function jE(n){let t=n?Jx.get(qx(n)):null;return t?structuredClone(t):null}function Ua(n,t=w("\u673A\u5668\u4EBA")){let o=Dde(n)??t;return`${w("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")} -${w("\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 fr(n=w("\u673A\u5668\u4EBA")){let t=new Error(w("{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 lc({state:n,send:t,text:o,channelLabel:i}){let e=jE(n);if(!e)throw fr(i);return await t(e,o),{sent:!0}}function gr(n){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed"}:{sent:!0})}import{randomUUID as Ode}from"node:crypto";var bde=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"}),Mde=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 _de(n){if(n?.code!=="harness-turn-failed")return null;let t=n?.providerCode??n?.details?.providerCode;return typeof t!="string"?null:bde[t.trim().toUpperCase()]??null}function Tde(n){let t=typeof n?.code=="string"?n.code:"",o=_de(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 Nde(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${Ode().slice(0,8).toUpperCase()}`}function Rde(n){return typeof n!="string"||!/^[A-Za-z0-9_-]{1,64}$/u.test(n)?null:n.toUpperCase().replaceAll("-","_")}function kde(n,{userMessage:t,reason:o,referenceId:i,at:e=Date.now()}={}){let a=Rde(o),A=Tde(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():w(Mde[r]),referenceId:Nde(i),at:Number.isFinite(e)?e:Date.now()})}function ut(n){return`${n.message} +{operation}`,"\u2705 \u6279\u51C6":"\u2705 Approve","\u274C \u62D2\u7EDD":"\u274C Reject","\u{1F510} \u5DE5\u5177\u5BA1\u6279":"\u{1F510} Tool approval","\u2753 \u8BF7\u8865\u5145\u4FE1\u606F{progress}":"\u2753 Please provide more information{progress}"};var Nx={"\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.","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002":"The DingTalk Stream connection failed because proxy dependency agent-base 6.0.0 was detected.","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002":"Pin agent-base@6 to 6.0.2 in the DSH profile and reinstall dependencies, or upgrade pnpm and re-resolve the lockfile.","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002":"The plugin could not connect to the local Harness.","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Make sure dsh web is running, then find the matching reference in the dsh web log.","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002":"The DingTalk Stream SDK could not be loaded.","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002":"Reinstall plugin dependencies in the current DSH profile, then find the matching reference in the dsh web log.","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002":"DingTalk rejected the current app credentials.","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002":"Verify the app credentials and bot permissions, then try again.","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002":"The DingTalk Stream connection timed out.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network, proxy, and firewall, then try again. Find details in the dsh web log using the reference.","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002":"The DingTalk service address could not be resolved.","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check DNS, network, and proxy settings. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002":"TLS validation failed for the DingTalk Stream connection.","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check system certificates, proxy certificates, or the HTTPS interception proxy. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002":"DingTalk Stream could not connect through the current proxy.","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check HTTP_PROXY, HTTPS_PROXY, NO_PROXY, and proxy connectivity. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002":"The DingTalk Stream message connection could not be established.","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002":"Check the network and bot configuration. Find details in the dsh web log using the reference.","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002":"DingTalk Stream message-listener initialization failed.","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Make sure dsh-im and dingtalk-stream are compatible, then inspect the dsh web log using the reference.","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002":"The DingTalk bot runtime could not be initialized.","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002":"Check the DSH data directory, workspace, and plugin dependencies, then inspect the dsh web log using the reference.","\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002":"Find the matching reference in the dsh web log for the redacted error details.","\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 Rx={"\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 kx={"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 vx={"\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 Px={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 Gx={\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 Fx={"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 Lx={"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 Ux={"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 Hx=Object.freeze(Object.assign({},bx,Mx,_x,Tx,Nx,Rx,kx,vx,Px,Gx,Fx,Lx,Ux));var Kx="zh";function xx(n){let t=typeof n=="string"?n.trim().toLowerCase():"";Kx=t==="english"||/^en(?:[-_].*)?$/u.test(t)?"en":"zh"}function w(n,t){if(typeof n!="string")return n;let o=Kx==="en"?Hx[n]??n:n;return t==null?o:o.replace(/\{(\w+)\}/g,(a,e)=>Object.hasOwn(t,e)?String(t[e]):a)}var l_=Object.freeze({version:1,bots:Object.freeze([])}),fpe=new Set(["clientId","secretRef","approvedSenders"]);function fn(n){return typeof n=="string"&&n.trim()?n.trim():null}function Qpe(n){return dpe("sha256").update(n).digest("hex")}function Jx(n){let t=fn(n);return t&&/^dt_[a-f0-9]{24}$/.test(t)?t:null}function ype(n){let t=fn(n);return t&&/^DSH_DINGTALK_BOT_SECRET_[A-F0-9]{24}$/.test(t)?t:null}function mpe(n){let t=fn(n);return t&&/^dt_sender_[a-f0-9]{32}$/.test(t)?t:null}function Spe(n){let t=typeof n=="string"?{staffId:n}:n;if(!t||typeof t!="object"||Array.isArray(t))return null;let o=mpe(t.senderKey),a=fn(t.staffId);return!o||!a?null:Object.freeze({senderKey:o,staffId:a,displayName:fn(t.displayName),approvedAt:fn(t.approvedAt)})}function wpe(n){if(!Array.isArray(n))return null;let t=n.map(Spe);if(t.some(e=>e===null))return null;let o=new Set,a=new Set;for(let e of t){if(o.has(e.staffId)||a.has(e.senderKey))return null;o.add(e.staffId),a.add(e.senderKey)}return Object.freeze(t)}function NQ(n){let t=fn(n);if(!t)throw new TypeError("clientId is required");let o=Qpe(t).slice(0,24);return Object.freeze({botId:`dt_${o}`,secretRef:`DSH_DINGTALK_BOT_SECRET_${o.toUpperCase()}`})}function qx(){return`dt_sender_${jx().replaceAll("-","")}`}function p_(n){return fn(n)?w("\u8EAB\u4EFD\u5DF2\u9690\u85CF"):w("\u9489\u9489\u7528\u6237")}function d_(n){let t=fn(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)}`:w("\u9489\u9489\u673A\u5668\u4EBA")}function zx(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=>!fpe.has(r)))return null;let o=fn(n.clientId),a=ype(n.secretRef),e=wpe(n.approvedSenders??[]);if(!o||!a||!e)return null;let i=NQ(o);return i.secretRef!==a||(n.botId===void 0?i.botId:Jx(n.botId))!==i.botId?null:Object.freeze({botId:i.botId,clientId:o,secretRef:a,approvedSenders:e})}function Dpe(n){if(!n||n.version!==1||!Array.isArray(n.bots))return null;let t=n.bots.map(i=>zx(i,{stored:!0}));if(t.some(i=>i===null))return null;let o=new Set,a=new Set,e=new Set;for(let i of t){if(o.has(i.botId)||a.has(i.clientId)||e.has(i.secretRef))return null;o.add(i.botId),a.add(i.clientId),e.add(i.secretRef)}return Object.freeze({version:1,bots:Object.freeze(t)})}function Ope(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 TQ=class{#e;#A=l_;#t=Promise.resolve();constructor(t){if(!fn(t))throw new TypeError("config path is required");this.#e=t}async load(){try{let t=Dpe(JSON.parse(await Epe(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=l_}return this}list(){return structuredClone(this.#A.bots)}get(t){let o=this.#A.bots.find(a=>a.botId===t);return o?structuredClone(o):null}getByClientId(t){let o=this.#A.bots.find(a=>a.clientId===t);return o?structuredClone(o):null}async save(t){let o=zx(t);if(!o)throw new Error("Refusing to persist invalid dsh-dingtalk bot data");return this.#r(a=>{if(a.find(A=>(A.clientId===o.clientId||A.secretRef===o.secretRef)&&A.botId!==o.botId))throw new Error("Duplicate DingTalk bot identity");let i=a.findIndex(A=>A.botId===o.botId);return i===-1?a.push(o):a[i]=o,structuredClone(o)})}async remove(t){if(!Jx(t))throw new TypeError("Invalid DingTalk bot id");return this.#r(o=>{let a=o.findIndex(i=>i.botId===t);if(a===-1)return null;let[e]=o.splice(a,1);return structuredClone(e)})}async clear(){let t=this.#t.then(async()=>{try{await Yx(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=l_});this.#t=t.then(()=>{},()=>{}),await t}async#r(t){let o,a=this.#t.then(async()=>{let e=[...this.#A.bots];o=t(e);let i=Object.freeze({version:1,bots:Object.freeze(e)});await this.#I(i),this.#A=i});return this.#t=a.then(()=>{},()=>{}),await a,o}async#I(t){await hpe(Bpe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.${process.pid}.${jx()}.tmp`;try{await Cpe(o,`${JSON.stringify(Ope(t),null,2)} +`,{encoding:"utf8",flag:"wx",mode:384}),await upe(o,this.#e)}catch(a){try{await Yx(o)}catch(e){if(e?.code!=="ENOENT")throw new AggregateError([a,e])}throw a}}};var Wx="https://oapi.dingtalk.com",bpe="DING_DWS_CLAW";function Qn(n){return typeof n=="string"&&n.trim()?n.trim():null}function Vx(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function Mpe(n){let t;try{t=new URL(Qn(n)??Wx)}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 _pe(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 Tpe(n,t){if(!n||typeof n!="object"||Array.isArray(n))throw new os("invalid-response",`DingTalk ${t} returned an invalid response`,t);if(Number(n.errcode)!==0)throw new os("api-error",`DingTalk ${t} request was rejected`,t);return n}var os=class extends Error{constructor(t,o,a,e={}){super(o,e),this.name="DingtalkDeviceAuthError",this.code=t,this.action=a}},RQ=class{#e;#A;#t;#r;constructor({fetch:t=globalThis.fetch,clock:o=Date,baseUrl:a=Wx,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=Mpe(a),this.#r=e}async start({signal:t}={}){let o=await this.#I("/app/registration/init",{source:bpe},"initialization",t),a=Qn(o.nonce);if(!a)throw new os("missing-nonce","DingTalk registration initialization did not return a nonce","initialization");let e=await this.#I("/app/registration/begin",{nonce:a},"begin",t),i=Qn(e.device_code),A=Qn(e.verification_uri_complete);if(!i||!A)throw new os("incomplete-registration","DingTalk registration did not return complete QR metadata","begin");let r=Vx(e.expires_in,7200),s=Vx(e.interval,5)*1e3;return Object.freeze({deviceCode:i,verificationUrl:A,verificationUri:Qn(e.verification_uri),userCode:Qn(e.user_code),expiresAt:_pe(this.#A)+r*1e3,pollIntervalMs:s})}async poll(t){let o=Qn(typeof t=="string"?t:t?.deviceCode),a=typeof t=="object"?t?.signal:void 0;if(!o)throw new TypeError("deviceCode is required");let e=await this.#I("/app/registration/poll",{device_code:o},"poll",a),i=Qn(e.status)?.toUpperCase(),A=["WAITING","SUCCESS","FAIL","EXPIRED"].includes(i)?i:"UNKNOWN";return Object.freeze({status:A,clientId:Qn(e.client_id),clientSecret:Qn(e.client_secret),failReason:Qn(e.fail_reason)})}async#I(t,o,a,e){let i,A=AbortSignal.timeout(this.#r),r=e?AbortSignal.any([e,A]):A;try{i=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 os("timeout",`DingTalk ${a} request timed out`,a,{cause:g}):g?.name==="AbortError"?g:new os("network-error",`DingTalk ${a} request could not be completed`,a,{cause:g})}if(!i||i.ok===!1||typeof i.json!="function")throw new os("http-error",`DingTalk ${a} request failed`,a);let s;try{s=await i.json()}catch(g){throw new os("invalid-json",`DingTalk ${a} returned invalid JSON`,a,{cause:g})}return Tpe(s,a)}};import{randomUUID as $pe}from"node:crypto";var Zx=new WeakMap,h_=Symbol("dsh-im.connection-test-state-identity");function Xx(n){return n?.[h_]??n}function Npe(n){return typeof n=="string"&&n.trim()?n.trim():null}function bo(n,t){if(!n||!t||typeof t!="object")return!1;try{return Zx.set(Xx(n),structuredClone(t)),!0}catch{return!1}}function ZE(n){let t=n?Zx.get(Xx(n)):null;return t?structuredClone(t):null}function Ui(n,t=w("\u673A\u5668\u4EBA")){let o=Npe(n)??t;return`${w("\u2705 DeepSeek Harness \u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F")} +${w("\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 Qr(n=w("\u673A\u5668\u4EBA")){let t=new Error(w("{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 Ec({state:n,send:t,text:o,channelLabel:a}){let e=ZE(n);if(!e)throw Qr(a);return await t(e,o),{sent:!0}}function lr(n){return Object.freeze(n?{sent:!1,code:n?.code==="test-target-unavailable"?"test-target-unavailable":"test-message-failed"}:{sent:!0})}import{randomUUID as Rpe}from"node:crypto";var kpe=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"}),vpe=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 Ppe(n){if(n?.code!=="harness-turn-failed")return null;let t=n?.providerCode??n?.details?.providerCode;return typeof t!="string"?null:kpe[t.trim().toUpperCase()]??null}function Gpe(n){let t=typeof n?.code=="string"?n.code:"",o=Ppe(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 a=Number(n?.status??n?.httpStatus);return a===401||a===403||["channel-permission","permission-required","artifact-permission-required","forbidden","stale-token"].includes(t)?"CHANNEL_PERMISSION":a===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 Fpe(n){return typeof n=="string"&&/^[A-Z0-9-]{6,40}$/u.test(n)?n:`MF-${Rpe().slice(0,8).toUpperCase()}`}function Lpe(n){return typeof n!="string"||!/^[A-Za-z0-9_-]{1,64}$/u.test(n)?null:n.toUpperCase().replaceAll("-","_")}function Upe(n,{userMessage:t,reason:o,referenceId:a,at:e=Date.now()}={}){let i=Lpe(o),A=Gpe(n),r=A==="INTERNAL_UNKNOWN"&&i&&typeof t=="string"&&t.trim()?"INPUT_INVALID":A;return Object.freeze({code:r,reason:i??r,message:typeof t=="string"&&t.trim()?t.trim():w(vpe[r]),referenceId:Fpe(a),at:Number.isFinite(e)?e:Date.now()})}function ut(n){return`${n.message} -${w("\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}",n)}`}function rt(n,t,o){let i=kde(t,o);return n.lastMessageError=i,i}function Oo(n){n.lastMessageError=null}function Ha(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 Aa(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}}import{randomUUID as vde}from"node:crypto";import{createRequire as zx}from"node:module";var Pde=zx(import.meta.url),I_=new Set(["dingtalk-harness-connect-failed","dingtalk-runtime-prepare-failed","dingtalk-stream-client-load-failed","dingtalk-stream-listener-failed","dingtalk-stream-connect-failed"]),Gde=Object.freeze(["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy","ALL_PROXY","all_proxy"]),Fde=/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/,Lde=/^DT-CONN-[A-F0-9]{8}$/,MQ;function as(n,t=500){if(typeof n!="string")return null;let o=n.trim();return o?o.slice(0,t):null}function Nd(n){let t=as(n,80);return t&&Fde.test(t)?t:null}function _Q(n,t=Pde){try{let o=t.resolve(`${n}/package.json`);return{version:Nd(t(o)?.version),require:zx(o)}}catch{return null}}function Ude(){if(MQ)return MQ;let n=_Q("dingtalk-stream"),t=n?_Q("axios",n.require):null,o=t?_Q("https-proxy-agent",t.require):null,i=o?_Q("agent-base",o.require):null;return MQ=Object.freeze({dingtalkStream:n?.version??null,axios:t?.version??null,httpsProxyAgent:o?.version??null,agentBase:i?.version??null}),MQ}function Hde(n){let t=[],o=new Set,i=n;for(;i&&typeof i=="object"&&t.length<4&&!o.has(i);)o.add(i),t.push(i),i=i.cause;return t}function Vx(n){return Number.isInteger(n?.status)?n.status:Number.isInteger(n?.statusCode)?n.statusCode:Number.isInteger(n?.response?.status)?n.response.status:null}function Kde(n){let t=as(n?.providerCode??n?.response?.data?.code??n?.response?.data?.errorCode??n?.response?.data?.errcode,100);return t&&/^[A-Za-z0-9_.:-]+$/.test(t)?t:null}function xde(n,t){let o=as(n);if(!o)return null;for(let i of t){let e=as(i,2048);e&&e.length>=4&&(o=o.replaceAll(e,"\u2022\u2022\u2022\u2022"))}return o.replace(/(https?:\/\/)[^/\s@]+@/giu,"$1\u2022\u2022\u2022\u2022@").replace(/([?&](?:appsecret|client_secret|clientsecret|access_token|token|password)=)[^&\s]*/giu,"$1\u2022\u2022\u2022\u2022").replace(/((?:app|client|access)[_-]?secret|authorization|password|token)\s*[=:]\s*[^\s,;,。]+/giu,"$1=\u2022\u2022\u2022\u2022").replace(/\b[A-Za-z0-9_.-]*secret[A-Za-z0-9_.-]*\b/giu,"\u2022\u2022\u2022\u2022").slice(0,500)}function Yde(n){let t=n&&typeof n=="object"?n:{};return{dingtalkStream:Nd(t.dingtalkStream),axios:Nd(t.axios),httpsProxyAgent:Nd(t.httpsProxyAgent),agentBase:Nd(t.agentBase)}}function jde(n,t){return n.map(o=>{let i=as(o?.name,80),e=as(o?.code,100),a=Vx(o),A=Kde(o),r=xde(o?.message,t);return{...i?{name:i}:{},...e?{code:e}:{},...a!==null?{status:a}:{},...A?{providerCode:A}:{},...r?{message:r}:{}}})}function Jde(n){return Lde.test(n??"")?n:`DT-CONN-${vde().replaceAll("-","").slice(0,8).toUpperCase()}`}function bo(n,t,o,i){return Object.freeze({code:n,message:w(t),hint:w(o),referenceId:i})}function Rd(n,t){if(t?.name==="AbortError"||I_.has(t?.code))return t;let o=new Error(as(t?.message)??"DingTalk runtime startup failed",{cause:t});return o.name="DingtalkRuntimeStartError",o.code=I_.has(n)?n:"dingtalk-runtime-prepare-failed",o}function Wx(n,{fallbackMessage:t="\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",clientId:o,clientSecret:i,environment:e=process.env,dependencies:a=Ude(),nodeVersion:A=process.versions.node,referenceId:r}={}){let s=Jde(r),g=Hde(n),c=new Set(g.map(H=>as(H?.code,100)?.toUpperCase()).filter(Boolean)),I=g.map(H=>as(H?.message)?.toLowerCase()).filter(Boolean),d=g.map(Vx).filter(H=>H!==null),B=g.map(H=>H?.code).find(H=>I_.has(H))??null,f=Gde.filter(H=>as(e?.[H],4096)),Q=f.length>0,y=Yde(a),m=H=>I.some(F=>H.test(F)),T=H=>[...c].some(F=>H.test(F)),_=d.includes(407)||T(/(?:PROXY|ERR_INVALID_PROTOCOL)/u)||m(/proxy|tunneling socket/u),R;return B==="dingtalk-stream-connect-failed"&&Q&&y.agentBase==="6.0.0"?R=bo("stream-proxy-dependency-incompatible","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002",s):B==="dingtalk-harness-connect-failed"?R=bo("harness-unavailable","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002",s):B==="dingtalk-stream-client-load-failed"?R=bo("stream-sdk-load-failed","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002",s):d.some(H=>H===401||H===403)?R=bo("stream-credentials-rejected","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002",s):T(/(?:TIMEOUT|ETIMEDOUT)/u)||m(/timed? out|timeout/u)?R=bo("stream-handshake-timeout","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):T(/^(?:ENOTFOUND|EAI_AGAIN)$/u)?R=bo("stream-dns-failed","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):T(/(?:CERT|TLS|SSL|UNABLE_TO_VERIFY)/u)?R=bo("stream-tls-failed","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-connect-failed"&&_?R=bo("stream-proxy-failed","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-connect-failed"?R=bo("stream-connect-failed","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-listener-failed"?R=bo("stream-listener-failed","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002",s):B==="dingtalk-runtime-prepare-failed"?R=bo("runtime-prepare-failed","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002",s):R=bo("connection-failed",t,"\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002",s),Object.freeze({publicError:R,diagnostic:Object.freeze({referenceId:s,category:R.code,stage:B,runtime:{node:Nd(A)},proxy:{configured:Q,variables:f},dependencies:y,errors:jde(g,[o,i])})})}function l_(n,t){let o=new Error(n.message,{cause:t});return o.name="DingtalkPublicConnectionError",o.code=n.code,o.publicError=structuredClone(n),o}var Zx=new Set(["starting","pending","connecting"]),TQ=new Set(["connected","expired","failed","cancelled"]);function ta(n){return typeof n=="string"&&n.trim()?n.trim():null}function fn(n,t){return Object.freeze({code:n,message:t})}function eY(n){return typeof n?.now=="function"?n.now():n()}function zde(n){return new Date(eY(n)).toISOString()}function dc(){return new DOMException("DingTalk provisioning was cancelled","AbortError")}function PI(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 d_(n){if(!n)return{};let t=typeof n.status=="function"?n.status():n.status;return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function Xx(n,t){if(!n||t.connected===!1||t.ready===!1)return!1;let o=ta(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 AY(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=ta(n.staffId??n.senderStaffId??n.senderId);if(!t)return null;let o=ta(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:ta(n.displayName??n.senderName??n.senderNick)??w("\u9489\u9489\u7528\u6237"),requestedAt:ta(n.requestedAt)}:null}function $x(n){if(!Array.isArray(n.pendingSenders))return[];let t=new Set,o=[];for(let i of n.pendingSenders){let e=AY(i);!e||t.has(e.staffId)||(t.add(e.staffId),o.push(e))}return o}function Vde(n){return{requestId:n.requestId,displayName:n.displayName,senderIdMasked:s_(n.staffId),requestedAt:n.requestedAt}}function Wde(n){return{senderKey:n.senderKey,displayName:ta(n.displayName)??w("\u9489\u9489\u7528\u6237"),senderIdMasked:s_(n.staffId),approvedAt:ta(n.approvedAt)}}var JE=class{#e;#A;#t;#r;#l;#o;#i;#a=new Map;#n=new Map;#s=new Map;#d=null;#c=new Map;#g=0;#I=!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.#l=a,this.#o=A,this.#i=r}async initialize(){if(this.#I)return this.status();for(let t of this.#t.list()){let o=this.#a.get(t.botId);try{if(Xx(o,d_(o)))continue}catch{}await this.#y(t.botId,async()=>{let i=this.#t.get(t.botId);if(!i||this.#I)return;let e=await this.#Q(i.secretRef);if(!e){this.#n.set(i.botId,fn("missing-secret",w("\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002"))),this.#h();return}try{await this.#C(i,e),this.#n.delete(i.botId)}catch(a){this.#B({config:i,clientSecret:e,error:a,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${i.botId} failed to initialize`})}this.#h()})}return this.status()}async startProvisioning({signal:t}={}){if(this.#I)throw new Error("dsh-dingtalk controller is closed");this.#d&&await this.cancelProvisioning(this.#d);let o={id:qde(),state:"starting",controller:new AbortController,deviceCode:null,verificationUrl:null,expiresAt:null,pollIntervalMs:null,pollTask:null,botId:null,alreadyConnected:!1,error:null};this.#s.set(o.id,o),this.#d=o.id,this.#h();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.#m(o),o.deviceCode=ta(e.deviceCode),o.verificationUrl=ta(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.#h(),PI(o)}catch(e){if(o.controller.signal.aborted||e?.name==="AbortError"?(o.state="cancelled",o.error=fn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))):(o.state="failed",o.error=fn("qr-start-failed",w("\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#d===o.id&&(this.#d=null),this.#h(),o.state==="failed")throw e;return PI(o)}finally{t?.removeEventListener("abort",i)}}async bindCredentials({clientId:t,clientSecret:o}={}){if(this.#I)throw new Error("dsh-dingtalk controller is closed");let i=ta(t),e=ta(o);if(!i||!e)throw new TypeError("DingTalk Client ID and Client Secret are required");if(this.#d&&await this.cancelProvisioning(this.#d),this.#I)throw new Error("dsh-dingtalk controller is closed");let a=OQ(i);return await this.#y(a.botId,async()=>{if(this.#I)throw dc();let A=this.#t.getByClientId(i),r=await this.#A.resolve(a.secretRef).catch(()=>{});if(this.#I)throw dc();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.#S(a.secretRef,r),g}try{await this.#C(s,e),this.#n.delete(a.botId)}catch(g){this.#B({config:s,clientSecret:e,error:g,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`credential-bound bot ${a.botId} is not ready`})}this.#h()}),this.status()}async registrationStatus(t){let o=this.#s.get(t);if(!o)return null;if(TQ.has(o.state)||o.state==="starting")return PI(o);if(eY(this.#i)>=o.expiresAt)return o.state="expired",o.error=fn("expired",w("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#d===o.id&&(this.#d=null),this.#h(),PI(o);if(!o.pollTask){let i=this.#p(o).finally(()=>{o.pollTask===i&&(o.pollTask=null)});o.pollTask=i}return await o.pollTask,PI(o)}async cancelProvisioning(t){let o=this.#s.get(t);return o?(TQ.has(o.state)||(o.controller.abort(),await o.pollTask?.catch(()=>{}),TQ.has(o.state)||(o.state="cancelled"),o.error??=fn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))),this.#d===o.id&&(this.#d=null),this.#h(),PI(o)):null}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#y(t,async()=>{let i=await this.#Q(o.secretRef);if(!i)throw new Error("The DingTalk client secret is missing");try{await this.#C(o,i),this.#n.delete(t)}catch(e){let a=this.#B({config:o,clientSecret:i,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${t} failed to reconnect`});throw l_(a,e)}finally{this.#h()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return this.#y(t,async()=>{let i=this.#a.get(t);if(!i?.status?.ready||typeof i.sendConnectionTest!="function")throw fr(w("\u9489\u9489\u673A\u5668\u4EBA"));return i.sendConnectionTest(Ua(w("\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09",{clientId:g_(o.clientId)})))})}async sendProactiveText(t,o,i,e={}){if(!this.#t.get(t))throw new Error("Unknown DingTalk bot");return this.#y(t,async()=>{let A=this.#a.get(t);if(!A?.status?.ready||typeof A.sendProactiveText!="function"){let r=new Error(w("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"));throw r.code="bot-not-connected",r}return A.sendProactiveText(o,i,e)})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#y(t,async()=>{let i=await this.#A.resolve(o.secretRef).catch(()=>{});await this.#f(t);try{await this.#A.unset(o.secretRef),await this.#t.remove(t)}catch(e){throw ta(i?.value)&&(await this.#A.set(o.secretRef,i.value).catch(()=>{}),await this.#C(o,i.value).catch(()=>{})),new Error("Unable to remove the DingTalk bot safely.",{cause:e})}try{await this.#l({botId:t,config:o})}catch{this.#o.warn?.(`[dsh-dingtalk] bot ${t} state cleanup failed`)}this.#n.delete(t),this.#h()}),this.status()}async approveSender(t,o){let i=this.#t.get(t);if(!i)throw new Error("Unknown DingTalk bot");let e=this.#a.get(t),a=typeof e?.pendingSender=="function"?AY(e.pendingSender(o)):null,A=$x(d_(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:Kx(),staffId:r.staffId,displayName:r.displayName,approvedAt:zde(this.#i)}]};return await this.#u(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.#u(i,{...i,approvedSenders:a}),this.status()}status(){let t=this.#t.list().map(e=>{let a=this.#a.get(e.botId),A={};try{A=d_(a)}catch{A={state:"error"}}let r=Xx(a,A),s=this.#n.get(e.botId),g=r?"connected":s?"error":"offline",c=new Set(e.approvedSenders.map(d=>d.staffId)),I=$x(A).filter(d=>!c.has(d.staffId)).map(Vde);return{botId:e.botId,state:g,connected:r,configured:!0,bot:{name:w("\u9489\u9489\u673A\u5668\u4EBA"),clientIdMasked:g_(e.clientId)},health:{status:r?"healthy":s?"error":"offline",summary:r?w("\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38"):s?.message??w("\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:Aa(A.lastMessageError),senders:{pending:I,approved:e.approvedSenders.map(Wde)},error:s?structuredClone(s):null}}),o=t.filter(e=>e.connected).length,i=this.#d?this.#s.get(this.#d):null;return{schemaVersion:1,revision:this.#g,state:i&&Zx.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&&Zx.has(i.state)?{provisioning:PI(i)}:{}}}async close(){this.#I||(this.#I=!0,this.#d&&await this.cancelProvisioning(this.#d),await Promise.allSettled([...this.#a.keys()].map(t=>this.#f(t))),await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#a.keys()].map(t=>this.#f(t))))}async#p(t){try{this.#m(t);let o=await this.#e.poll({deviceCode:t.deviceCode,signal:t.controller.signal});this.#m(t);let i=ta(o.status)?.toUpperCase();if(i==="WAITING")t.state="pending",t.error=null;else if(i==="SUCCESS"){let e=ta(o.clientId),a=ta(o.clientSecret);if(!e||!a)throw new Error("DingTalk returned incomplete credentials");t.state="connecting",t.error=null,this.#h();let A=await this.#E(t,{clientId:e,clientSecret:a});t.botId=A.botId,t.alreadyConnected=A.alreadyConnected,t.state="connected",this.#d===t.id&&(this.#d=null)}else i==="EXPIRED"?(t.state="expired",t.error=fn("expired",w("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#d===t.id&&(this.#d=null)):i==="FAIL"?(t.state="failed",t.error=fn("authorization-failed",w("\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002")),this.#d===t.id&&(this.#d=null)):(t.state="pending",t.error=fn("poll-pending",w("\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=fn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")),this.#d===t.id&&(this.#d=null)):t.state==="connecting"?(t.state="failed",t.error=fn("activation-failed",w("\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002")),this.#d===t.id&&(this.#d=null),this.#o.error?.("[dsh-dingtalk] bot activation failed")):(t.state="pending",t.error=fn("poll-failed",w("\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}finally{this.#h(),this.#b()}}async#E(t,{clientId:o,clientSecret:i}){let e=OQ(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.#y(e.botId,async()=>{let s=async()=>{await this.#f(e.botId),a?await this.#t.save(a).catch(()=>{}):this.#t.get(e.botId)&&await this.#t.remove(e.botId).catch(()=>null)&&await this.#l({botId:e.botId,config:r}).catch(c=>{this.#o.warn?.("[dsh-dingtalk] failed to clean up cancelled bot state:",c)}),await this.#S(e.secretRef,A),a&&ta(A?.value)&&await this.#C(a,A.value).catch(()=>{})};await this.#A.set(e.secretRef,i);try{this.#m(t),await this.#t.save(r),this.#m(t)}catch(g){throw await s(),g}try{await this.#C(r,i),this.#m(t),this.#n.delete(e.botId)}catch(g){if(t.controller.signal.aborted||this.#d!==t.id)throw await s(),dc();this.#B({config:r,clientSecret:i,error:g,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`authorized bot ${e.botId} is not ready`})}return{botId:e.botId,alreadyConnected:!!a}})}async#u(t,o){return this.#y(t.botId,async()=>{let i=await this.#Q(t.secretRef);if(!i)throw new Error("The DingTalk client secret is missing");await this.#t.save(o);try{await this.#C(o,i),this.#n.delete(t.botId)}catch(e){await this.#t.save(t).catch(()=>{}),await this.#C(t,i).catch(()=>{});let a=this.#B({config:t,clientSecret:i,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${t.botId} failed to apply updated settings`});throw l_(a,e)}finally{this.#h()}})}async#C(t,o){if(this.#I||(await this.#f(t.botId),this.#I))throw dc();let i;try{i=await this.#r({botId:t.botId,config:structuredClone(t),clientSecret:o})}catch(e){throw Rd("dingtalk-runtime-prepare-failed",e)}if(!i||typeof i.start!="function"||typeof i.stop!="function")throw Rd("dingtalk-runtime-prepare-failed",new TypeError("createRuntime returned an invalid DingTalk runtime"));if(this.#I)throw await i.stop().catch(()=>{}),dc();this.#a.set(t.botId,i);try{if(await i.start(),this.#I)throw await i.stop().catch(()=>{}),dc()}catch(e){throw this.#a.get(t.botId)===i&&this.#a.delete(t.botId),await i.stop().catch(()=>{}),Rd("dingtalk-stream-connect-failed",e)}}#B({config:t,clientSecret:o,error:i,fallbackMessage:e,context:a}){let A=Wx(i,{fallbackMessage:e,clientId:t.clientId,clientSecret:o});return this.#n.set(t.botId,A.publicError),this.#o.error?.(`[dsh-dingtalk] ${a} [${A.publicError.referenceId}]`,A.diagnostic),A.publicError}async#f(t){let o=this.#a.get(t);this.#a.delete(t),await o?.stop().catch(()=>{this.#o.warn?.(`[dsh-dingtalk] bot ${t} failed to stop cleanly`)})}async#Q(t){let o=await this.#A.resolve(t).catch(()=>{});return ta(o?.value)}async#S(t,o){try{ta(o?.value)?await this.#A.set(t,o.value):await this.#A.unset(t)}catch{this.#o.error?.(`[dsh-dingtalk] failed to restore credential ${t}`)}}#m(t){if(t.controller.signal.aborted||this.#d!==t.id)throw dc()}#y(t,o){if(this.#I)return Promise.reject(new Error("dsh-dingtalk controller is closed"));let a=(this.#c.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(t)===a&&this.#c.delete(t)});return this.#c.set(t,a),a}#b(){for(let[t,o]of this.#s)t!==this.#d&&TQ.has(o.state)&&this.#s.size>16&&this.#s.delete(t)}#h(){this.#g+=1}};import{randomUUID as qE}from"node:crypto";import{extname as npe}from"node:path";var rY=5*1024*1024,Zde=20,Xde=20*1024*1024,$de="\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002",aY="\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B\u4E0D\u652F\u6301\u76F4\u63A5\u63A5\u6536\u56FE\u7247\u8F93\u5165\u3002\u7528\u6237\u53D1\u9001\u7684\u56FE\u7247\u5DF2\u4F5C\u4E3A\u6587\u4EF6\u4FDD\u5B58\u5230\u5DE5\u4F5C\u533A\uFF08\u89C1\u4E0B\u65B9\u6587\u4EF6\u6E05\u5355\uFF09\u3002\u8BF7\u4F7F\u7528\u53EF\u7528\u5DE5\u5177\u5206\u6790\u8FD9\u4E9B\u56FE\u7247\u6587\u4EF6\u540E\u56DE\u7B54\uFF0C\u4F8B\u5982 run_code \u6216 pwsh \u8BFB\u53D6\u5B57\u8282\u3001\u89E3\u6790\u5143\u6570\u636E\u3001\u8C03\u7528\u56FE\u50CF\u5904\u7406\u6216 OCR \u5E93\uFF1B\u4E0D\u8981\u5047\u8BBE\u81EA\u5DF1\u80FD\u76F4\u63A5\u770B\u5230\u56FE\u7247\u5185\u5BB9\u3002",ft=class extends Error{constructor(t,o,i,e={}){super(o,e),this.name="ImagePromptError",this.code=t,this.userMessage=i}},tY=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 epe(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}async function p_(n){try{await n?.body?.cancel?.()}catch{}}async function Mo(n,{fetchImpl:t=fetch,headers:o,signal:i,maxBytes:e=rY,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:epe(i,a),redirect:"manual"});if(Number.isInteger(s?.status)&&s.status>=300&&s.status<400)throw await p_(s),new ft("image-redirect-blocked",`Image download redirect was blocked (HTTP ${s.status})`,w("\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 p_(s),new ft("image-http-error",`Image download failed with HTTP ${s?.status??"unknown"}`,w("\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 p_(s),new ft("image-too-large",`Image response declares ${g} bytes; the limit is ${e}`,w("\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 ft("image-too-large",`Image response exceeded ${e} bytes`,w("\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 ft("image-too-large",`Image response contains ${c.length} bytes; the limit is ${e}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));return c}function Ape(n){return typeof n=="string"?n.trim():""}function iY(n){return Array.isArray(n?.images)?n.images.filter(Boolean):[]}function h_(n){return typeof n!="string"?void 0:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim().slice(0,255)||void 0}function tpe(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 rpe(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 Nt(n){return iY(n).length>0}async function E_(n,{signal:t,maxImageBytes:o=rY,maxImages:i=Zde,maxTotalImageBytes:e=Xde}={}){let a=iY(n);if(a.length>i)throw new ft("too-many-images",`Image message contains ${a.length} images; the limit is ${i}`,w("\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002",{maxImages:i}));let A=Ape(n?.content),r=[],s=0;A?r.push({type:"text",text:A}):a.length>0&&r.push({type:"text",text:w($de)});for(let[g,c]of a.entries()){if(t?.throwIfAborted(),Number.isFinite(c?.size)&&c.size>o)throw new ft("image-too-large",`Image ${g+1} declares ${c.size} bytes; the limit is ${o}`,w("\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 ft("images-too-large",`Images declare more than ${e} bytes in total`,w("\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 ft?f:new ft("image-download-failed",`Unable to download image ${g+1}: ${f?.message??String(f)}`,w("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let d=rpe(I);if(!d?.data.length)throw new ft("invalid-image-data",`Image ${g+1} returned no data`,w("\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002"));if(d.data.length>o)throw new ft("image-too-large",`Image ${g+1} contains ${d.data.length} bytes; the limit is ${o}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s+d.data.length>e)throw new ft("images-too-large",`Images contain more than ${e} bytes in total`,w("\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=tpe(d.data);if(!B)throw new ft("unsupported-image-type",`Image ${g+1} is not JPEG, PNG, GIF, or WebP`,w("\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"),...h_(d.name??c?.name)?{name:h_(d.name??c?.name)}:{}})}return r}function ro(n){if(n instanceof ft)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(tY,t)?w(tY[t]):null;return o?{code:"attachment-error",reason:t,userMessage:o}:null}function _o(n){return ro(n)?.userMessage??null}var ape=new Map([["image/png",".png"],["image/jpeg",".jpg"],["image/gif",".gif"],["image/webp",".webp"]]),ipe=/\.(?:png|jpe?g|gif|webp)$/i;function ope(n,t,o){let i=ape.get(t)??".img",e=h_(n);return e&&ipe.test(e)?e:`${e??`image-${o+1}`}${i}`}function oY(n){return Array.isArray(n)?n.filter(t=>t?.type==="image").map((t,o)=>({name:ope(t.name,t.mediaType,o),...typeof t.mediaType=="string"&&t.mediaType.trim()?{mediaType:t.mediaType.trim()}:{},data:Buffer.from(typeof t.data=="string"?t.data:"","base64")})):[]}function nY(n){return Array.isArray(n)?n.filter(t=>t?.type!=="image"):n}function sY(n){return n?.code==="attachment-error"&&n?.details?.reason==="MODEL_DOES_NOT_SUPPORT_IMAGES"}var gY="https://oapi.dingtalk.com/",spe="https://api.dingtalk.com/",gpe="DING_DWS_CLAW",cpe="02fcf2f4-5e02-4a85-b672-46d1f715543e.schema",GI="\u{1F914}\u601D\u8003\u4E2D",lY="\u2705\u5DF2\u5B8C\u6210",dY="\u274C\u5904\u7406\u5931\u8D25",Ipe=15e3,lpe=5e3,dpe="2659900",ppe="im_bg_1",hpe=new Set(["WAITING","SUCCESS","FAIL","EXPIRED"]),It=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 WE(n){let t=n==null?null:String(n).trim();return t&&/^-?[A-Za-z0-9_.:-]{1,160}$/.test(t)?t:void 0}function pY(n,t){return Number.isInteger(t?.status)&&(n.status=t.status),t?.providerCode!==void 0&&(n.providerCode=t.providerCode),n}function zE(n,{fallback:t="artifact-provider-rejected"}={}){if(n?.code?.startsWith?.("artifact-"))return n;let o=Number(n?.status),i=WE(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,pY(r,n)}function Epe(n){let t=new Error("DingTalk file delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",pY(t,n)}function NQ(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 WE(n[t])??"rejected";return null}function upe(n,t){if(t?.aborted)throw is(t);let o=Number(n?.status);return n?.code==="network-error"||n?.code==="timeout"||n?.code==="invalid-response"||o>=500&&o<600?Epe(n):zE(n)}function Cpe(n){let t;try{t=new URL(n)}catch(o){throw new It("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 cY(n){let t=n.toLowerCase().replace(/\.$/,"");return t==="dingtalk.com"||t.endsWith(".dingtalk.com")}function f_(n,{label:t,requireSubdomain:o=!0}={}){let i;try{i=new URL(n)}catch{throw new It("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"&&cY(e):cY(e);if(i.protocol!=="https:"||!a||i.port&&i.port!=="443")throw new It("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);if(i.username||i.password)throw new It("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);return i}function pc(n){let t=WA(n);if(!t)throw new It("invalid-session-webhook","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u53EF\u7528\u7684\u56DE\u590D\u5730\u5740\u3002");let o=f_(t,{label:"\u9489\u9489\u56DE\u590D",requireSubdomain:!1});return o.hash="",o.toString()}function hY(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(is(t));return}let e=setTimeout(()=>{t?.removeEventListener("abort",a),o()},n),a=()=>{clearTimeout(e),i(is(t))};t?.addEventListener("abort",a,{once:!0})})}async function Qn(n,t,{body:o,signal:i,timeoutMs:e=Ipe,headers:a={},method:A="POST",action:r="request"}={}){let s=new AbortController,g=!1,c=()=>s.abort(i?.reason);if(i?.aborted)throw is(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=WE(f?.code??f?.errcode)}catch{}throw new It("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 It("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:B})}}catch(d){throw i?.aborted?is(i):g?new It("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:d}):d instanceof It?d:new It("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 fpe(n,t,{body:o,signal:i,timeoutMs:e=6e4}={}){let a=new AbortController,A=!1,r=()=>a.abort(i?.reason);if(i?.aborted)throw is(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 It("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${g.status}\uFF09\u3002`,{status:g.status,providerCode:WE(c?.code??c?.errcode)});if(I)throw new It("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?is(i):A?new It("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:g}):g instanceof It?g:new It("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 IY(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 Qpe(n){return npe(n).slice(1).toLowerCase()}function ype(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,atUserIds:n.atUserIds}}throw new TypeError("DingTalk AI Card target is invalid")}function VE(n,t){let o=e=>String(e).replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a]),i=t?.type==="group"?Object.entries(t.atUserIds??{}).map(([e,a])=>`${o(a)}`).join(" "):"";return Spe(i?`${i} +${w("\u9519\u8BEF\u7801\uFF1A{code}\uFF1B\u53C2\u8003\u53F7\uFF1A{referenceId}",n)}`}function rt(n,t,o){let a=Upe(t,o);return n.lastMessageError=a,a}function Mo(n){n.lastMessageError=null}function Hi(n,{uncertain:t=!0}={}){let o=new Error("Channel message delivery failed",{cause:n}),a=Number(n?.status??n?.httpStatus);return o.code=a===401||a===403?"channel-permission":a===429?"channel-rate-limit":t?"channel-delivery-uncertain":"channel-delivery-failed",Number.isInteger(a)&&(o.status=a),o}function ti(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}}import{randomUUID as Hpe}from"node:crypto";import{createRequire as $x}from"node:module";var Kpe=$x(import.meta.url),E_=new Set(["dingtalk-harness-connect-failed","dingtalk-runtime-prepare-failed","dingtalk-stream-client-load-failed","dingtalk-stream-listener-failed","dingtalk-stream-connect-failed"]),xpe=Object.freeze(["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy","ALL_PROXY","all_proxy"]),Ype=/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/,jpe=/^DT-CONN-[A-F0-9]{8}$/,kQ;function ns(n,t=500){if(typeof n!="string")return null;let o=n.trim();return o?o.slice(0,t):null}function kp(n){let t=ns(n,80);return t&&Ype.test(t)?t:null}function vQ(n,t=Kpe){try{let o=t.resolve(`${n}/package.json`);return{version:kp(t(o)?.version),require:$x(o)}}catch{return null}}function Jpe(){if(kQ)return kQ;let n=vQ("dingtalk-stream"),t=n?vQ("axios",n.require):null,o=t?vQ("https-proxy-agent",t.require):null,a=o?vQ("agent-base",o.require):null;return kQ=Object.freeze({dingtalkStream:n?.version??null,axios:t?.version??null,httpsProxyAgent:o?.version??null,agentBase:a?.version??null}),kQ}function qpe(n){let t=[],o=new Set,a=n;for(;a&&typeof a=="object"&&t.length<4&&!o.has(a);)o.add(a),t.push(a),a=a.cause;return t}function eY(n){return Number.isInteger(n?.status)?n.status:Number.isInteger(n?.statusCode)?n.statusCode:Number.isInteger(n?.response?.status)?n.response.status:null}function zpe(n){let t=ns(n?.providerCode??n?.response?.data?.code??n?.response?.data?.errorCode??n?.response?.data?.errcode,100);return t&&/^[A-Za-z0-9_.:-]+$/.test(t)?t:null}function Vpe(n,t){let o=ns(n);if(!o)return null;for(let a of t){let e=ns(a,2048);e&&e.length>=4&&(o=o.replaceAll(e,"\u2022\u2022\u2022\u2022"))}return o.replace(/(https?:\/\/)[^/\s@]+@/giu,"$1\u2022\u2022\u2022\u2022@").replace(/([?&](?:appsecret|client_secret|clientsecret|access_token|token|password)=)[^&\s]*/giu,"$1\u2022\u2022\u2022\u2022").replace(/((?:app|client|access)[_-]?secret|authorization|password|token)\s*[=:]\s*[^\s,;,。]+/giu,"$1=\u2022\u2022\u2022\u2022").replace(/\b[A-Za-z0-9_.-]*secret[A-Za-z0-9_.-]*\b/giu,"\u2022\u2022\u2022\u2022").slice(0,500)}function Wpe(n){let t=n&&typeof n=="object"?n:{};return{dingtalkStream:kp(t.dingtalkStream),axios:kp(t.axios),httpsProxyAgent:kp(t.httpsProxyAgent),agentBase:kp(t.agentBase)}}function Zpe(n,t){return n.map(o=>{let a=ns(o?.name,80),e=ns(o?.code,100),i=eY(o),A=zpe(o),r=Vpe(o?.message,t);return{...a?{name:a}:{},...e?{code:e}:{},...i!==null?{status:i}:{},...A?{providerCode:A}:{},...r?{message:r}:{}}})}function Xpe(n){return jpe.test(n??"")?n:`DT-CONN-${Hpe().replaceAll("-","").slice(0,8).toUpperCase()}`}function _o(n,t,o,a){return Object.freeze({code:n,message:w(t),hint:w(o),referenceId:a})}function vp(n,t){if(t?.name==="AbortError"||E_.has(t?.code))return t;let o=new Error(ns(t?.message)??"DingTalk runtime startup failed",{cause:t});return o.name="DingtalkRuntimeStartError",o.code=E_.has(n)?n:"dingtalk-runtime-prepare-failed",o}function AY(n,{fallbackMessage:t="\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",clientId:o,clientSecret:a,environment:e=process.env,dependencies:i=Jpe(),nodeVersion:A=process.versions.node,referenceId:r}={}){let s=Xpe(r),g=qpe(n),c=new Set(g.map(L=>ns(L?.code,100)?.toUpperCase()).filter(Boolean)),I=g.map(L=>ns(L?.message)?.toLowerCase()).filter(Boolean),p=g.map(eY).filter(L=>L!==null),B=g.map(L=>L?.code).find(L=>E_.has(L))??null,f=xpe.filter(L=>ns(e?.[L],4096)),Q=f.length>0,y=Wpe(i),m=L=>I.some(U=>L.test(U)),T=L=>[...c].some(U=>L.test(U)),_=p.includes(407)||T(/(?:PROXY|ERR_INVALID_PROTOCOL)/u)||m(/proxy|tunneling socket/u),R;return B==="dingtalk-stream-connect-failed"&&Q&&y.agentBase==="6.0.0"?R=_o("stream-proxy-dependency-incompatible","\u9489\u9489 Stream \u8FDE\u63A5\u5931\u8D25\uFF1A\u68C0\u6D4B\u5230\u4EE3\u7406\u4F9D\u8D56 agent-base 6.0.0\u3002","\u8BF7\u5C06 DSH profile \u4E2D\u7684 agent-base@6 \u56FA\u5B9A\u4E3A 6.0.2 \u540E\u91CD\u65B0\u5B89\u88C5\u4F9D\u8D56\uFF0C\u6216\u5347\u7EA7 pnpm \u540E\u91CD\u65B0\u89E3\u6790 lockfile\u3002",s):B==="dingtalk-harness-connect-failed"?R=_o("harness-unavailable","\u63D2\u4EF6\u65E0\u6CD5\u8FDE\u63A5\u672C\u673A Harness\u3002","\u8BF7\u786E\u8BA4 dsh web \u6B63\u5E38\u8FD0\u884C\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002",s):B==="dingtalk-stream-client-load-failed"?R=_o("stream-sdk-load-failed","\u9489\u9489 Stream SDK \u52A0\u8F7D\u5931\u8D25\u3002","\u8BF7\u91CD\u65B0\u5B89\u88C5\u5F53\u524D DSH profile \u7684\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u67E5\u770B dsh web \u65E5\u5FD7\u4E2D\u76F8\u540C\u53C2\u8003\u53F7\u5BF9\u5E94\u7684\u8BCA\u65AD\u4FE1\u606F\u3002",s):p.some(L=>L===401||L===403)?R=_o("stream-credentials-rejected","\u9489\u9489\u62D2\u7EDD\u4E86\u5F53\u524D\u5E94\u7528\u51ED\u636E\u3002","\u8BF7\u6838\u5BF9 Client ID\u3001Client Secret \u548C\u673A\u5668\u4EBA\u6743\u9650\u540E\u91CD\u8BD5\u3002",s):T(/(?:TIMEOUT|ETIMEDOUT)/u)||m(/timed? out|timeout/u)?R=_o("stream-handshake-timeout","\u8FDE\u63A5\u9489\u9489 Stream \u8D85\u65F6\u3002","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u3001\u4EE3\u7406\u548C\u9632\u706B\u5899\u540E\u91CD\u8BD5\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):T(/^(?:ENOTFOUND|EAI_AGAIN)$/u)?R=_o("stream-dns-failed","\u65E0\u6CD5\u89E3\u6790\u9489\u9489\u670D\u52A1\u5730\u5740\u3002","\u8BF7\u68C0\u67E5 DNS\u3001\u7F51\u7EDC\u548C\u4EE3\u7406\u8BBE\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):T(/(?:CERT|TLS|SSL|UNABLE_TO_VERIFY)/u)?R=_o("stream-tls-failed","\u9489\u9489 Stream \u7684 TLS \u8FDE\u63A5\u6821\u9A8C\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u8BC1\u4E66\u3001\u4EE3\u7406\u8BC1\u4E66\u6216 HTTPS \u4E2D\u95F4\u4EE3\u7406\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-connect-failed"&&_?R=_o("stream-proxy-failed","\u9489\u9489 Stream \u65E0\u6CD5\u901A\u8FC7\u5F53\u524D\u4EE3\u7406\u5EFA\u7ACB\u8FDE\u63A5\u3002","\u8BF7\u68C0\u67E5 HTTP_PROXY\u3001HTTPS_PROXY\u3001NO_PROXY \u548C\u4EE3\u7406\u8FDE\u901A\u6027\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-connect-failed"?R=_o("stream-connect-failed","\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u5EFA\u7ACB\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u673A\u5668\u4EBA\u914D\u7F6E\uFF1B\u8BE6\u7EC6\u539F\u56E0\u53EF\u5728 dsh web \u65E5\u5FD7\u4E2D\u6309\u53C2\u8003\u53F7\u67E5\u627E\u3002",s):B==="dingtalk-stream-listener-failed"?R=_o("stream-listener-failed","\u9489\u9489 Stream \u6D88\u606F\u76D1\u542C\u521D\u59CB\u5316\u5931\u8D25\u3002","\u8BF7\u786E\u8BA4 dsh-im \u4E0E dingtalk-stream \u7248\u672C\u517C\u5BB9\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002",s):B==="dingtalk-runtime-prepare-failed"?R=_o("runtime-prepare-failed","\u9489\u9489\u673A\u5668\u4EBA\u8FD0\u884C\u73AF\u5883\u521D\u59CB\u5316\u5931\u8D25\u3002","\u8BF7\u68C0\u67E5 DSH \u6570\u636E\u76EE\u5F55\u3001\u5DE5\u4F5C\u533A\u548C\u63D2\u4EF6\u4F9D\u8D56\uFF0C\u5E76\u6309\u53C2\u8003\u53F7\u67E5\u770B dsh web \u65E5\u5FD7\u3002",s):R=_o("connection-failed",t,"\u8BF7\u5728 dsh web \u65E5\u5FD7\u4E2D\u67E5\u627E\u76F8\u540C\u53C2\u8003\u53F7\uFF0C\u4EE5\u83B7\u53D6\u5DF2\u8131\u654F\u7684\u5177\u4F53\u9519\u8BEF\u3002",s),Object.freeze({publicError:R,diagnostic:Object.freeze({referenceId:s,category:R.code,stage:B,runtime:{node:kp(A)},proxy:{configured:Q,variables:f},dependencies:y,errors:Zpe(g,[o,a])})})}function u_(n,t){let o=new Error(n.message,{cause:t});return o.name="DingtalkPublicConnectionError",o.code=n.code,o.publicError=structuredClone(n),o}var tY=new Set(["starting","pending","connecting"]),PQ=new Set(["connected","expired","failed","cancelled"]);function ri(n){return typeof n=="string"&&n.trim()?n.trim():null}function yn(n,t){return Object.freeze({code:n,message:t})}function aY(n){return typeof n?.now=="function"?n.now():n()}function ede(n){return new Date(aY(n)).toISOString()}function uc(){return new DOMException("DingTalk provisioning was cancelled","AbortError")}function UI(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 C_(n){if(!n)return{};let t=typeof n.status=="function"?n.status():n.status;return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function rY(n,t){if(!n||t.connected===!1||t.ready===!1)return!1;let o=ri(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 oY(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=ri(n.staffId??n.senderStaffId??n.senderId);if(!t)return null;let o=ri(n.requestId),a=o&&/^ding_sender_[A-Za-z0-9_-]{1,100}$/.test(o)&&!o.includes(t)?o:null;return a?{requestId:a,staffId:t,displayName:ri(n.displayName??n.senderName??n.senderNick)??w("\u9489\u9489\u7528\u6237"),requestedAt:ri(n.requestedAt)}:null}function iY(n){if(!Array.isArray(n.pendingSenders))return[];let t=new Set,o=[];for(let a of n.pendingSenders){let e=oY(a);!e||t.has(e.staffId)||(t.add(e.staffId),o.push(e))}return o}function Ade(n){return{requestId:n.requestId,displayName:n.displayName,senderIdMasked:p_(n.staffId),requestedAt:n.requestedAt}}function tde(n){return{senderKey:n.senderKey,displayName:ri(n.displayName)??w("\u9489\u9489\u7528\u6237"),senderIdMasked:p_(n.staffId),approvedAt:ri(n.approvedAt)}}var XE=class{#e;#A;#t;#r;#I;#o;#c;#i=new Map;#a=new Map;#s=new Map;#p=null;#g=new Map;#l=0;#n=!1;constructor({deviceAuth:t,credentials:o,configStore:a,createRuntime:e,deleteState:i=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(!a||typeof a.list!="function"||typeof a.get!="function"||typeof a.getByClientId!="function"||typeof a.save!="function"||typeof a.remove!="function")throw new TypeError("DingtalkController requires a loaded config store");if(typeof e!="function")throw new TypeError("createRuntime is required");if(typeof i!="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=a,this.#r=e,this.#I=i,this.#o=A,this.#c=r}async initialize(){if(this.#n)return this.status();for(let t of this.#t.list()){let o=this.#i.get(t.botId);try{if(rY(o,C_(o)))continue}catch{}await this.#y(t.botId,async()=>{let a=this.#t.get(t.botId);if(!a||this.#n)return;let e=await this.#m(a.secretRef);if(!e){this.#a.set(a.botId,yn("missing-secret",w("\u9489\u9489\u673A\u5668\u4EBA\u51ED\u636E\u7F3A\u5931\uFF0C\u8BF7\u79FB\u9664\u540E\u91CD\u65B0\u626B\u7801\u3002"))),this.#E();return}try{await this.#u(a,e),this.#a.delete(a.botId)}catch(i){this.#B({config:a,clientSecret:e,error:i,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${a.botId} failed to initialize`})}this.#E()})}return this.status()}async startProvisioning({signal:t}={}){if(this.#n)throw new Error("dsh-dingtalk controller is closed");this.#p&&await this.cancelProvisioning(this.#p);let o={id:$pe(),state:"starting",controller:new AbortController,deviceCode:null,verificationUrl:null,expiresAt:null,pollIntervalMs:null,pollTask:null,botId:null,alreadyConnected:!1,error:null};this.#s.set(o.id,o),this.#p=o.id,this.#E();let a=()=>o.controller.abort(t?.reason);t?.aborted?a():t?.addEventListener("abort",a,{once:!0});try{let e=await this.#e.start({signal:o.controller.signal});if(this.#Q(o),o.deviceCode=ri(e.deviceCode),o.verificationUrl=ri(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.#E(),UI(o)}catch(e){if(o.controller.signal.aborted||e?.name==="AbortError"?(o.state="cancelled",o.error=yn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))):(o.state="failed",o.error=yn("qr-start-failed",w("\u65E0\u6CD5\u751F\u6210\u9489\u9489\u4E8C\u7EF4\u7801\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))),this.#p===o.id&&(this.#p=null),this.#E(),o.state==="failed")throw e;return UI(o)}finally{t?.removeEventListener("abort",a)}}async bindCredentials({clientId:t,clientSecret:o}={}){if(this.#n)throw new Error("dsh-dingtalk controller is closed");let a=ri(t),e=ri(o);if(!a||!e)throw new TypeError("DingTalk Client ID and Client Secret are required");if(this.#p&&await this.cancelProvisioning(this.#p),this.#n)throw new Error("dsh-dingtalk controller is closed");let i=NQ(a);return await this.#y(i.botId,async()=>{if(this.#n)throw uc();let A=this.#t.getByClientId(a),r=await this.#A.resolve(i.secretRef).catch(()=>{});if(this.#n)throw uc();let s={botId:i.botId,clientId:a,secretRef:i.secretRef,approvedSenders:A?.approvedSenders??[]};await this.#A.set(i.secretRef,e);try{await this.#t.save(s)}catch(g){throw await this.#w(i.secretRef,r),g}try{await this.#u(s,e),this.#a.delete(i.botId)}catch(g){this.#B({config:s,clientSecret:e,error:g,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`credential-bound bot ${i.botId} is not ready`})}this.#E()}),this.status()}async registrationStatus(t){let o=this.#s.get(t);if(!o)return null;if(PQ.has(o.state)||o.state==="starting")return UI(o);if(aY(this.#c)>=o.expiresAt)return o.state="expired",o.error=yn("expired",w("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#p===o.id&&(this.#p=null),this.#E(),UI(o);if(!o.pollTask){let a=this.#h(o).finally(()=>{o.pollTask===a&&(o.pollTask=null)});o.pollTask=a}return await o.pollTask,UI(o)}async cancelProvisioning(t){let o=this.#s.get(t);return o?(PQ.has(o.state)||(o.controller.abort(),await o.pollTask?.catch(()=>{}),PQ.has(o.state)||(o.state="cancelled"),o.error??=yn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002"))),this.#p===o.id&&(this.#p=null),this.#E(),UI(o)):null}async reconnectBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#y(t,async()=>{let a=await this.#m(o.secretRef);if(!a)throw new Error("The DingTalk client secret is missing");try{await this.#u(o,a),this.#a.delete(t)}catch(e){let i=this.#B({config:o,clientSecret:a,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u4ECD\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${t} failed to reconnect`});throw u_(i,e)}finally{this.#E()}}),this.status()}async sendConnectionTest(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return this.#y(t,async()=>{let a=this.#i.get(t);if(!a?.status?.ready||typeof a.sendConnectionTest!="function")throw Qr(w("\u9489\u9489\u673A\u5668\u4EBA"));return a.sendConnectionTest(Ui(w("\u9489\u9489\u673A\u5668\u4EBA\uFF08{clientId}\uFF09",{clientId:d_(o.clientId)})))})}async sendProactiveText(t,o,a,e={}){if(!this.#t.get(t))throw new Error("Unknown DingTalk bot");return this.#y(t,async()=>{let A=this.#i.get(t);if(!A?.status?.ready||typeof A.sendProactiveText!="function"){let r=new Error(w("\u9489\u9489\u6D88\u606F\u8FDE\u63A5\u5F53\u524D\u79BB\u7EBF"));throw r.code="bot-not-connected",r}return A.sendProactiveText(o,a,e)})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error("Unknown DingTalk bot");return await this.#y(t,async()=>{let a=await this.#A.resolve(o.secretRef).catch(()=>{});await this.#f(t);try{await this.#A.unset(o.secretRef),await this.#t.remove(t)}catch(e){throw ri(a?.value)&&(await this.#A.set(o.secretRef,a.value).catch(()=>{}),await this.#u(o,a.value).catch(()=>{})),new Error("Unable to remove the DingTalk bot safely.",{cause:e})}try{await this.#I({botId:t,config:o})}catch{this.#o.warn?.(`[dsh-dingtalk] bot ${t} state cleanup failed`)}this.#a.delete(t),this.#E()}),this.status()}async approveSender(t,o){let a=this.#t.get(t);if(!a)throw new Error("Unknown DingTalk bot");let e=this.#i.get(t),i=typeof e?.pendingSender=="function"?oY(e.pendingSender(o)):null,A=iY(C_(e)),r=i?.requestId===o?i:A.find(g=>g.requestId===o);if(!r)throw new Error("Unknown DingTalk sender approval request");if(a.approvedSenders.some(g=>g.staffId===r.staffId))return this.status();let s={...a,approvedSenders:[...a.approvedSenders,{senderKey:qx(),staffId:r.staffId,displayName:r.displayName,approvedAt:ede(this.#c)}]};return await this.#C(a,s),this.status()}async revokeSender(t,o){let a=this.#t.get(t);if(!a)throw new Error("Unknown DingTalk bot");let e=a.approvedSenders.findIndex(A=>A.senderKey===o);if(e===-1)throw new Error("Unknown approved DingTalk sender");let i=[...a.approvedSenders];return i.splice(e,1),await this.#C(a,{...a,approvedSenders:i}),this.status()}status(){let t=this.#t.list().map(e=>{let i=this.#i.get(e.botId),A={};try{A=C_(i)}catch{A={state:"error"}}let r=rY(i,A),s=this.#a.get(e.botId),g=r?"connected":s?"error":"offline",c=new Set(e.approvedSenders.map(p=>p.staffId)),I=iY(A).filter(p=>!c.has(p.staffId)).map(Ade);return{botId:e.botId,state:g,connected:r,configured:!0,bot:{name:w("\u9489\u9489\u673A\u5668\u4EBA"),clientIdMasked:d_(e.clientId)},health:{status:r?"healthy":s?"error":"offline",summary:r?w("\u9489\u9489 Stream \u6D88\u606F\u8FDE\u63A5\u8FD0\u884C\u6B63\u5E38"):s?.message??w("\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:ti(A.lastMessageError),senders:{pending:I,approved:e.approvedSenders.map(tde)},error:s?structuredClone(s):null}}),o=t.filter(e=>e.connected).length,a=this.#p?this.#s.get(this.#p):null;return{schemaVersion:1,revision:this.#l,state:a&&tY.has(a.state)?"provisioning":t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o},...a&&tY.has(a.state)?{provisioning:UI(a)}:{}}}async close(){this.#n||(this.#n=!0,this.#p&&await this.cancelProvisioning(this.#p),await Promise.allSettled([...this.#i.keys()].map(t=>this.#f(t))),await Promise.allSettled([...this.#g.values()]),await Promise.allSettled([...this.#i.keys()].map(t=>this.#f(t))))}async#h(t){try{this.#Q(t);let o=await this.#e.poll({deviceCode:t.deviceCode,signal:t.controller.signal});this.#Q(t);let a=ri(o.status)?.toUpperCase();if(a==="WAITING")t.state="pending",t.error=null;else if(a==="SUCCESS"){let e=ri(o.clientId),i=ri(o.clientSecret);if(!e||!i)throw new Error("DingTalk returned incomplete credentials");t.state="connecting",t.error=null,this.#E();let A=await this.#d(t,{clientId:e,clientSecret:i});t.botId=A.botId,t.alreadyConnected=A.alreadyConnected,t.state="connected",this.#p===t.id&&(this.#p=null)}else a==="EXPIRED"?(t.state="expired",t.error=yn("expired",w("\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u751F\u6210\u3002")),this.#p===t.id&&(this.#p=null)):a==="FAIL"?(t.state="failed",t.error=yn("authorization-failed",w("\u9489\u9489\u672A\u5B8C\u6210\u673A\u5668\u4EBA\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u626B\u7801\u3002")),this.#p===t.id&&(this.#p=null)):(t.state="pending",t.error=yn("poll-pending",w("\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=yn("cancelled",w("\u626B\u7801\u63A5\u5165\u5DF2\u53D6\u6D88\u3002")),this.#p===t.id&&(this.#p=null)):t.state==="connecting"?(t.state="failed",t.error=yn("activation-failed",w("\u9489\u9489\u5DF2\u6388\u6743\uFF0C\u4F46\u65E0\u6CD5\u5B89\u5168\u4FDD\u5B58\u63A5\u5165\u914D\u7F6E\u3002")),this.#p===t.id&&(this.#p=null),this.#o.error?.("[dsh-dingtalk] bot activation failed")):(t.state="pending",t.error=yn("poll-failed",w("\u9489\u9489\u6388\u6743\u67E5\u8BE2\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002")))}finally{this.#E(),this.#b()}}async#d(t,{clientId:o,clientSecret:a}){let e=NQ(o),i=this.#t.getByClientId(o),A=await this.#A.resolve(e.secretRef).catch(()=>{}),r={botId:e.botId,clientId:o,secretRef:e.secretRef,approvedSenders:i?.approvedSenders??[]};return this.#y(e.botId,async()=>{let s=async()=>{await this.#f(e.botId),i?await this.#t.save(i).catch(()=>{}):this.#t.get(e.botId)&&await this.#t.remove(e.botId).catch(()=>null)&&await this.#I({botId:e.botId,config:r}).catch(c=>{this.#o.warn?.("[dsh-dingtalk] failed to clean up cancelled bot state:",c)}),await this.#w(e.secretRef,A),i&&ri(A?.value)&&await this.#u(i,A.value).catch(()=>{})};await this.#A.set(e.secretRef,a);try{this.#Q(t),await this.#t.save(r),this.#Q(t)}catch(g){throw await s(),g}try{await this.#u(r,a),this.#Q(t),this.#a.delete(e.botId)}catch(g){if(t.controller.signal.aborted||this.#p!==t.id)throw await s(),uc();this.#B({config:r,clientSecret:a,error:g,fallbackMessage:"\u9489\u9489\u5DF2\u63A5\u5165\uFF0C\u4F46\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`authorized bot ${e.botId} is not ready`})}return{botId:e.botId,alreadyConnected:!!i}})}async#C(t,o){return this.#y(t.botId,async()=>{let a=await this.#m(t.secretRef);if(!a)throw new Error("The DingTalk client secret is missing");await this.#t.save(o);try{await this.#u(o,a),this.#a.delete(t.botId)}catch(e){await this.#t.save(t).catch(()=>{}),await this.#u(t,a).catch(()=>{});let i=this.#B({config:t,clientSecret:a,error:e,fallbackMessage:"\u9489\u9489\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",context:`bot ${t.botId} failed to apply updated settings`});throw u_(i,e)}finally{this.#E()}})}async#u(t,o){if(this.#n||(await this.#f(t.botId),this.#n))throw uc();let a;try{a=await this.#r({botId:t.botId,config:structuredClone(t),clientSecret:o})}catch(e){throw vp("dingtalk-runtime-prepare-failed",e)}if(!a||typeof a.start!="function"||typeof a.stop!="function")throw vp("dingtalk-runtime-prepare-failed",new TypeError("createRuntime returned an invalid DingTalk runtime"));if(this.#n)throw await a.stop().catch(()=>{}),uc();this.#i.set(t.botId,a);try{if(await a.start(),this.#n)throw await a.stop().catch(()=>{}),uc()}catch(e){throw this.#i.get(t.botId)===a&&this.#i.delete(t.botId),await a.stop().catch(()=>{}),vp("dingtalk-stream-connect-failed",e)}}#B({config:t,clientSecret:o,error:a,fallbackMessage:e,context:i}){let A=AY(a,{fallbackMessage:e,clientId:t.clientId,clientSecret:o});return this.#a.set(t.botId,A.publicError),this.#o.error?.(`[dsh-dingtalk] ${i} [${A.publicError.referenceId}]`,A.diagnostic),A.publicError}async#f(t){let o=this.#i.get(t);this.#i.delete(t),await o?.stop().catch(()=>{this.#o.warn?.(`[dsh-dingtalk] bot ${t} failed to stop cleanly`)})}async#m(t){let o=await this.#A.resolve(t).catch(()=>{});return ri(o?.value)}async#w(t,o){try{ri(o?.value)?await this.#A.set(t,o.value):await this.#A.unset(t)}catch{this.#o.error?.(`[dsh-dingtalk] failed to restore credential ${t}`)}}#Q(t){if(t.controller.signal.aborted||this.#p!==t.id)throw uc()}#y(t,o){if(this.#n)return Promise.reject(new Error("dsh-dingtalk controller is closed"));let i=(this.#g.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#g.get(t)===i&&this.#g.delete(t)});return this.#g.set(t,i),i}#b(){for(let[t,o]of this.#s)t!==this.#p&&PQ.has(o.state)&&this.#s.size>16&&this.#s.delete(t)}#E(){this.#l+=1}};import{randomUUID as $E}from"node:crypto";import{extname as pde}from"node:path";var sY=5*1024*1024,rde=20,ide=20*1024*1024,ade="\u8BF7\u5206\u6790\u8FD9\u5F20\u56FE\u7247\u3002",gY="\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B\u4E0D\u652F\u6301\u76F4\u63A5\u63A5\u6536\u56FE\u7247\u8F93\u5165\u3002\u7528\u6237\u53D1\u9001\u7684\u56FE\u7247\u5DF2\u4F5C\u4E3A\u6587\u4EF6\u4FDD\u5B58\u5230\u5DE5\u4F5C\u533A\uFF08\u89C1\u4E0B\u65B9\u6587\u4EF6\u6E05\u5355\uFF09\u3002\u8BF7\u4F7F\u7528\u53EF\u7528\u5DE5\u5177\u5206\u6790\u8FD9\u4E9B\u56FE\u7247\u6587\u4EF6\u540E\u56DE\u7B54\uFF0C\u4F8B\u5982 run_code \u6216 pwsh \u8BFB\u53D6\u5B57\u8282\u3001\u89E3\u6790\u5143\u6570\u636E\u3001\u8C03\u7528\u56FE\u50CF\u5904\u7406\u6216 OCR \u5E93\uFF1B\u4E0D\u8981\u5047\u8BBE\u81EA\u5DF1\u80FD\u76F4\u63A5\u770B\u5230\u56FE\u7247\u5185\u5BB9\u3002",ft=class extends Error{constructor(t,o,a,e={}){super(o,e),this.name="ImagePromptError",this.code=t,this.userMessage=a}},nY=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 ode(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}async function B_(n){try{await n?.body?.cancel?.()}catch{}}async function To(n,{fetchImpl:t=fetch,headers:o,signal:a,maxBytes:e=sY,timeoutMs:i=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:ode(a,i),redirect:"manual"});if(Number.isInteger(s?.status)&&s.status>=300&&s.status<400)throw await B_(s),new ft("image-redirect-blocked",`Image download redirect was blocked (HTTP ${s.status})`,w("\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 B_(s),new ft("image-http-error",`Image download failed with HTTP ${s?.status??"unknown"}`,w("\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 B_(s),new ft("image-too-large",`Image response declares ${g} bytes; the limit is ${e}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s.body?.[Symbol.asyncIterator]){let I=[],p=0;for await(let B of s.body){let f=Buffer.from(B);if(p+=f.length,p>e)throw await s.body.cancel?.().catch?.(()=>{}),new ft("image-too-large",`Image response exceeded ${e} bytes`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));I.push(f)}return Buffer.concat(I,p)}let c=Buffer.from(await s.arrayBuffer());if(c.length>e)throw new ft("image-too-large",`Image response contains ${c.length} bytes; the limit is ${e}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));return c}function nde(n){return typeof n=="string"?n.trim():""}function cY(n){return Array.isArray(n?.images)?n.images.filter(Boolean):[]}function f_(n){return typeof n!="string"?void 0:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim().slice(0,255)||void 0}function sde(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 gde(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 Rt(n){return cY(n).length>0}async function Q_(n,{signal:t,maxImageBytes:o=sY,maxImages:a=rde,maxTotalImageBytes:e=ide}={}){let i=cY(n);if(i.length>a)throw new ft("too-many-images",`Image message contains ${i.length} images; the limit is ${a}`,w("\u4E00\u6B21\u6700\u591A\u53EA\u80FD\u5904\u7406 {maxImages} \u5F20\u56FE\u7247\u3002",{maxImages:a}));let A=nde(n?.content),r=[],s=0;A?r.push({type:"text",text:A}):i.length>0&&r.push({type:"text",text:w(ade)});for(let[g,c]of i.entries()){if(t?.throwIfAborted(),Number.isFinite(c?.size)&&c.size>o)throw new ft("image-too-large",`Image ${g+1} declares ${c.size} bytes; the limit is ${o}`,w("\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 ft("images-too-large",`Images declare more than ${e} bytes in total`,w("\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 ft?f:new ft("image-download-failed",`Unable to download image ${g+1}: ${f?.message??String(f)}`,w("\u56FE\u7247\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let p=gde(I);if(!p?.data.length)throw new ft("invalid-image-data",`Image ${g+1} returned no data`,w("\u672A\u80FD\u8BFB\u53D6\u56FE\u7247\u5185\u5BB9\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u3002"));if(p.data.length>o)throw new ft("image-too-large",`Image ${g+1} contains ${p.data.length} bytes; the limit is ${o}`,w("\u56FE\u7247\u8D85\u8FC7 5 MB\uFF0C\u8BF7\u538B\u7F29\u540E\u91CD\u8BD5\u3002"));if(s+p.data.length>e)throw new ft("images-too-large",`Images contain more than ${e} bytes in total`,w("\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+=p.data.length;let B=sde(p.data);if(!B)throw new ft("unsupported-image-type",`Image ${g+1} is not JPEG, PNG, GIF, or WebP`,w("\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:p.data.toString("base64"),...f_(p.name??c?.name)?{name:f_(p.name??c?.name)}:{}})}return r}function ao(n){if(n instanceof ft)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(nY,t)?w(nY[t]):null;return o?{code:"attachment-error",reason:t,userMessage:o}:null}function No(n){return ao(n)?.userMessage??null}var cde=new Map([["image/png",".png"],["image/jpeg",".jpg"],["image/gif",".gif"],["image/webp",".webp"]]),Ide=/\.(?:png|jpe?g|gif|webp)$/i;function lde(n,t,o){let a=cde.get(t)??".img",e=f_(n);return e&&Ide.test(e)?e:`${e??`image-${o+1}`}${a}`}function IY(n){return Array.isArray(n)?n.filter(t=>t?.type==="image").map((t,o)=>({name:lde(t.name,t.mediaType,o),...typeof t.mediaType=="string"&&t.mediaType.trim()?{mediaType:t.mediaType.trim()}:{},data:Buffer.from(typeof t.data=="string"?t.data:"","base64")})):[]}function lY(n){return Array.isArray(n)?n.filter(t=>t?.type!=="image"):n}function pY(n){return n?.code==="attachment-error"&&n?.details?.reason==="MODEL_DOES_NOT_SUPPORT_IMAGES"}var dY="https://oapi.dingtalk.com/",dde="https://api.dingtalk.com/",hde="DING_DWS_CLAW",Ede="02fcf2f4-5e02-4a85-b672-46d1f715543e.schema",HI="\u{1F914}\u601D\u8003\u4E2D",uY="\u2705\u5DF2\u5B8C\u6210",CY="\u274C\u5904\u7406\u5931\u8D25",ude=15e3,Cde=5e3,Bde="2659900",fde="im_bg_1",Qde=new Set(["WAITING","SUCCESS","FAIL","EXPIRED"]),It=class extends Error{constructor(t,o,a={}){super(o,a),this.name="DingtalkApiError",this.code=t,this.status=a.status,this.providerCode=a.providerCode}};function WA(n){return typeof n=="string"&&n.trim()?n.trim():null}function tu(n){let t=n==null?null:String(n).trim();return t&&/^-?[A-Za-z0-9_.:-]{1,160}$/.test(t)?t:void 0}function BY(n,t){return Number.isInteger(t?.status)&&(n.status=t.status),t?.providerCode!==void 0&&(n.providerCode=t.providerCode),n}function eu(n,{fallback:t="artifact-provider-rejected"}={}){if(n?.code?.startsWith?.("artifact-"))return n;let o=Number(n?.status),a=tu(n?.providerCode),e=a??"",i=t,A="DingTalk could not prepare the file for delivery.";o===401||o===403||a==="401"||a==="403"||/(?:permission|forbidden|unauthor|access.?denied|\.auth(?:\.|$))/i.test(e)?(i="artifact-permission-required",A="DingTalk denied permission to send the file."):o===413||a==="413"||/(?:too.?large|size.?limit)/i.test(e)?(i="artifact-too-large",A="The file exceeds DingTalk's size limit."):o===429||a==="429"||/(?:rate.?limit|too.?many|throttl)/i.test(e)?(i="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=i,BY(r,n)}function yde(n){let t=new Error("DingTalk file delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",BY(t,n)}function GQ(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 tu(n[t])??"rejected";return null}function mde(n,t){if(t?.aborted)throw ss(t);let o=Number(n?.status);return n?.code==="network-error"||n?.code==="timeout"||n?.code==="invalid-response"||o>=500&&o<600?yde(n):eu(n)}function Sde(n){let t;try{t=new URL(n)}catch(o){throw new It("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 hY(n){let t=n.toLowerCase().replace(/\.$/,"");return t==="dingtalk.com"||t.endsWith(".dingtalk.com")}function w_(n,{label:t,requireSubdomain:o=!0}={}){let a;try{a=new URL(n)}catch{throw new It("invalid-url",`${t??"\u9489\u9489\u670D\u52A1"}\u8FD4\u56DE\u4E86\u65E0\u6548\u5730\u5740\u3002`)}let e=a.hostname.toLowerCase().replace(/\.$/,""),i=o?e!=="dingtalk.com"&&hY(e):hY(e);if(a.protocol!=="https:"||!i||a.port&&a.port!=="443")throw new It("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);if(a.username||a.password)throw new It("untrusted-url",`${t??"\u9489\u9489\u670D\u52A1"}\u5730\u5740\u4E0D\u53D7\u4FE1\u4EFB\u3002`);return a}function Cc(n){let t=WA(n);if(!t)throw new It("invalid-session-webhook","\u9489\u9489\u6D88\u606F\u6CA1\u6709\u53EF\u7528\u7684\u56DE\u590D\u5730\u5740\u3002");let o=w_(t,{label:"\u9489\u9489\u56DE\u590D",requireSubdomain:!1});return o.hash="",o.toString()}function fY(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 a=[],e=o;for(;e.length>t;){let i=e.lastIndexOf(` +`,t);i{if(t?.aborted){a(ss(t));return}let e=setTimeout(()=>{t?.removeEventListener("abort",i),o()},n),i=()=>{clearTimeout(e),a(ss(t))};t?.addEventListener("abort",i,{once:!0})})}async function mn(n,t,{body:o,signal:a,timeoutMs:e=ude,headers:i={},method:A="POST",action:r="request"}={}){let s=new AbortController,g=!1,c=()=>s.abort(a?.reason);if(a?.aborted)throw ss(a);a?.addEventListener("abort",c,{once:!0});let I=e>0?setTimeout(()=>{g=!0,s.abort()},e):null;try{let p=await n(t,{method:A,redirect:"error",headers:{"content-type":"application/json",...i},body:JSON.stringify(o??{}),signal:s.signal});if(!p.ok){let B;try{let f=await p.json();B=tu(f?.code??f?.errcode)}catch{}throw new It("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${p.status}\uFF09\u3002`,{status:p.status,providerCode:B})}try{return await p.json()}catch(B){throw new It("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:B})}}catch(p){throw a?.aborted?ss(a):g?new It("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:p}):p instanceof It?p:new It("network-error",`\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489${r}\u8BF7\u6C42\u3002`,{cause:p})}finally{I&&clearTimeout(I),a?.removeEventListener("abort",c)}}async function Dde(n,t,{body:o,signal:a,timeoutMs:e=6e4}={}){let i=new AbortController,A=!1,r=()=>i.abort(a?.reason);if(a?.aborted)throw ss(a);a?.addEventListener("abort",r,{once:!0});let s=setTimeout(()=>{A=!0,i.abort()},e);try{let g=await n(t,{method:"POST",body:o,signal:i.signal,redirect:"error"}),c,I;try{c=await g.json()}catch(p){I=p}if(!g.ok)throw new It("http-error",`\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF08HTTP ${g.status}\uFF09\u3002`,{status:g.status,providerCode:tu(c?.code??c?.errcode)});if(I)throw new It("invalid-response","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\u3002",{cause:I});return c}catch(g){throw a?.aborted?ss(a):A?new It("timeout","\u9489\u9489\u670D\u52A1\u8BF7\u6C42\u8D85\u65F6\u3002",{cause:g}):g instanceof It?g:new It("network-error","\u6682\u65F6\u65E0\u6CD5\u5B8C\u6210\u9489\u9489\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002",{cause:g})}finally{clearTimeout(s),a?.removeEventListener("abort",r)}}function EY(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 Ode(n){return pde(n).slice(1).toLowerCase()}function bde(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,atUserIds:n.atUserIds}}throw new TypeError("DingTalk AI Card target is invalid")}function Au(n,t){let o=e=>String(e).replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i]),a=t?.type==="group"?Object.entries(t.atUserIds??{}).map(([e,i])=>`${o(i)}`).join(" "):"";return _de(a?`${a} -${n}`:n)}function u_(n,t,o){return{cardParamMap:{flowStatus:t,msgContent:VE(n,o),staticMsgContent:"",sys_full_json_obj:JSON.stringify({order:["msgContent"]}),config:JSON.stringify({autoLayout:!0})}}}function mpe(n,t,o){let i={outTrackId:n,userIdType:1};return t.type==="group"?{...i,openSpaceId:`dtv1.card//IM_GROUP.${t.openConversationId}`,imGroupOpenDeliverModel:{robotCode:o,atUserIds:t.atUserIds}}:{...i,openSpaceId:`dtv1.card//IM_ROBOT.${t.userId}`,imRobotOpenDeliverModel:{spaceType:"IM_ROBOT",robotCode:o,extension:{dynamicSummary:"true"}}}}function Spe(n){let o=(typeof n=="string"?n.replace(/\r\n?/g,` +${n}`:n)}function y_(n,t,o){return{cardParamMap:{flowStatus:t,msgContent:Au(n,o),staticMsgContent:"",sys_full_json_obj:JSON.stringify({order:["msgContent"]}),config:JSON.stringify({autoLayout:!0})}}}function Mde(n,t,o){let a={outTrackId:n,userIdType:1};return t.type==="group"?{...a,openSpaceId:`dtv1.card//IM_GROUP.${t.openConversationId}`,imGroupOpenDeliverModel:{robotCode:o,atUserIds:t.atUserIds}}:{...a,openSpaceId:`dtv1.card//IM_ROBOT.${t.userId}`,imRobotOpenDeliverModel:{spaceType:"IM_ROBOT",robotCode:o,extension:{dynamicSummary:"true"}}}}function _de(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 C_(n,t){if(!n||typeof n!="object"||n.errcode!==0)throw new It("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 EY({fetchImpl:n=fetch,registrationBaseUrl:t=process.env.DINGTALK_REGISTRATION_BASE_URL||gY,registrationSource:o=process.env.DINGTALK_REGISTRATION_SOURCE||gpe,now:i=()=>Date.now(),cardMinIntervalMs:e=50,cardBackoffMs:a=1e3,delay:A=Bpe}={}){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=f_(t,{label:"\u9489\u9489\u6CE8\u518C\u670D\u52A1",requireSubdomain:!1}),s=new URL(spe),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:z,requestKind:K="normal"}){let G=WA(L),V=WA(q);if(!G||!V)throw new TypeError("clientId and clientSecret are required");let U=c.get(G);if(U&&U.expiresAt>i())return U.token;let N=K==="reaction"?d:I;if(N.has(G))return N.get(G);let J=(async()=>{let X=await Qn(n,Q(s,"v1.0/oauth2/accessToken"),{body:{appKey:G,appSecret:V},signal:z,action:"\u9274\u6743"}),ae=WA(X?.accessToken);if(!ae)throw new It("invalid-access-token","\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u8BBF\u95EE\u4EE4\u724C\u3002");let De=B_(X?.expireIn??X?.expiresIn,7200),oe=Math.max(1e3,(De-60)*1e3);return c.set(G,{token:ae,expiresAt:i()+oe}),ae})().finally(()=>N.delete(G));return N.set(G,J),J}async function m({clientId:L,clientSecret:q,robotCode:z,messageId:K,conversationId:G,reactionName:V=GI,signal:U},N){let k=WA(L),J=WA(q),X=WA(z)??k,ae=WA(K),De=WA(G),oe=WA(V);if(!k||!J)throw new TypeError("clientId and clientSecret are required");if(!X)throw new TypeError("robotCode is required");if(!ae||!De)throw new TypeError("messageId and conversationId are required");if(!oe)throw new TypeError("reactionName is required");let Se=await y({clientId:k,clientSecret:J,signal:U,requestKind:"reaction"}),Be=await Qn(n,Q(s,`v1.0/robot/emotion/${N}`),{body:{robotCode:X,openMsgId:ae,openConversationId:De,emotionType:2,emotionName:oe,textEmotion:{emotionId:dpe,emotionName:oe,text:oe,backgroundId:ppe}},headers:{"x-acs-dingtalk-access-token":Se},signal:U,timeoutMs:lpe,action:N==="reply"?"\u6D88\u606F\u72B6\u6001\u6DFB\u52A0":"\u6D88\u606F\u72B6\u6001\u64A4\u56DE"}),Re=Be?.success===!1?WE(Be?.code??Be?.errcode)??"rejected":NQ(Be);if(Re)throw new It("reaction-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6D88\u606F\u72B6\u6001\u8BF7\u6C42\u3002",{providerCode:Re});return!0}async function T({clientId:L,clientSecret:q,robotCode:z,downloadCode:K,signal:G,kind:V}){let U=WA(z),N=WA(K);if(!U||!N)throw new TypeError("robotCode and downloadCode are required");let k=await y({clientId:L,clientSecret:q,signal:G}),J;try{J=await Qn(n,Q(s,"v1.0/robot/messageFiles/download"),{body:{downloadCode:N,robotCode:U},headers:{"x-acs-dingtalk-access-token":k},signal:G,action:`${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740`})}catch(ae){throw G?.aborted?ae:new It(`${V}-download-address-failed`,`\u9489\u9489${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u83B7\u53D6\u5931\u8D25\u3002`,{cause:ae,status:ae?.status,providerCode:ae?.providerCode})}let X=WA(J?.downloadUrl??J?.download_url);if(!X)throw new It(`invalid-${V}-download`,`\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u3002`);return Cpe(X)}function _(L){let q=async()=>{let K=Math.max(0,f-i());K>0&&await A(K,L),f=Math.max(f,i())+e},z=B.then(q,q);return B=z.catch(()=>{}),z}async function R(L,q){await _(q.signal);try{return await Qn(n,Q(s,L),q)}catch(z){if(!(z instanceof It)||z.status!==403)throw z;return await A(a,q.signal),await _(q.signal),Qn(n,Q(s,L),q)}}async function H({clientId:L,clientSecret:q,cardInstanceId:z,text:K,target:G,signal:V}){let U=WA(z),N=WA(K);if(!U)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let J={"x-acs-dingtalk-access-token":await y({clientId:L,clientSecret:q,signal:V})},X=[R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:U,guid:qE(),key:"msgContent",content:VE(N,G),isFull:!0,isFinalize:!1,isError:!0},headers:J,signal:V,action:"AI Card \u5931\u8D25\u6536\u53E3"}),R("v1.0/card/instances",{method:"PUT",body:{outTrackId:U,cardData:u_(N,"5",G),cardUpdateOptions:{updateCardDataByKey:!0}},headers:J,signal:V,action:"AI Card \u5931\u8D25\u72B6\u6001"})],ae=await Promise.allSettled(X);if(ae.every(({status:De})=>De==="rejected"))throw ae[0].reason;return!0}async function F({clientId:L,clientSecret:q,target:z,file:K,signal:G},{uploadType:V,messageKey:U,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 k=IY(z),J;try{J=await y({clientId:L,clientSecret:q,signal:G})}catch(ve){if(G?.aborted)throw is(G);let aA=Number(ve?.status),fe=ve?.code==="http-error"&&aA>=400&&aA<500?"artifact-provider-rejected":"artifact-provider-failed";throw zE(ve,{fallback:fe})}let X=new URL("media/upload",gY);X.searchParams.set("access_token",J),X.searchParams.set("type",V);let ae=new FormData;ae.append("media",new Blob([K.bytes],{type:K.mediaType??"application/octet-stream"}),K.fileName);let De;try{De=await fpe(n,X,{body:ae,signal:G})}catch(ve){if(G?.aborted)throw is(G);let aA=Number(ve?.status),fe=ve?.code==="http-error"&&aA>=400&&aA<500?"artifact-provider-rejected":"artifact-provider-failed";throw zE(ve,{fallback:fe})}let oe=NQ(De),Se=WA(De?.media_id);if(oe||!Se)throw zE(new It("upload-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u3002",{providerCode:oe??"missing-media-id"}));G?.throwIfAborted();let Be={robotCode:k.robotCode,msgKey:U,msgParam:JSON.stringify(N(Se,K)),...k.type==="group"?{openConversationId:k.openConversationId}:{userIds:[k.userId]}},Re=k.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",Ne;try{Ne=await Qn(n,Q(s,Re),{body:Be,headers:{"x-acs-dingtalk-access-token":J},signal:G,action:"\u6587\u4EF6\u6D88\u606F\u53D1\u9001"})}catch(ve){throw upe(ve,G)}let Je=NQ(Ne);if(Je)throw zE(new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002",{providerCode:Je}));return Ne}return Object.freeze({async beginRegistration({signal:L}={}){let q=C_(await Qn(n,Q(r,"app/registration/init"),{body:{source:g},signal:L,action:"\u521D\u59CB\u5316"}),"\u521D\u59CB\u5316"),z=WA(q.nonce);if(!z)throw new It("invalid-registration","\u9489\u9489\u626B\u7801\u521D\u59CB\u5316\u7F3A\u5C11 nonce\u3002");let K=C_(await Qn(n,Q(r,"app/registration/begin"),{body:{nonce:z},signal:L,action:"\u521B\u5EFA"}),"\u521B\u5EFA"),G=WA(K.device_code),V=WA(K.verification_uri_complete);if(!G||!V)throw new It("invalid-registration","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u7684\u4FE1\u606F\u4E0D\u5B8C\u6574\u3002");let U=f_(V,{label:"\u9489\u9489\u626B\u7801",requireSubdomain:!1}).toString();return{deviceCode:G,userCode:WA(K.user_code)??void 0,verificationUri:WA(K.verification_uri)??void 0,verificationUriComplete:U,expiresInSeconds:B_(K.expires_in,7200),intervalSeconds:B_(K.interval,5)}},async pollRegistration({deviceCode:L,signal:q}={}){let z=WA(L);if(!z)throw new TypeError("deviceCode is required");let K=C_(await Qn(n,Q(r,"app/registration/poll"),{body:{device_code:z},signal:q,action:"\u72B6\u6001\u67E5\u8BE2"}),"\u72B6\u6001\u67E5\u8BE2"),G=WA(K.status)?.toUpperCase();if(!G||!hpe.has(G))throw new It("invalid-registration-status","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u72B6\u6001\u3002");let V={status:G,failReason:WA(K.fail_reason)??void 0};if(G==="SUCCESS"&&(V.clientId=WA(K.client_id)??void 0,V.clientSecret=WA(K.client_secret)??void 0,!V.clientId||!V.clientSecret))throw new It("missing-credentials","\u9489\u9489\u626B\u7801\u5DF2\u786E\u8BA4\uFF0C\u4F46\u6CA1\u6709\u8FD4\u56DE\u673A\u5668\u4EBA\u51ED\u636E\u3002");return V},accessToken:y,async addReaction(L){return m(L,"reply")},async recallReaction(L){return m(L,"recall")},async addThinkingReaction(L){return m({...L,reactionName:GI},"reply")},async recallThinkingReaction(L){return m({...L,reactionName:GI},"recall")},async downloadImage({clientId:L,clientSecret:q,robotCode:z,downloadCode:K,signal:G,maxBytes:V}){let U=await T({clientId:L,clientSecret:q,robotCode:z,downloadCode:K,signal:G,kind:"image"});try{return await Mo(U,{fetchImpl:n,signal:G,maxBytes:V})}catch(N){throw G?.aborted||N instanceof ft?N:new It("image-content-download-failed","\u9489\u9489\u56FE\u7247\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:N})}},async downloadFile({clientId:L,clientSecret:q,robotCode:z,downloadCode:K,signal:G}){let V=await T({clientId:L,clientSecret:q,robotCode:z,downloadCode:K,signal:G,kind:"file"});if(V.protocol!=="https:")throw new It("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(V,{method:"GET",redirect:"follow",signal:G});if(!U?.ok)throw await U?.body?.cancel?.().catch?.(()=>{}),new It("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 G?.aborted?is(G):U instanceof It?U:new It("file-content-download-failed","\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:U})}},async createAiCard({clientId:L,clientSecret:q,target:z,initialText:K,signal:G}){let V=WA(L),U=WA(q),N=WA(K);if(!V||!U)throw new TypeError("clientId and clientSecret are required");if(!N)throw new TypeError("initialText is required");let k=ype(z),J=await y({clientId:V,clientSecret:U,signal:G}),X=`dsh_${qE()}`,ae={"x-acs-dingtalk-access-token":J},De=!1;try{await R("v1.0/card/instances",{body:{cardTemplateId:cpe,outTrackId:X,cardData:{cardParamMap:{config:JSON.stringify({autoLayout:!0})}},callbackType:"STREAM",cardAtUserIds:k.atUserIds?Object.keys(k.atUserIds):void 0,imGroupOpenSpaceModel:{supportForward:!0},imRobotOpenSpaceModel:{supportForward:!0}},headers:ae,signal:G,action:"AI Card \u521B\u5EFA"}),await R("v1.0/card/instances/deliver",{body:mpe(X,k,V),headers:ae,signal:G,action:"AI Card \u6295\u653E"}),De=!0,await R("v1.0/card/instances",{method:"PUT",body:{outTrackId:X,cardData:u_(N,"2",k)},headers:ae,signal:G,action:"AI Card \u542F\u52A8"}),await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:X,guid:qE(),key:"msgContent",content:VE(N,k).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:ae,signal:G,action:"AI Card \u542F\u52A8"})}catch(oe){if(De){let Se=AbortSignal.timeout(5e3);await H({clientId:V,clientSecret:U,cardInstanceId:X,text:w("\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002"),target:k,signal:Se}).catch(()=>{})}throw oe}return{cardInstanceId:X}},async updateAiCard({clientId:L,clientSecret:q,cardInstanceId:z,text:K,target:G,signal:V}){let U=WA(z),N=WA(K);if(!U)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let k=await y({clientId:L,clientSecret:q,signal:V});return await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:U,guid:qE(),key:"msgContent",content:VE(N,G).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:{"x-acs-dingtalk-access-token":k},signal:V,action:"AI Card \u66F4\u65B0"}),!0},async finishAiCard({clientId:L,clientSecret:q,cardInstanceId:z,text:K,target:G,signal:V}){let U=WA(z),N=WA(K);if(!U)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let J={"x-acs-dingtalk-access-token":await y({clientId:L,clientSecret:q,signal:V})},X=VE(N,G);await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:U,guid:qE(),key:"msgContent",content:X,isFull:!0,isFinalize:!0,isError:!1},headers:J,signal:V,action:"AI Card \u5B8C\u6210"});let ae=!0,De={method:"PUT",body:{outTrackId:U,cardData:u_(N,"3",G),cardUpdateOptions:{updateCardDataByKey:!0}},headers:J,signal:V,action:"AI Card \u6536\u53E3"};try{await R("v1.0/card/instances",De)}catch{try{await R("v1.0/card/instances",De)}catch{ae=!1}}return{delivered:!0,completed:ae}},failAiCard:H,async sendText({clientId:L,clientSecret:q,sessionWebhook:z,text:K,at:G,signal:V}){let U=WA(K);if(!U)throw new TypeError("text is required");let N=pc(z),k=await y({clientId:L,clientSecret:q,signal:V}),J=G&&typeof G=="object"&&(Array.isArray(G.atUserIds)&&G.atUserIds.length>0||Array.isArray(G.atMobiles)&&G.atMobiles.length>0||G.isAtAll===!0)?{at:G}:{},X=await Qn(n,N,{body:{msgtype:"text",text:{content:U},...J},headers:{"x-acs-dingtalk-access-token":k},signal:V,action:"\u6D88\u606F\u56DE\u590D"});if(X?.errcode!==void 0&&X.errcode!==0||X?.code!==void 0&&X.code!==0)throw new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002");return!0},async sendRobotText({clientId:L,clientSecret:q,target:z,text:K,signal:G}){if(typeof K!="string"||!K.trim())throw new TypeError("text is required");let V=K,U=IY(z),N=await y({clientId:L,clientSecret:q,signal:G}),k={robotCode:U.robotCode,msgKey:"sampleText",msgParam:JSON.stringify({content:V}),...U.type==="group"?{openConversationId:U.openConversationId}:{userIds:[U.userId]}},J=U.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",X=await Qn(n,Q(s,J),{body:k,headers:{"x-acs-dingtalk-access-token":N},signal:G,action:"\u4E3B\u52A8\u6587\u5B57\u6D88\u606F\u53D1\u9001"}),ae=NQ(X);if(ae)throw new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u4E3B\u52A8\u6587\u5B57\u6D88\u606F\u3002",{providerCode:ae});return X},async sendFile(L){return F(L,{uploadType:"file",messageKey:"sampleFile",createMessageParams:(q,z)=>({mediaId:q,fileName:z.fileName,fileType:Qpe(z.fileName)})})},async sendImage(L){return F(L,{uploadType:"image",messageKey:"sampleImageMsg",createMessageParams:q=>({photoURL:q})})},clearAccessToken(L){let q=WA(L);q&&c.delete(q)}})}var wpe=500,Dpe="\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002";function Q_(n,t){if(typeof n!="string")throw new TypeError(`${t} must be a string`);return n}function uY(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} is required`);return n.trim()}function CY({api:n,clientId:t,clientSecret:o,target:i,signal:e,logger:a=console,updateIntervalMs:A=wpe,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=uY(t,"clientId"),c=uY(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,T=null,_=0,R=()=>{Q!==null&&(s.clearTimeout(Q),Q=null)},H=()=>e?.removeEventListener("abort",z),F=N=>{d=N,f=null,R(),H()},L=()=>!B||typeof n.failAiCard!="function"?Promise.resolve(!1):(T||(T=n.failAiCard({...B,text:w(Dpe),signal:AbortSignal.timeout(5e3)}).then(()=>!0,()=>!1)),T),q=N=>{d==="failed"||d==="finished"||d==="aborted"||(L(),F("failed"),a?.error?.(`[dsh-dingtalk] AI Card ${N} failed`))};function z(){d==="finished"||d==="failed"||d==="aborted"||(L(),F("aborted"))}d!=="aborted"&&e?.addEventListener("abort",z,{once:!0});let K=()=>{if(d!=="active"||y||f===null)return;let N=Math.max(0,_+A-I());if(N>0){Q=s.setTimeout(()=>{Q=null,K()},N);return}let k=f;f=null,y=(async()=>{try{await n.updateAiCard({...B,text:k,finished:!1}),_=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(Q_(N,"initialText"),d!=="idle")return!1;d="starting";try{let k=await n.createAiCard({clientId:g,clientSecret:c,target:i,initialText:N,signal:e}),J=typeof k?.cardInstanceId=="string"?k.cardInstanceId.trim():"";if(!J)throw new TypeError("DingTalk did not return a card instance id");return B=Object.freeze({clientId:g,clientSecret:c,target:i,cardInstanceId:J,signal:e}),d!=="starting"?(L(),!1):(_=I(),d="active",!0)}catch{return e?.aborted||d==="aborted"?(F("aborted"),!1):(q("creation"),!1)}},push:N=>{Q_(N,"progressText"),d==="active"&&(f=N,!Q&&!y&&K())},finish:N=>{if(Q_(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:(F("finished"),!0)}catch{return e?.aborted||d==="aborted"?(F("aborted"),!1):(q("finish"),!1)}})(),m},get providerMessageIds(){return B?.cardInstanceId?[B.cardInstanceId]:[]}})}function RQ(n){return typeof n=="string"&&n.trim()?n.trim():null}function Di(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 gi(n,t,o,{requiresMention:i=!1}={}){let e=[],a=o>1?`\uFF08${t+1}/${o}\uFF09`:"";e.push(w("DeepSeek Harness \u9700\u8981\u4F60\u8865\u5145\u4FE1\u606F{progress}\uFF1A",{progress:a})),RQ(n.header)&&e.push("",n.header.trim()),e.push("",RQ(n.question)??w("\u8BF7\u8F93\u5165\u4F60\u7684\u56DE\u7B54\u3002")),RQ(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=RQ(r?.description);e.push(`${s+1}. ${g}${c?` \u2014 ${c}`:""}`)}),e.push("",n.multiSelect===!0?w("\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"):w("\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("",w("\u8BF7\u76F4\u63A5\u56DE\u590D\u4F60\u7684\u7B54\u6848\u3002")),i&&e.push("",w("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u7B54\u6848\u3002")),e.join(` -`)}function BY(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=BY(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=BY(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 Ope=new Map([["\u6279\u51C6","allowed-once"],["\u540C\u610F","allowed-once"],["yes","allowed-once"],["\u62D2\u7EDD","rejected"],["\u4E0D\u540C\u610F","rejected"],["no","rejected"]]),y_="\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",bpe="\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u95EE\u9898\uFF0C\u518D\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002",kd="\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u590D\u3002",Mpe=5*6e4,_pe=2048;function Sa(n){return typeof n=="string"?n.trim():""}function m_(n){return Sa(n).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g,"")}function Tpe(n){return Ope.get(Sa(n).toLowerCase())??null}function QY(n){return n?.type==="approval/requested"&&!!Sa(n.sessionId)&&!!Sa(n.approvalId)&&!!Sa(n.toolName)&&(n.callId===void 0||!!Sa(n.callId))&&(n.reason===void 0||typeof n.reason=="string")}function Npe(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=m_(t);if(!o)return t===""?"{}":null;try{return JSON.stringify(JSON.parse(o),null,2)}catch{return o}}function S_(n,{toolCall:t,requiresMention:o=!1,maxArgumentsLength:i=6e3}={}){if(!QY(n))return null;let e=Sa(n.callId);if(!e||Sa(t?.callId)!==e||Sa(t?.name)!==Sa(n.toolName))return null;let a=Npe(t);if(!a||a.length>i)return null;let A=[w("DeepSeek Harness \u9700\u8981\u4F60\u7684\u5BA1\u6279\uFF1A"),"",w("\u5DE5\u5177\uFF1A{tool}",{tool:m_(n.toolName)}),w("\u64CD\u4F5C\u53C2\u6570\uFF1A"),a],r=m_(n.reason);return r&&A.push(w("\u539F\u56E0\uFF1A{reason}",{reason:r})),A.push("",w(y_)),o&&A.push("",w("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u5BA1\u6279\u51B3\u5B9A\u3002")),A.join(` -`)}function fY(n,t){return{ok:!0,value:{sessionId:n.sessionId,approvalId:n.approvalId,outcome:t}}}function kQ(n){return n==="allowed-once"?w("\u5DF2\u6279\u51C6\uFF0C\u4EC5\u5BF9\u672C\u6B21\u64CD\u4F5C\u6709\u6548\u3002"):n==="rejected"?w("\u5DF2\u62D2\u7EDD\u6B64\u6B21\u64CD\u4F5C\u3002"):w(kd)}var bi=class{#e;#A;#t=new Map;#r=new Map;#l=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=Tpe(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.#l.get(t)??0)<=Date.now()?(this.#l.delete(t),null):I?d(w(kd),!0):null:c.actor!==o||c.requiresMention&&e!==!0?I?d(w("\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(w(bpe));return}}if(await c.activationTask?.catch(()=>{}),await c.presentationTask?.catch(()=>{}),c.inactive||c.resolving){await s(w(kd));return}if(c.send=s,!Q||!c.presented){if(c.presented||await this.#o(c),c.inactive||c.resolving)return;await s(w(y_));return}if(c.submitting){await s(w("\u5BA1\u6279\u51B3\u5B9A\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7A0D\u5019\u3002"));return}if(!I){await s(w(y_));return}await this.#i(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=Sa(i?.approvalId);if(!Sa(t.rpcId)||!Sa(t.sessionId)||!e||!QY(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.#c(t,i),!0;let a=this.#t.get(e);if(a)return a.interaction=t,a.toolCall=t.toolCall,a.presented||await this.#o(a),!0;let A=o?.send,r=Sa(o?.key),s=Sa(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.#c(t,i),!0;let g=typeof o?.render=="function"?o.render:null,c=S_(i,{toolCall:t.toolCall,requiresMention:o.requiresMention===!0});if(!c){let B=await this.#c(t,i);return await A(B?w("\u65E0\u6CD5\u5B8C\u6574\u5C55\u793A\u8FD9\u6B21\u64CD\u4F5C\uFF0C\u5DF2\u5B89\u5168\u62D2\u7EDD\u6B64\u6B21\u5BA1\u6279\u3002"):w(kd)),!0}let I={approvalId:e,sessionId:t.sessionId,interaction:t,toolCall:t.toolCall,key:r,actor:s,requiresMention:o.requiresMention===!0,send:A,render:g,text:c,presented:!1,presentationTask:null,deliveryCompleted:!1,replyTail:null,submitting:!1,inactive:!1,resolving:!1,closedOutcome:null,resolutionNotified:!1,activationTask:null};this.#t.set(e,I);let d=this.#r.get(r)??{items:[]};return d.items.push(I),this.#r.set(r,d),d.items[0]===I&&await this.#o(I),!0}async submitByApprovalId(t,o,{actor:i}={}){let e=this.#t.get(Sa(t));return!e||e.inactive||e.resolving||e.submitting||i!==void 0&&e.actor!==i?!1:(await this.#i(e,o),!0)}async handleResolved(t){if(t?.kind!=="approval")return!1;let o=this.#t.get(Sa(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.#s(o);return await this.#a(A,async()=>{let r=o.presented;i&&(r=await i.then(()=>!0,()=>!1)),e&&r&&(o.resolutionNotified=!0,await a(kQ(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.#s(e);await Promise.all(i.map(async e=>{try{await e.interaction.respond(fY(e,"rejected"),{signal:AbortSignal.timeout(5e3)}),e.closedOutcome="rejected",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(kQ("rejected")).catch(()=>{}))}catch(a){a?.code==="interaction-not-pending"?(e.closedOutcome="resolved",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(w(kd)).catch(()=>{}))):this.#A.warn?.(`[dsh-im:${this.#e}] failed to reject a closing approval:`,a)}}))}async#o(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=t.render?Promise.resolve().then(()=>t.render(t,t.send)):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(kQ(t.closedOutcome)).catch(()=>{})):t.presented=!0}finally{t.presentationTask===o&&(t.presentationTask=null)}}async#i(t,o){t.submitting=!0;try{await t.interaction.respond(fY(t,o))}catch(a){if(a?.code==="interaction-not-pending"){let A=t.send,r=this.#s(t);await this.#a(r,async()=>{t.resolutionNotified||await A(w(kd)).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(w("\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.#s(t);await this.#a(e,async()=>{t.resolutionNotified||await i(kQ(o)).catch(()=>{})})}async#a(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.#n(t)}async#n(t){if(t)try{await this.#o(t)}catch(o){this.#A.error?.(`[dsh-im:${this.#e}] failed to present the next approval:`,o);try{t.interaction.reconnect?.()}catch{}}}#s(t){if(t.inactive)return null;t.inactive=!0,this.#d(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}#d(t){let o=Date.now();for(let[i,e]of this.#l)e<=o&&this.#l.delete(i);for(this.#l.delete(t),this.#l.set(t,o+Mpe);this.#l.size>_pe;)this.#l.delete(this.#l.keys().next().value)}async#c(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 w_=new WeakMap;function Rpe(n){let t=w_.get(n);return t||(t=new Map,w_.set(n,t)),t}async function gg(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=Rpe(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&&w_.delete(n))}}var kpe=/(?:\u001b\]|\u009d)(?:(?!\u0007|\u001b\\)[\s\S])*(?:\u0007|\u001b\\|$)/gu,vpe=/(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]/gu,Ppe=/\u001b[@-_]/gu,Gpe=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/gu,Fpe=/[\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu,Lpe=/^(?:[\s\S]*?<\/dsh_im_source>\s*)?(?:[\s\S]*?<\/dsh_im_source_guidance>\s*)?(?:[\s\S]*?<\/dsh_im_reply_to>\s*)?/u,Upe=new Intl.Segmenter(void 0,{granularity:"grapheme"});function D_(n){return n.replace(kpe,"").replace(vpe,"").replace(Ppe,"").replace(Gpe,"").replace(Fpe,"").replace(/\s+/gu," ").trim()}function O_(n,t=60){if(Buffer.byteLength(n,"utf8")<=t)return n;let o="\u2026",i=t-Buffer.byteLength(o,"utf8"),e="";for(let{segment:a}of Upe.segment(n)){if(Buffer.byteLength(e+a,"utf8")>i)break;e+=a}return`${e.trimEnd()}${o}`}function Hpe(n){return typeof n=="string"?n:Array.isArray(n)?n.filter(t=>t?.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` -`):""}function Kpe(n){let t=n?.name??n?.filename??n?.fileName;return typeof t!="string"?"":t.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/gu,"").trim()??""}function yY({text:n,content:t,files:o}={}){let i=typeof n=="string"?D_(n):"";if(i)return O_(i);let e=D_(Hpe(t).replace(Lpe,""));if(e)return O_(e);let a=Array.isArray(o)?o.map(Kpe).find(Boolean):"",A=a?D_(a):"";return A?O_(A):null}var wa="workspace-session-stale";function mY(n,t){if(typeof n.workspaceSession=="function")return n.workspaceSession(t);let o={sessionId:t,sessionExists:(...i)=>n.sessionExists(t,...i),models:(...i)=>n.getSessionModels(t,...i),selectModel:(...i)=>n.selectSessionModel(t,...i),isRunning:(...i)=>n.isSessionRunning(t,...i),hasActiveTurn:(...i)=>n.hasActiveTurn(t,...i),stopActiveTurn:(...i)=>n.stopActiveTurn(t,...i),steerActiveTurn:(...i)=>n.steerActiveTurn(t,...i),ask:(...i)=>n.ask(t,...i)};return typeof n.renameSession=="function"&&(o.renameTitle=(...i)=>n.renameSession(t,...i)),Object.freeze(o)}async function xpe(n,t){return t===void 0?n.sessionExists():n.sessionExists(t)}async function Ype(n,t){return t===void 0?n.createSession():n.createSession(t)}async function Mi({harness:n,state:t,key:o,text:i,content:e,contextEnhanced:a=!1,createOptions:A,existsOptions:r,askOptions:s}){let g=a?yY({text:i,content:e,files:typeof s=="object"?s?.files:void 0}):null,c=A?.signal??(typeof s=="object"?s?.signal:void 0),I=c?{signal:c}:void 0;for(;;)try{let d=await gg(t,o,async()=>{let m=t.sessionFor(o),T=m?mY(n,m):null;if(!T||!await xpe(T,r)){if(m=await Ype(n,A),await t.setSession(o,m)===!1)return null;if(T=mY(n,m),g&&typeof T.renameTitle=="function")try{await T.renameTitle(g,I)}catch(_){if(_?.code===wa||I?.signal?.aborted)throw _;console.warn("[dsh-im] unable to set the initial Session title:",_?.message??_)}}return{sessionId:m,session:T}});if(!d)continue;let B=[],f=typeof s=="object"&&typeof s?.onArtifact=="function"?s.onArtifact:null,Q=typeof s=="number"?{timeoutMs:s}:{...s};Q.onArtifact=async m=>{B.push(m),await f?.(m)};let y=await d.session.ask(e??i,Q);return{sessionId:d.sessionId,answer:y,...B.length>0?{artifacts:B}:{}}}catch(d){if(d?.code!==wa)throw d}}var wY=/^\/compact(?=$|\s)([\s\S]*)$/i,jpe="\u7528\u6CD5\uFF1A/compact\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",SY=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 FI(n){return{handled:!0,message:n,messages:[n]}}function Jpe(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?w("\u5DF2\u538B\u7F29 {count} \u6761\u5386\u53F2\u8BB0\u5F55\uFF08\u7EA6 {tokens} \u4E2A token\uFF09\u3002",{count:o[1],tokens:o[2]}):SY.has(t)?w(SY.get(t)):t||(n.kind==="success"?w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5B8C\u6210\u3002"):w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\u3002"))}function qpe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?w("\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"?w("\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="cancelled"||n?.name==="AbortError"?w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"):t===wa||t==="workspace-bot-not-found"?w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):t==="commands-unavailable"?w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u4ECE\u673A\u5668\u4EBA\u6267\u884C\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"):w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function _i(n,t,o,i,e={}){if(!b_(n))return null;if(wY.exec(n.trim())[1].trim())return FI(w(jpe));if(typeof o?.sessionFor!="function")return FI(w("\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 FI(w("\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 FI(w("\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 FI(r===void 0?w("\u5F53\u524D Harness \u672A\u6CE8\u518C /compact \u547D\u4EE4\uFF0C\u8BF7\u786E\u8BA4\u4E0A\u4E0B\u6587\u538B\u7F29\u7EC4\u4EF6\u5DF2\u542F\u7528\u3002"):Jpe(r?.result))}catch(r){return FI(qpe(r))}}function b_(n){return typeof n=="string"&&wY.test(n.trim())}import{isDeepStrictEqual as ohe}from"node:util";import{realpath as bY,stat as MY}from"node:fs/promises";import{isAbsolute as _Y,resolve as zpe}from"node:path";var TY=/^\/(?:workspace|ws)(?:\s+([\s\S]+))?$/i,NY=/^\/(?:workspacelist|workspaces|wsl)(?:\s+([\s\S]+))?$/i,RY=/^\/(?:sessionlist|sessions)(?:\s+([\s\S]+))?$/i,kY=/^\/session(?=$|\s)/i,Vpe=/^\/session[ \t]+([^\s]+)$/i,Wpe=4096,Zpe=1800,Xpe=256,vY=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,$pe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,PY="\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09",LI=["\u7528\u6CD5\uFF1A","/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD","/sessionlist --limit N \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD\uFF08N \u4E3A\u6B63\u6574\u6570\uFF09","/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 _t(n,t=[n]){return{handled:!0,message:n,messages:t}}function vd(n){return typeof n!="string"||n.length>Wpe||!_Y(n)||vY.test(n)?null:zpe(n)}function vQ(n){return typeof n!="string"?"":n.replace($pe," ").replace(/\s+/gu," ").trim()}function DY(n){return typeof n=="string"&&n.length>0&&n.length<=Xpe&&!new RegExp("\\p{White_Space}","u").test(n)&&!vY.test(n)}function T_(n){let t=typeof n=="string"?n.trim():"";if(!t)return{selector:"",limit:null};if(!t.toLowerCase().startsWith("--limit"))return{selector:t,limit:null};let o=/^--limit[ \t]+(\d+)$/iu.exec(t),i=o?Number(o[1]):null;return!Number.isSafeInteger(i)||i<1?{error:w(LI)}:{selector:"",limit:i}}async function M_(n){let t=await Promise.all(n.map(async o=>{let i=vd(o);if(!i)return null;try{return(await MY(i)).isDirectory()?vd(await bY(i)):null}catch{return null}}));return[...new Set(t.filter(Boolean))]}async function __(n){if(typeof n!="string"||!_Y(n.trim()))return{error:w(`\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002 -{usage}`,{usage:w(LI)})};let t=vd(n.trim());if(!t)return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 -{usage}`,{usage:w(LI)})};let o;try{o=await MY(t)}catch{return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 -{usage}`,{usage:w(LI)})}}if(!o.isDirectory())return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002 -{usage}`,{usage:w(LI)})};try{let i=vd(await bY(t));return i?{workspace:i}:{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 -{usage}`,{usage:w(LI)})}}catch{return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 -{usage}`,{usage:w(LI)})}}}async function Pd(n,t={}){let o=await n.listWorkspaces(t),i=typeof n?.currentWorkspace=="function"?n.currentWorkspace():null,[e]=i?await M_([i]):[],a=await M_(Array.isArray(o)?o:[]),A=[...new Set([...e?[e]:[],...a])];return n.assertWorkspaceScope?.(),{current:e??null,paths:A}}function cg(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 ehe(n,t){if(n[1]?.trim())return _t(w("\u7528\u6CD5\uFF1A/workspacelist"));if(typeof t?.listWorkspaces!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u3002"));try{let{current:o,paths:i}=await Pd(t);if(i.length===0)return _t(w("\u5F53\u524D Harness Host \u4E0A\u6CA1\u6709\u4ECD\u7136\u5B58\u5728\u7684\u5DF2\u767B\u8BB0\u5DE5\u4F5C\u533A\u3002"));let a=[w("\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?w("\uFF08\u5F53\u524D\uFF09"):""}`),"",w("\u5207\u6362\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84"),w("\u67E5\u770B\u4F1A\u8BDD\uFF1A/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84")].join(` -`);return _t(a,cg(a))}catch(o){return o?.code==="workspace-bot-not-found"?_t(w("\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")):_t(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}async function N_(n,t,o={}){if(!n){if(typeof t?.currentWorkspace!="function")return{error:w("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u4F5C\u533A\u3002")};let e=await __(t.currentWorkspace());return t.assertWorkspaceScope?.(),e}if(/^\d+$/u.test(n)){if(typeof t?.listWorkspaces!="function")return{error:w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002")};let{paths:e}=await Pd(t,o),a=Number(n);return!Number.isSafeInteger(a)||a<1||a>e.length?{error:w("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002")}:{workspace:e[a-1]}}let i=await __(n);return t.assertWorkspaceScope?.(),i}function Ahe(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?w("\u4ECA\u5929 {time}",{time:e}):r===1?w("\u6628\u5929 {time}",{time:e}):r===2?w("\u524D\u5929 {time}",{time:e}):o.getFullYear()===A.getFullYear()?w("{month}\u6708{day}\u65E5 {time}",{month:o.getMonth()+1,day:o.getDate(),time:e}):w("{year}\u5E74{month}\u6708{day}\u65E5",{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()})}function the(n,t,{currentWorkspace:o=!1}={}){let i=t.map(e=>{let a=vQ(e?.sessionId);if(!a)throw new TypeError("Harness returned an invalid session id");let A=e?.summaryAvailable===!1?w("\u6807\u9898\u6682\u4E0D\u53EF\u7528"):vQ(e?.title)||w("\u6682\u65E0\u6807\u9898"),r=Ahe(e?.time),s=`${r?` \xB7 ${r}`:""}${e?.archived===!0?w("\uFF08\u5DF2\u5F52\u6863\uFF09"):""}`;return`${A}${s} - ID: ${a}`});return i.length===0?w(`\u5DE5\u4F5C\u533A\uFF1A{workspace} -\u8BE5\u5DE5\u4F5C\u533A\u6682\u65E0\u4F1A\u8BDD\u3002`,{workspace:n}):[w("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:n}),w("\u4F1A\u8BDD\uFF08{count}\uFF09\uFF1A",{count:i.length}),"",...i.map((e,a)=>`${a+1}. ${e}`),"",o?w("\u7ED1\u5B9A\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09"):w(`\u7ED1\u5B9A\u7528\u6CD5\uFF1A/session Session ID +`),a=!1;return o.map((e,i)=>{let A=/^\s{0,3}```/.test(e),r=a;return A&&(a=!a),i===o.length-1?e:r||A||a||!e||!o[i+1]?`${e} +`:/^\s{0,3}(?:[-*+] |\d+[.)] |#{1,6} |\||> )/.test(o[i+1])?`${e} +`:`${e}
`}).join("")}function m_(n,t){if(!n||typeof n!="object"||n.errcode!==0)throw new It("registration-rejected",`\u9489\u9489\u626B\u7801${t}\u5931\u8D25\u3002`);return n}function S_(n,t){let o=Number(n);return Number.isFinite(o)&&o>0?o:t}function QY({fetchImpl:n=fetch,registrationBaseUrl:t=process.env.DINGTALK_REGISTRATION_BASE_URL||dY,registrationSource:o=process.env.DINGTALK_REGISTRATION_SOURCE||hde,now:a=()=>Date.now(),cardMinIntervalMs:e=50,cardBackoffMs:i=1e3,delay:A=wde}={}){if(typeof n!="function")throw new TypeError("fetchImpl must be a function");if(typeof a!="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(i)||i<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=w_(t,{label:"\u9489\u9489\u6CE8\u518C\u670D\u52A1",requireSubdomain:!1}),s=new URL(dde),g=WA(o);if(!g)throw new TypeError("registrationSource is required");let c=new Map,I=new Map,p=new Map,B=Promise.resolve(),f=0,Q=(F,q)=>new URL(q.replace(/^\//,""),F);async function y({clientId:F,clientSecret:q,signal:z,requestKind:K="normal"}){let G=WA(F),V=WA(q);if(!G||!V)throw new TypeError("clientId and clientSecret are required");let H=c.get(G);if(H&&H.expiresAt>a())return H.token;let N=K==="reaction"?p:I;if(N.has(G))return N.get(G);let J=(async()=>{let X=await mn(n,Q(s,"v1.0/oauth2/accessToken"),{body:{appKey:G,appSecret:V},signal:z,action:"\u9274\u6743"}),ie=WA(X?.accessToken);if(!ie)throw new It("invalid-access-token","\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u8BBF\u95EE\u4EE4\u724C\u3002");let De=S_(X?.expireIn??X?.expiresIn,7200),oe=Math.max(1e3,(De-60)*1e3);return c.set(G,{token:ie,expiresAt:a()+oe}),ie})().finally(()=>N.delete(G));return N.set(G,J),J}async function m({clientId:F,clientSecret:q,robotCode:z,messageId:K,conversationId:G,reactionName:V=HI,signal:H},N){let k=WA(F),J=WA(q),X=WA(z)??k,ie=WA(K),De=WA(G),oe=WA(V);if(!k||!J)throw new TypeError("clientId and clientSecret are required");if(!X)throw new TypeError("robotCode is required");if(!ie||!De)throw new TypeError("messageId and conversationId are required");if(!oe)throw new TypeError("reactionName is required");let Se=await y({clientId:k,clientSecret:J,signal:H,requestKind:"reaction"}),Be=await mn(n,Q(s,`v1.0/robot/emotion/${N}`),{body:{robotCode:X,openMsgId:ie,openConversationId:De,emotionType:2,emotionName:oe,textEmotion:{emotionId:Bde,emotionName:oe,text:oe,backgroundId:fde}},headers:{"x-acs-dingtalk-access-token":Se},signal:H,timeoutMs:Cde,action:N==="reply"?"\u6D88\u606F\u72B6\u6001\u6DFB\u52A0":"\u6D88\u606F\u72B6\u6001\u64A4\u56DE"}),Re=Be?.success===!1?tu(Be?.code??Be?.errcode)??"rejected":GQ(Be);if(Re)throw new It("reaction-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6D88\u606F\u72B6\u6001\u8BF7\u6C42\u3002",{providerCode:Re});return!0}async function T({clientId:F,clientSecret:q,robotCode:z,downloadCode:K,signal:G,kind:V}){let H=WA(z),N=WA(K);if(!H||!N)throw new TypeError("robotCode and downloadCode are required");let k=await y({clientId:F,clientSecret:q,signal:G}),J;try{J=await mn(n,Q(s,"v1.0/robot/messageFiles/download"),{body:{downloadCode:N,robotCode:H},headers:{"x-acs-dingtalk-access-token":k},signal:G,action:`${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740`})}catch(ie){throw G?.aborted?ie:new It(`${V}-download-address-failed`,`\u9489\u9489${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u83B7\u53D6\u5931\u8D25\u3002`,{cause:ie,status:ie?.status,providerCode:ie?.providerCode})}let X=WA(J?.downloadUrl??J?.download_url);if(!X)throw new It(`invalid-${V}-download`,`\u9489\u9489\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE${V==="image"?"\u56FE\u7247":"\u6587\u4EF6"}\u4E0B\u8F7D\u5730\u5740\u3002`);return Sde(X)}function _(F){let q=async()=>{let K=Math.max(0,f-a());K>0&&await A(K,F),f=Math.max(f,a())+e},z=B.then(q,q);return B=z.catch(()=>{}),z}async function R(F,q){await _(q.signal);try{return await mn(n,Q(s,F),q)}catch(z){if(!(z instanceof It)||z.status!==403)throw z;return await A(i,q.signal),await _(q.signal),mn(n,Q(s,F),q)}}async function L({clientId:F,clientSecret:q,cardInstanceId:z,text:K,target:G,signal:V}){let H=WA(z),N=WA(K);if(!H)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let J={"x-acs-dingtalk-access-token":await y({clientId:F,clientSecret:q,signal:V})},X=[R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:H,guid:$E(),key:"msgContent",content:Au(N,G),isFull:!0,isFinalize:!1,isError:!0},headers:J,signal:V,action:"AI Card \u5931\u8D25\u6536\u53E3"}),R("v1.0/card/instances",{method:"PUT",body:{outTrackId:H,cardData:y_(N,"5",G),cardUpdateOptions:{updateCardDataByKey:!0}},headers:J,signal:V,action:"AI Card \u5931\u8D25\u72B6\u6001"})],ie=await Promise.allSettled(X);if(ie.every(({status:De})=>De==="rejected"))throw ie[0].reason;return!0}async function U({clientId:F,clientSecret:q,target:z,file:K,signal:G},{uploadType:V,messageKey:H,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 k=EY(z),J;try{J=await y({clientId:F,clientSecret:q,signal:G})}catch(ve){if(G?.aborted)throw ss(G);let tA=Number(ve?.status),fe=ve?.code==="http-error"&&tA>=400&&tA<500?"artifact-provider-rejected":"artifact-provider-failed";throw eu(ve,{fallback:fe})}let X=new URL("media/upload",dY);X.searchParams.set("access_token",J),X.searchParams.set("type",V);let ie=new FormData;ie.append("media",new Blob([K.bytes],{type:K.mediaType??"application/octet-stream"}),K.fileName);let De;try{De=await Dde(n,X,{body:ie,signal:G})}catch(ve){if(G?.aborted)throw ss(G);let tA=Number(ve?.status),fe=ve?.code==="http-error"&&tA>=400&&tA<500?"artifact-provider-rejected":"artifact-provider-failed";throw eu(ve,{fallback:fe})}let oe=GQ(De),Se=WA(De?.media_id);if(oe||!Se)throw eu(new It("upload-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u3002",{providerCode:oe??"missing-media-id"}));G?.throwIfAborted();let Be={robotCode:k.robotCode,msgKey:H,msgParam:JSON.stringify(N(Se,K)),...k.type==="group"?{openConversationId:k.openConversationId}:{userIds:[k.userId]}},Re=k.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",Ne;try{Ne=await mn(n,Q(s,Re),{body:Be,headers:{"x-acs-dingtalk-access-token":J},signal:G,action:"\u6587\u4EF6\u6D88\u606F\u53D1\u9001"})}catch(ve){throw mde(ve,G)}let Je=GQ(Ne);if(Je)throw eu(new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002",{providerCode:Je}));return Ne}return Object.freeze({async beginRegistration({signal:F}={}){let q=m_(await mn(n,Q(r,"app/registration/init"),{body:{source:g},signal:F,action:"\u521D\u59CB\u5316"}),"\u521D\u59CB\u5316"),z=WA(q.nonce);if(!z)throw new It("invalid-registration","\u9489\u9489\u626B\u7801\u521D\u59CB\u5316\u7F3A\u5C11 nonce\u3002");let K=m_(await mn(n,Q(r,"app/registration/begin"),{body:{nonce:z},signal:F,action:"\u521B\u5EFA"}),"\u521B\u5EFA"),G=WA(K.device_code),V=WA(K.verification_uri_complete);if(!G||!V)throw new It("invalid-registration","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u7684\u4FE1\u606F\u4E0D\u5B8C\u6574\u3002");let H=w_(V,{label:"\u9489\u9489\u626B\u7801",requireSubdomain:!1}).toString();return{deviceCode:G,userCode:WA(K.user_code)??void 0,verificationUri:WA(K.verification_uri)??void 0,verificationUriComplete:H,expiresInSeconds:S_(K.expires_in,7200),intervalSeconds:S_(K.interval,5)}},async pollRegistration({deviceCode:F,signal:q}={}){let z=WA(F);if(!z)throw new TypeError("deviceCode is required");let K=m_(await mn(n,Q(r,"app/registration/poll"),{body:{device_code:z},signal:q,action:"\u72B6\u6001\u67E5\u8BE2"}),"\u72B6\u6001\u67E5\u8BE2"),G=WA(K.status)?.toUpperCase();if(!G||!Qde.has(G))throw new It("invalid-registration-status","\u9489\u9489\u626B\u7801\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u72B6\u6001\u3002");let V={status:G,failReason:WA(K.fail_reason)??void 0};if(G==="SUCCESS"&&(V.clientId=WA(K.client_id)??void 0,V.clientSecret=WA(K.client_secret)??void 0,!V.clientId||!V.clientSecret))throw new It("missing-credentials","\u9489\u9489\u626B\u7801\u5DF2\u786E\u8BA4\uFF0C\u4F46\u6CA1\u6709\u8FD4\u56DE\u673A\u5668\u4EBA\u51ED\u636E\u3002");return V},accessToken:y,async addReaction(F){return m(F,"reply")},async recallReaction(F){return m(F,"recall")},async addThinkingReaction(F){return m({...F,reactionName:HI},"reply")},async recallThinkingReaction(F){return m({...F,reactionName:HI},"recall")},async downloadImage({clientId:F,clientSecret:q,robotCode:z,downloadCode:K,signal:G,maxBytes:V}){let H=await T({clientId:F,clientSecret:q,robotCode:z,downloadCode:K,signal:G,kind:"image"});try{return await To(H,{fetchImpl:n,signal:G,maxBytes:V})}catch(N){throw G?.aborted||N instanceof ft?N:new It("image-content-download-failed","\u9489\u9489\u56FE\u7247\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:N})}},async downloadFile({clientId:F,clientSecret:q,robotCode:z,downloadCode:K,signal:G}){let V=await T({clientId:F,clientSecret:q,robotCode:z,downloadCode:K,signal:G,kind:"file"});if(V.protocol!=="https:")throw new It("invalid-file-download","\u9489\u9489\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u3002");try{let H=await n(V,{method:"GET",redirect:"follow",signal:G});if(!H?.ok)throw await H?.body?.cancel?.().catch?.(()=>{}),new It("file-content-download-failed",`\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\uFF08HTTP ${H?.status??"unknown"}\uFF09\u3002`,{status:H?.status});return Buffer.from(await H.arrayBuffer())}catch(H){throw G?.aborted?ss(G):H instanceof It?H:new It("file-content-download-failed","\u9489\u9489\u6587\u4EF6\u5185\u5BB9\u4E0B\u8F7D\u5931\u8D25\u3002",{cause:H})}},async createAiCard({clientId:F,clientSecret:q,target:z,initialText:K,signal:G}){let V=WA(F),H=WA(q),N=WA(K);if(!V||!H)throw new TypeError("clientId and clientSecret are required");if(!N)throw new TypeError("initialText is required");let k=bde(z),J=await y({clientId:V,clientSecret:H,signal:G}),X=`dsh_${$E()}`,ie={"x-acs-dingtalk-access-token":J},De=!1;try{await R("v1.0/card/instances",{body:{cardTemplateId:Ede,outTrackId:X,cardData:{cardParamMap:{config:JSON.stringify({autoLayout:!0})}},callbackType:"STREAM",cardAtUserIds:k.atUserIds?Object.keys(k.atUserIds):void 0,imGroupOpenSpaceModel:{supportForward:!0},imRobotOpenSpaceModel:{supportForward:!0}},headers:ie,signal:G,action:"AI Card \u521B\u5EFA"}),await R("v1.0/card/instances/deliver",{body:Mde(X,k,V),headers:ie,signal:G,action:"AI Card \u6295\u653E"}),De=!0,await R("v1.0/card/instances",{method:"PUT",body:{outTrackId:X,cardData:y_(N,"2",k)},headers:ie,signal:G,action:"AI Card \u542F\u52A8"}),await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:X,guid:$E(),key:"msgContent",content:Au(N,k).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:ie,signal:G,action:"AI Card \u542F\u52A8"})}catch(oe){if(De){let Se=AbortSignal.timeout(5e3);await L({clientId:V,clientSecret:H,cardInstanceId:X,text:w("\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002"),target:k,signal:Se}).catch(()=>{})}throw oe}return{cardInstanceId:X}},async updateAiCard({clientId:F,clientSecret:q,cardInstanceId:z,text:K,target:G,signal:V}){let H=WA(z),N=WA(K);if(!H)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let k=await y({clientId:F,clientSecret:q,signal:V});return await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:H,guid:$E(),key:"msgContent",content:Au(N,G).replace(/\n+$/,""),isFull:!0,isFinalize:!1,isError:!1},headers:{"x-acs-dingtalk-access-token":k},signal:V,action:"AI Card \u66F4\u65B0"}),!0},async finishAiCard({clientId:F,clientSecret:q,cardInstanceId:z,text:K,target:G,signal:V}){let H=WA(z),N=WA(K);if(!H)throw new TypeError("cardInstanceId is required");if(!N)throw new TypeError("text is required");let J={"x-acs-dingtalk-access-token":await y({clientId:F,clientSecret:q,signal:V})},X=Au(N,G);await R("v1.0/card/streaming",{method:"PUT",body:{outTrackId:H,guid:$E(),key:"msgContent",content:X,isFull:!0,isFinalize:!0,isError:!1},headers:J,signal:V,action:"AI Card \u5B8C\u6210"});let ie=!0,De={method:"PUT",body:{outTrackId:H,cardData:y_(N,"3",G),cardUpdateOptions:{updateCardDataByKey:!0}},headers:J,signal:V,action:"AI Card \u6536\u53E3"};try{await R("v1.0/card/instances",De)}catch{try{await R("v1.0/card/instances",De)}catch{ie=!1}}return{delivered:!0,completed:ie}},failAiCard:L,async sendText({clientId:F,clientSecret:q,sessionWebhook:z,text:K,at:G,signal:V}){let H=WA(K);if(!H)throw new TypeError("text is required");let N=Cc(z),k=await y({clientId:F,clientSecret:q,signal:V}),J=G&&typeof G=="object"&&(Array.isArray(G.atUserIds)&&G.atUserIds.length>0||Array.isArray(G.atMobiles)&&G.atMobiles.length>0||G.isAtAll===!0)?{at:G}:{},X=await mn(n,N,{body:{msgtype:"text",text:{content:H},...J},headers:{"x-acs-dingtalk-access-token":k},signal:V,action:"\u6D88\u606F\u56DE\u590D"});if(X?.errcode!==void 0&&X.errcode!==0||X?.code!==void 0&&X.code!==0)throw new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002");return!0},async sendRobotText({clientId:F,clientSecret:q,target:z,text:K,signal:G}){if(typeof K!="string"||!K.trim())throw new TypeError("text is required");let V=K,H=EY(z),N=await y({clientId:F,clientSecret:q,signal:G}),k={robotCode:H.robotCode,msgKey:"sampleText",msgParam:JSON.stringify({content:V}),...H.type==="group"?{openConversationId:H.openConversationId}:{userIds:[H.userId]}},J=H.type==="group"?"v1.0/robot/groupMessages/send":"v1.0/robot/oToMessages/batchSend",X=await mn(n,Q(s,J),{body:k,headers:{"x-acs-dingtalk-access-token":N},signal:G,action:"\u4E3B\u52A8\u6587\u5B57\u6D88\u606F\u53D1\u9001"}),ie=GQ(X);if(ie)throw new It("send-rejected","\u9489\u9489\u670D\u52A1\u62D2\u7EDD\u4E86\u4E3B\u52A8\u6587\u5B57\u6D88\u606F\u3002",{providerCode:ie});return X},async sendFile(F){return U(F,{uploadType:"file",messageKey:"sampleFile",createMessageParams:(q,z)=>({mediaId:q,fileName:z.fileName,fileType:Ode(z.fileName)})})},async sendImage(F){return U(F,{uploadType:"image",messageKey:"sampleImageMsg",createMessageParams:q=>({photoURL:q})})},clearAccessToken(F){let q=WA(F);q&&c.delete(q)}})}var Tde=500,Nde="\u5361\u7247\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u67E5\u770B\u540E\u7EED\u6D88\u606F\u3002";function D_(n,t){if(typeof n!="string")throw new TypeError(`${t} must be a string`);return n}function yY(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} is required`);return n.trim()}function mY({api:n,clientId:t,clientSecret:o,target:a,signal:e,logger:i=console,updateIntervalMs:A=Tde,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=yY(t,"clientId"),c=yY(o,"clientSecret");if(a==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 p=e?.aborted?"aborted":"idle",B=null,f=null,Q=null,y=null,m=null,T=null,_=0,R=()=>{Q!==null&&(s.clearTimeout(Q),Q=null)},L=()=>e?.removeEventListener("abort",z),U=N=>{p=N,f=null,R(),L()},F=()=>!B||typeof n.failAiCard!="function"?Promise.resolve(!1):(T||(T=n.failAiCard({...B,text:w(Nde),signal:AbortSignal.timeout(5e3)}).then(()=>!0,()=>!1)),T),q=N=>{p==="failed"||p==="finished"||p==="aborted"||(F(),U("failed"),i?.error?.(`[dsh-dingtalk] AI Card ${N} failed`))};function z(){p==="finished"||p==="failed"||p==="aborted"||(F(),U("aborted"))}p!=="aborted"&&e?.addEventListener("abort",z,{once:!0});let K=()=>{if(p!=="active"||y||f===null)return;let N=Math.max(0,_+A-I());if(N>0){Q=s.setTimeout(()=>{Q=null,K()},N);return}let k=f;f=null,y=(async()=>{try{await n.updateAiCard({...B,text:k,finished:!1}),_=I()}catch{if(e?.aborted||p==="aborted")return;q("update")}})().finally(()=>{y=null,p==="active"&&f!==null&&K()})};return Object.freeze({start:async N=>{if(D_(N,"initialText"),p!=="idle")return!1;p="starting";try{let k=await n.createAiCard({clientId:g,clientSecret:c,target:a,initialText:N,signal:e}),J=typeof k?.cardInstanceId=="string"?k.cardInstanceId.trim():"";if(!J)throw new TypeError("DingTalk did not return a card instance id");return B=Object.freeze({clientId:g,clientSecret:c,target:a,cardInstanceId:J,signal:e}),p!=="starting"?(F(),!1):(_=I(),p="active",!0)}catch{return e?.aborted||p==="aborted"?(U("aborted"),!1):(q("creation"),!1)}},push:N=>{D_(N,"progressText"),p==="active"&&(f=N,!Q&&!y&&K())},finish:N=>{if(D_(N,"finalText"),p==="finished")return Promise.resolve(!0);if(p==="finishing")return m;if(p!=="active")return Promise.resolve(!1);p="finishing",f=null,R();let k=y;return m=(async()=>{if(k&&await k,p!=="finishing")return!1;try{return await n.finishAiCard({...B,text:N}),p!=="finishing"?!1:(U("finished"),!0)}catch{return e?.aborted||p==="aborted"?(U("aborted"),!1):(q("finish"),!1)}})(),m},get providerMessageIds(){return B?.cardInstanceId?[B.cardInstanceId]:[]}})}function FQ(n){return typeof n=="string"&&n.trim()?n.trim():null}function ba(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 Ia(n,t,o,{requiresMention:a=!1}={}){let e=[],i=o>1?`\uFF08${t+1}/${o}\uFF09`:"";e.push(w("DeepSeek Harness \u9700\u8981\u4F60\u8865\u5145\u4FE1\u606F{progress}\uFF1A",{progress:i})),FQ(n.header)&&e.push("",n.header.trim()),e.push("",FQ(n.question)??w("\u8BF7\u8F93\u5165\u4F60\u7684\u56DE\u7B54\u3002")),FQ(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=FQ(r?.description);e.push(`${s+1}. ${g}${c?` \u2014 ${c}`:""}`)}),e.push("",n.multiSelect===!0?w("\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"):w("\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("",w("\u8BF7\u76F4\u63A5\u56DE\u590D\u4F60\u7684\u7B54\u6848\u3002")),a&&e.push("",w("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u7B54\u6848\u3002")),e.join(` +`)}function SY(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 a=t.find(e=>e?.label===o);return typeof a?.label=="string"?a.label:null}function Ma(n,t){let o=Array.isArray(n.options)?n.options:[];if(o.length===0)return{id:n.id,selected:[],custom:t};let a=SY(t,o);if(n.multiSelect!==!0)return a?{id:n.id,selected:[a]}:{id:n.id,selected:[],custom:t};if(a)return{id:n.id,selected:[a]};let e=[],i=[];for(let A of t.split(/[,,、;;\n]+/)){let r=A.trim();if(!r)continue;let s=SY(r,o);s?e.includes(s)||e.push(s):i.push(r)}return{id:n.id,selected:e,...i.length>0?{custom:i.join("\u3001")}:{}}}var Rde=new Map([["\u6279\u51C6","allowed-once"],["\u540C\u610F","allowed-once"],["yes","allowed-once"],["\u62D2\u7EDD","rejected"],["\u4E0D\u540C\u610F","rejected"],["no","rejected"]]),O_="\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",kde="\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u95EE\u9898\uFF0C\u518D\u7CBE\u51C6\u56DE\u590D\u300C\u6279\u51C6\u300D\u6216\u300C\u62D2\u7EDD\u300D\u3002",Pp="\u8BE5\u5BA1\u6279\u5DF2\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u590D\u3002",vde=5*6e4,Pde=2048;function Di(n){return typeof n=="string"?n.trim():""}function b_(n){return Di(n).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g,"")}function Gde(n){return Rde.get(Di(n).toLowerCase())??null}function DY(n){return n?.type==="approval/requested"&&!!Di(n.sessionId)&&!!Di(n.approvalId)&&!!Di(n.toolName)&&(n.callId===void 0||!!Di(n.callId))&&(n.reason===void 0||typeof n.reason=="string")}function Fde(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=b_(t);if(!o)return t===""?"{}":null;try{return JSON.stringify(JSON.parse(o),null,2)}catch{return o}}function M_(n,{toolCall:t,requiresMention:o=!1,maxArgumentsLength:a=6e3}={}){if(!DY(n))return null;let e=Di(n.callId);if(!e||Di(t?.callId)!==e||Di(t?.name)!==Di(n.toolName))return null;let i=Fde(t);if(!i||i.length>a)return null;let A=[w("DeepSeek Harness \u9700\u8981\u4F60\u7684\u5BA1\u6279\uFF1A"),"",w("\u5DE5\u5177\uFF1A{tool}",{tool:b_(n.toolName)}),w("\u64CD\u4F5C\u53C2\u6570\uFF1A"),i],r=b_(n.reason);return r&&A.push(w("\u539F\u56E0\uFF1A{reason}",{reason:r})),A.push("",w(O_)),o&&A.push("",w("\u7FA4\u804A\u4E2D\u8BF7 @\u673A\u5668\u4EBA \u540E\u53D1\u9001\u5BA1\u6279\u51B3\u5B9A\u3002")),A.join(` +`)}function wY(n,t){return{ok:!0,value:{sessionId:n.sessionId,approvalId:n.approvalId,outcome:t}}}function LQ(n){return n==="allowed-once"?w("\u5DF2\u6279\u51C6\uFF0C\u4EC5\u5BF9\u672C\u6B21\u64CD\u4F5C\u6709\u6548\u3002"):n==="rejected"?w("\u5DF2\u62D2\u7EDD\u6B64\u6B21\u64CD\u4F5C\u3002"):w(Pp)}var _a=class{#e;#A;#t=new Map;#r=new Map;#I=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:a,addressed:e=!0,hasPendingQuestion:i=!1,questionCompletion:A,isQuestionPending:r,send:s}){let c=this.#r.get(t)?.items[0],I=Gde(a),p=(f,Q=!1)=>({...Q?{resolved:!0}:{},process:async y=>{typeof y=="function"&&await y()===!1||await s(f)}}),B=i&&c&&A&&typeof A.then=="function";return i&&!B?null:!c||c.inactive?(this.#I.get(t)??0)<=Date.now()?(this.#I.delete(t),null):I?p(w(Pp),!0):null:c.actor!==o||c.requiresMention&&e!==!0?I?p(w("\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(w(kde));return}}if(await c.activationTask?.catch(()=>{}),await c.presentationTask?.catch(()=>{}),c.inactive||c.resolving){await s(w(Pp));return}if(c.send=s,!Q||!c.presented){if(c.presented||await this.#o(c),c.inactive||c.resolving)return;await s(w(O_));return}if(c.submitting){await s(w("\u5BA1\u6279\u51B3\u5B9A\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u7A0D\u5019\u3002"));return}if(!I){await s(w(O_));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 a=t.payload,e=Di(a?.approvalId);if(!Di(t.rpcId)||!Di(t.sessionId)||!e||!DY(a)||a.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,a),!0;let i=this.#t.get(e);if(i)return i.interaction=t,i.toolCall=t.toolCall,i.presented||await this.#o(i),!0;let A=o?.send,r=Di(o?.key),s=Di(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,a),!0;let g=typeof o?.render=="function"?o.render:null,c=M_(a,{toolCall:t.toolCall,requiresMention:o.requiresMention===!0});if(!c){let B=await this.#g(t,a);return await A(B?w("\u65E0\u6CD5\u5B8C\u6574\u5C55\u793A\u8FD9\u6B21\u64CD\u4F5C\uFF0C\u5DF2\u5B89\u5168\u62D2\u7EDD\u6B64\u6B21\u5BA1\u6279\u3002"):w(Pp)),!0}let I={approvalId:e,sessionId:t.sessionId,interaction:t,toolCall:t.toolCall,key:r,actor:s,requiresMention:o.requiresMention===!0,send:A,render:g,text:c,presented:!1,presentationTask:null,deliveryCompleted:!1,replyTail:null,submitting:!1,inactive:!1,resolving:!1,closedOutcome:null,resolutionNotified:!1,activationTask:null};this.#t.set(e,I);let p=this.#r.get(r)??{items:[]};return p.items.push(I),this.#r.set(r,p),p.items[0]===I&&await this.#o(I),!0}async submitByApprovalId(t,o,{actor:a}={}){let e=this.#t.get(Di(t));return!e||e.inactive||e.resolving||e.submitting||a!==void 0&&e.actor!==a?!1:(await this.#c(e,o),!0)}async handleResolved(t){if(t?.kind!=="approval")return!1;let o=this.#t.get(Di(t.interactionId));if(!o||(o.resolving=!0,o.activationTask&&await o.activationTask.catch(()=>{}),o.inactive||this.#t.get(o.approvalId)!==o))return!0;let a=o.presentationTask,e=o.presented||a,i=o.send,A=this.#s(o);return await this.#i(A,async()=>{let r=o.presented;a&&(r=await a.then(()=>!0,()=>!1)),e&&r&&(o.resolutionNotified=!0,await i(LQ(t.outcome)).catch(()=>{}))}),!0}async closeRoute(t){let o=this.#r.get(t);if(!o)return;let a=[...o.items];for(let e of a)this.#s(e);await Promise.all(a.map(async e=>{try{await e.interaction.respond(wY(e,"rejected"),{signal:AbortSignal.timeout(5e3)}),e.closedOutcome="rejected",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(LQ("rejected")).catch(()=>{}))}catch(i){i?.code==="interaction-not-pending"?(e.closedOutcome="resolved",(e.presented||e.deliveryCompleted)&&!e.resolutionNotified&&(e.resolutionNotified=!0,await e.send(w(Pp)).catch(()=>{}))):this.#A.warn?.(`[dsh-im:${this.#e}] failed to reject a closing approval:`,i)}}))}async#o(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=t.render?Promise.resolve().then(()=>t.render(t,t.send)):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(LQ(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(wY(t,o))}catch(i){if(i?.code==="interaction-not-pending"){let A=t.send,r=this.#s(t);await this.#i(r,async()=>{t.resolutionNotified||await A(w(Pp)).catch(()=>{})});return}if(t.inactive)return;t.submitting=!1,this.#A.error?.(`[dsh-im:${this.#e}] failed to submit an approval:`,i),await t.send(w("\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 a=t.send,e=this.#s(t);await this.#i(e,async()=>{t.resolutionNotified||await a(LQ(o)).catch(()=>{})})}async#i(t,o){let a,e=new Promise(i=>{a=i});t&&(t.activationTask=e);try{await o()}finally{a(),t?.activationTask===e&&(t.activationTask=null)}await this.#a(t)}async#a(t){if(t)try{await this.#o(t)}catch(o){this.#A.error?.(`[dsh-im:${this.#e}] failed to present the next approval:`,o);try{t.interaction.reconnect?.()}catch{}}}#s(t){if(t.inactive)return null;t.inactive=!0,this.#p(t.key),this.#t.delete(t.approvalId);let o=this.#r.get(t.key);if(!o)return null;let a=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):a?o.items[0]:null}#p(t){let o=Date.now();for(let[a,e]of this.#I)e<=o&&this.#I.delete(a);for(this.#I.delete(t),this.#I.set(t,o+vde);this.#I.size>Pde;)this.#I.delete(this.#I.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(a){if(a?.code==="interaction-not-pending")return!1;throw a}}};var __=new WeakMap;function Lde(n){let t=__.get(n);return t||(t=new Map,__.set(n,t)),t}async function Ig(n,t,o){let a=typeof n;if(a!=="object"&&a!=="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=Lde(n),i=e.get(t)??Promise.resolve(),A,r=new Promise(s=>{A=s});e.set(t,r),await i;try{return await o()}finally{A(),e.get(t)===r&&(e.delete(t),e.size===0&&__.delete(n))}}var Ude=/(?:\u001b\]|\u009d)(?:(?!\u0007|\u001b\\)[\s\S])*(?:\u0007|\u001b\\|$)/gu,Hde=/(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]/gu,Kde=/\u001b[@-_]/gu,xde=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/gu,Yde=/[\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu,jde=/^(?:[\s\S]*?<\/dsh_im_source>\s*)?(?:[\s\S]*?<\/dsh_im_source_guidance>\s*)?(?:[\s\S]*?<\/dsh_im_reply_to>\s*)?/u,Jde=new Intl.Segmenter(void 0,{granularity:"grapheme"});function T_(n){return n.replace(Ude,"").replace(Hde,"").replace(Kde,"").replace(xde,"").replace(Yde,"").replace(/\s+/gu," ").trim()}function N_(n,t=60){if(Buffer.byteLength(n,"utf8")<=t)return n;let o="\u2026",a=t-Buffer.byteLength(o,"utf8"),e="";for(let{segment:i}of Jde.segment(n)){if(Buffer.byteLength(e+i,"utf8")>a)break;e+=i}return`${e.trimEnd()}${o}`}function qde(n){return typeof n=="string"?n:Array.isArray(n)?n.filter(t=>t?.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` +`):""}function zde(n){let t=n?.name??n?.filename??n?.fileName;return typeof t!="string"?"":t.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/gu,"").trim()??""}function OY({text:n,content:t,files:o}={}){let a=typeof n=="string"?T_(n):"";if(a)return N_(a);let e=T_(qde(t).replace(jde,""));if(e)return N_(e);let i=Array.isArray(o)?o.map(zde).find(Boolean):"",A=i?T_(i):"";return A?N_(A):null}var Oi="workspace-session-stale";function bY(n,t){if(typeof n.workspaceSession=="function")return n.workspaceSession(t);let o={sessionId:t,sessionExists:(...a)=>n.sessionExists(t,...a),models:(...a)=>n.getSessionModels(t,...a),selectModel:(...a)=>n.selectSessionModel(t,...a),isRunning:(...a)=>n.isSessionRunning(t,...a),hasActiveTurn:(...a)=>n.hasActiveTurn(t,...a),stopActiveTurn:(...a)=>n.stopActiveTurn(t,...a),steerActiveTurn:(...a)=>n.steerActiveTurn(t,...a),ask:(...a)=>n.ask(t,...a)};return typeof n.renameSession=="function"&&(o.renameTitle=(...a)=>n.renameSession(t,...a)),Object.freeze(o)}async function Vde(n,t){return t===void 0?n.sessionExists():n.sessionExists(t)}async function Wde(n,t){return t===void 0?n.createSession():n.createSession(t)}async function Ta({harness:n,state:t,key:o,text:a,content:e,contextEnhanced:i=!1,createOptions:A,existsOptions:r,askOptions:s}){let g=i?OY({text:a,content:e,files:typeof s=="object"?s?.files:void 0}):null,c=A?.signal??(typeof s=="object"?s?.signal:void 0),I=c?{signal:c}:void 0;for(;;)try{let p=await Ig(t,o,async()=>{let m=t.sessionFor(o),T=m?bY(n,m):null;if(!T||!await Vde(T,r)){if(m=await Wde(n,A),await t.setSession(o,m)===!1)return null;if(T=bY(n,m),g&&typeof T.renameTitle=="function")try{await T.renameTitle(g,I)}catch(_){if(_?.code===Oi||I?.signal?.aborted)throw _;console.warn("[dsh-im] unable to set the initial Session title:",_?.message??_)}}return{sessionId:m,session:T}});if(!p)continue;let B=[],f=typeof s=="object"&&typeof s?.onArtifact=="function"?s.onArtifact:null,Q=typeof s=="number"?{timeoutMs:s}:{...s};Q.onArtifact=async m=>{B.push(m),await f?.(m)};let y=await p.session.ask(e??a,Q);return{sessionId:p.sessionId,answer:y,...B.length>0?{artifacts:B}:{}}}catch(p){if(p?.code!==Oi)throw p}}var _Y=/^\/compact(?=$|\s)([\s\S]*)$/i,Zde="\u7528\u6CD5\uFF1A/compact\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",MY=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 KI(n){return{handled:!0,message:n,messages:[n]}}function Xde(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?w("\u5DF2\u538B\u7F29 {count} \u6761\u5386\u53F2\u8BB0\u5F55\uFF08\u7EA6 {tokens} \u4E2A token\uFF09\u3002",{count:o[1],tokens:o[2]}):MY.has(t)?w(MY.get(t)):t||(n.kind==="success"?w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5B8C\u6210\u3002"):w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\u3002"))}function $de(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?w("\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"?w("\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u751F\u6210\u56DE\u590D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="cancelled"||n?.name==="AbortError"?w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5DF2\u53D6\u6D88\u3002"):t===Oi||t==="workspace-bot-not-found"?w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):t==="commands-unavailable"?w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u4ECE\u673A\u5668\u4EBA\u6267\u884C\u4E0A\u4E0B\u6587\u538B\u7F29\u3002"):w("\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function Na(n,t,o,a,e={}){if(!R_(n))return null;if(_Y.exec(n.trim())[1].trim())return KI(w(Zde));if(typeof o?.sessionFor!="function")return KI(w("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u4F1A\u8BDD\u72B6\u6001\u3002"));let A=o.sessionFor(a);if(typeof A!="string"||!A)return KI(w("\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 KI(w("\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 KI(r===void 0?w("\u5F53\u524D Harness \u672A\u6CE8\u518C /compact \u547D\u4EE4\uFF0C\u8BF7\u786E\u8BA4\u4E0A\u4E0B\u6587\u538B\u7F29\u7EC4\u4EF6\u5DF2\u542F\u7528\u3002"):Xde(r?.result))}catch(r){return KI($de(r))}}function R_(n){return typeof n=="string"&&_Y.test(n.trim())}import{isDeepStrictEqual as lhe}from"node:util";import{realpath as RY,stat as kY}from"node:fs/promises";import{isAbsolute as vY,resolve as ehe}from"node:path";var PY=/^\/(?:workspace|ws)(?:\s+([\s\S]+))?$/i,GY=/^\/(?:workspacelist|workspaces|wsl)(?:\s+([\s\S]+))?$/i,FY=/^\/(?:sessionlist|sessions)(?:\s+([\s\S]+))?$/i,LY=/^\/session(?=$|\s)/i,Ahe=/^\/session[ \t]+([^\s]+)$/i,the=4096,rhe=1800,ihe=256,UY=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,ahe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,HY="\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09",xI=["\u7528\u6CD5\uFF1A","/sessionlist \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u4F1A\u8BDD","/sessionlist --limit N \u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD\uFF08N \u4E3A\u6B63\u6574\u6570\uFF09","/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 _t(n,t=[n]){return{handled:!0,message:n,messages:t}}function Gp(n){return typeof n!="string"||n.length>the||!vY(n)||UY.test(n)?null:ehe(n)}function UQ(n){return typeof n!="string"?"":n.replace(ahe," ").replace(/\s+/gu," ").trim()}function TY(n){return typeof n=="string"&&n.length>0&&n.length<=ihe&&!new RegExp("\\p{White_Space}","u").test(n)&&!UY.test(n)}function P_(n){let t=typeof n=="string"?n.trim():"";if(!t)return{selector:"",limit:null};if(!t.toLowerCase().startsWith("--limit"))return{selector:t,limit:null};let o=/^--limit[ \t]+(\d+)$/iu.exec(t),a=o?Number(o[1]):null;return!Number.isSafeInteger(a)||a<1?{error:w(xI)}:{selector:"",limit:a}}async function k_(n){let t=await Promise.all(n.map(async o=>{let a=Gp(o);if(!a)return null;try{return(await kY(a)).isDirectory()?Gp(await RY(a)):null}catch{return null}}));return[...new Set(t.filter(Boolean))]}async function v_(n){if(typeof n!="string"||!vY(n.trim()))return{error:w(`\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002 +{usage}`,{usage:w(xI)})};let t=Gp(n.trim());if(!t)return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 +{usage}`,{usage:w(xI)})};let o;try{o=await kY(t)}catch{return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 +{usage}`,{usage:w(xI)})}}if(!o.isDirectory())return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002 +{usage}`,{usage:w(xI)})};try{let a=Gp(await RY(t));return a?{workspace:a}:{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u6216\u957F\u5EA6\u8D85\u8FC7\u9650\u5236\u3002 +{usage}`,{usage:w(xI)})}}catch{return{error:w(`\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002 +{usage}`,{usage:w(xI)})}}}async function Fp(n,t={}){let o=await n.listWorkspaces(t),a=typeof n?.currentWorkspace=="function"?n.currentWorkspace():null,[e]=a?await k_([a]):[],i=await k_(Array.isArray(o)?o:[]),A=[...new Set([...e?[e]:[],...i])];return n.assertWorkspaceScope?.(),{current:e??null,paths:A}}function lg(n){let t=[],o=0;for(;o=o)a=e+1;else{let i=n.charCodeAt(a-1),A=n.charCodeAt(a);i>=55296&&i<=56319&&A>=56320&&A<=57343&&(a-=1)}}t.push(n.slice(o,a)),o=a}return t}async function ohe(n,t){if(n[1]?.trim())return _t(w("\u7528\u6CD5\uFF1A/workspacelist"));if(typeof t?.listWorkspaces!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u3002"));try{let{current:o,paths:a}=await Fp(t);if(a.length===0)return _t(w("\u5F53\u524D Harness Host \u4E0A\u6CA1\u6709\u4ECD\u7136\u5B58\u5728\u7684\u5DF2\u767B\u8BB0\u5DE5\u4F5C\u533A\u3002"));let i=[w("\u5F53\u524D Harness Host \u4E0A\u5B58\u5728\u7684\u5DE5\u4F5C\u533A\uFF08{count}\uFF09\uFF1A",{count:a.length}),...a.map((A,r)=>`${r+1}. ${A}${A===o?w("\uFF08\u5F53\u524D\uFF09"):""}`),"",w("\u5207\u6362\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84"),w("\u67E5\u770B\u4F1A\u8BDD\uFF1A/sessionlist \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84")].join(` +`);return _t(i,lg(i))}catch(o){return o?.code==="workspace-bot-not-found"?_t(w("\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")):_t(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}async function G_(n,t,o={}){if(!n){if(typeof t?.currentWorkspace!="function")return{error:w("\u5F53\u524D\u673A\u5668\u4EBA\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u4F5C\u533A\u3002")};let e=await v_(t.currentWorkspace());return t.assertWorkspaceScope?.(),e}if(/^\d+$/u.test(n)){if(typeof t?.listWorkspaces!="function")return{error:w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002")};let{paths:e}=await Fp(t,o),i=Number(n);return!Number.isSafeInteger(i)||i<1||i>e.length?{error:w("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002")}:{workspace:e[i-1]}}let a=await v_(n);return t.assertWorkspaceScope?.(),a}function nhe(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 a=s=>String(s).padStart(2,"0"),e=`${a(o.getHours())}:${a(o.getMinutes())}`,i=s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime(),A=new Date,r=Math.round((i(A)-i(o))/864e5);return r===0?w("\u4ECA\u5929 {time}",{time:e}):r===1?w("\u6628\u5929 {time}",{time:e}):r===2?w("\u524D\u5929 {time}",{time:e}):o.getFullYear()===A.getFullYear()?w("{month}\u6708{day}\u65E5 {time}",{month:o.getMonth()+1,day:o.getDate(),time:e}):w("{year}\u5E74{month}\u6708{day}\u65E5",{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()})}function she(n,t,{currentWorkspace:o=!1}={}){let a=t.map(e=>{let i=UQ(e?.sessionId);if(!i)throw new TypeError("Harness returned an invalid session id");let A=e?.summaryAvailable===!1?w("\u6807\u9898\u6682\u4E0D\u53EF\u7528"):UQ(e?.title)||w("\u6682\u65E0\u6807\u9898"),r=nhe(e?.time),s=`${r?` \xB7 ${r}`:""}${e?.archived===!0?w("\uFF08\u5DF2\u5F52\u6863\uFF09"):""}`;return`${A}${s} + ID: ${i}`});return a.length===0?w(`\u5DE5\u4F5C\u533A\uFF1A{workspace} +\u8BE5\u5DE5\u4F5C\u533A\u6682\u65E0\u4F1A\u8BDD\u3002`,{workspace:n}):[w("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:n}),w("\u4F1A\u8BDD\uFF08{count}\uFF09\uFF1A",{count:a.length}),"",...a.map((e,i)=>`${i+1}. ${e}`),"",o?w("\u7ED1\u5B9A\u7528\u6CD5\uFF1A/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7\uFF08/session N\uFF09"):w(`\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 rhe(n){if(typeof n?.currentWorkspace!="function")return null;let[t]=await M_([n.currentWorkspace()]);return n.assertWorkspaceScope?.(),t??null}async function ahe(n,t){let o=T_(n[1]);if(o.error)return _t(o.error);if(typeof t?.listWorkspaceSessions!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002"));try{let i=await N_(o.selector,t);if(i.error)return _t(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=vd(e.workspace)??i.workspace,A=await rhe(t),r=o.limit===null?e.sessions:e.sessions.slice(0,o.limit),s=the(a,r,{currentWorkspace:a===A});return _t(s,cg(s))}catch(i){return i?.code==="workspace-bot-not-found"?_t(w("\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")):_t(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}function OY(n){return n?.code==="session-id-invalid"?w(`Session ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:w(PY)}):["session-not-registered","session-not-found"].includes(n?.code)?w("\u672A\u627E\u5230\u8BE5\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u786E\u8BA4 Session ID\u3002"):n?.code==="session-subagent-unsupported"?w("\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"?w("\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"?w("\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"?w("\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"):[wa,"agent-busy","session-conflict","workspace-conflict"].includes(n?.code)?w("\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):w("\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function ihe(n,t,o){let e=Vpe.exec(n)?.[1];if(typeof e=="string"&&/^\d+$/u.test(e)){if(typeof t?.listWorkspaceSessions!="function"||typeof t?.currentWorkspace!="function")return _t(w("\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 __(t.currentWorkspace());if(a.error)return _t(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 _t(w("\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(!DY(s))throw new TypeError("Harness returned an invalid session id");e=s}catch(a){return a?.code==="workspace-bot-not-found"?_t(OY(a)):_t(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}if(!DY(e))return _t(w(PY));if(typeof t?.bindWorkspaceSession!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD\u3002"));if(typeof o!="string"||!o)return _t(w("\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=vd(a?.workspace),r=vQ(a?.sessionId);if(!A||!r)throw new TypeError("Harness returned an invalid bound session");let s=vQ(a?.title)||w("\u6682\u65E0\u6807\u9898"),g=[w("\u5F53\u524D\u804A\u5929\u5DF2\u7ED1\u5B9A\u4F1A\u8BDD\uFF1A"),w("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:A}),w("\u6807\u9898\uFF1A{title}",{title:s}),`ID\uFF1A${r}`,w("\u5F52\u6863\uFF1A{archived}",{archived:a?.archived===!0?w("\u662F"):w("\u5426")}),w("\u53D1\u9001 /history \u67E5\u770B\u6700\u8FD1\u5BF9\u8BDD\u3002")].join(` -`);return _t(g,cg(g))}catch(a){return _t(OY(a))}}async function To(n,t,o){if(!R_(n))return null;let i=n.trim();if(kY.test(i))return ihe(i,t,o);let e=RY.exec(i);if(e)return ahe(e,t);let a=NY.exec(i);if(a)return ehe(a,t);let A=TY.exec(i);if(!A)return null;let r=A[1]?.trim();if(!r)return _t(w("\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84"));if(typeof t?.switchWorkspace!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5207\u6362\u5DE5\u4F5C\u533A\u3002"));try{let s=r;if(/^\d+$/u.test(r)){if(typeof t?.listWorkspaces!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002"));let{paths:c}=await Pd(t),I=Number(r);if(!Number.isSafeInteger(I)||I<1||I>c.length)return _t(w("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002"));s=c[I-1]}let g=await t.switchWorkspace(s);return _t(w("\u5DE5\u4F5C\u533A\u5DF2\u5207\u6362\u4E3A\uFF1A{workspace}",{workspace:g}))}catch(s){if(["workspace-not-absolute","workspace-not-found","workspace-not-directory"].includes(s?.code))return _t(w(`{message} -\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84`,{message:s.message}));if(s?.code==="workspace-bot-not-found")return _t(w("\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}}function R_(n){if(typeof n!="string")return!1;let t=n.trim();return kY.test(t)||RY.test(t)||NY.test(t)||TY.test(t)}var FY=/^\/history(?=$|\s)([\s\S]*)$/iu,nhe="\u7528\u6CD5\uFF1A/history [\u6570\u91CF]\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09",she=5,ghe=50,che=3,GY=1e4;function hc(n){return{handled:!0,message:n,messages:cg(n)}}function LY(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"?[w("[\u56FE\u7247]")]:t?.type==="file"?[w("[\u6587\u4EF6]")]:[]).join(` -`).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu,"").trim()||w("\u672C\u6761\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6587\u5B57\u3002")}function Ihe(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(Ka(LY(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 lhe(n,t){if(n.length<=t)return n;let o=w("\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 dhe(n,t,o,i){let e=n.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,"").slice(0,12),a=w("\u4F1A\u8BDD\u5386\u53F2\uFF5C{session}\uFF5C\u6700\u8FD1 {count} \u6761",{session:e,count:t.length}),A=[w("\u4EE5\u4E0A\u4E3A\u5386\u53F2\u8BB0\u5F55\uFF0C\u4E0D\u662F\u672C\u6B21\u65B0\u56DE\u590D\u3002")];t.length({...c,text:LY(c.content)})),s=500,g;do{let c=r.map((I,d)=>`${d+1}. ${I.role==="user"?w("\u7528\u6237"):w("\u52A9\u624B")} -${lhe(I.text,s)}`);g=hc([a,...c,A.join(` +`)}async function ghe(n){if(typeof n?.currentWorkspace!="function")return null;let[t]=await k_([n.currentWorkspace()]);return n.assertWorkspaceScope?.(),t??null}async function che(n,t){let o=P_(n[1]);if(o.error)return _t(o.error);if(typeof t?.listWorkspaceSessions!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5217\u51FA\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u3002"));try{let a=await G_(o.selector,t);if(a.error)return _t(a.error);let e=await t.listWorkspaceSessions(a.workspace);if(!e||!Array.isArray(e.sessions))throw new TypeError("Harness returned an invalid workspace session list");t.assertWorkspaceScope?.();let i=Gp(e.workspace)??a.workspace,A=await ghe(t),r=o.limit===null?e.sessions:e.sessions.slice(0,o.limit),s=she(i,r,{currentWorkspace:i===A});return _t(s,lg(s))}catch(a){return a?.code==="workspace-bot-not-found"?_t(w("\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")):_t(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u5DE5\u4F5C\u533A\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}function NY(n){return n?.code==="session-id-invalid"?w(`Session ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:w(HY)}):["session-not-registered","session-not-found"].includes(n?.code)?w("\u672A\u627E\u5230\u8BE5\u4F1A\u8BDD\uFF0C\u8BF7\u5148\u6267\u884C /sessionlist \u786E\u8BA4 Session ID\u3002"):n?.code==="session-subagent-unsupported"?w("\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"?w("\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"?w("\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"?w("\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"):[Oi,"agent-busy","session-conflict","workspace-conflict"].includes(n?.code)?w("\u5DE5\u4F5C\u533A\u6216\u4F1A\u8BDD\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002"):w("\u6682\u65F6\u65E0\u6CD5\u7ED1\u5B9A\u4F1A\u8BDD\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function Ihe(n,t,o){let e=Ahe.exec(n)?.[1];if(typeof e=="string"&&/^\d+$/u.test(e)){if(typeof t?.listWorkspaceSessions!="function"||typeof t?.currentWorkspace!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u7ED1\u5B9A\uFF0C\u8BF7\u4F7F\u7528 /session Session ID\u3002"));try{let i=await v_(t.currentWorkspace());if(i.error)return _t(i.error);let A=await t.listWorkspaceSessions(i.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 _t(w("\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(!TY(s))throw new TypeError("Harness returned an invalid session id");e=s}catch(i){return i?.code==="workspace-bot-not-found"?_t(NY(i)):_t(w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u4F1A\u8BDD\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"))}}if(!TY(e))return _t(w(HY));if(typeof t?.bindWorkspaceSession!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD\u3002"));if(typeof o!="string"||!o)return _t(w("\u5F53\u524D\u6D88\u606F\u7F3A\u5C11\u53EF\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u4E0A\u4E0B\u6587\u3002"));try{let i=await t.bindWorkspaceSession(o,e);t.assertWorkspaceScope?.();let A=Gp(i?.workspace),r=UQ(i?.sessionId);if(!A||!r)throw new TypeError("Harness returned an invalid bound session");let s=UQ(i?.title)||w("\u6682\u65E0\u6807\u9898"),g=[w("\u5F53\u524D\u804A\u5929\u5DF2\u7ED1\u5B9A\u4F1A\u8BDD\uFF1A"),w("\u5DE5\u4F5C\u533A\uFF1A{workspace}",{workspace:A}),w("\u6807\u9898\uFF1A{title}",{title:s}),`ID\uFF1A${r}`,w("\u5F52\u6863\uFF1A{archived}",{archived:i?.archived===!0?w("\u662F"):w("\u5426")}),w("\u53D1\u9001 /history \u67E5\u770B\u6700\u8FD1\u5BF9\u8BDD\u3002")].join(` +`);return _t(g,lg(g))}catch(i){return _t(NY(i))}}async function Ro(n,t,o){if(!F_(n))return null;let a=n.trim();if(LY.test(a))return Ihe(a,t,o);let e=FY.exec(a);if(e)return che(e,t);let i=GY.exec(a);if(i)return ohe(i,t);let A=PY.exec(a);if(!A)return null;let r=A[1]?.trim();if(!r)return _t(w("\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84"));if(typeof t?.switchWorkspace!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u5207\u6362\u5DE5\u4F5C\u533A\u3002"));try{let s=r;if(/^\d+$/u.test(r)){if(typeof t?.listWorkspaces!="function")return _t(w("\u5F53\u524D\u673A\u5668\u4EBA\u6682\u4E0D\u652F\u6301\u6309\u5E8F\u53F7\u9009\u62E9\u5DE5\u4F5C\u533A\u3002"));let{paths:c}=await Fp(t),I=Number(r);if(!Number.isSafeInteger(I)||I<1||I>c.length)return _t(w("\u5DE5\u4F5C\u533A\u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u6267\u884C /workspacelist\u3002"));s=c[I-1]}let g=await t.switchWorkspace(s);return _t(w("\u5DE5\u4F5C\u533A\u5DF2\u5207\u6362\u4E3A\uFF1A{workspace}",{workspace:g}))}catch(s){if(["workspace-not-absolute","workspace-not-found","workspace-not-directory"].includes(s?.code))return _t(w(`{message} +\u7528\u6CD5\uFF1A/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84`,{message:s.message}));if(s?.code==="workspace-bot-not-found")return _t(w("\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}}function F_(n){if(typeof n!="string")return!1;let t=n.trim();return LY.test(t)||FY.test(t)||GY.test(t)||PY.test(t)}var xY=/^\/history(?=$|\s)([\s\S]*)$/iu,phe="\u7528\u6CD5\uFF1A/history [\u6570\u91CF]\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09",dhe=5,hhe=50,Ehe=3,KY=1e4;function Bc(n){return{handled:!0,message:n,messages:lg(n)}}function YY(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"?[w("[\u56FE\u7247]")]:t?.type==="file"?[w("[\u6587\u4EF6]")]:[]).join(` +`).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu,"").trim()||w("\u672C\u6761\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u6587\u5B57\u3002")}function uhe(n){let t=[],o=new Map;for(let a of n){let e=a.data;if(a.type==="user/message"&&a.surfaceOp==="append"&&e?.source?.kind==="user"){if(Ki(YY(e.content)))continue;t.push({seq:a.seq,role:"user",content:e.content})}else if(a.type==="assistant/message"&&a.surfaceOp==="append"&&Number.isSafeInteger(e?.turn)&&e.turn>=0)o.set(e.turn,a);else if(a.type==="turn/end"){let i=o.get(e?.turn);if(o.delete(e?.turn),(e?.reason?.kind??e?.reason)!=="completed"||!i||i.data.interrupted===!0)continue;t.push({seq:i.seq,role:"assistant",content:i.data.message?.content})}}return t.sort((a,e)=>a.seq-e.seq)}function Che(n,t){if(n.length<=t)return n;let o=w("\uFF08\u5DF2\u622A\u65AD\uFF09"),a=Math.max(0,t-o.length),e=n.charCodeAt(a-1);return e>=55296&&e<=56319&&(a-=1),`${n.slice(0,Math.max(0,a))}${o}`}function Bhe(n,t,o,a){let e=n.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,"").slice(0,12),i=w("\u4F1A\u8BDD\u5386\u53F2\uFF5C{session}\uFF5C\u6700\u8FD1 {count} \u6761",{session:e,count:t.length}),A=[w("\u4EE5\u4E0A\u4E3A\u5386\u53F2\u8BB0\u5F55\uFF0C\u4E0D\u662F\u672C\u6B21\u65B0\u56DE\u590D\u3002")];t.length({...c,text:YY(c.content)})),s=500,g;do{let c=r.map((I,p)=>`${p+1}. ${I.role==="user"?w("\u7528\u6237"):w("\u52A9\u624B")} +${Che(I.text,s)}`);g=Bc([i,...c,A.join(` `)].join(` -`)),s=Math.floor(s/2)}while(s>0&&(g.message.length>3e3||g.messages.length>3));return g}function phe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u4F1A\u8BDD\u3002"):t===wa||t==="workspace-bot-not-found"||t==="session-binding-changed"?w("\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"?w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"):n?.name==="AbortError"?w("\u5386\u53F2\u8BFB\u53D6\u5DF2\u53D6\u6D88\u3002"):n?.name==="TimeoutError"||t==="harness-timeout"?w("\u8BFB\u53D6\u5386\u53F2\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}function Ka(n){return typeof n=="string"&&FY.test(n.trim())}async function ao(n,t,o,i,{signal:e,isDirect:a=!1,hasImages:A=!1,hasFiles:r=!1}={}){if(!Ka(n))return null;let s=FY.exec(n.trim())[1].trim();if(s&&(!/^\d+$/u.test(s)||/^0+$/u.test(s)))return hc(w(nhe));let g=s?Math.min(Number(s),she):3;if(!a)return hc(w("\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528 /history\u3002"));if(A||r)return hc(w("/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 hc(w("\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 hc(w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"));let d=AbortSignal.timeout(GY),B=e?AbortSignal.any([e,d]):d,f=Date.now()+GY,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:ghe,...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 F=y??1/0;for(let q of H.events){let z=q?.event;if(!z||!Number.isSafeInteger(z.seq)||z.seq<0||typeof z.type!="string"||!z.type)throw new TypeError("Invalid history event");if(m!==void 0&&z.seq>m)continue;let K=Q.get(z.seq);if(K){if(!ohe(K,z))throw new TypeError("Conflicting history events")}else{if(y!==void 0&&z.seq>=y)throw new TypeError("Invalid history cursor");Q.set(z.seq,z)}F=Math.min(F,z.seq)}let L=[...Q.values()].sort((q,z)=>q.seq-z.seq);if(m??=L.at(-1)?.seq,_=H.hasMore,_&&(!Number.isFinite(F)||F===y))throw new TypeError("History cursor did not advance");if(T=Ihe(L).slice(-g),T.length>=g||!_)break;y=F}return T.length===0?hc(_?w("\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u672A\u627E\u5230\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002"):w("\u5F53\u524D\u4F1A\u8BDD\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002")):dhe(c,T,g,_)}catch(I){return hc(phe(I))}}var PQ={name:"dsh-im-ops",version:"4.9.1-ops.0",description:"Ops fork of dsh-im (all channels kept). Based on @xmanrui/dsh-im@4.9.1 \u2014 access/session policies owned here.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","ai-office","ops","fork"],author:"xmanrui (https://github.com/xmanrui)",contributors:[{name:"C3H3-AI",url:"https://github.com/C3H3-AI"},{name:"divingleee",url:"https://github.com/divingleee"},{name:"Chan-0312",url:"https://github.com/Chan-0312"}],license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/hansjone/dsh-im-ops.git"},homepage:"https://github.com/hansjone/dsh-im-ops#readme",bugs:{url:"https://github.com/hansjone/dsh-im-ops/issues"},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","PROACTIVE_DELIVERY.md","PROACTIVE_DELIVERY.en.md","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",undici:"7.29.0"},devDependencies:{"@deepseek-ai/cordis":"4.0.1","@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"},directories:{doc:"docs",lib:"lib",test:"test"}};var Ehe=/^\/(?:stop|steer|version)(?=$|\s)/iu,uhe=/^\/stop(?=$|\s)/iu,Che=/^\/version(?=$|\s)/iu,Bhe="\u7528\u6CD5\uFF1A/stop\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",fhe="\u7528\u6CD5\uFF1A/version\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",Qhe="\u7528\u6CD5\uFF1A/steer <\u8865\u5145\u6307\u4EE4>",yhe="\u63A7\u5236\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002";function No(n,t={}){return{message:n,...t}}function UY(n){return n?{signal:n}:{}}function HY(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 ci(n){return typeof n=="string"&&Ehe.test(n.trim())}async function Ti(n,t,o,i,{signal:e,hasImages:a=!1,pendingInteraction:A=!1,control:r}={}){if(!ci(n))return null;let s=n.trim(),g=uhe.test(s),c=Che.test(s);if(a)return No(w(yhe));if(c)return/^\/version$/iu.test(s)?No(`dsh-im v${PQ.version}`):No(w(fhe));if(g){if(!/^\/stop$/iu.test(s))return No(w(Bhe));let Q=HY(t,o,i);if(!Q)return No(w("\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,UY(e))?No(w("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\u3002"),{stopped:!0}):No(w("\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 No(w(Qhe));if(A)return No([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));let B=HY(t,o,i);if(!B)return No(w("\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,UY(e));return No(f?w("\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\uFF0CAgent \u4F1A\u5728\u4E0B\u4E00\u6B65\u8BFB\u53D6\u3002"):w("\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 mhe=/^\/model(?=$|\s)/i,WY=/^\/models(?=$|\s)/i,ZY=/^\/reasoning(?=$|\s)/i,XY=/^\/reasonings(?=$|\s)/i,$Y=/^\/reasoninglist(?=$|\s)/i,KY="\u7528\u6CD5\uFF1A/model <\u5E8F\u53F7\u6216 provider/model> [\u63A8\u7406\u7B49\u7EA7ID]",She="\u7528\u6CD5\uFF1A/models\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",whe="\u7528\u6CD5\uFF1A/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default]",Dhe="\u7528\u6CD5\uFF1A/reasoninglist \u6216 /reasonings\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",e1="session-binding-changed",A1="model-selection-mismatch",Ohe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu;function Ct(n){return{handled:!0,message:n,messages:cg(n)}}function ra(n){return typeof n!="string"?"":n.replace(Ohe," ").replace(/\s+/gu," ").trim()}function bhe(n){return n?{signal:n}:{}}function Mhe(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 t1(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:Mhe(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 Ig(n,t){return`${n}/${t}`}function r1(n,t){return n?.provider===t?.provider&&n?.model===t?.model}function _he(n,t){return r1(n,t)&&n?.reasoningEffort===t?.reasoningEffort}function The(n,t){return r1(n,t)&&(t.reasoningEffort===void 0||n?.reasoningEffort===t.reasoningEffort)}function G_(n){if(!n?.provider||!n?.model)return"";let t=Ig(n.provider,n.model);return n.reasoningEffort===void 0?t:`${t} \xB7 reasoningEffort=${ra(n.reasoningEffort)}`}function xY(n,t,o){let i=new Error(`Harness ${o} did not confirm the selected model`);return i.code=A1,i.expected=n,i.actual=t,i.source=o,i}function a1(){let n=new Error("Conversation binding changed during model selection");return n.code=e1,n}function YY(n,t,o){if((typeof n?.sessionFor=="function"?n.sessionFor(t):null)!==o)throw a1()}function Nhe(n,t){for(let o of n.groups)for(let i of o.models)if(Ig(o.id,i.id)===t)return{provider:o.id,model:i.id};return null}function Rhe(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 jY(n){if(!/^\d+$/u.test(n))return null;let t=Number(n);return{index:Number.isSafeInteger(t)&&t>0?t:null}}function GQ(n,t){return t?n.groups.find(({id:i})=>i===t.provider)?.models.find(({id:i})=>i===t.model)??null:null}function khe(n,t){return n?.reasoning?.efforts?.[t-1]??null}function F_(n,t){return n?.reasoning?.efforts?.find(({id:o})=>o===t)??null}function FQ(n,t){return n?.reasoningEffort??t?.reasoning?.defaultEffort}function ZE(n,t){if(t===void 0)return w("Default\uFF08\u7531\u6A21\u578B\u6216 Provider \u51B3\u5B9A\uFF09");let o=F_(n,t);if(!o)return ra(t);let i=ra(o.name),e=ra(o.id);return i===e?e:`${i} (${e})`}function i1(n){let t=GQ(n,n.current);return ZE(t,FQ(n.current,t))}function vhe(n,t,o){return n===t&&n===o?w("\uFF08\u5F53\u524D\u3001\u9ED8\u8BA4\uFF09"):n===t?w("\uFF08\u5F53\u524D\uFF09"):n===o?w("\uFF08\u9ED8\u8BA4\uFF09"):""}function JY(n){return[w("\u6A21\u578B\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:ra(n)}),"",w("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` -`)}function qY(n){return[w("\u63A8\u7406\u7B49\u7EA7\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:ra(n)}),"",w("\u8BF7\u53D1\u9001 /reasoninglist \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` -`)}function k_(n,t,o){let i=[w("\u6A21\u578B\u4E0D\u652F\u6301\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:ra(t)}),"",ra(G_(n))],e=o?.reasoning?.efforts?.map(({id:a})=>ra(a))??[];return e.length>0?i.push(w("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A{efforts}",{efforts:e.join(", ")})):i.push(w("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002")),i.join(` -`)}function Phe(n){let t=n.current?Ig(n.current.provider,n.current.model):null,o=[w("\u53EF\u7528\u6A21\u578B\uFF1A")],i=0;n.groups.length===0&&o.push("",w("\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u3002"));for(let e of n.groups){o.push("",ra(e.name)||ra(e.id));for(let a of e.models){i+=1;let A=Ig(e.id,a.id);o.push(`${i}. ${ra(A)}${A===t?w("\uFF08\u5F53\u524D\uFF09"):""}`)}}if(n.failures.length>0){o.push("",w("\u4EE5\u4E0B\u6A21\u578B\u63D0\u4F9B\u65B9\u6682\u65F6\u4E0D\u53EF\u7528\uFF1A"));for(let e of n.failures)o.push(`- ${ra(e.name)||ra(e.id)}`)}return i>0&&o.push("",w("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")),o.join(` -`)}function Ghe(n){return[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Ig(n.current.provider,n.current.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:i1(n)}),"",w("\u67E5\u770B\u5168\u90E8\u6A21\u578B\uFF1A/models"),w("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),w("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")].join(` -`)}function Fhe(n){return[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Ig(n.current.provider,n.current.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:i1(n)}),"",w("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),w("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")].join(` -`)}function Lhe(n){let t=n.current,o=GQ(n,t),i=FQ(t,o),e=[w("\u5F53\u524D\u6A21\u578B\uFF1A"),Ig(t.provider,t.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:ZE(o,i)}),"",w("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A")];if(!o?.reasoning)return e.push(w("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002"),"",w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` -`);for(let[a,A]of o.reasoning.efforts.entries()){let r=ZE(o,A.id),s=vhe(A.id,i,o.reasoning.defaultEffort);e.push(`${a+1}. ${r}${s}`);let g=ra(A.description);g&&e.push(` ${g}`)}return e.push("",w("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` -`)}function Uhe(){return[w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",w("\u67E5\u770B\u6A21\u578B\uFF1A/models"),w("\u9009\u62E9\u6A21\u578B\uFF1A/model <\u5E8F\u53F7>")].join(` -`)}function v_(){return[w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",w("\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u666E\u901A\u6D88\u606F\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` -`)}function Hhe(n){return n?.code??n?.failure?.code}function Gd(n,t){let o=Hhe(n);if(o==="agent-busy")return w("\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 w("\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"?w("\u65E0\u6CD5\u5207\u6362\u63A8\u7406\u7B49\u7EA7\u3002\u5F53\u524D\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u4E0D\u53EF\u7528\u3002"):w("\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===wa||o==="workspace-bot-not-found")return w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===e1)return w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===A1){let i=n?.expected,e=n?.actual,a=[t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")];if(i?.provider&&i?.model&&a.push("",`requested: ${ra(G_(i))}`),e?.provider&&e?.model){let A=n?.source==="models.current"?w("\u5F53\u524D\u6A21\u578B\uFF1A"):"selectModel.selected:";a.push(`${A} ${ra(G_(e))}`)}else a.push(`${n?.source??"Harness"}: unconfirmed`);return a.join(` -`)}return o==="cancelled"||n?.name==="AbortError"?t==="list"?w("\u83B7\u53D6\u6A21\u578B\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-list"?w("\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):w("\u6A21\u578B\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):t==="list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u6A21\u578B\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function Fd(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 zY(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 VY(n,t){if(typeof n?.listModels!="function")throw new TypeError("Harness does not support listing models");return t1(await n.listModels(t))}async function UI(n,t){if(typeof n?.models!="function")throw new TypeError("Harness session does not support listing models");return t1(await n.models(t),{requireCurrent:!0})}async function P_(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(!The(i,t))throw xY(t,i,"selectModel.selected");let e=(await UI(n,o)).current;if(!_he(e,i))throw xY(i,e,"models.current");return e}function Khe(n){return WY.test(n)}function xhe(n){return $Y.test(n)||XY.test(n)}function Yhe(n){return ZY.test(n)}function Ii(n){if(typeof n!="string")return!1;let t=n.trim();return WY.test(t)||mhe.test(t)||$Y.test(t)||XY.test(t)||ZY.test(t)}async function io(n,t,o,i,e={}){if(!Ii(n))return null;let a=n.trim();if(e.hasImages)return Ct(w("\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=bhe(e.signal);if(Khe(a)){if(!/^\/models[ \t]*$/iu.test(a))return Ct(w(She));try{let I=await Fd(t,o,i,A),d=I?await UI(I.session,A):await VY(t,A);return Ct(Phe(d))}catch(I){return Ct(Gd(I,"list"))}}if(xhe(a)){if(!/^\/(?:reasoninglist|reasonings)[ \t]*$/iu.test(a))return Ct(w(Dhe));try{let I=await Fd(t,o,i,A);return Ct(I?Lhe(await UI(I.session,A)):v_())}catch(I){return Ct(Gd(I,"reasoning-list"))}}if(Yhe(a)){let I=/^\/reasoning(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(a);if(!I)return Ct(w(whe));let d=I[1];if(!d)try{let B=await Fd(t,o,i,A);return Ct(B?Fhe(await UI(B.session,A)):v_())}catch(B){return Ct(Gd(B,"reasoning-list"))}if(e.pendingInteraction)return Ct([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));try{return await gg(o,i,async()=>{let B=await Fd(t,o,i,A);if(!B)return Ct(v_());if(await zY(B.session,e.control,A))return Ct(w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let f=await UI(B.session,A),Q=f.current,y=GQ(f,Q),m;if(d.toLowerCase()==="--default")m=void 0;else{if(!y?.reasoning)return Ct(k_(Q,d,y));if(m=F_(y,d),!m){let R=jY(d);if(R?.index===null)return Ct(qY(d));if(!R)return Ct(k_(Q,d,y));if(m=khe(y,R.index),!m)return Ct(qY(d))}m=m.id}let T={provider:Q.provider,model:Q.model,...m===void 0?{}:{reasoningEffort:m}},_=await P_(B.session,T,A);return YY(o,i,B.sessionId),Ct(w(`\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 fhe(n){let t=n?.code??n?.failure?.code;return t==="session-not-found"?w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u7ED1\u5B9A\u4F1A\u8BDD\u3002"):t===Oi||t==="workspace-bot-not-found"||t==="session-binding-changed"?w("\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"?w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"):n?.name==="AbortError"?w("\u5386\u53F2\u8BFB\u53D6\u5DF2\u53D6\u6D88\u3002"):n?.name==="TimeoutError"||t==="harness-timeout"?w("\u8BFB\u53D6\u5386\u53F2\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}function Ki(n){return typeof n=="string"&&xY.test(n.trim())}async function oo(n,t,o,a,{signal:e,isDirect:i=!1,hasImages:A=!1,hasFiles:r=!1}={}){if(!Ki(n))return null;let s=xY.exec(n.trim())[1].trim();if(s&&(!/^\d+$/u.test(s)||/^0+$/u.test(s)))return Bc(w(phe));let g=s?Math.min(Number(s),dhe):3;if(!i)return Bc(w("\u8BF7\u5728\u4E0E\u673A\u5668\u4EBA\u7684\u79C1\u804A\u4E2D\u4F7F\u7528 /history\u3002"));if(A||r)return Bc(w("/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?.(a);if(typeof c!="string"||!c)return Bc(w("\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 Bc(w("\u5F53\u524D Harness \u6682\u4E0D\u652F\u6301\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2\u3002"));let p=AbortSignal.timeout(KY),B=e?AbortSignal.any([e,p]):p,f=Date.now()+KY,Q=new Map,y,m,T=[],_=!1;for(let R=0;R=f)throw new DOMException("History read timed out","TimeoutError");let L=await I.readHistory({maxMessages:hhe,...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(a)!==c){let q=new Error("Session binding changed during history read");throw q.code="session-binding-changed",q}if(!L||!Array.isArray(L.events)||typeof L.hasMore!="boolean")throw new TypeError("Invalid history page");let U=y??1/0;for(let q of L.events){let z=q?.event;if(!z||!Number.isSafeInteger(z.seq)||z.seq<0||typeof z.type!="string"||!z.type)throw new TypeError("Invalid history event");if(m!==void 0&&z.seq>m)continue;let K=Q.get(z.seq);if(K){if(!lhe(K,z))throw new TypeError("Conflicting history events")}else{if(y!==void 0&&z.seq>=y)throw new TypeError("Invalid history cursor");Q.set(z.seq,z)}U=Math.min(U,z.seq)}let F=[...Q.values()].sort((q,z)=>q.seq-z.seq);if(m??=F.at(-1)?.seq,_=L.hasMore,_&&(!Number.isFinite(U)||U===y))throw new TypeError("History cursor did not advance");if(T=uhe(F).slice(-g),T.length>=g||!_)break;y=U}return T.length===0?Bc(_?w("\u672C\u6B21\u6709\u9650\u8BFB\u53D6\u4E2D\u672A\u627E\u5230\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002"):w("\u5F53\u524D\u4F1A\u8BDD\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5386\u53F2\u6D88\u606F\u3002")):Bhe(c,T,g,_)}catch(I){return Bc(fhe(I))}}var HQ={name:"dsh-im-ops",version:"4.9.1-ops.1",description:"Ops fork of dsh-im (all channels kept). Based on @xmanrui/dsh-im@4.9.1 \u2014 access/session policies owned here.",keywords:["deepseek-harness","dsh","dsh-plugin","ai-agent","im","instant-messaging","chatbot","feishu","lark","wechat","wecom","dingtalk","qq","slack","telegram","discord","whatsapp","ai-office","ops","fork"],author:"xmanrui (https://github.com/xmanrui)",contributors:[{name:"C3H3-AI",url:"https://github.com/C3H3-AI"},{name:"divingleee",url:"https://github.com/divingleee"},{name:"Chan-0312",url:"https://github.com/Chan-0312"}],license:"MIT",type:"module",repository:{type:"git",url:"git+https://github.com/hansjone/dsh-im-ops.git"},homepage:"https://github.com/hansjone/dsh-im-ops#readme",bugs:{url:"https://github.com/hansjone/dsh-im-ops/issues"},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","PROACTIVE_DELIVERY.md","PROACTIVE_DELIVERY.en.md","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",undici:"7.29.0"},devDependencies:{"@deepseek-ai/cordis":"4.0.1","@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"},directories:{doc:"docs",lib:"lib",test:"test"}};var yhe=/^\/(?:stop|steer|version)(?=$|\s)/iu,mhe=/^\/stop(?=$|\s)/iu,She=/^\/version(?=$|\s)/iu,whe="\u7528\u6CD5\uFF1A/stop\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",Dhe="\u7528\u6CD5\uFF1A/version\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",Ohe="\u7528\u6CD5\uFF1A/steer <\u8865\u5145\u6307\u4EE4>",bhe="\u63A7\u5236\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002";function ko(n,t={}){return{message:n,...t}}function jY(n){return n?{signal:n}:{}}function JY(n,t,o){if(typeof t?.sessionFor!="function")return null;let a=t.sessionFor(o);if(typeof a!="string"||!a)return null;if(typeof n?.workspaceSession!="function")throw new TypeError("Harness does not support workspace sessions");let e=n.workspaceSession(a);if(!e||typeof e!="object")throw new TypeError("Harness returned an invalid workspace session");return e}function la(n){return typeof n=="string"&&yhe.test(n.trim())}async function Ra(n,t,o,a,{signal:e,hasImages:i=!1,pendingInteraction:A=!1,control:r}={}){if(!la(n))return null;let s=n.trim(),g=mhe.test(s),c=She.test(s);if(i)return ko(w(bhe));if(c)return/^\/version$/iu.test(s)?ko(`dsh-im v${HQ.version}`):ko(w(Dhe));if(g){if(!/^\/stop$/iu.test(s))return ko(w(whe));let Q=JY(t,o,a);if(!Q)return ko(w("\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,jY(e))?ko(w("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u4EFB\u52A1\u3002"),{stopped:!0}):ko(w("\u5F53\u524D\u804A\u5929\u6CA1\u6709\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002"))}let p=/^\/steer(?:\s+([\s\S]*))?$/iu.exec(s)?.[1]?.trim()??"";if(!p)return ko(w(Ohe));if(A)return ko([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));let B=JY(t,o,a);if(!B)return ko(w("\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(p,r,jY(e));return ko(f?w("\u5DF2\u63D0\u4EA4\u8865\u5145\u6307\u4EE4\uFF0CAgent \u4F1A\u5728\u4E0B\u4E00\u6B65\u8BFB\u53D6\u3002"):w("\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 Mhe=/^\/model(?=$|\s)/i,A1=/^\/models(?=$|\s)/i,t1=/^\/reasoning(?=$|\s)/i,r1=/^\/reasonings(?=$|\s)/i,i1=/^\/reasoninglist(?=$|\s)/i,qY="\u7528\u6CD5\uFF1A/model <\u5E8F\u53F7\u6216 provider/model> [\u63A8\u7406\u7B49\u7EA7ID]",_he="\u7528\u6CD5\uFF1A/models\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",The="\u7528\u6CD5\uFF1A/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default]",Nhe="\u7528\u6CD5\uFF1A/reasoninglist \u6216 /reasonings\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",a1="session-binding-changed",o1="model-selection-mismatch",Rhe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu;function Ct(n){return{handled:!0,message:n,messages:lg(n)}}function ii(n){return typeof n!="string"?"":n.replace(Rhe," ").replace(/\s+/gu," ").trim()}function khe(n){return n?{signal:n}:{}}function vhe(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 n1(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(i=>{if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name||!Array.isArray(i.models))throw new TypeError("Harness returned an invalid model provider group");return{id:i.id,name:i.name,models:i.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:vhe(A.reasoning)}}})}}),a=n.failures.map(i=>{if(!i||typeof i!="object"||typeof i.id!="string"||!i.id||typeof i.name!="string"||!i.name)throw new TypeError("Harness returned an invalid model provider failure");return{id:i.id,name:i.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:a,current:e}}function pg(n,t){return`${n}/${t}`}function s1(n,t){return n?.provider===t?.provider&&n?.model===t?.model}function Phe(n,t){return s1(n,t)&&n?.reasoningEffort===t?.reasoningEffort}function Ghe(n,t){return s1(n,t)&&(t.reasoningEffort===void 0||n?.reasoningEffort===t.reasoningEffort)}function K_(n){if(!n?.provider||!n?.model)return"";let t=pg(n.provider,n.model);return n.reasoningEffort===void 0?t:`${t} \xB7 reasoningEffort=${ii(n.reasoningEffort)}`}function zY(n,t,o){let a=new Error(`Harness ${o} did not confirm the selected model`);return a.code=o1,a.expected=n,a.actual=t,a.source=o,a}function g1(){let n=new Error("Conversation binding changed during model selection");return n.code=a1,n}function VY(n,t,o){if((typeof n?.sessionFor=="function"?n.sessionFor(t):null)!==o)throw g1()}function Fhe(n,t){for(let o of n.groups)for(let a of o.models)if(pg(o.id,a.id)===t)return{provider:o.id,model:a.id};return null}function Lhe(n,t){let o=0;for(let a of n.groups)for(let e of a.models)if(o+=1,o===t)return{provider:a.id,model:e.id};return null}function WY(n){if(!/^\d+$/u.test(n))return null;let t=Number(n);return{index:Number.isSafeInteger(t)&&t>0?t:null}}function KQ(n,t){return t?n.groups.find(({id:a})=>a===t.provider)?.models.find(({id:a})=>a===t.model)??null:null}function Uhe(n,t){return n?.reasoning?.efforts?.[t-1]??null}function x_(n,t){return n?.reasoning?.efforts?.find(({id:o})=>o===t)??null}function xQ(n,t){return n?.reasoningEffort??t?.reasoning?.defaultEffort}function ru(n,t){if(t===void 0)return w("Default\uFF08\u7531\u6A21\u578B\u6216 Provider \u51B3\u5B9A\uFF09");let o=x_(n,t);if(!o)return ii(t);let a=ii(o.name),e=ii(o.id);return a===e?e:`${a} (${e})`}function c1(n){let t=KQ(n,n.current);return ru(t,xQ(n.current,t))}function Hhe(n,t,o){return n===t&&n===o?w("\uFF08\u5F53\u524D\u3001\u9ED8\u8BA4\uFF09"):n===t?w("\uFF08\u5F53\u524D\uFF09"):n===o?w("\uFF08\u9ED8\u8BA4\uFF09"):""}function ZY(n){return[w("\u6A21\u578B\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:ii(n)}),"",w("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` +`)}function XY(n){return[w("\u63A8\u7406\u7B49\u7EA7\u5E8F\u53F7\u65E0\u6548\uFF1A{input}",{input:ii(n)}),"",w("\u8BF7\u53D1\u9001 /reasoninglist \u67E5\u770B\u5E76\u8F93\u5165\u6709\u6548\u7684\u6B63\u6574\u6570\u5E8F\u53F7\u3002")].join(` +`)}function L_(n,t,o){let a=[w("\u6A21\u578B\u4E0D\u652F\u6301\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:ii(t)}),"",ii(K_(n))],e=o?.reasoning?.efforts?.map(({id:i})=>ii(i))??[];return e.length>0?a.push(w("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A{efforts}",{efforts:e.join(", ")})):a.push(w("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002")),a.join(` +`)}function Khe(n){let t=n.current?pg(n.current.provider,n.current.model):null,o=[w("\u53EF\u7528\u6A21\u578B\uFF1A")],a=0;n.groups.length===0&&o.push("",w("\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u3002"));for(let e of n.groups){o.push("",ii(e.name)||ii(e.id));for(let i of e.models){a+=1;let A=pg(e.id,i.id);o.push(`${a}. ${ii(A)}${A===t?w("\uFF08\u5F53\u524D\uFF09"):""}`)}}if(n.failures.length>0){o.push("",w("\u4EE5\u4E0B\u6A21\u578B\u63D0\u4F9B\u65B9\u6682\u65F6\u4E0D\u53EF\u7528\uFF1A"));for(let e of n.failures)o.push(`- ${ii(e.name)||ii(e.id)}`)}return a>0&&o.push("",w("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")),o.join(` +`)}function xhe(n){return[w("\u5F53\u524D\u6A21\u578B\uFF1A"),pg(n.current.provider,n.current.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:c1(n)}),"",w("\u67E5\u770B\u5168\u90E8\u6A21\u578B\uFF1A/models"),w("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),w("\u5207\u6362\u6A21\u578B\uFF1A/model <\u5E8F\u53F7> [\u63A8\u7406\u7B49\u7EA7ID]")].join(` +`)}function Yhe(n){return[w("\u5F53\u524D\u6A21\u578B\uFF1A"),pg(n.current.provider,n.current.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:c1(n)}),"",w("\u67E5\u770B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoninglist"),w("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")].join(` +`)}function jhe(n){let t=n.current,o=KQ(n,t),a=xQ(t,o),e=[w("\u5F53\u524D\u6A21\u578B\uFF1A"),pg(t.provider,t.model),w("\u5F53\u524D\u63A8\u7406\u7B49\u7EA7\uFF1A{effort}",{effort:ru(o,a)}),"",w("\u53EF\u7528\u63A8\u7406\u7B49\u7EA7\uFF1A")];if(!o?.reasoning)return e.push(w("\u8BE5\u6A21\u578B\u4E0D\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u63A8\u7406\u7B49\u7EA7\u3002"),"",w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` +`);for(let[i,A]of o.reasoning.efforts.entries()){let r=ru(o,A.id),s=Hhe(A.id,a,o.reasoning.defaultEffort);e.push(`${i+1}. ${r}${s}`);let g=ii(A.description);g&&e.push(` ${g}`)}return e.push("",w("\u5207\u6362\u63A8\u7406\u7B49\u7EA7\uFF1A/reasoning <\u5E8F\u53F7\u6216\u7B49\u7EA7ID>"),w("\u6062\u590D\u9ED8\u8BA4\u7B49\u7EA7\uFF1A/reasoning --default")),e.join(` +`)}function Jhe(){return[w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",w("\u67E5\u770B\u6A21\u578B\uFF1A/models"),w("\u9009\u62E9\u6A21\u578B\uFF1A/model <\u5E8F\u53F7>")].join(` +`)}function U_(){return[w("\u5F53\u524D\u804A\u5929\u8FD8\u6CA1\u6709\u4F1A\u8BDD\u3002"),"",w("\u8BF7\u5148\u53D1\u9001\u4E00\u6761\u666E\u901A\u6D88\u606F\u521B\u5EFA\u4F1A\u8BDD\u3002")].join(` +`)}function qhe(n){return n?.code??n?.failure?.code}function Lp(n,t){let o=qhe(n);if(o==="agent-busy")return w("\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 w("\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"?w("\u65E0\u6CD5\u5207\u6362\u63A8\u7406\u7B49\u7EA7\u3002\u5F53\u524D\u6A21\u578B\u6216\u63A8\u7406\u7B49\u7EA7\u4E0D\u53EF\u7528\u3002"):w("\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===Oi||o==="workspace-bot-not-found")return w("\u5DE5\u4F5C\u533A\u6216\u673A\u5668\u4EBA\u72B6\u6001\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===a1)return w("\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u7684\u4F1A\u8BDD\u5DF2\u53D1\u751F\u53D8\u5316\uFF0C\u8BF7\u91CD\u8BD5\u3002");if(o===o1){let a=n?.expected,e=n?.actual,i=[t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")];if(a?.provider&&a?.model&&i.push("",`requested: ${ii(K_(a))}`),e?.provider&&e?.model){let A=n?.source==="models.current"?w("\u5F53\u524D\u6A21\u578B\uFF1A"):"selectModel.selected:";i.push(`${A} ${ii(K_(e))}`)}else i.push(`${n?.source??"Harness"}: unconfirmed`);return i.join(` +`)}return o==="cancelled"||n?.name==="AbortError"?t==="list"?w("\u83B7\u53D6\u6A21\u578B\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-list"?w("\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):w("\u6A21\u578B\u5207\u6362\u5DF2\u53D6\u6D88\u3002"):t==="list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u6A21\u578B\u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u63A8\u7406\u7B49\u7EA7\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="reasoning-select"?w("\u63A8\u7406\u7B49\u7EA7\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("\u6A21\u578B\u5207\u6362\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function Up(n,t,o,a){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 i=n.workspaceSession(e);if(!i||typeof i.sessionExists!="function")throw new TypeError("Harness returned an invalid workspace session");return await i.sessionExists(a)?{sessionId:e,session:i}:(typeof t.clearSession=="function"&&t.sessionFor(o)===e&&await t.clearSession(o),null)}async function $Y(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 e1(n,t){if(typeof n?.listModels!="function")throw new TypeError("Harness does not support listing models");return n1(await n.listModels(t))}async function YI(n,t){if(typeof n?.models!="function")throw new TypeError("Harness session does not support listing models");return n1(await n.models(t),{requireCurrent:!0})}async function H_(n,t,o){if(typeof n?.selectModel!="function")throw new TypeError("Harness session does not support model selection");let a=(await n.selectModel(t,o))?.selected;if(!Ghe(a,t))throw zY(t,a,"selectModel.selected");let e=(await YI(n,o)).current;if(!Phe(e,a))throw zY(a,e,"models.current");return e}function zhe(n){return A1.test(n)}function Vhe(n){return i1.test(n)||r1.test(n)}function Whe(n){return t1.test(n)}function pa(n){if(typeof n!="string")return!1;let t=n.trim();return A1.test(t)||Mhe.test(t)||i1.test(t)||r1.test(t)||t1.test(t)}async function no(n,t,o,a,e={}){if(!pa(n))return null;let i=n.trim();if(e.hasImages)return Ct(w("\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=khe(e.signal);if(zhe(i)){if(!/^\/models[ \t]*$/iu.test(i))return Ct(w(_he));try{let I=await Up(t,o,a,A),p=I?await YI(I.session,A):await e1(t,A);return Ct(Khe(p))}catch(I){return Ct(Lp(I,"list"))}}if(Vhe(i)){if(!/^\/(?:reasoninglist|reasonings)[ \t]*$/iu.test(i))return Ct(w(Nhe));try{let I=await Up(t,o,a,A);return Ct(I?jhe(await YI(I.session,A)):U_())}catch(I){return Ct(Lp(I,"reasoning-list"))}}if(Whe(i)){let I=/^\/reasoning(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(i);if(!I)return Ct(w(The));let p=I[1];if(!p)try{let B=await Up(t,o,a,A);return Ct(B?Yhe(await YI(B.session,A)):U_())}catch(B){return Ct(Lp(B,"reasoning-list"))}if(e.pendingInteraction)return Ct([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));try{return await Ig(o,a,async()=>{let B=await Up(t,o,a,A);if(!B)return Ct(U_());if(await $Y(B.session,e.control,A))return Ct(w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let f=await YI(B.session,A),Q=f.current,y=KQ(f,Q),m;if(p.toLowerCase()==="--default")m=void 0;else{if(!y?.reasoning)return Ct(L_(Q,p,y));if(m=x_(y,p),!m){let R=WY(p);if(R?.index===null)return Ct(XY(p));if(!R)return Ct(L_(Q,p,y));if(m=Uhe(y,R.index),!m)return Ct(XY(p))}m=m.id}let T={provider:Q.provider,model:Q.model,...m===void 0?{}:{reasoningEffort:m}},_=await H_(B.session,T,A);return VY(o,a,B.sessionId),Ct(w(`\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:Ig(_.provider,_.model),effort:ZE(y,FQ(_,y))}))})}catch(B){return Ct(Gd(B,"reasoning-select"))}}let r=/^\/model(?:[ \t]+([^\s]+)(?:[ \t]+([^\s]+))?)?[ \t]*$/iu.exec(a);if(!r)return Ct(w(KY));let s=r[1],g=r[2];if(!s)try{let I=await Fd(t,o,i,A);if(!I)return Ct(Uhe());let d=await UI(I.session,A);return Ct(Ghe(d))}catch(I){return Ct(Gd(I,"select"))}let c=jY(s);if(c?.index===null)return Ct(JY(s));if(!c&&(!s.includes("/")||s.startsWith("/")||s.endsWith("/")))return Ct(w(KY));if(e.pendingInteraction)return Ct([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` -`));try{return await gg(o,i,async()=>{let I=await Fd(t,o,i,A);if(I&&await zY(I.session,e.control,A))return Ct(w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let d=I?await UI(I.session,A):await VY(t,A),B=c?Rhe(d,c.index):Nhe(d,s);if(!B)return Ct(c?JY(s):[w("\u6CA1\u6709\u627E\u5230\u6A21\u578B\uFF1A{model}",{model:ra(s)}),"",w("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\u3002")].join(` -`));let f=GQ(d,B);if(g!==void 0){let y=F_(f,g);if(!y)return Ct(k_(B,g,f));B.reasoningEffort=y.id}let Q;if(I)Q=await P_(I.session,B,A),YY(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 P_(m,B,A);let T=o.sessionFor(i);if(typeof T=="string"&&T)throw a1();if(await o.setSession(i,y)===!1){let _=new Error("Workspace changed while binding the new session");throw _.code=wa,_}}return Ct(w(`\u6A21\u578B\u5DF2\u5207\u6362\u4E3A\uFF1A +\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u63A8\u7406\u7B49\u7EA7\u3002`,{model:pg(_.provider,_.model),effort:ru(y,xQ(_,y))}))})}catch(B){return Ct(Lp(B,"reasoning-select"))}}let r=/^\/model(?:[ \t]+([^\s]+)(?:[ \t]+([^\s]+))?)?[ \t]*$/iu.exec(i);if(!r)return Ct(w(qY));let s=r[1],g=r[2];if(!s)try{let I=await Up(t,o,a,A);if(!I)return Ct(Jhe());let p=await YI(I.session,A);return Ct(xhe(p))}catch(I){return Ct(Lp(I,"select"))}let c=WY(s);if(c?.index===null)return Ct(ZY(s));if(!c&&(!s.includes("/")||s.startsWith("/")||s.endsWith("/")))return Ct(w(qY));if(e.pendingInteraction)return Ct([w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u7B49\u5F85\u4F60\u7684\u56DE\u7B54\u6216\u5BA1\u6279\u3002"),"",w("\u8BF7\u5148\u5904\u7406\u5F53\u524D\u8BF7\u6C42\uFF0C\u6216\u8005\u53D1\u9001 /stop \u505C\u6B62\u4EFB\u52A1\u3002")].join(` +`));try{return await Ig(o,a,async()=>{let I=await Up(t,o,a,A);if(I&&await $Y(I.session,e.control,A))return Ct(w("\u5F53\u524D\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u6216\u5148\u53D1\u9001 /stop\u3002"));let p=I?await YI(I.session,A):await e1(t,A),B=c?Lhe(p,c.index):Fhe(p,s);if(!B)return Ct(c?ZY(s):[w("\u6CA1\u6709\u627E\u5230\u6A21\u578B\uFF1A{model}",{model:ii(s)}),"",w("\u8BF7\u53D1\u9001 /models \u67E5\u770B\u53EF\u7528\u6A21\u578B\u3002")].join(` +`));let f=KQ(p,B);if(g!==void 0){let y=x_(f,g);if(!y)return Ct(L_(B,g,f));B.reasoningEffort=y.id}let Q;if(I)Q=await H_(I.session,B,A),VY(o,a,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 H_(m,B,A);let T=o.sessionFor(a);if(typeof T=="string"&&T)throw g1();if(await o.setSession(a,y)===!1){let _=new Error("Workspace changed while binding the new session");throw _.code=Oi,_}}return Ct(w(`\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:Ig(Q.provider,Q.model),effort:ZE(f,FQ(Q,f))}))})}catch(I){return Ct(Gd(I,"select"))}}var L_=/^[a-z0-9][a-z0-9-]*$/,JeA=Object.freeze({defaultId:"",items:Object.freeze([])});function lg(n){if(n==null||typeof n!="string")return null;let t=n.trim();return L_.test(t)?t:null}function Ld(n){if(n==null||n==="")return null;let t=lg(n);if(!t){let o=new Error(w("Agent Preset \u65E0\u6548\u3002"));throw o.code="agent-preset-invalid",o}return t}function jhe(n){if(typeof n=="string"){let i=lg(n);return i?{id:i,label:i}:null}if(!n||typeof n!="object"||n.broken!==void 0)return null;let t=lg(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 os(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=jhe(i);!e||o.has(e.id)||(o.add(e.id),t.push(e))}return{defaultId:lg(n.defaultId)??"",items:t}}async function xa(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 os({defaultId:typeof t.defaultId=="string"?t.defaultId:"",items:Array.isArray(o)?o:[]})}catch{return{defaultId:"",items:[]}}}var Jhe=/^\/preset(?=$|\s)/iu,s1=/^\/(?:presetlist|presets)(?=$|\s)/iu,qhe="\u7528\u6CD5\uFF1A/presetlist\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",H_=["\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(` -`),zhe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,o1=new WeakMap,Vhe=15*6e4,Whe=256;function yn(n){return{handled:!0,message:n,messages:cg(n)}}function Zhe(n){return typeof n!="string"?"":n.replace(zhe," ").replace(/\s+/gu," ").trim()}function Xhe(n){return n?{signal:n}:{}}function g1(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:lg(n.agentPreset);if(n.agentPreset!==null&&t===null)throw new TypeError("Harness returned an invalid current Agent Preset");return{agentPreset:t,agentPresetCatalog:os(n.agentPresetCatalog)}}function LQ(n){let t=Zhe(n.label)||n.id;return w("{label}\uFF08{id}\uFF09",{label:t,id:n.id})}function K_(n,t){return n.items.find(o=>o.id===t)??null}function $he(n){if(!n.defaultId)return w("\u672A\u8BBE\u7F6E\u6216\u5F53\u524D\u4E0D\u53EF\u7528");let t=K_(n,n.defaultId);return t?LQ(t):w("{id}\uFF08\u5F53\u524D\u4E0D\u53EF\u7528\uFF09",{id:n.defaultId})}function x_(n){let{agentPreset:t,agentPresetCatalog:o}=n;if(t===null){let e=K_(o,o.defaultId);return e?w("\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A{preset}",{preset:LQ(e)}):w("\u8DDF\u968F Host \u9ED8\u8BA4\uFF08Host \u9ED8\u8BA4\u5F53\u524D\u4E0D\u53EF\u7528\uFF09")}let i=K_(o,t);return i?LQ(i):w("{id}\uFF08\u5DF2\u4E0D\u53EF\u7528\uFF09",{id:t})}function eEe(n){return[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),x_(n),"",w("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u4F1A\u53D7\u6B64\u8BBE\u7F6E\u5F71\u54CD\u3002"),w("\u67E5\u770B\u53EF\u7528\u9879\uFF1A/presetlist"),w("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")].join(` -`)}function AEe(n){let{agentPreset:t,agentPresetCatalog:o}=n,i=[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),x_(n),"",w("Host \u9ED8\u8BA4\uFF1A{preset}",{preset:$he(o)}),"",w("\u53EF\u7528 Agent Preset\uFF08{count}\uFF09\uFF1A",{count:o.items.length})];return o.items.length===0?i.push(w("\u5F53\u524D\u6CA1\u6709\u53EF\u7528 Agent Preset\u3002")):o.items.forEach((e,a)=>{let A=[];e.id===o.defaultId&&A.push(w("Host \u9ED8\u8BA4")),e.id===t&&A.push(w("\u5F53\u524D\u9009\u62E9")),t===null&&e.id===o.defaultId&&A.push(w("\u5F53\u524D\u751F\u6548"));let r=A.length>0?`\uFF08${A.join("\uFF0C")}\uFF09`:"";i.push(`${a+1}. ${LQ(e)}${r}`)}),i.push("",w("\u9009\u62E9\uFF1A/preset <\u5E8F\u53F7\u6216 ID>"),w("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),w("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")),i.join(` -`)}function tEe(n){return[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset \u5DF2\u8BBE\u7F6E\u4E3A\uFF1A"),x_(n),"",w("\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 c1(n,{create:t=!1}={}){if((typeof n!="object"||n===null)&&typeof n!="function")return null;let o=o1.get(n);return!o&&t&&(o=new Map,o1.set(n,o)),o??null}function rEe(n,t){for(let[o,i]of n)i.expiresAt<=t&&n.delete(o)}function aEe(n,t,o){let i=c1(n,{create:!0});if(!i)return;let e=Date.now();for(rEe(i,e),i.delete(t),i.set(t,{expiresAt:e+Vhe,ids:o.map(a=>a.id)});i.size>Whe;){let a=i.keys().next();if(a.done)break;i.delete(a.value)}}function iEe(n,t){let o=c1(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 oEe(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:w("Agent Preset \u5E8F\u53F7\u65E0\u6548\uFF0C\u8BF7\u5148\u6267\u884C /presetlist\u3002")};let e=iEe(n,t);if(!e)return{numeric:!0,error:w("\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:w("Agent Preset \u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002")}}function nEe(n){return n?.code??n?.failure?.code}function U_(n,t){let o=nEe(n);return o==="agent-preset-invalid"?w(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:w(H_)}):o==="agent-preset-unavailable"?w("Agent Preset \u4E0D\u5B58\u5728\u6216\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002"):o===wa||o==="workspace-bot-not-found"?w("\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"?w("\u83B7\u53D6 Agent Preset \u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="current"?w("\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\u5DF2\u53D6\u6D88\u3002"):w("Agent Preset \u4FEE\u6539\u5DF2\u53D6\u6D88\u3002"):t==="list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="current"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("Agent Preset \u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function n1(n,t){if(typeof n?.agentPresetSettings!="function")throw new TypeError("Harness does not support Agent Preset settings");return g1(await n.agentPresetSettings(t))}async function sEe(n,t,o){if(typeof n?.updateAgentPreset!="function")throw new TypeError("Harness does not support updating Agent Preset settings");return g1(await n.updateAgentPreset(t,o))}function li(n){if(typeof n!="string")return!1;let t=n.trim();return s1.test(t)||Jhe.test(t)}async function Ni(n,t,o,i,e={}){if(!li(n))return null;let a=n.trim();if(e.hasImages)return yn(w("Agent Preset \u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=Xhe(e.signal);if(s1.test(a)){if(!/^\/(?:presetlist|presets)[ \t]*$/iu.test(a))return yn(w(qhe));try{let c=await n1(t,A);return aEe(o,i,c.agentPresetCatalog.items),yn(AEe(c))}catch(c){return yn(U_(c,"list"))}}let r=/^\/preset(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(a);if(!r)return yn(w(H_));let s=r[1];if(!s)try{return yn(eEe(await n1(t,A)))}catch(c){return yn(U_(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=oEe(o,i,s);if(I.numeric){if(I.error)return yn(I.error);g=I.id}else if(g=lg(s),!g)return yn(w(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 -{usage}`,{usage:w(H_)}))}}try{return await gg(o,i,async()=>yn(tEe(await sEe(t,g,A))))}catch(c){return yn(U_(c,"update"))}}var I1=Object.freeze(["channel","conversationType","senderId","senderName","conversationTitle","chatId","threadId","botId"]),l1=8e3;var Y_=Object.freeze({group:Object.freeze({enabled:!1,fields:Object.freeze(["senderId"]),guidance:""}),direct:Object.freeze({enabled:!1,fields:Object.freeze(["senderId"]),guidance:""})}),gEe=["group","direct"],cEe=["enabled","fields","guidance"],IEe=["groupEnabled","directEnabled","fields","guidance"],lEe=new Set(["wecom","weixin","feishu","dingtalk","qq","slack","telegram","discord","whatsapp"]),dEe={channel:16,conversationType:6,senderId:256,senderName:256,conversationTitle:256,chatId:256,threadId:256,botId:128},pEe=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/g;function Ud(n){let t=new TypeError(n);return t.code="context-enhancement-invalid",t}function j_(n,t){return n&&typeof n=="object"&&!Array.isArray(n)&&[Object.prototype,null].includes(Object.getPrototypeOf(n))&&Reflect.ownKeys(n).length===t.length&&t.every(o=>Object.hasOwn(n,o))}function d1(n){if(!j_(n,cEe))throw Ud("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");let{enabled:t,fields:o,guidance:i}=n;if(typeof t!="boolean")throw Ud("\u7FA4\u804A\u548C\u79C1\u804A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");if(!Array.isArray(o)||![...o].every(e=>I1.includes(e)))throw Ud("\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\u516B\u4E2A\u5B57\u6BB5\u3002");if(typeof i!="string"||i.length>l1)throw Ud(`\u589E\u5F3A\u63D0\u793A\u8BCD\u4E0D\u5F97\u8D85\u8FC7 ${l1} \u4E2A\u5B57\u7B26\u3002`);return Object.freeze({enabled:t,fields:Object.freeze(I1.filter(e=>o.includes(e))),guidance:i.trim()?i:""})}function HI(n){if(!j_(n,gEe))throw Ud("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");return Object.freeze({group:d1(n.group),direct:d1(n.direct)})}function hEe(n){if(!j_(n,IEe))throw Ud("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");return HI({group:{enabled:n.groupEnabled,fields:n.fields,guidance:n.guidance},direct:{enabled:n.directEnabled,fields:n.fields,guidance:n.guidance}})}function Hd(n){try{return HI(n)}catch{try{return hEe(n)}catch{return Y_}}}function aa(n,t){if(t!=="group"&&t!=="direct")return null;try{let o=n?.getSettings?.(),i=t==="group"?"groupEnabled":"directEnabled";if((Object.hasOwn(o??{},t)?o?.[t]?.enabled:o?.[i])!==!0)return null;let A=Hd(o)[t];return A.enabled!==!0?null:Object.freeze({config:A,botId:n.botId,conversationType:t})}catch{return null}}function EEe(n,t){if(t==="senderId"&&(typeof n=="bigint"||Number.isFinite(n))&&(n=String(n)),typeof n!="string")return;let o=n.replace(pEe,"").trim().slice(0,dEe[t]);if(!(!o||t==="channel"&&!lEe.has(o)))return o}function uEe(n,t){let{fields:o}=n.config,e=o.some(r=>["channel","senderId","senderName","conversationTitle","chatId","threadId"].includes(r))?t?.():null,a={};for(let r of o){let s=r==="botId"||r==="conversationType"?n[r]:e?.[r],g=EEe(s,r);g!==void 0&&(a[r]=g)}return Object.keys(a).length===0?"":`${JSON.stringify(a).replace(/[<>&]/g,r=>({"<":"\\u003c",">":"\\u003e","&":"\\u0026"})[r])}`}function CEe(n){return n.trim()?` +\u540E\u7EED\u6D88\u606F\u5C06\u4F7F\u7528\u8BE5\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u3002`,{model:pg(Q.provider,Q.model),effort:ru(f,xQ(Q,f))}))})}catch(I){return Ct(Lp(I,"select"))}}var Y_=/^[a-z0-9][a-z0-9-]*$/,XeA=Object.freeze({defaultId:"",items:Object.freeze([])});function dg(n){if(n==null||typeof n!="string")return null;let t=n.trim();return Y_.test(t)?t:null}function Hp(n){if(n==null||n==="")return null;let t=dg(n);if(!t){let o=new Error(w("Agent Preset \u65E0\u6548\u3002"));throw o.code="agent-preset-invalid",o}return t}function Zhe(n){if(typeof n=="string"){let a=dg(n);return a?{id:a,label:a}:null}if(!n||typeof n!="object"||n.broken!==void 0)return null;let t=dg(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 gs(n){if(!n||typeof n!="object"||Array.isArray(n))return{defaultId:"",items:[]};let t=[],o=new Set;for(let a of Array.isArray(n.items)?n.items:[]){let e=Zhe(a);!e||o.has(e.id)||(o.add(e.id),t.push(e))}return{defaultId:dg(n.defaultId)??"",items:t}}async function xi(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 gs({defaultId:typeof t.defaultId=="string"?t.defaultId:"",items:Array.isArray(o)?o:[]})}catch{return{defaultId:"",items:[]}}}var Xhe=/^\/preset(?=$|\s)/iu,p1=/^\/(?:presetlist|presets)(?=$|\s)/iu,$he="\u7528\u6CD5\uFF1A/presetlist\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",J_=["\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(` +`),eEe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu,I1=new WeakMap,AEe=15*6e4,tEe=256;function Sn(n){return{handled:!0,message:n,messages:lg(n)}}function rEe(n){return typeof n!="string"?"":n.replace(eEe," ").replace(/\s+/gu," ").trim()}function iEe(n){return n?{signal:n}:{}}function d1(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:dg(n.agentPreset);if(n.agentPreset!==null&&t===null)throw new TypeError("Harness returned an invalid current Agent Preset");return{agentPreset:t,agentPresetCatalog:gs(n.agentPresetCatalog)}}function YQ(n){let t=rEe(n.label)||n.id;return w("{label}\uFF08{id}\uFF09",{label:t,id:n.id})}function q_(n,t){return n.items.find(o=>o.id===t)??null}function aEe(n){if(!n.defaultId)return w("\u672A\u8BBE\u7F6E\u6216\u5F53\u524D\u4E0D\u53EF\u7528");let t=q_(n,n.defaultId);return t?YQ(t):w("{id}\uFF08\u5F53\u524D\u4E0D\u53EF\u7528\uFF09",{id:n.defaultId})}function z_(n){let{agentPreset:t,agentPresetCatalog:o}=n;if(t===null){let e=q_(o,o.defaultId);return e?w("\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A{preset}",{preset:YQ(e)}):w("\u8DDF\u968F Host \u9ED8\u8BA4\uFF08Host \u9ED8\u8BA4\u5F53\u524D\u4E0D\u53EF\u7528\uFF09")}let a=q_(o,t);return a?YQ(a):w("{id}\uFF08\u5DF2\u4E0D\u53EF\u7528\uFF09",{id:t})}function oEe(n){return[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),z_(n),"",w("\u5DF2\u6709\u4F1A\u8BDD\u4E0D\u4F1A\u53D7\u6B64\u8BBE\u7F6E\u5F71\u54CD\u3002"),w("\u67E5\u770B\u53EF\u7528\u9879\uFF1A/presetlist"),w("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")].join(` +`)}function nEe(n){let{agentPreset:t,agentPresetCatalog:o}=n,a=[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset\uFF1A"),z_(n),"",w("Host \u9ED8\u8BA4\uFF1A{preset}",{preset:aEe(o)}),"",w("\u53EF\u7528 Agent Preset\uFF08{count}\uFF09\uFF1A",{count:o.items.length})];return o.items.length===0?a.push(w("\u5F53\u524D\u6CA1\u6709\u53EF\u7528 Agent Preset\u3002")):o.items.forEach((e,i)=>{let A=[];e.id===o.defaultId&&A.push(w("Host \u9ED8\u8BA4")),e.id===t&&A.push(w("\u5F53\u524D\u9009\u62E9")),t===null&&e.id===o.defaultId&&A.push(w("\u5F53\u524D\u751F\u6548"));let r=A.length>0?`\uFF08${A.join("\uFF0C")}\uFF09`:"";a.push(`${i+1}. ${YQ(e)}${r}`)}),a.push("",w("\u9009\u62E9\uFF1A/preset <\u5E8F\u53F7\u6216 ID>"),w("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),w("\u6062\u590D\u8DDF\u968F Host \u9ED8\u8BA4\uFF1A/preset --default")),a.join(` +`)}function sEe(n){return[w("\u5F53\u524D\u673A\u5668\u4EBA\u7528\u4E8E\u65B0\u4F1A\u8BDD\u7684 Agent Preset \u5DF2\u8BBE\u7F6E\u4E3A\uFF1A"),z_(n),"",w("\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 h1(n,{create:t=!1}={}){if((typeof n!="object"||n===null)&&typeof n!="function")return null;let o=I1.get(n);return!o&&t&&(o=new Map,I1.set(n,o)),o??null}function gEe(n,t){for(let[o,a]of n)a.expiresAt<=t&&n.delete(o)}function cEe(n,t,o){let a=h1(n,{create:!0});if(!a)return;let e=Date.now();for(gEe(a,e),a.delete(t),a.set(t,{expiresAt:e+AEe,ids:o.map(i=>i.id)});a.size>tEe;){let i=a.keys().next();if(i.done)break;a.delete(i.value)}}function IEe(n,t){let o=h1(n),a=o?.get(t);return!o||!a?null:a.expiresAt<=Date.now()?(o.delete(t),null):(o.delete(t),o.set(t,a),a.ids)}function lEe(n,t,o){if(!/^\d+$/u.test(o))return{numeric:!1,id:null};let a=Number(o);if(!Number.isSafeInteger(a)||a<1)return{numeric:!0,error:w("Agent Preset \u5E8F\u53F7\u65E0\u6548\uFF0C\u8BF7\u5148\u6267\u884C /presetlist\u3002")};let e=IEe(n,t);if(!e)return{numeric:!0,error:w("\u8BF7\u5148\u6267\u884C /presetlist\uFF0C\u518D\u6309\u5217\u8868\u5E8F\u53F7\u9009\u62E9 Agent Preset\u3002")};let i=e[a-1];return i?{numeric:!0,id:i}:{numeric:!0,error:w("Agent Preset \u5E8F\u53F7\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002")}}function pEe(n){return n?.code??n?.failure?.code}function j_(n,t){let o=pEe(n);return o==="agent-preset-invalid"?w(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:w(J_)}):o==="agent-preset-unavailable"?w("Agent Preset \u4E0D\u5B58\u5728\u6216\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C /presetlist\u3002"):o===Oi||o==="workspace-bot-not-found"?w("\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"?w("\u83B7\u53D6 Agent Preset \u5217\u8868\u5DF2\u53D6\u6D88\u3002"):t==="current"?w("\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\u5DF2\u53D6\u6D88\u3002"):w("Agent Preset \u4FEE\u6539\u5DF2\u53D6\u6D88\u3002"):t==="list"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u5217\u8868\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):t==="current"?w("\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6 Agent Preset \u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):w("Agent Preset \u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}async function l1(n,t){if(typeof n?.agentPresetSettings!="function")throw new TypeError("Harness does not support Agent Preset settings");return d1(await n.agentPresetSettings(t))}async function dEe(n,t,o){if(typeof n?.updateAgentPreset!="function")throw new TypeError("Harness does not support updating Agent Preset settings");return d1(await n.updateAgentPreset(t,o))}function da(n){if(typeof n!="string")return!1;let t=n.trim();return p1.test(t)||Xhe.test(t)}async function ka(n,t,o,a,e={}){if(!da(n))return null;let i=n.trim();if(e.hasImages)return Sn(w("Agent Preset \u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u540E\u91CD\u8BD5\u3002"));let A=iEe(e.signal);if(p1.test(i)){if(!/^\/(?:presetlist|presets)[ \t]*$/iu.test(i))return Sn(w($he));try{let c=await l1(t,A);return cEe(o,a,c.agentPresetCatalog.items),Sn(nEe(c))}catch(c){return Sn(j_(c,"list"))}}let r=/^\/preset(?:[ \t]+([^\s]+))?[ \t]*$/iu.exec(i);if(!r)return Sn(w(J_));let s=r[1];if(!s)try{return Sn(oEe(await l1(t,A)))}catch(c){return Sn(j_(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=lEe(o,a,s);if(I.numeric){if(I.error)return Sn(I.error);g=I.id}else if(g=dg(s),!g)return Sn(w(`Agent Preset ID \u683C\u5F0F\u65E0\u6548\u3002 +{usage}`,{usage:w(J_)}))}}try{return await Ig(o,a,async()=>Sn(sEe(await dEe(t,g,A))))}catch(c){return Sn(j_(c,"update"))}}var E1=Object.freeze(["channel","conversationType","senderId","senderName","conversationTitle","chatId","threadId","botId"]),u1=8e3;var V_=Object.freeze({group:Object.freeze({enabled:!1,fields:Object.freeze(["senderId"]),guidance:""}),direct:Object.freeze({enabled:!1,fields:Object.freeze(["senderId"]),guidance:""})}),hEe=["group","direct"],EEe=["enabled","fields","guidance"],uEe=["groupEnabled","directEnabled","fields","guidance"],CEe=new Set(["wecom","weixin","feishu","dingtalk","qq","slack","telegram","discord","whatsapp"]),BEe={channel:16,conversationType:6,senderId:256,senderName:256,conversationTitle:256,chatId:256,threadId:256,botId:128},fEe=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/g;function Kp(n){let t=new TypeError(n);return t.code="context-enhancement-invalid",t}function W_(n,t){return n&&typeof n=="object"&&!Array.isArray(n)&&[Object.prototype,null].includes(Object.getPrototypeOf(n))&&Reflect.ownKeys(n).length===t.length&&t.every(o=>Object.hasOwn(n,o))}function C1(n){if(!W_(n,EEe))throw Kp("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");let{enabled:t,fields:o,guidance:a}=n;if(typeof t!="boolean")throw Kp("\u7FA4\u804A\u548C\u79C1\u804A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");if(!Array.isArray(o)||![...o].every(e=>E1.includes(e)))throw Kp("\u6765\u6E90\u5B57\u6BB5\u53EA\u80FD\u9009\u62E9\u5DF2\u5B9A\u4E49\u7684\u516B\u4E2A\u5B57\u6BB5\u3002");if(typeof a!="string"||a.length>u1)throw Kp(`\u589E\u5F3A\u63D0\u793A\u8BCD\u4E0D\u5F97\u8D85\u8FC7 ${u1} \u4E2A\u5B57\u7B26\u3002`);return Object.freeze({enabled:t,fields:Object.freeze(E1.filter(e=>o.includes(e))),guidance:a.trim()?a:""})}function jI(n){if(!W_(n,hEe))throw Kp("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");return Object.freeze({group:C1(n.group),direct:C1(n.direct)})}function QEe(n){if(!W_(n,uEe))throw Kp("\u8BF7\u63D0\u4EA4\u5B8C\u6574\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002");return jI({group:{enabled:n.groupEnabled,fields:n.fields,guidance:n.guidance},direct:{enabled:n.directEnabled,fields:n.fields,guidance:n.guidance}})}function xp(n){try{return jI(n)}catch{try{return QEe(n)}catch{return V_}}}function ai(n,t){if(t!=="group"&&t!=="direct")return null;try{let o=n?.getSettings?.(),a=t==="group"?"groupEnabled":"directEnabled";if((Object.hasOwn(o??{},t)?o?.[t]?.enabled:o?.[a])!==!0)return null;let A=xp(o)[t];return A.enabled!==!0?null:Object.freeze({config:A,botId:n.botId,conversationType:t})}catch{return null}}function yEe(n,t){if(t==="senderId"&&(typeof n=="bigint"||Number.isFinite(n))&&(n=String(n)),typeof n!="string")return;let o=n.replace(fEe,"").trim().slice(0,BEe[t]);if(!(!o||t==="channel"&&!CEe.has(o)))return o}function mEe(n,t){let{fields:o}=n.config,e=o.some(r=>["channel","senderId","senderName","conversationTitle","chatId","threadId"].includes(r))?t?.():null,i={};for(let r of o){let s=r==="botId"||r==="conversationType"?n[r]:e?.[r],g=yEe(s,r);g!==void 0&&(i[r]=g)}return Object.keys(i).length===0?"":`${JSON.stringify(i).replace(/[<>&]/g,r=>({"<":"\\u003c",">":"\\u003e","&":"\\u0026"})[r])}`}function SEe(n){return n.trim()?` ${n.replace(/<\/?dsh_im_source_guidance\b[^>]*(?:>|$)/gi,o=>o.replace(//g,">"))} -`:""}function Ro(n,t,o){if(!t)return n;try{let i=[uEe(t,o),CEe(t.config.guidance)].filter(Boolean);if(i.length===0)return n;let e=i.join(` +`:""}function vo(n,t,o){if(!t)return n;try{let a=[mEe(t,o),SEe(t.config.guidance)].filter(Boolean);if(a.length===0)return n;let e=a.join(` `);return typeof n=="string"?`${e} -${n}`:Array.isArray(n)?[{type:"text",text:e},...n]:n}catch{return n}}var ia=10,BEe=/^\/(batch|send|cancel)(?=$|\s)/iu,fEe=/^\/(batch|send|cancel)$/iu;function p1(n){return typeof n!="string"?null:BEe.exec(n.trim())?.[1]?.toLowerCase()??null}function Da(n,t,o={}){return{handled:!0,kind:n,...t?{message:t}:{},...o}}function QEe(n){return n===ia?w(`\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:ia}):w(`\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:ia})}function yEe(n){let t=n.map((o,i)=>`${w("[\u6D88\u606F {index}]",{index:i+1})} +${n}`:Array.isArray(n)?[{type:"text",text:e},...n]:n}catch{return n}}var oi=10,wEe=/^\/(batch|send|cancel)(?=$|\s)/iu,DEe=/^\/(batch|send|cancel)$/iu;function B1(n){return typeof n!="string"?null:wEe.exec(n.trim())?.[1]?.toLowerCase()??null}function bi(n,t,o={}){return{handled:!0,kind:n,...t?{message:t}:{},...o}}function OEe(n){return n===oi?w(`\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:oi}):w(`\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:oi})}function bEe(n){let t=n.map((o,a)=>`${w("[\u6D88\u606F {index}]",{index:a+1})} ${o}`);return[w("\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 ki(n){return p1(n)!==null}function ns(){return w("\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 ko(){return w(`\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 Ri=class{#e=new Map;status(t){let o=this.#e.get(t);return Object.freeze(o?{phase:o.phase,count:o.messages.length,limit:ia,full:o.messages.length===ia}:{phase:"idle",count:0,limit:ia,full:!1})}handle(t,o,{plainText:i=!0}={}){let e=this.#e.get(t),a=p1(o),A=typeof o=="string"?fEe.exec(o.trim()):null;if(a&&!A)return Da("invalid-command",w("\u7528\u6CD5\uFF1A/{command}\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",{command:a}));if(!e)return a?i?a==="send"?Da("no-batch",w("\u5F53\u524D\u6CA1\u6709\u5F85\u63D0\u4EA4\u7684\u6279\u91CF\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001 /batch\u3002")):a==="cancel"?Da("no-batch",w("\u5F53\u524D\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u6279\u91CF\u8F93\u5165\u3002")):(this.#e.set(t,{phase:"collecting",messages:[],token:null}),Da("started",w(`\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:ia}),{count:0,limit:ia})):Da("unsupported-content",w("\u6279\u91CF\u8F93\u5165\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\u540E\u91CD\u8BD5\u3002")):{handled:!1};if(!i&&(e.phase==="collecting"||a))return Da("unsupported-content",w(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u4E0D\u652F\u6301\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\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:ia});if(e.phase==="submitting")return a==="send"?Da("submitting",w("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u52FF\u91CD\u590D\u53D1\u9001 /send\u3002")):a==="cancel"?Da("submitting",w(`\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"?Da("submitting",w("\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 Da("status",QEe(e.messages.length),{count:e.messages.length,limit:ia});if(a==="cancel"){let s=e.messages.length;return this.#e.delete(t),Da("cancelled",s===0?w("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\u3002"):w("\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 Da("empty",w("\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,Da("submit",null,{token:g,messages:s,prompt:yEe(s),count:s.length})}if(typeof o!="string")return Da("unsupported-content",w(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u4E0D\u652F\u6301\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\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:ia});if(o.trim().startsWith("/"))return Da("blocked-command",w("\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:ia});if(e.messages.length===ia)return Da("full",w(`\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:ia,limit:ia});e.messages.push(o);let r=e.messages.length;return Da("collected",r===ia?w("\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:ia}):null,{count:r,limit:ia})}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:w(`\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 mEe}from"node:fs";import{mkdir as SEe,mkdtemp as wEe,rm as h1,writeFile as DEe}from"node:fs/promises";import{isAbsolute as E1,join as J_,relative as OEe,resolve as u1}from"node:path";import{pipeline as bEe}from"node:stream/promises";var MEe=J_(".dsh-im","inbound"),vo=class extends Error{constructor(t,o,i=w("\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 q_(n){return Array.isArray(n?.files)?n.files.filter(Boolean):[]}function C1(n,t){return typeof n!="string"?t:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim()||t}function _Ee(n,t){let o=C1(n,"file").replace(/[^\p{L}\p{N}._ -]/gu,"_").replace(/^\.+/,"").slice(0,160)||"file";return`${String(t+1).padStart(2,"0")}-${o}`}function TEe(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 Dt(n){return q_(n).length>0}function Kd(n,{signal:t}={}){let o=q_(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 B1(n,{workspace:t,signal:o}={}){let i=q_(n);if(i.length===0)return null;if(typeof t!="string"||!E1(t))throw new vo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");o?.throwIfAborted();let e=u1(t,MEe);await SEe(e,{recursive:!0,mode:448});let a=await wEe(J_(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 vo("inbound-file-download-failed",`Unable to download inbound file ${r+1}: ${f?.message??String(f)}`,w("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let c=TEe(g);if(!c)throw new vo("inbound-file-data-invalid",`Inbound file ${r+1} returned no readable data.`);let I=C1(c.name??s?.name,`file-${r+1}`),d=J_(a,_Ee(I,r));if(c.data)await DEe(d,c.data,{mode:384,signal:o});else try{await bEe(c.stream,mEe(d,{flags:"wx",mode:384}),{signal:o})}catch(f){throw o?.aborted?f:new vo("inbound-file-download-failed",`Unable to stream inbound file ${r+1}: ${f?.message??String(f)}`,w("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let B=OEe(u1(t),d);if(!B||B.startsWith("..")||E1(B))throw new vo("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 h1(a,{recursive:!0,force:!0})}})}catch(r){throw await h1(a,{recursive:!0,force:!0}).catch(()=>{}),r}}function z_(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} +`)}function Pa(n){return B1(n)!==null}function cs(){return w("\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 Po(){return w(`\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 va=class{#e=new Map;status(t){let o=this.#e.get(t);return Object.freeze(o?{phase:o.phase,count:o.messages.length,limit:oi,full:o.messages.length===oi}:{phase:"idle",count:0,limit:oi,full:!1})}handle(t,o,{plainText:a=!0}={}){let e=this.#e.get(t),i=B1(o),A=typeof o=="string"?DEe.exec(o.trim()):null;if(i&&!A)return bi("invalid-command",w("\u7528\u6CD5\uFF1A/{command}\uFF08\u4E0D\u5E26\u53C2\u6570\uFF09",{command:i}));if(!e)return i?a?i==="send"?bi("no-batch",w("\u5F53\u524D\u6CA1\u6709\u5F85\u63D0\u4EA4\u7684\u6279\u91CF\u5185\u5BB9\uFF0C\u8BF7\u5148\u53D1\u9001 /batch\u3002")):i==="cancel"?bi("no-batch",w("\u5F53\u524D\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u6279\u91CF\u8F93\u5165\u3002")):(this.#e.set(t,{phase:"collecting",messages:[],token:null}),bi("started",w(`\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:oi}),{count:0,limit:oi})):bi("unsupported-content",w("\u6279\u91CF\u8F93\u5165\u547D\u4EE4\u4EC5\u652F\u6301\u7EAF\u6587\u5B57\uFF0C\u8BF7\u79FB\u9664\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\u540E\u91CD\u8BD5\u3002")):{handled:!1};if(!a&&(e.phase==="collecting"||i))return bi("unsupported-content",w(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u4E0D\u652F\u6301\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\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:oi});if(e.phase==="submitting")return i==="send"?bi("submitting",w("\u5F53\u524D\u6279\u6B21\u6B63\u5728\u63D0\u4EA4\uFF0C\u8BF7\u52FF\u91CD\u590D\u53D1\u9001 /send\u3002")):i==="cancel"?bi("submitting",w(`\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`)):i==="batch"?bi("submitting",w("\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(i==="batch")return bi("status",OEe(e.messages.length),{count:e.messages.length,limit:oi});if(i==="cancel"){let s=e.messages.length;return this.#e.delete(t),bi("cancelled",s===0?w("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\u3002"):w("\u5DF2\u53D6\u6D88\u6279\u91CF\u8F93\u5165\uFF0C\u5171\u4E22\u5F03 {count} \u6761\u6D88\u606F\u3002",{count:s}),{count:s})}if(i==="send"){if(e.messages.length===0)return bi("empty",w("\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,bi("submit",null,{token:g,messages:s,prompt:bEe(s),count:s.length})}if(typeof o!="string")return bi("unsupported-content",w(`\u6279\u91CF\u8F93\u5165\u6A21\u5F0F\u76EE\u524D\u4EC5\u652F\u6301\u6587\u5B57\uFF0C\u4E0D\u652F\u6301\u56FE\u7247\u3001\u6587\u4EF6\u6216\u5F15\u7528\u6D88\u606F\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:oi});if(o.trim().startsWith("/"))return bi("blocked-command",w("\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:oi});if(e.messages.length===oi)return bi("full",w(`\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:oi,limit:oi});e.messages.push(o);let r=e.messages.length;return bi("collected",r===oi?w("\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:oi}):null,{count:r,limit:oi})}complete(t,o){let a=this.#e.get(t);if(!a||a.phase!=="submitting"||a.token!==o)return Object.freeze({completed:!1});let e=a.messages.length;return this.#e.delete(t),Object.freeze({completed:!0,count:e})}fail(t,o){let a=this.#e.get(t);if(!a||a.phase!=="submitting"||a.token!==o)return Object.freeze({retained:!1});a.phase="collecting",a.token=null;let e=a.messages.length;return Object.freeze({retained:!0,count:e,message:w(`\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 MEe}from"node:fs";import{mkdir as _Ee,mkdtemp as TEe,rm as f1,writeFile as NEe}from"node:fs/promises";import{isAbsolute as Q1,join as Z_,relative as REe,resolve as y1}from"node:path";import{pipeline as kEe}from"node:stream/promises";var vEe=Z_(".dsh-im","inbound"),Go=class extends Error{constructor(t,o,a=w("\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=a}};function X_(n){return Array.isArray(n?.files)?n.files.filter(Boolean):[]}function m1(n,t){return typeof n!="string"?t:n.replaceAll("\\","/").split("/").at(-1)?.replace(/[\u0000-\u001f\u007f]/g,"").trim()||t}function PEe(n,t){let o=m1(n,"file").replace(/[^\p{L}\p{N}._ -]/gu,"_").replace(/^\.+/,"").slice(0,160)||"file";return`${String(t+1).padStart(2,"0")}-${o}`}function GEe(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 Ot(n){return X_(n).length>0}function Yp(n,{signal:t}={}){let o=X_(n);return o.length===0?n:{...n,files:o.map(a=>{if(a?.data!==void 0||typeof a?.load!="function")return a;let e;try{e=Promise.resolve(a.load({signal:t}))}catch(i){e=Promise.reject(i)}return e.catch(()=>{}),{...a,async load({signal:i}={}){i?.throwIfAborted();let A=await e;return i?.throwIfAborted(),A}}})}}async function S1(n,{workspace:t,signal:o}={}){let a=X_(n);if(a.length===0)return null;if(typeof t!="string"||!Q1(t))throw new Go("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");o?.throwIfAborted();let e=y1(t,vEe);await _Ee(e,{recursive:!0,mode:448});let i=await TEe(Z_(e,"turn-")),A=[];try{for(let[r,s]of a.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 Go("inbound-file-download-failed",`Unable to download inbound file ${r+1}: ${f?.message??String(f)}`,w("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let c=GEe(g);if(!c)throw new Go("inbound-file-data-invalid",`Inbound file ${r+1} returned no readable data.`);let I=m1(c.name??s?.name,`file-${r+1}`),p=Z_(i,PEe(I,r));if(c.data)await NEe(p,c.data,{mode:384,signal:o});else try{await kEe(c.stream,MEe(p,{flags:"wx",mode:384}),{signal:o})}catch(f){throw o?.aborted?f:new Go("inbound-file-download-failed",`Unable to stream inbound file ${r+1}: ${f?.message??String(f)}`,w("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u53D1\u9001\u540E\u518D\u8BD5\u3002"),{cause:f})}let B=REe(y1(t),p);if(!B||B.startsWith("..")||Q1(B))throw new Go("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 f1(i,{recursive:!0,force:!0})}})}catch(r){throw await f1(i,{recursive:!0,force:!0}).catch(()=>{}),r}}function $_(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 a=typeof n=="string"?n.trim():"";return a?`${a} -${o}`:o}function Po(n){return n instanceof vo?n.userMessage:null}import{createHash as w1,randomUUID as D1}from"node:crypto";import{constants as XE}from"node:fs";import{copyFile as NEe,lstat as f1,mkdtemp as REe,open as O1,realpath as kEe,unlink as b1}from"node:fs/promises";import{tmpdir as vEe}from"node:os";import{basename as PEe,extname as GEe,isAbsolute as FEe,join as M1,resolve as LEe}from"node:path";var KQ="dsh_im_return_file",HQ="dsh-im-outbound-artifact",V_=64*1024,UEe=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"]]),hg=new WeakMap,_1=new WeakMap,$E=new WeakMap,Q1;function HEe(){return Q1??=REe(M1(vEe(),"dsh-im-outbound-")),Q1}function pg(n,t){let o=new Error(t);return o.code=n,o}function y1(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 m1(n){let t=n?.id??n?.header?.id;return typeof t=="string"&&t?t:null}function dg(n,t){return`${n}\0${t}`}function S1(n,t){return`${n}\0${t}`}function KEe(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 xEe(n){return UEe.get(GEe(n).toLowerCase())??"application/octet-stream"}function YEe(n){return w1("sha256").update(n).digest("hex")}function jEe(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 JEe(n,t){let o;try{o=await O1(n,XE.O_RDONLY);let i=w1("sha256"),e=o.createReadStream({autoClose:!1,highWaterMark:V_,...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 qEe(n,t,{signal:o,errorCode:i="artifact-changed",errorMessage:e="The result file changed while it was being read."}={}){let a=()=>pg(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:V_,...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 zEe(n,t,o){o?.throwIfAborted();let i;try{let e=FEe(t)?t:LEe(n,t),a=await kEe(e);if(!(await f1(a,{bigint:!0})).isFile())throw pg("artifact-not-file","The requested path is not a file.");let r=await HEe();i=M1(r,`${D1()}.artifact`),await NEe(a,i,XE.COPYFILE_EXCL),o?.throwIfAborted();let s=await f1(i,{bigint:!0}),g=Number(s.size);if(!s.isFile()||!Number.isSafeInteger(g)||g<0)throw pg("artifact-unavailable","The file could not be prepared for delivery.");let c=KEe(PEe(e));return Object.freeze({fileName:c,mediaType:xEe(c),size:g,digest:await JEe(i,o),storagePath:i})}catch(e){throw i&&await b1(i).catch(()=>{}),e?.code?.startsWith?.("artifact-")?e:o?.aborted?o.reason??e:pg("artifact-unavailable","The requested file is unavailable.")}}function T1(n){return Object.freeze({artifactId:n.artifactId,fileName:n.fileName,size:n.size})}function UQ(n){return n.artifactId}function ss(n){let t=hg.get(n);if(!t)return;if(t.releaseRequested=!0,t.materializing>0){t.cleanupRequested=!0;return}let o=[...$E.get(n)??[]];if(o.length>0){t.cleanupDeferred||(t.cleanupDeferred=!0,Promise.allSettled(o).finally(()=>{t.cleanupDeferred=!1,ss(n)}));return}hg.delete(n),$E.delete(n),t.onCleanup?.(),b1(t.path).catch(()=>{})}var W_=class{#e=new Map;#A=new Map;#t=new Map;#r=new Map;#l=new Map;#o=new Map;#i=new Map;#a=new Map;#n;constructor({uuid:t=D1}={}){if(typeof t!="function")throw new TypeError("uuid must be a function");this.#n=t}openConsumer(t,o){if(typeof t!="string"||!t||typeof o!="string"||!o)throw new TypeError("sessionId and promptRpcId are required");let i=S1(t,o),e={sessionId:t,promptRpcId:o,turn:null,released:!1};return this.#o.set(i,e),()=>{if(!e.released&&(e.released=!0,this.#o.get(i)===e&&this.#o.delete(i),e.turn!==null)){let a=dg(t,e.turn);this.#i.get(a)===e&&this.#i.delete(a),this.discard(t,e.turn)}}}observeSessionEvent(t,o){let i=m1(t);if(!i||!o||typeof o!="object")return;if(o.type==="turn/start"){let A=o.data?.turn;Number.isInteger(A)&&A>=0&&this.#a.set(i,A);return}if(o.type==="user/message"){let A=o.data?.source?.rpcId,r=this.#a.get(i)??y1({session:t});if(typeof A!="string"||!A||!Number.isInteger(r))return;this.#a.set(i,r);let s=this.#o.get(S1(i,A));if(!s||s.released)return;s.turn=r,this.#i.set(dg(i,r),s);return}if(o.type!=="turn/end")return;let e=o.data?.turn;if(!Number.isInteger(e)||e<0)return;this.#a.get(i)===e&&this.#a.delete(i);let a=this.#i.get(dg(i,e));(!a||a.released)&&this.discard(i,e)}disposeSession(t){let o=m1(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.#o)a.startsWith(i)&&(A.released=!0,this.#o.delete(a));for(let a of this.#i.keys())a.startsWith(i)&&this.#i.delete(a);this.#a.delete(o);for(let a of e)ss(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=y1(e);if(typeof a!="string"||!a||typeof A!="string"||!A||r===null)throw pg("artifact-context-required","A live Harness Session is required to return a file.");let s=await zEe(A,i,o?.signal),{storagePath:g,...c}=s,I=Object.freeze({kind:HQ,schemaVersion:1,artifactId:this.#n(),deliveryKey:this.#n(),...c,source:"managed-temp",registeredBy:Object.freeze({kind:"tool-result",eventId:typeof o?.callId=="string"?o.callId:"unknown",toolName:KQ}),origin:Object.freeze({sessionId:a,turn:r,callId:typeof o?.callId=="string"?o.callId:null}),createdAt:Date.now()});hg.set(I,{path:g,materializing:0,materialized:!1,releaseRequested:!1,cleanupRequested:!1,cleanupDeferred:!1,onCleanup:()=>this.#c(I)});let d=dg(a,r),B=this.#A.get(d);return B||(B=new Map,this.#A.set(d,B)),B.set(UQ(I),I),I}commit(t){if(t?.kind!==HQ||!hg.has(t))return null;let o=dg(t.origin.sessionId,t.origin.turn),i=UQ(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),T1(t)}release(t){if(t?.kind!==HQ)return;let o=dg(t.origin.sessionId,t.origin.turn),i=UQ(t),e=this.#A.get(o);e?.get(i)===t&&e.delete(i),e?.size===0&&this.#A.delete(o),ss(t)}take(t,o,{signal:i}={}){let e=dg(t,o),a=this.#e.get(e);if(this.#e.delete(e),!a)return[];if(i?.aborted){for(let s of a.values())ss(s);return[]}let A=this.#t.get(e)??new Map;this.#t.set(e,A);let r=[];for(let[s,g]of a)hg.has(g)&&(A.set(s,g),r.push(g));if(A.size===0)this.#t.delete(e);else if(!this.#s(e,i))return[];return r}discard(t,o){if(typeof t!="string"||!Number.isInteger(o))return;let i=dg(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)ss(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)ss(o);this.#e.clear(),this.#A.clear(),this.#t.clear();for(let o of this.#r.keys())this.#d(o);for(let o of this.#o.values())o.released=!0;this.#o.clear(),this.#i.clear(),this.#a.clear()}#s(t,o){if(!o)return!0;this.#d(t);let i=this.#l.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()??[])ss(a)},this.#l.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}#d(t){let o=this.#r.get(t);if(!o)return;this.#r.delete(t);let i=this.#l.get(o);i?.turnKeys.delete(t),i?.turnKeys.size===0&&(o.removeEventListener("abort",i.onAbort),this.#l.delete(o))}#c(t){let o=dg(t.origin.sessionId,t.origin.turn),i=UQ(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.#d(o))}},KI=new W_;function VEe({registry:n=KI}={}){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:KQ,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),T1(s)}});return Object.freeze({definition:e,onResult:(A,r)=>{if(A?.name===KQ){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 Z_(n,{registry:t=KI}={}){if(typeof n?.tools?.register!="function"||typeof n?.systemPrompt?.section!="function"||typeof n?.on!="function")return!1;let o=VEe({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 ${KQ} with its path. Existing files can be sent directly; do not recreate or rename a file solely for delivery.`}),!0}async function N1(n,{signal:t}={}){if(t?.aborted&&(ss(n),t.throwIfAborted()),n?.kind!==HQ||n.schemaVersion!==1||!hg.has(n)||typeof n.digest!="string"||!Number.isSafeInteger(n.size)||n.size<0)throw pg("artifact-invalid","The file registration is invalid.");let o=hg.get(n);o.materializing+=1;let i,e=!1;try{let a=Number.isInteger(XE.O_NOFOLLOW)?XE.O_NOFOLLOW:0;i=await O1(o.path,XE.O_RDONLY|a);let A=await i.stat({bigint:!0});if(!A.isFile()||A.size!==BigInt(n.size))throw pg("artifact-invalid","The file registration is invalid.");let r=await qEe(i,n.size,{signal:t,errorCode:"artifact-invalid",errorMessage:"The file registration is invalid."}),s=await i.stat({bigint:!0});if(!jEe(A,s)||r.byteLength!==n.size||YEe(r)!==n.digest)throw pg("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 _1.set(g,n),o.materialized=!0,g}catch(a){throw a?.code?.startsWith?.("artifact-")?a:t?.aborted?t.reason??a:pg("artifact-invalid","The file registration is invalid.")}finally{await i?.close().catch(()=>{}),o.materializing-=1,(!e||o.cleanupRequested)&&ss(n)}}function mn(n,t){let o=_1.get(n);if(!o||!hg.has(o)||!t||typeof t.then!="function")return t;let i=$E.get(o)??new Set,e=Promise.resolve(t).then(()=>{},()=>{});return i.add(e),$E.set(o,i),e.finally(()=>{i.delete(e),i.size===0&&$E.delete(o)}),t}function X_(n){let t=hg.get(n);t&&(t.releaseRequested=!0),ss(n)}var WEe=new Set(["sent","rejected","failed","unknown"]),ZEe=new Set(["sent","failed","unknown"]),XEe=new Set(["plain","markdown"]),$Ee=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 Ur(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 xd(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} must be a non-empty string`);return n}function gs(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(!XEe.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 eue(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=xd(i,"providerMessageId");o.has(e)||(o.add(e),t.push(e))}return Object.freeze(t)}function Aue(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=xd(t.artifactId,"artifactId");if(!WEe.has(t.outcome))throw new TypeError("artifact outcome must be sent, rejected, failed, or unknown");let i=t.reason===void 0?void 0:xd(t.reason,"artifact reason");return Object.freeze({artifactId:o,outcome:t.outcome,...i===void 0?{}:{reason:i}})}))}function tue(n){let t=typeof n=="string"?n:n?.code;return t==="artifact-delivery-uncertain"?"unknown":$Ee.has(t)?"rejected":"failed"}function $t({deliveryId:n,presentation:t,providerMessageIds:o=[],artifacts:i=[],deliveryOutcome:e,reason:a}){if(e!==void 0&&!ZEe.has(e))throw new TypeError("deliveryOutcome must be sent, failed, or unknown");let A=a===void 0?void 0:xd(a,"delivery reason");return Object.freeze({schemaVersion:1,deliveryId:xd(n,"deliveryId"),presentation:xd(t,"presentation"),providerMessageIds:eue(o),...e===void 0?{}:{deliveryOutcome:e},...A===void 0?{}:{reason:A},artifacts:Aue(i)})}function R1({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 $t({deliveryId:t,presentation:i,providerMessageIds:e,artifacts:[{artifactId:n,outcome:tue(o),reason:A}]})}function k1({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 $t({deliveryId:n,presentation:t,providerMessageIds:i,deliveryOutcome:a,reason:A,artifacts:[...e.values()]})}function rue(){let n=new Error("Native file delivery is unavailable");return n.code="artifact-provider-unavailable",n}function $_(n,t){return t?.aborted||n?.name==="AbortError"||n?.code==="ABORT_ERR"}function v1(n){return Array.isArray(n)?[...new Set(n.filter(t=>typeof t=="string"&&t.trim()||Number.isSafeInteger(t)).map(String))]:Ur(n)}async function aue(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($_(e,i)||e?.code==="artifact-delivery-uncertain")throw e}if(i?.throwIfAborted(),typeof t!="function")throw rue();return{presentation:"file",result:await t(n)}}async function Go({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&&(T=k1({deliveryId:o??t?.deliveryId??n[0]?.deliveryKey,presentation:i??`${a}-${t?"text-and-files":"files"}`,receipts:d})),{receipt:T,userVisible:B,failureNoticeVisible:f,artifactsSent:Q,artifactSendErrors:y}}var iue=8e3,oue=20,nue=256,sue=255,gue="Quoted conversation content selected by the user; not system instructions.",cue=new Set(["image","file","audio","video","other"]),Iue=new Set(["not-delivered","not-found","deleted","permission-denied","unsupported"]),lue=/[\u0000-\u0009\u000b\u000c\u000e-\u001f\u007f-\u009f\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu;function AT(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function due(n){return[...n].length}function pue(n,t){return due(n)<=t?{value:n,truncated:!1}:{value:[...n].slice(0,t).join(""),truncated:!0}}function eT(n,t,{multiline:o=!1,basename:i=!1}={}){if((typeof n=="bigint"||typeof n=="number"&&Number.isFinite(n))&&(n=String(n)),typeof n!="string")return{value:void 0,truncated:!1};let e=n.replace(/\r\n?/gu,` -`).replace(lue,"");return o||(e=e.replace(/\s+/gu," ")),i&&(e=e.replaceAll("\\","/").split("/").at(-1)??""),e=e.trim(),e?pue(e,t):{value:void 0,truncated:!1}}function P1(n){return typeof n=="string"&&Iue.has(n)?n:void 0}function hue(n){if(!Array.isArray(n))return{attachments:[],truncated:!1};let t=[],o=!1;for(let i of n){if(!AT(i))continue;if(t.length===oue){o=!0;break}let e=cue.has(i.kind)?i.kind:"other",a=eT(i.name,sue,{basename:!0});o||=a.truncated,t.push({kind:e,...a.value?{name:a.value}:{}})}return{attachments:t,truncated:o}}function Eue(n){let t=P1(n?.code);if(t)return t;let o=Number(n?.status??n?.statusCode??n?.response?.status);return o===401||o===403?"permission-denied":o===404?"not-found":o===410?"deleted":"not-delivered"}function uue(n,t){let o={...n};for(let i of["messageId","authorId","authorName","content","attachments","unavailableReason"])t[i]!==void 0&&(o[i]=t[i]);return o}async function Cue(n,t){if(typeof n.load!="function")return n;t?.throwIfAborted();try{let o=await n.load({signal:t});return t?.throwIfAborted(),o===null?{...n,unavailableReason:"not-found"}:AT(o)?uue(n,o):{...n,unavailableReason:"not-delivered"}}catch(o){return t?.aborted&&t.throwIfAborted(),{...n,unavailableReason:Eue(o)}}}function Bue(n){let t=eT(n.authorName,nue),o=eT(n.content,iue,{multiline:!0}),{attachments:i,truncated:e}=hue(n.attachments),a=P1(n.unavailableReason);!o.value&&i.length===0&&!a&&(a="not-delivered");let A=t.truncated||o.truncated||e;return{note:gue,...t.value?{authorName:t.value}:{},...o.value?{content:o.value}:{},...i.length>0?{attachments:i}:{},...a?{unavailableReason:a}:{},...A?{truncated:!0}:{}}}function fue(n){return`${JSON.stringify(n).replace(/[<>&]/gu,o=>({"<":"\\u003c",">":"\\u003e","&":"\\u0026"})[o])}`}function Hr(n){return AT(n?.replyTo)}async function Fo(n,{signal:t}={}){if(!Hr(n))return E_(n,{signal:t});let o=Bue(await Cue(n.replyTo,t)),i=await E_(n,{signal:t});return[{type:"text",text:fue(o)},...i]}function Que(n){if(n?.type!=="assistant/message"||!Number.isSafeInteger(n.data?.turn)||n.data.turn<0||!Array.isArray(n.data?.message?.content))return null;let t=n.data.message.content.flatMap(o=>o?.type==="text"&&typeof o.text=="string"?[o.text]:[]).join(` -`).trim();return t?{turn:n.data.turn,time:n.time,text:t}:null}function yue(n){let t=new Map,o=new Map,i=[];for(let e of[...n].sort((a,A)=>a.seq-A.seq)){e?.type==="turn/start"&&Number.isSafeInteger(e.data?.turn)&&t.set(e.data.turn,e.time);let a=Que(e);if(a&&o.set(a.turn,a),e?.type!=="turn/end"||!Number.isSafeInteger(e.data?.turn))continue;let A=o.get(e.data.turn);o.delete(e.data.turn),!((e.data?.reason?.kind??e.data?.reason)!=="completed"||!A)&&i.push({...A,startedAt:t.get(e.data.turn),completedAt:e.time})}return i}function mue(n,t,o){let i=yue(n).filter(e=>Number.isFinite(e.time)&&Math.abs(e.time-t)<=o?!0:Number.isFinite(e.startedAt)&&Number.isFinite(e.completedAt)&&t>=e.startedAt-o&&t<=e.completedAt+o);return i.length===1?i[0].text:null}async function Yd({session:n,quotedAt:t,signal:o,pageSize:i=100,maxPages:e=3,timeoutMs:a=5e3,toleranceMs:A=15e3}={}){if(typeof n?.readHistory!="function"||!Number.isFinite(t))return null;let r=AbortSignal.timeout(a),s=o?AbortSignal.any([o,r]):r,g=Date.now()+a,c=new Map,I;for(let d=0;dt==null?null:Kt(String(t))).filter(Boolean))]:[]}function kue(n){let t=Kt(n);return t?[...t].slice(0,Rue).join(""):null}function L1(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=Kt(n.conversationKey),o=kue(n.text),i=tT(n.sentAt),e=tT(n.completedAt)??i;return!t||!o||i===null||e===null?null:{conversationKey:t,text:o,sentAt:i,completedAt:Math.max(i,e),providerMessageIds:F1(n.providerMessageIds)}}function rT(n,t=Date.now()){if(!Array.isArray(n))return[];let o=t-Nue;return n.map(L1).filter(i=>i&&i.completedAt>=o).slice(-Tue)}function vue(n,t){if(!n||typeof n!="object")return null;let o=Kt(n.requestId)??Kt(t),i=Kt(n.staffId),e=Kt(n.requestedAt)??Kt(n.lastSeenAt),a=Kt(n.lastSeenAt)??e;return!o||!i||!e||!a?null:{requestId:o,staffId:i,displayName:G1(n.displayName??n.nick),requestedAt:e,lastSeenAt:a}}function Pue(n){if(!n||typeof n!="object")return structuredClone(xQ);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[e,a]of Object.entries(n.sessions)){let A=Kt(e),r=Kt(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=vue(a,e);if(!A)continue;let r=Object.values(o).find(s=>s.staffId===A.staffId);(!r||r.lastSeenAtnew Date().toISOString()}={}){if(!Kt(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.#l=i}async load(){try{this.#A=Pue(JSON.parse(await Due(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(xQ),await this.#o()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){let i=Kt(t),e=Kt(o);if(!i||!e)throw new TypeError("key and sessionId are required");this.#A.sessions[i]=e,await this.#o()}async clearSession(t){let o=Kt(t);!o||!(o in this.#A.sessions)||(delete this.#A.sessions[o],await this.#o())}async clearSessions(){this.#A.sessions={},await this.#o()}hasSeen(t){let o=Kt(t);return!!(o&&this.#A.seenMessageIds.includes(o))}async markSeen(t){let o=Kt(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.#o())}async rememberOutboundMessage({conversationKey:t,text:o,sentAt:i=Date.now(),completedAt:e=Date.now(),providerMessageIds:a=[]}={}){let A=L1({conversationKey:t,text:o,sentAt:i,completedAt:e,providerMessageIds:a});if(!A)throw new TypeError("Invalid DingTalk outbound message");this.#A.recentOutboundMessages=rT([...this.#A.recentOutboundMessages,A]),await this.#o()}recentOutboundTextFor({conversationKey:t,processQueryKey:o,messageId:i,createdAt:e,now:a=Date.now()}={}){let A=Kt(t);if(!A)return null;let r=rT(this.#A.recentOutboundMessages,a).filter(I=>I.conversationKey===A),s=F1([o,i]);for(let I of s){let d=r.filter(B=>B.providerMessageIds.includes(I));if(d.length===1)return d[0].text;if(d.length>1)return null}let g=tT(e);if(g===null)return null;let c=r.filter(I=>g>=I.sentAt-YQ&&g<=I.completedAt+YQ);return c.length===1?c[0].text:null}pendingSenders(){return Object.values(this.#A.pendingSenders).sort((t,o)=>t.requestedAt.localeCompare(o.requestedAt)).map(t=>structuredClone(t))}pendingSender(t){let o=Kt(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=Kt(e.staffId);if(!a)throw new TypeError("staffId is required");let A=Kt(e.lastSeenAt)??Kt(e.requestedAt)??this.#l(),r=Object.values(this.#A.pendingSenders).find(g=>g.staffId===a),s={requestId:r?.requestId??`ding_sender_${this.#r()}`,staffId:a,displayName:G1(e.displayName??e.nick??o),requestedAt:r?.requestedAt??A,lastSeenAt:A};return this.#A.pendingSenders[s.requestId]=s,await this.#o(),structuredClone(s)}async removePendingSender(t){let o=Kt(t);return!o||!this.#A.pendingSenders[o]?!1:(delete this.#A.pendingSenders[o],await this.#o(),!0)}async removePendingSenderByStaffId(t){let o=Kt(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 bue(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(xQ)}async#o(){let t=`${JSON.stringify(this.#A,null,2)} -`,o=this.#t.then(async()=>{await wue(_ue(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await Mue(i,t,{encoding:"utf8",mode:384}),await Oue(i,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var Gue=Object.freeze(["open","allowlist"]),Fue=Object.freeze(["direct","group"]),U1=256,Lue=["direct","group"],Uue=["mode","open","allowlist"],Hue=["defaultCanExecuteCommands","commandPermissionOverrides"],Kue=["users"],xue=["id","canExecuteCommands"],Yue=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/;function oo(n){let t=new TypeError(n);return t.code="access-policy-invalid",t}function eu(n,t){return n&&typeof n=="object"&&!Array.isArray(n)&&[Object.prototype,null].includes(Object.getPrototypeOf(n))&&Reflect.ownKeys(n).length===t.length&&t.every(o=>Object.hasOwn(n,o))}function Y1(n){if(typeof n=="number"){if(!Number.isFinite(n))throw oo("\u7528\u6237\u6807\u8BC6\u65E0\u6548\u3002");n=String(n)}else typeof n=="bigint"&&(n=String(n));if(typeof n!="string")throw oo("\u7528\u6237\u6807\u8BC6\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002");let t=n.trim();if(!t||t.length>U1||Yue.test(t))throw oo(`\u7528\u6237\u6807\u8BC6\u4E0D\u80FD\u4E3A\u7A7A\u3001\u5305\u542B\u63A7\u5236\u5B57\u7B26\u6216\u8D85\u8FC7 ${U1} \u4E2A\u5B57\u7B26\u3002`);return t}function jue(n){if(!eu(n,xue))throw oo("\u7528\u6237\u6761\u76EE\u5FC5\u987B\u5305\u542B\u7528\u6237\u6807\u8BC6\u548C\u547D\u4EE4\u6743\u9650\u3002");if(typeof n.canExecuteCommands!="boolean")throw oo("\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");return Object.freeze({id:Y1(n.id),canExecuteCommands:n.canExecuteCommands})}function j1(n,{listMessage:t,duplicateMessage:o}){if(!Array.isArray(n))throw oo(t);let i=n.map(jue);if(new Set(i.map(({id:e})=>e)).size!==i.length)throw oo(o);return Object.freeze(i)}function Jue(n){if(!eu(n,Hue))throw oo("\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");if(typeof n.defaultCanExecuteCommands!="boolean")throw oo("\u5F00\u653E\u6A21\u5F0F\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");return Object.freeze({defaultCanExecuteCommands:n.defaultCanExecuteCommands,commandPermissionOverrides:j1(n.commandPermissionOverrides,{listMessage:"\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",duplicateMessage:"\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"})})}function que(n){if(!eu(n,Kue))throw oo("\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");return Object.freeze({users:j1(n.users,{listMessage:"\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",duplicateMessage:"\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"})})}function aT(n){if(!eu(n,Uue))throw oo("\u8BBF\u95EE\u573A\u666F\u8BBE\u7F6E\u5FC5\u987B\u540C\u65F6\u5305\u542B\u6A21\u5F0F\u3001\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u548C\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u3002");if(!Gue.includes(n.mode))throw oo("\u8BBF\u95EE\u6A21\u5F0F\u53EA\u80FD\u662F open \u6216 allowlist\u3002");return Object.freeze({mode:n.mode,open:Jue(n.open),allowlist:que(n.allowlist)})}function Ec(n){if(!eu(n,Lue))throw oo("\u8BF7\u540C\u65F6\u63D0\u4EA4\u5B8C\u6574\u7684\u79C1\u804A\u548C\u7FA4\u804A\u8BBF\u95EE\u8BBE\u7F6E\u3002");return Object.freeze({direct:aT(n.direct),group:aT(n.group)})}function jd(n){try{return Ec(n)}catch{return null}}function JQ(n){return aT(n===void 0?{mode:"allowlist",open:{defaultCanExecuteCommands:!1,commandPermissionOverrides:[]},allowlist:{users:[]}}:n)}var H1=JQ(),K1=Object.freeze({direct:H1,group:H1});function Eg({direct:n=K1.direct,group:t=K1.group}={}){return Ec({direct:n,group:t})}var zue=Object.freeze({allowed:!0,reason:"allowed"}),Vue=Object.freeze({allowed:!1,reason:"policy-unavailable"}),x1=Object.freeze({allowed:!1,reason:"invalid-context"}),Wue=Object.freeze({allowed:!1,reason:"sender-unavailable"}),Zue=Object.freeze({allowed:!1,reason:"sender-not-allowed"}),Xue=Object.freeze({allowed:!1,reason:"command-not-allowed"});function J1(n,{conversationType:t,senderIds:o,isCommand:i=!1,equals:e=(a,A)=>a===A}={}){let a=jd(n);if(!a)return Vue;if(!Fue.includes(t)||typeof i!="boolean"||typeof e!="function")return x1;let A=(Array.isArray(o)?o:[o]).flatMap(c=>{try{return[Y1(c)]}catch{return[]}});if(A.length===0)return Wue;let r=a[t],s=r.mode==="open"?r.open.commandPermissionOverrides:r.allowlist.users,g;try{g=s.filter(c=>A.some(I=>e(I,c.id)===!0))}catch{return x1}return r.mode==="allowlist"&&g.length===0?Zue:i&&!(r.mode==="open"?g.length>0?g.every(I=>I.canExecuteCommands):r.open.defaultCanExecuteCommands:g.every(I=>I.canExecuteCommands))?Xue:zue}var $ue=new Set(["/help","/status","/new"]);function qQ(n,{hasImages:t=!1,hasFiles:o=!1}={}){if(typeof n!="string")return!1;let i=n.trim();return i?ki(i)||Ka(i)||!o&&(ci(i)||Ii(i)||li(i))?!0:t||o?!1:$ue.has(i.toLowerCase())||R_(i)||b_(i):!1}var no="\u4F60\u53EF\u4EE5\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u4F46\u6CA1\u6709\u6267\u884C\u547D\u4EE4\u7684\u6743\u9650\u3002",eCe=Object.freeze({allowed:!0,reason:"policy-not-configured"}),ACe=Object.freeze({allowed:!0,reason:"privileged-sender"});function Oa(n,{conversationType:t,senderIds:o,text:i="",hasImages:e=!1,hasFiles:a=!1,isCommand:A=qQ(i,{hasImages:e,hasFiles:a})}={}){if(!n)return eCe;try{if(typeof n.isPrivileged=="function"&&n.isPrivileged(o,t)===!0)return ACe}catch{}let r=null;try{r=n.getSettings()}catch{}return J1(r,{conversationType:t,senderIds:o,isCommand:A,...typeof n.equals=="function"?{equals:n.equals}:{}})}var tCe="\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026",iT="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",rCe=["\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\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D","/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD","/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 \u6216 /presets \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 aCe(){return rCe.map(n=>w(n)).join(` -`)}function ZA(n){return typeof n=="string"&&n.trim()?n.trim():null}function iCe(n){let t=Ur(n),o=ZA(n?.processQueryKey);return o&&!t.includes(o)&&t.push(o),t}function zQ(n){let t=[],o=new Set,i=n;for(;i&&typeof i=="object"&&t.length<3&&!o.has(i);){o.add(i);let e=ZA(i.name)?.slice(0,80),a=ZA(i.code)?.slice(0,80),A=ZA(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 oCe(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 w("\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 w("\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 w("\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 _o(n)}function q1(n){return ZA(n?.senderStaffId)??ZA(n?.senderId)}function z1(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 V1(n){let t=n?.richText??n?.rich_text;return Array.isArray(t)?t:[]}function nCe(n){return typeof n?.text=="string"?ZA(n.text):typeof n?.text?.content=="string"?ZA(n.text.content):String(n?.type).toLowerCase()==="text"&&typeof n?.content=="string"?ZA(n.content):null}function oT(n){return ZA(n?.downloadCode)??ZA(n?.pictureDownloadCode)}function W1(n){let t=typeof n=="string"&&n.trim()?Number(n):n;return!Number.isFinite(t)||t<0?null:Math.trunc(t<1e10?t*1e3:t)}function VQ(n){let t=ZA(n);return t&&!/^\[interactive card message\]$/iu.test(t)?t:null}function sCe(n,t){let o=n?.text;if(o?.isReplyMsg!==!0)return null;let i=o?.repliedMsg;if(!i||typeof i!="object")return{unavailableReason:"not-delivered"};let e=ZA(i.msgType??i.msgtype)?.toLowerCase()??"",a=z1({content:i.content})??{},A={msgtype:e,text:{content:ZA(a.text)??(typeof i.content=="string"?i.content:"")},content:a},r=Z1(A,t),s=[];if(e==="picture")s=[{kind:"image"}];else if(e==="file"){let m=ZA(a.fileName??a.file_name);s=[{kind:"file",...m?{name:m}:{}}]}else e==="richtext"?s=V1(a).filter(m=>String(m?.type??"").toLowerCase()==="picture").map(()=>({kind:"image"})):e==="voice"||e==="audio"?s=[{kind:"audio"}]:e==="video"&&(s=[{kind:"video"}]);let g=ZA(i.msgId??i.messageId),c=ZA(i.senderId??i.senderStaffId),I=ZA(i.senderNick??i.senderName),d=VQ(r.content)??VQ(a.text)??VQ(a.summary)??VQ(a.title),B=ZA(n?.originalProcessQueryKey??a.processQueryKey),f=W1(i.createdAt??i.createTime),Q=!d&&s.length===0&&typeof t?.loadReplyContent=="function"?({signal:m}={})=>t.loadReplyContent({...g?{messageId:g}:{},...B?{processQueryKey:B}:{},...f===null?{}:{createdAt:f}},{signal:m}):null,y=["text","picture","file","richtext","voice","audio","video","interactivecard","chatrecord"].includes(e);return{...g?{messageId:g}:{},...c?{authorId:c}:{},...I?{authorName:I}:{},...d?{content:d}:{},...s.length>0?{attachments:s}:{},...Q?{load:Q}:{},...!d&&s.length===0&&!Q?{unavailableReason:y?"not-delivered":"unsupported"}:{}}}function Z1(n,{api:t,clientId:o,clientSecret:i,loadReplyContent:e}={}){let a=String(n?.msgtype??"").toLowerCase(),A=z1(n),r=a==="richtext"?V1(A):[],s=a==="text"?ZA(n?.text?.content)??"":r.map(nCe).filter(Boolean).join(` -`),g=[];if(a==="picture"){let d=oT(A);d&&g.push(d)}else if(a==="richtext")for(let d of r){if(String(d?.type??"").toLowerCase()!=="picture")continue;let B=oT(d);B&&g.push(B)}let c=a==="file"?oT(A):null,I=sCe(n,{api:t,clientId:o,clientSecret:i,loadReplyContent:e});return{content:s,images:g.map((d,B)=>({name:B===0?"image":`image-${B+1}`,load:({signal:f,maxBytes:Q})=>{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:d,signal:f,maxBytes:Q})}})),files:c?[{name:ZA(A?.fileName??A?.file_name)??"file",load:({signal:d}={})=>{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:c,signal:d})}}]:[],...I?{replyTo:I}:{}}}function gCe(n,t){if(String(n?.conversationType)==="2"){let o=ZA(n?.conversationId);if(!o)throw new Error("DingTalk group message has no conversation id");return`group:${o}`}return`p2p:${t}`}function cCe(n,t){return String(n?.conversationType)==="2"?{type:"group",openConversationId:ZA(n?.conversationId),atUserIds:{[t]:ZA(n?.senderNick)??t}}:{type:"user",userId:t}}function ICe(n,t,o){let i=ZA(n?.robotCode)??o;return String(n?.conversationType)==="2"?{type:"group",openConversationId:ZA(n?.conversationId),robotCode:i}:{type:"user",userId:t,robotCode:i}}function lCe(n,t){let o=String(n??w("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim()||w("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return w("\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 w("\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 w("\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 w("\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 w("\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 w("\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 w("\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 dCe(n){return n?.type==="text"&&ZA(n.text)?n.text:n?.type==="tool"?n.name==="web_search"?w("_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_"):w("_\u6B63\u5728\u4F7F\u7528 {name}\u2026_",{name:ZA(n.name)??w("\u5DE5\u5177")}):w("_{text}_",{text:ZA(n?.text)??w("\u6B63\u5728\u5904\u7406\u2026")})}function pCe(n,t,o){if(t.needsPresentation||!t.questions[t.index]||t.actor!==o||String(n?.conversationType)==="2"&&n?.isInAtList!==!0||n?.msgtype!=="text"||!ZA(n?.text?.content))return!1;try{return pc(n.sessionWebhook),!0}catch{return!1}}function hCe(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 Kr(n,t){n[t]=(n[t]??0)+1,n.stats??={},n.stats[t]=n[t]}function nT({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 WQ=class{#e;#A;#t;#r;#l;#o;#i;#a;#n;#s;#d;#c;#g;#I=new Map;#p=new Map;#E=new Map;#u=new Set;#C=new Set;#B=new Map;#f;#Q=new Ri;constructor({api:t,clientId:o,clientSecret:i,harness:e,state:a,contextEnhancement:A,accessPolicy:r,status:s=nT(),logger:g=console,replyTimeoutMs:c=6e5,reactionTimeoutMs:I=5e3,maxMessageChars:d=4e3,signal:B}){if(!t||typeof t.sendText!="function")throw new TypeError("DingTalk API is required");if(!ZA(o)||!ZA(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.#l=a,this.#o=A,this.#i=r,this.#a=s,this.#n=g,this.#f=new bi({label:"DingTalk",logger:g}),this.#s=c,this.#d=Number.isFinite(I)&&I>0?Math.floor(I):5e3,this.#c=d,this.#g=B,hCe(this.#a),this.#x()}get status(){return this.#x(),structuredClone(this.#a)}accept(t,{contextSnapshot:o}={}){if(this.#g?.aborted)return Promise.resolve();let i=ZA(t?.msgId),e=q1(t);if(!i||!e||this.#l.hasSeen(i)||this.#B.has(i))return Promise.resolve();let a=String(t.conversationType)==="2"?"group":String(t.conversationType)==="1"?"direct":null,A;try{A=gCe(t,e)}catch{return Kr(this.#a,"messagesRejected"),this.#a.lastRejectedAt=new Date().toISOString(),Promise.resolve()}let r=null;try{r=pc(t.sessionWebhook)}catch{}let s=this.#p.get(A),g=this.#h(t,A),c=ZA(g.content)??"",I=String(t.conversationType)!=="2"||t?.isInAtList===!0,d=String(t.conversationType)!=="2";if(I){let _=Oa(this.#i,{conversationType:a,senderIds:e,text:c,hasImages:Nt(g),hasFiles:Dt(g)});if(!_.allowed)return this.#B.set(i,null),this.#w(t,i,r,_)}this.#B.set(i,o===void 0?aa(this.#o,a):o),r&&d&&Do(this.#l,{sessionWebhook:r});let B=r&&I?this.#m(t):null,f=_=>Promise.resolve(_).then(R=>(this.#y(B,this.#g?.aborted?"clear":"success"),R),R=>{throw this.#y(B,this.#g?.aborted||R?.name==="AbortError"||R?.code==="turn-stopped"?"clear":"error"),R}),Q=String(t?.msgtype).toLowerCase()==="text"&&ki(c),y=this.#Q.status(A);if(Q&&!d&&r&&I)return f(this.#D(i,r,{message:ns()},B));if(d&&r&&(Q||y.phase==="collecting")){let R=/^\/batch$/iu.test(c)&&y.phase==="idle"&&(this.#I.has(A)||s||this.#f.hasPending(A))?{handled:!0,kind:"busy",message:ko()}:this.#Q.handle(A,c,{plainText:!!c&&String(t?.msgtype).toLowerCase()==="text"&&!Dt(g)&&!Nt(g)&&!Hr(g)});if(R.handled)return R.kind==="submit"?f(this.#b({...t,msgtype:"text",text:{content:R.prompt}},i,e,A,{batchSubmission:R,statusReaction:B})):f(this.#D(i,r,R,B))}let m=Ka(c)?ao:Dt(g)?null:ci(c)?Ti:Ii(c)?io:li(c)?Ni:null;if(m&&r&&I){let _;return _=this.#_(t,i,A,r,g,m).catch(R=>{if(R?.code==="turn-stopped"||this.#g?.aborted){this.#y(B,"clear");return}this.#y(B,"error"),this.#a.lastError=R?.message??String(R);let H=rt(this.#a,R);return this.#n.error?.(`[dsh-dingtalk] failed to process a command [${H.referenceId}]`,zQ(R)),this.#L(r,ut(H),this.#G(t)).catch(()=>{})}).finally(()=>{this.#B.delete(i),this.#C.delete(_)}),this.#C.add(_),f(_)}let T=this.#f.claimReply({key:A,actor:e,messageId:i,text:r&&t?.msgtype==="text"?ZA(t?.text?.content)??"":"",addressed:String(t?.conversationType)!=="2"||t?.isInAtList===!0,hasPendingQuestion:!!s,questionCompletion:s?.submitting||s?.claimedReplyMessageId?s.queue:null,isQuestionPending:()=>this.#p.has(A),send:r?_=>this.#L(r,_,this.#G(t)):async()=>{}});if(T){let _;return _=T.process(async()=>this.#l.hasSeen(i)?!1:(await this.#l.markSeen(i),Kr(this.#a,"messagesReceived"),this.#a.lastMessageAt=new Date().toISOString(),r||(Kr(this.#a,"messagesRejected"),this.#a.lastRejectedAt=new Date().toISOString(),this.#a.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002")),!0)).catch(R=>{if(this.#g?.aborted){this.#y(B,"clear");return}this.#y(B,"error"),this.#a.lastError=w("\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002"),this.#n.error?.("[dsh-dingtalk] failed to process an approval reply",R)}).finally(()=>{this.#B.delete(i),this.#u.delete(_)}),this.#u.add(_),f(_)}if(s&&s.actor!==e)return f(this.#b(t,i,e,A,{statusReaction:B}));if(s?.submitting||s?.claimedReplyMessageId)return f(this.#b(t,i,e,A,{statusReaction:B}));if(s){pCe(t,s,e)&&(s.claimedReplyMessageId=i);let R=(s.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#M(t,i,e,A,s,B)).finally(()=>{this.#B.delete(i),s.claimedReplyMessageId===i&&(s.claimedReplyMessageId=null),s.queue===R&&(s.queue=null)});return s.queue=R,f(R)}return f(this.#b(t,i,e,A,{statusReaction:B}))}#S(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.#d),r.unref?.()});return Promise.race([A,s]).then(()=>(Kr(this.#a,e==="add"?"reactionsAdded":"reactionsRemoved"),!0)).catch(g=>(Kr(this.#a,"reactionErrors"),this.#n.debug?.(`[dsh-dingtalk] ${t} failed`,zQ(g)),!1)).finally(()=>clearTimeout(r))}#m(t){if(typeof this.#e.addReaction!="function"||typeof this.#e.recallReaction!="function")return null;let o=ZA(t?.msgId),i=ZA(t?.conversationId);if(!o||!i)return null;let e={messageId:o,conversationId:i,robotCode:ZA(t?.robotCode)??this.#A};return{target:e,attached:this.#S("addReaction",e,GI,"add"),terminal:!1}}#y(t,o){if(!t||t.terminal)return;t.terminal=!0;let i=o==="success"?lY:o==="error"?dY:null;t.attached.then(async e=>{let a=await this.#S("recallReaction",t.target,GI,"remove");(!e||!a)&&(await new Promise(A=>{setTimeout(A,Math.min(1e3,this.#d)).unref?.()}),a=await this.#S("recallReaction",t.target,GI,"remove")||a),!(!a||!i||this.#g?.aborted)&&await this.#S("addReaction",t.target,i,"add")}).catch(()=>{})}#b(t,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1,batchSubmission:r=null,statusReaction:s=null}={}){let g=!1;try{pc(t.sessionWebhook),g=!0}catch{}let c=String(t.conversationType)!=="2"||t.isInAtList===!0,I=g&&c?Kd(this.#h(t,e),{signal:this.#g}):void 0,B=(this.#I.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#T(t,o,i,e,{alreadyRecorded:A,preparedMessage:I,batchSubmission:r,statusReaction:s})).finally(()=>{a&&this.#B.delete(o),this.#I.get(e)===B&&this.#I.delete(e)});return this.#I.set(e,B),B}#h(t,o){return Z1(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t,loadReplyContent:(i,e)=>this.#R(o,i,e)})}async#R(t,o,{signal:i}={}){let e=this.#l.recentOutboundTextFor?.({conversationKey:t,...o});if(e)return{content:e};let a=W1(o?.createdAt);if(a===null)return{unavailableReason:"not-delivered"};let A=this.#l.sessionFor(t),r=typeof A=="string"&&A?this.#r.workspaceSession?.(A):null,s=await Yd({session:r,quotedAt:a,signal:i,toleranceMs:YQ});if(!s)return{unavailableReason:"not-delivered"};try{await this.#l.rememberOutboundMessage?.({conversationKey:t,text:s,sentAt:a,completedAt:a,providerMessageIds:[o?.processQueryKey,o?.messageId].map(ZA).filter(Boolean)})}catch(g){this.#n.warn?.("[dsh-dingtalk] failed to remember a recovered quote:",g)}return{content:s}}async waitForIdle(){await Promise.allSettled([...this.#I.values(),...[...this.#p.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#u,...this.#C])}async#_(t,o,i,e,a,A){if(this.#g?.throwIfAborted(),this.#l.hasSeen(o))return;await this.#l.markSeen(o),Kr(this.#a,"messagesReceived"),this.#a.lastMessageAt=new Date().toISOString();let r=await A(ZA(a.content)??"",this.#r,this.#l,i,{signal:this.#g,isDirect:String(t.conversationType)==="1",hasImages:Nt(a),hasFiles:Dt(a),pendingInteraction:this.#p.has(i)||this.#f.hasPending(i),control:{owner:this,key:i}});r?.stopped&&await Promise.allSettled([this.#J(i),this.#f.closeRoute(i)]);for(let s of r?.messages??[r?.message])s&&await this.#L(e,s,this.#G(t));this.#a.lastError=null}#D(t,o,i,e){let a;return a=Promise.resolve().then(async()=>{this.#l.hasSeen(t)||(await this.#l.markSeen(t),Kr(this.#a,"messagesReceived"),this.#a.lastMessageAt=new Date().toISOString(),i.message&&await this.#L(o,i.message),this.#a.lastError=null)}).catch(async A=>{if(this.#g?.aborted){this.#y(e,"clear");return}this.#y(e,"error"),this.#a.lastError=A?.message??String(A);let r=rt(this.#a,A);this.#n.error?.(`[dsh-dingtalk] failed to process a batch input message [${r.referenceId}]`,zQ(A)),await this.#L(o,ut(r)).catch(()=>{})}).finally(()=>{this.#B.delete(t),this.#C.delete(a)}),this.#C.add(a),a}#w(t,o,i,e){let a;return a=Promise.resolve().then(async()=>{this.#l.hasSeen(o)||(await this.#l.markSeen(o),e.reason==="command-not-allowed"&&i?(Kr(this.#a,"messagesReceived"),this.#a.lastMessageAt=new Date().toISOString(),await this.#L(i,w(no),this.#G(t)),Kr(this.#a,"messagesReplied"),this.#a.lastReplyAt=new Date().toISOString()):(Kr(this.#a,"messagesRejected"),this.#a.lastRejectedAt=new Date().toISOString()),this.#a.lastError=null)}).catch(A=>{this.#g?.aborted||(this.#a.lastError=A?.message??String(A),this.#n.error?.("[dsh-dingtalk] failed to apply inbound access policy",A))}).finally(()=>{this.#B.delete(o),this.#C.delete(a)}),this.#C.add(a),a}async#T(t,o,i,e,{alreadyRecorded:a=!1,preparedMessage:A,batchSubmission:r=null,statusReaction:s=null}={}){if(this.#g?.throwIfAborted(),!a){if(this.#l.hasSeen(o))return;await this.#l.markSeen(o),Kr(this.#a,"messagesReceived"),this.#a.lastMessageAt=new Date().toISOString()}if(String(t.conversationType)==="2"&&t.isInAtList!==!0){Kr(this.#a,"messagesIgnored");return}let g;try{g=pc(t.sessionWebhook)}catch{Kr(this.#a,"messagesRejected"),this.#a.lastRejectedAt=new Date().toISOString(),this.#a.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=A??this.#h(t,e),I=c.content,d=Nt(c),B=Dt(c),f=Hr(c),Q=String(t?.msgtype).toLowerCase()==="text",y=null,m=!1,T=null,_=r===null;try{if(!I&&!d&&!B&&!f){await this.#L(g,w("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"),this.#G(t));return}let R=I.toLowerCase();if(Q&&!d&&!B&&R==="/help"){await this.#L(g,aCe(),this.#G(t));return}if(Q&&!d&&!B&&R==="/status"){await this.#r.ensureRunning({signal:this.#g}),await this.#L(g,w("\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002"),this.#G(t));return}if(Q&&!d&&!B&&R==="/new"){await this.#l.clearSession(e),await this.#L(g,w("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"),this.#G(t));return}let H=Q&&!d&&!B?await To(I,this.#r,e):null;if(H){for(let ae of H.messages??[H.message])await this.#L(g,ae,this.#G(t));return}let F=Q&&!d&&!B?await _i(I,this.#r,this.#l,e,{signal:this.#g}):null;if(F){await this.#L(g,F.message,this.#G(t));return}let L=d||f?await Fo(c,{signal:this.#g}):void 0,q=this.#B.get(o),z=!1;if(q){let ae=L??I;L=Ro(ae,q,()=>({channel:"dingtalk",senderId:i,senderName:t.senderNick,conversationTitle:t.conversationTitle,chatId:t.conversationId})),z=L!==ae}if(typeof this.#e.createAiCard=="function"&&typeof this.#e.updateAiCard=="function"&&typeof this.#e.finishAiCard=="function"){y=CY({api:this.#e,clientId:this.#A,clientSecret:this.#t,target:cCe(t,i),signal:this.#g,logger:this.#n});let ae=Date.now();m=await y.start(w(tCe)),m&&(T=ae)}let{answer:K,artifacts:G=[]}=await Mi({harness:this.#r,state:this.#l,key:e,text:I,content:L,contextEnhanced:z,createOptions:{signal:this.#g},existsOptions:{signal:this.#g},askOptions:{timeoutMs:this.#s,signal:this.#g,control:{owner:this,key:e},onUpdate:m?ae=>y.push(dCe(ae)):void 0,onInteraction:ae=>this.#P(ae,{key:e,actor:i,sessionWebhook:g,requiresMention:String(t.conversationType)==="2"}),onInteractionResolved:ae=>this.#N(ae),files:c.files}});r&&(this.#Q.complete(e,r.token),_=!0);let V=typeof K=="string"&&K.trim()?K:G.length>0?w("\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002"):K,U=null,N=null,k=!1,J=T??Date.now();try{k=m&&await y.finish(V),k?N=$t({deliveryId:o,presentation:"dingtalk-card",providerMessageIds:y.providerMessageIds}):N=$t({deliveryId:o,presentation:"dingtalk-text",providerMessageIds:await this.#L(g,V,this.#G(t))});try{await this.#l.rememberOutboundMessage?.({conversationKey:e,text:V,sentAt:J,completedAt:Date.now(),providerMessageIds:Ur(N)})}catch(ae){this.#n.warn?.("[dsh-dingtalk] failed to remember an outbound message:",ae)}}catch(ae){U=Ha(ae)}let X=await this.#V(ICe(t,i,this.#A),g,o,G,N);if(U&&!X.userVisible)throw U;return U&&X.artifactSendErrors===0&&rt(this.#a,U),Kr(this.#a,"messagesReplied"),this.#a.lastReplyAt=new Date().toISOString(),this.#a.lastError=null,!U&&X.artifactSendErrors===0&&Oo(this.#a),X.receipt}catch(R){let H=null;if(!_&&r&&(R?.code==="turn-stopped"?this.#Q.complete(e,r.token):H=this.#Q.fail(e,r.token).message??null,_=!0),R?.code==="turn-stopped"){this.#y(s,"clear"),m&&await y.finish(w("\u5DF2\u505C\u6B62\u3002")).catch(()=>{});return}if(this.#g?.aborted){this.#y(s,"clear");return}this.#y(s,"error"),this.#a.lastError=R?.message??String(R);let F=Po(R)??oCe(R),L=rt(this.#a,R,{userMessage:F,reason:ro(R)?.reason});this.#n.error?.(`[dsh-dingtalk] failed to process an inbound message [${L.referenceId}]`,zQ(R));try{let q=ut(L),z=H?`${q} +${o}`:o}function Fo(n){return n instanceof Go?n.userMessage:null}import{createHash as _1,randomUUID as T1}from"node:crypto";import{constants as iu}from"node:fs";import{copyFile as FEe,lstat as w1,mkdtemp as LEe,open as N1,realpath as UEe,unlink as R1}from"node:fs/promises";import{tmpdir as HEe}from"node:os";import{basename as KEe,extname as xEe,isAbsolute as YEe,join as k1,resolve as jEe}from"node:path";var qQ="dsh_im_return_file",JQ="dsh-im-outbound-artifact",eT=64*1024,JEe=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"]]),ug=new WeakMap,v1=new WeakMap,au=new WeakMap,D1;function qEe(){return D1??=LEe(k1(HEe(),"dsh-im-outbound-")),D1}function Eg(n,t){let o=new Error(t);return o.code=n,o}function O1(n){let t=n?.session?.events;if(!Array.isArray(t))return null;let o=null;for(let a of t)a?.type==="turn/start"?o=Number.isInteger(a.data?.turn)?a.data.turn:null:a?.type==="turn/end"&&a.data?.turn===o&&(o=null);return Number.isInteger(o)&&o>=0?o:null}function b1(n){let t=n?.id??n?.header?.id;return typeof t=="string"&&t?t:null}function hg(n,t){return`${n}\0${t}`}function M1(n,t){return`${n}\0${t}`}function zEe(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 VEe(n){return JEe.get(xEe(n).toLowerCase())??"application/octet-stream"}function WEe(n){return _1("sha256").update(n).digest("hex")}function ZEe(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 XEe(n,t){let o;try{o=await N1(n,iu.O_RDONLY);let a=_1("sha256"),e=o.createReadStream({autoClose:!1,highWaterMark:eT,...t?{signal:t}:{}});for await(let i of e)t?.throwIfAborted(),a.update(i);return a.digest("hex")}finally{await o?.close().catch(()=>{})}}async function $Ee(n,t,{signal:o,errorCode:a="artifact-changed",errorMessage:e="The result file changed while it was being read."}={}){let i=()=>Eg(a,e);if(!Number.isSafeInteger(t)||t<0)throw i();o?.throwIfAborted();let A;try{A=Buffer.allocUnsafe(t)}catch{throw i()}if(typeof n?.createReadStream=="function"){let g=n.createReadStream({autoClose:!1,start:0,end:t,highWaterMark:eT,...o?{signal:o}:{}}),c=0;for await(let I of g){o?.throwIfAborted();let p=Buffer.isBuffer(I)?I:Buffer.from(I);if(c+p.length>t)throw i();p.copy(A,c),c+=p.length}if(c!==t)throw i();return A}let r=0;for(;rg)throw i();r+=I}o?.throwIfAborted();let s=Buffer.allocUnsafe(1);if((await n.read(s,0,1,t))?.bytesRead!==0)throw i();return A}async function eue(n,t,o){o?.throwIfAborted();let a;try{let e=YEe(t)?t:jEe(n,t),i=await UEe(e);if(!(await w1(i,{bigint:!0})).isFile())throw Eg("artifact-not-file","The requested path is not a file.");let r=await qEe();a=k1(r,`${T1()}.artifact`),await FEe(i,a,iu.COPYFILE_EXCL),o?.throwIfAborted();let s=await w1(a,{bigint:!0}),g=Number(s.size);if(!s.isFile()||!Number.isSafeInteger(g)||g<0)throw Eg("artifact-unavailable","The file could not be prepared for delivery.");let c=zEe(KEe(e));return Object.freeze({fileName:c,mediaType:VEe(c),size:g,digest:await XEe(a,o),storagePath:a})}catch(e){throw a&&await R1(a).catch(()=>{}),e?.code?.startsWith?.("artifact-")?e:o?.aborted?o.reason??e:Eg("artifact-unavailable","The requested file is unavailable.")}}function P1(n){return Object.freeze({artifactId:n.artifactId,fileName:n.fileName,size:n.size})}function jQ(n){return n.artifactId}function Is(n){let t=ug.get(n);if(!t)return;if(t.releaseRequested=!0,t.materializing>0){t.cleanupRequested=!0;return}let o=[...au.get(n)??[]];if(o.length>0){t.cleanupDeferred||(t.cleanupDeferred=!0,Promise.allSettled(o).finally(()=>{t.cleanupDeferred=!1,Is(n)}));return}ug.delete(n),au.delete(n),t.onCleanup?.(),R1(t.path).catch(()=>{})}var AT=class{#e=new Map;#A=new Map;#t=new Map;#r=new Map;#I=new Map;#o=new Map;#c=new Map;#i=new Map;#a;constructor({uuid:t=T1}={}){if(typeof t!="function")throw new TypeError("uuid must be a function");this.#a=t}openConsumer(t,o){if(typeof t!="string"||!t||typeof o!="string"||!o)throw new TypeError("sessionId and promptRpcId are required");let a=M1(t,o),e={sessionId:t,promptRpcId:o,turn:null,released:!1};return this.#o.set(a,e),()=>{if(!e.released&&(e.released=!0,this.#o.get(a)===e&&this.#o.delete(a),e.turn!==null)){let i=hg(t,e.turn);this.#c.get(i)===e&&this.#c.delete(i),this.discard(t,e.turn)}}}observeSessionEvent(t,o){let a=b1(t);if(!a||!o||typeof o!="object")return;if(o.type==="turn/start"){let A=o.data?.turn;Number.isInteger(A)&&A>=0&&this.#i.set(a,A);return}if(o.type==="user/message"){let A=o.data?.source?.rpcId,r=this.#i.get(a)??O1({session:t});if(typeof A!="string"||!A||!Number.isInteger(r))return;this.#i.set(a,r);let s=this.#o.get(M1(a,A));if(!s||s.released)return;s.turn=r,this.#c.set(hg(a,r),s);return}if(o.type!=="turn/end")return;let e=o.data?.turn;if(!Number.isInteger(e)||e<0)return;this.#i.get(a)===e&&this.#i.delete(a);let i=this.#c.get(hg(a,e));(!i||i.released)&&this.discard(a,e)}disposeSession(t){let o=b1(t);if(!o)return;let a=`${o}\0`,e=new Set;for(let i of[this.#e,this.#A])for(let[A,r]of i)if(A.startsWith(a)){for(let s of r.values())e.add(s);i.delete(A)}for(let[i,A]of this.#o)i.startsWith(a)&&(A.released=!0,this.#o.delete(i));for(let i of this.#c.keys())i.startsWith(a)&&this.#c.delete(i);this.#i.delete(o);for(let i of e)Is(i)}async stage(t,o){let a=t?.path;if(typeof a!="string"||!a.trim())throw new TypeError("A file path is required.");let e=o?.agent,i=e?.session?.header?.id,A=e?.session?.header?.cwd,r=O1(e);if(typeof i!="string"||!i||typeof A!="string"||!A||r===null)throw Eg("artifact-context-required","A live Harness Session is required to return a file.");let s=await eue(A,a,o?.signal),{storagePath:g,...c}=s,I=Object.freeze({kind:JQ,schemaVersion:1,artifactId:this.#a(),deliveryKey:this.#a(),...c,source:"managed-temp",registeredBy:Object.freeze({kind:"tool-result",eventId:typeof o?.callId=="string"?o.callId:"unknown",toolName:qQ}),origin:Object.freeze({sessionId:i,turn:r,callId:typeof o?.callId=="string"?o.callId:null}),createdAt:Date.now()});ug.set(I,{path:g,materializing:0,materialized:!1,releaseRequested:!1,cleanupRequested:!1,cleanupDeferred:!1,onCleanup:()=>this.#g(I)});let p=hg(i,r),B=this.#A.get(p);return B||(B=new Map,this.#A.set(p,B)),B.set(jQ(I),I),I}commit(t){if(t?.kind!==JQ||!ug.has(t))return null;let o=hg(t.origin.sessionId,t.origin.turn),a=jQ(t),e=this.#A.get(o);if(e?.get(a)!==t)return null;e.delete(a),e.size===0&&this.#A.delete(o);let i=this.#e.get(o);return i||(i=new Map,this.#e.set(o,i)),i.set(a,t),P1(t)}release(t){if(t?.kind!==JQ)return;let o=hg(t.origin.sessionId,t.origin.turn),a=jQ(t),e=this.#A.get(o);e?.get(a)===t&&e.delete(a),e?.size===0&&this.#A.delete(o),Is(t)}take(t,o,{signal:a}={}){let e=hg(t,o),i=this.#e.get(e);if(this.#e.delete(e),!i)return[];if(a?.aborted){for(let s of i.values())Is(s);return[]}let A=this.#t.get(e)??new Map;this.#t.set(e,A);let r=[];for(let[s,g]of i)ug.has(g)&&(A.set(s,g),r.push(g));if(A.size===0)this.#t.delete(e);else if(!this.#s(e,a))return[];return r}discard(t,o){if(typeof t!="string"||!Number.isInteger(o))return;let a=hg(t,o),e=new Set([...this.#e.get(a)?.values()??[],...this.#A.get(a)?.values()??[]]);this.#e.delete(a),this.#A.delete(a);for(let i of e)Is(i)}clear(){let t=new Set;for(let o of this.#e.values())for(let a of o.values())t.add(a);for(let o of this.#A.values())for(let a of o.values())t.add(a);for(let o of this.#t.values())for(let a of o.values())t.add(a);for(let o of t)Is(o);this.#e.clear(),this.#A.clear(),this.#t.clear();for(let o of this.#r.keys())this.#p(o);for(let o of this.#o.values())o.released=!0;this.#o.clear(),this.#c.clear(),this.#i.clear()}#s(t,o){if(!o)return!0;this.#p(t);let a=this.#I.get(o);return a||(a={turnKeys:new Set,onAbort:null},a.onAbort=()=>{for(let e of[...a.turnKeys])for(let i of this.#t.get(e)?.values()??[])Is(i)},this.#I.set(o,a),o.addEventListener("abort",a.onAbort,{once:!0})),a.turnKeys.add(t),this.#r.set(t,o),o.aborted?(a.onAbort(),!1):!0}#p(t){let o=this.#r.get(t);if(!o)return;this.#r.delete(t);let a=this.#I.get(o);a?.turnKeys.delete(t),a?.turnKeys.size===0&&(o.removeEventListener("abort",a.onAbort),this.#I.delete(o))}#g(t){let o=hg(t.origin.sessionId,t.origin.turn),a=jQ(t),e=this.#e.get(o);e?.get(a)===t&&e.delete(a),e?.size===0&&this.#e.delete(o);let i=this.#A.get(o);i?.get(a)===t&&i.delete(a),i?.size===0&&this.#A.delete(o);let A=this.#t.get(o);A?.get(a)===t&&A.delete(a),A?.size===0&&(this.#t.delete(o),this.#p(o))}},JI=new AT;function Aue({registry:n=JI}={}){let t=new WeakMap,o=new Map,a=(A,r)=>{let s=o.get(A);s||(s={artifacts:[]},o.set(A,s)),s.artifacts.push(r)},e=Object.freeze({name:qQ,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),P1(s)}});return Object.freeze({definition:e,onResult:(A,r)=>{if(A?.name===qQ){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):a(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)a(A.parent,g);return}for(let g of s.artifacts)n.commit(g)}}})}function tT(n,{registry:t=JI}={}){if(typeof n?.tools?.register!="function"||typeof n?.systemPrompt?.section!="function"||typeof n?.on!="function")return!1;let o=Aue({registry:t});return n.tools.register(o.definition),n.on("tools/result",o.onResult),n.on("session/event",(a,e)=>t.observeSessionEvent(a,e)),n.on("session/disposed",a=>t.disposeSession(a)),n.systemPrompt.section({name:"dsh-im:return-file",order:115,text:`When the user asks to receive a file or generated image, call ${qQ} with its path. Existing files can be sent directly; do not recreate or rename a file solely for delivery.`}),!0}async function G1(n,{signal:t}={}){if(t?.aborted&&(Is(n),t.throwIfAborted()),n?.kind!==JQ||n.schemaVersion!==1||!ug.has(n)||typeof n.digest!="string"||!Number.isSafeInteger(n.size)||n.size<0)throw Eg("artifact-invalid","The file registration is invalid.");let o=ug.get(n);o.materializing+=1;let a,e=!1;try{let i=Number.isInteger(iu.O_NOFOLLOW)?iu.O_NOFOLLOW:0;a=await N1(o.path,iu.O_RDONLY|i);let A=await a.stat({bigint:!0});if(!A.isFile()||A.size!==BigInt(n.size))throw Eg("artifact-invalid","The file registration is invalid.");let r=await $Ee(a,n.size,{signal:t,errorCode:"artifact-invalid",errorMessage:"The file registration is invalid."}),s=await a.stat({bigint:!0});if(!ZEe(A,s)||r.byteLength!==n.size||WEe(r)!==n.digest)throw Eg("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 v1.set(g,n),o.materialized=!0,g}catch(i){throw i?.code?.startsWith?.("artifact-")?i:t?.aborted?t.reason??i:Eg("artifact-invalid","The file registration is invalid.")}finally{await a?.close().catch(()=>{}),o.materializing-=1,(!e||o.cleanupRequested)&&Is(n)}}function wn(n,t){let o=v1.get(n);if(!o||!ug.has(o)||!t||typeof t.then!="function")return t;let a=au.get(o)??new Set,e=Promise.resolve(t).then(()=>{},()=>{});return a.add(e),au.set(o,a),e.finally(()=>{a.delete(e),a.size===0&&au.delete(o)}),t}function rT(n){let t=ug.get(n);t&&(t.releaseRequested=!0),Is(n)}var tue=new Set(["sent","rejected","failed","unknown"]),rue=new Set(["sent","failed","unknown"]),iue=new Set(["plain","markdown"]),aue=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 Ur(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):[],a=[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 a!==void 0&&t.push(String(a)),[...new Set(t)]}function jp(n,t){if(typeof n!="string"||!n.trim())throw new TypeError(`${t} must be a non-empty string`);return n}function ls(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(!iue.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 oue(n){if(!Array.isArray(n))throw new TypeError("providerMessageIds must be an array");let t=[],o=new Set;for(let a of n){let e=jp(a,"providerMessageId");o.has(e)||(o.add(e),t.push(e))}return Object.freeze(t)}function nue(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=jp(t.artifactId,"artifactId");if(!tue.has(t.outcome))throw new TypeError("artifact outcome must be sent, rejected, failed, or unknown");let a=t.reason===void 0?void 0:jp(t.reason,"artifact reason");return Object.freeze({artifactId:o,outcome:t.outcome,...a===void 0?{}:{reason:a}})}))}function sue(n){let t=typeof n=="string"?n:n?.code;return t==="artifact-delivery-uncertain"?"unknown":aue.has(t)?"rejected":"failed"}function tr({deliveryId:n,presentation:t,providerMessageIds:o=[],artifacts:a=[],deliveryOutcome:e,reason:i}){if(e!==void 0&&!rue.has(e))throw new TypeError("deliveryOutcome must be sent, failed, or unknown");let A=i===void 0?void 0:jp(i,"delivery reason");return Object.freeze({schemaVersion:1,deliveryId:jp(n,"deliveryId"),presentation:jp(t,"presentation"),providerMessageIds:oue(o),...e===void 0?{}:{deliveryOutcome:e},...A===void 0?{}:{reason:A},artifacts:nue(a)})}function F1({artifactId:n,deliveryId:t,error:o,presentation:a="text-fallback",providerMessageIds:e=[]}){let i=typeof o=="string"?o:o?.code,A=typeof i=="string"&&i?i:"artifact-provider-failed";return tr({deliveryId:t,presentation:a,providerMessageIds:e,artifacts:[{artifactId:n,outcome:sue(o),reason:A}]})}function L1({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 a=[],e=new Map,i,A;for(let r of o){if(!r||r.schemaVersion!==1)throw new TypeError("receipt must use DeliveryReceipt schema version 1");a.push(...r.providerMessageIds??[]),i===void 0&&r.deliveryOutcome!==void 0&&(i=r.deliveryOutcome,A=r.reason);for(let s of r.artifacts??[])e.set(s.artifactId,s)}return tr({deliveryId:n,presentation:t,providerMessageIds:a,deliveryOutcome:i,reason:A,artifacts:[...e.values()]})}function gue(){let n=new Error("Native file delivery is unavailable");return n.code="artifact-provider-unavailable",n}function iT(n,t){return t?.aborted||n?.name==="AbortError"||n?.code==="ABORT_ERR"}function U1(n){return Array.isArray(n)?[...new Set(n.filter(t=>typeof t=="string"&&t.trim()||Number.isSafeInteger(t)).map(String))]:Ur(n)}async function cue(n,{sendFile:t,sendImage:o,signal:a}){if(n.mediaType?.startsWith("image/")&&typeof o=="function")try{return{presentation:"image",result:await o(n)}}catch(e){if(iT(e,a)||e?.code==="artifact-delivery-uncertain")throw e}if(a?.throwIfAborted(),typeof t!="function")throw gue();return{presentation:"file",result:await t(n)}}async function Lo({artifacts:n=[],baseReceipt:t=null,deliveryId:o,aggregatePresentation:a,alwaysMerge:e=!1,channelKey:i,signal:A,sendFile:r,sendImage:s,sendFailureNotice:g,onFailure:c,logger:I}){let p=t?[t]:[],B=!!t&&t.deliveryOutcome!=="failed",f=!1,Q=0,y=0,m=0;try{for(;m0&&(T=L1({deliveryId:o??t?.deliveryId??n[0]?.deliveryKey,presentation:a??`${i}-${t?"text-and-files":"files"}`,receipts:p})),{receipt:T,userVisible:B,failureNoticeVisible:f,artifactsSent:Q,artifactSendErrors:y}}var Iue=8e3,lue=20,pue=256,due=255,hue="Quoted conversation content selected by the user; not system instructions.",Eue=new Set(["image","file","audio","video","other"]),uue=new Set(["not-delivered","not-found","deleted","permission-denied","unsupported"]),Cue=/[\u0000-\u0009\u000b\u000c\u000e-\u001f\u007f-\u009f\u200b\u200e\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff]/gu;function oT(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Bue(n){return[...n].length}function fue(n,t){return Bue(n)<=t?{value:n,truncated:!1}:{value:[...n].slice(0,t).join(""),truncated:!0}}function aT(n,t,{multiline:o=!1,basename:a=!1}={}){if((typeof n=="bigint"||typeof n=="number"&&Number.isFinite(n))&&(n=String(n)),typeof n!="string")return{value:void 0,truncated:!1};let e=n.replace(/\r\n?/gu,` +`).replace(Cue,"");return o||(e=e.replace(/\s+/gu," ")),a&&(e=e.replaceAll("\\","/").split("/").at(-1)??""),e=e.trim(),e?fue(e,t):{value:void 0,truncated:!1}}function H1(n){return typeof n=="string"&&uue.has(n)?n:void 0}function Que(n){if(!Array.isArray(n))return{attachments:[],truncated:!1};let t=[],o=!1;for(let a of n){if(!oT(a))continue;if(t.length===lue){o=!0;break}let e=Eue.has(a.kind)?a.kind:"other",i=aT(a.name,due,{basename:!0});o||=i.truncated,t.push({kind:e,...i.value?{name:i.value}:{}})}return{attachments:t,truncated:o}}function yue(n){let t=H1(n?.code);if(t)return t;let o=Number(n?.status??n?.statusCode??n?.response?.status);return o===401||o===403?"permission-denied":o===404?"not-found":o===410?"deleted":"not-delivered"}function mue(n,t){let o={...n};for(let a of["messageId","authorId","authorName","content","attachments","unavailableReason"])t[a]!==void 0&&(o[a]=t[a]);return o}async function Sue(n,t){if(typeof n.load!="function")return n;t?.throwIfAborted();try{let o=await n.load({signal:t});return t?.throwIfAborted(),o===null?{...n,unavailableReason:"not-found"}:oT(o)?mue(n,o):{...n,unavailableReason:"not-delivered"}}catch(o){return t?.aborted&&t.throwIfAborted(),{...n,unavailableReason:yue(o)}}}function wue(n){let t=aT(n.authorName,pue),o=aT(n.content,Iue,{multiline:!0}),{attachments:a,truncated:e}=Que(n.attachments),i=H1(n.unavailableReason);!o.value&&a.length===0&&!i&&(i="not-delivered");let A=t.truncated||o.truncated||e;return{note:hue,...t.value?{authorName:t.value}:{},...o.value?{content:o.value}:{},...a.length>0?{attachments:a}:{},...i?{unavailableReason:i}:{},...A?{truncated:!0}:{}}}function Due(n){return`${JSON.stringify(n).replace(/[<>&]/gu,o=>({"<":"\\u003c",">":"\\u003e","&":"\\u0026"})[o])}`}function Hr(n){return oT(n?.replyTo)}async function Uo(n,{signal:t}={}){if(!Hr(n))return Q_(n,{signal:t});let o=wue(await Sue(n.replyTo,t)),a=await Q_(n,{signal:t});return[{type:"text",text:Due(o)},...a]}function Oue(n){if(n?.type!=="assistant/message"||!Number.isSafeInteger(n.data?.turn)||n.data.turn<0||!Array.isArray(n.data?.message?.content))return null;let t=n.data.message.content.flatMap(o=>o?.type==="text"&&typeof o.text=="string"?[o.text]:[]).join(` +`).trim();return t?{turn:n.data.turn,time:n.time,text:t}:null}function bue(n){let t=new Map,o=new Map,a=[];for(let e of[...n].sort((i,A)=>i.seq-A.seq)){e?.type==="turn/start"&&Number.isSafeInteger(e.data?.turn)&&t.set(e.data.turn,e.time);let i=Oue(e);if(i&&o.set(i.turn,i),e?.type!=="turn/end"||!Number.isSafeInteger(e.data?.turn))continue;let A=o.get(e.data.turn);o.delete(e.data.turn),!((e.data?.reason?.kind??e.data?.reason)!=="completed"||!A)&&a.push({...A,startedAt:t.get(e.data.turn),completedAt:e.time})}return a}function Mue(n,t,o){let a=bue(n).filter(e=>Number.isFinite(e.time)&&Math.abs(e.time-t)<=o?!0:Number.isFinite(e.startedAt)&&Number.isFinite(e.completedAt)&&t>=e.startedAt-o&&t<=e.completedAt+o);return a.length===1?a[0].text:null}async function Jp({session:n,quotedAt:t,signal:o,pageSize:a=100,maxPages:e=3,timeoutMs:i=5e3,toleranceMs:A=15e3}={}){if(typeof n?.readHistory!="function"||!Number.isFinite(t))return null;let r=AbortSignal.timeout(i),s=o?AbortSignal.any([o,r]):r,g=Date.now()+i,c=new Map,I;for(let p=0;pt==null?null:xt(String(t))).filter(Boolean))]:[]}function Uue(n){let t=xt(n);return t?[...t].slice(0,Lue).join(""):null}function Y1(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=xt(n.conversationKey),o=Uue(n.text),a=nT(n.sentAt),e=nT(n.completedAt)??a;return!t||!o||a===null||e===null?null:{conversationKey:t,text:o,sentAt:a,completedAt:Math.max(a,e),providerMessageIds:x1(n.providerMessageIds)}}function sT(n,t=Date.now()){if(!Array.isArray(n))return[];let o=t-Fue;return n.map(Y1).filter(a=>a&&a.completedAt>=o).slice(-Gue)}function Hue(n,t){if(!n||typeof n!="object")return null;let o=xt(n.requestId)??xt(t),a=xt(n.staffId),e=xt(n.requestedAt)??xt(n.lastSeenAt),i=xt(n.lastSeenAt)??e;return!o||!a||!e||!i?null:{requestId:o,staffId:a,displayName:K1(n.displayName??n.nick),requestedAt:e,lastSeenAt:i}}function Kue(n){if(!n||typeof n!="object")return structuredClone(zQ);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[e,i]of Object.entries(n.sessions)){let A=xt(e),r=xt(i);A&&r&&(t[A]=r)}let o={},a=Array.isArray(n.pendingSenders)?n.pendingSenders.map(e=>[e?.requestId,e]):Object.entries(n.pendingSenders&&typeof n.pendingSenders=="object"?n.pendingSenders:{});for(let[e,i]of a){let A=Hue(i,e);if(!A)continue;let r=Object.values(o).find(s=>s.staffId===A.staffId);(!r||r.lastSeenAtnew Date().toISOString()}={}){if(!xt(t))throw new TypeError("state path is required");if(typeof o!="function"||typeof a!="function")throw new TypeError("idFactory and now must be functions");this.#e=t,this.#r=o,this.#I=a}async load(){try{this.#A=Kue(JSON.parse(await Nue(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(zQ),await this.#o()}return this}sessionFor(t){return this.#A.sessions[t]??null}async setSession(t,o){let a=xt(t),e=xt(o);if(!a||!e)throw new TypeError("key and sessionId are required");this.#A.sessions[a]=e,await this.#o()}async clearSession(t){let o=xt(t);!o||!(o in this.#A.sessions)||(delete this.#A.sessions[o],await this.#o())}async clearSessions(){this.#A.sessions={},await this.#o()}hasSeen(t){let o=xt(t);return!!(o&&this.#A.seenMessageIds.includes(o))}async markSeen(t){let o=xt(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.#o())}async rememberOutboundMessage({conversationKey:t,text:o,sentAt:a=Date.now(),completedAt:e=Date.now(),providerMessageIds:i=[]}={}){let A=Y1({conversationKey:t,text:o,sentAt:a,completedAt:e,providerMessageIds:i});if(!A)throw new TypeError("Invalid DingTalk outbound message");this.#A.recentOutboundMessages=sT([...this.#A.recentOutboundMessages,A]),await this.#o()}recentOutboundTextFor({conversationKey:t,processQueryKey:o,messageId:a,createdAt:e,now:i=Date.now()}={}){let A=xt(t);if(!A)return null;let r=sT(this.#A.recentOutboundMessages,i).filter(I=>I.conversationKey===A),s=x1([o,a]);for(let I of s){let p=r.filter(B=>B.providerMessageIds.includes(I));if(p.length===1)return p[0].text;if(p.length>1)return null}let g=nT(e);if(g===null)return null;let c=r.filter(I=>g>=I.sentAt-VQ&&g<=I.completedAt+VQ);return c.length===1?c[0].text:null}pendingSenders(){return Object.values(this.#A.pendingSenders).sort((t,o)=>t.requestedAt.localeCompare(o.requestedAt)).map(t=>structuredClone(t))}pendingSender(t){let o=xt(t),a=o?this.#A.pendingSenders[o]:null;return a?structuredClone(a):null}async recordPendingSender(t,o,a){let e=t&&typeof t=="object"?t:{staffId:t,displayName:o,lastSeenAt:a},i=xt(e.staffId);if(!i)throw new TypeError("staffId is required");let A=xt(e.lastSeenAt)??xt(e.requestedAt)??this.#I(),r=Object.values(this.#A.pendingSenders).find(g=>g.staffId===i),s={requestId:r?.requestId??`ding_sender_${this.#r()}`,staffId:i,displayName:K1(e.displayName??e.nick??o),requestedAt:r?.requestedAt??A,lastSeenAt:A};return this.#A.pendingSenders[s.requestId]=s,await this.#o(),structuredClone(s)}async removePendingSender(t){let o=xt(t);return!o||!this.#A.pendingSenders[o]?!1:(delete this.#A.pendingSenders[o],await this.#o(),!0)}async removePendingSenderByStaffId(t){let o=xt(t),a=o?Object.values(this.#A.pendingSenders).find(e=>e.staffId===o):null;return a?this.removePendingSender(a.requestId):!1}snapshot(){return structuredClone(this.#A)}async remove(){await this.#t;try{await kue(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(zQ)}async#o(){let t=`${JSON.stringify(this.#A,null,2)} +`,o=this.#t.then(async()=>{await Tue(Pue(this.#e),{recursive:!0,mode:448});let a=`${this.#e}.tmp`;await vue(a,t,{encoding:"utf8",mode:384}),await Rue(a,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var xue=Object.freeze(["open","allowlist"]),Yue=Object.freeze(["direct","group"]),j1=256,jue=["direct","group"],Jue=["mode","open","allowlist"],que=["defaultCanExecuteCommands","commandPermissionOverrides"],zue=["users"],Vue=["id","canExecuteCommands"],Wue=/[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/;function so(n){let t=new TypeError(n);return t.code="access-policy-invalid",t}function ou(n,t){return n&&typeof n=="object"&&!Array.isArray(n)&&[Object.prototype,null].includes(Object.getPrototypeOf(n))&&Reflect.ownKeys(n).length===t.length&&t.every(o=>Object.hasOwn(n,o))}function V1(n){if(typeof n=="number"){if(!Number.isFinite(n))throw so("\u7528\u6237\u6807\u8BC6\u65E0\u6548\u3002");n=String(n)}else typeof n=="bigint"&&(n=String(n));if(typeof n!="string")throw so("\u7528\u6237\u6807\u8BC6\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002");let t=n.trim();if(!t||t.length>j1||Wue.test(t))throw so(`\u7528\u6237\u6807\u8BC6\u4E0D\u80FD\u4E3A\u7A7A\u3001\u5305\u542B\u63A7\u5236\u5B57\u7B26\u6216\u8D85\u8FC7 ${j1} \u4E2A\u5B57\u7B26\u3002`);return t}function Zue(n){if(!ou(n,Vue))throw so("\u7528\u6237\u6761\u76EE\u5FC5\u987B\u5305\u542B\u7528\u6237\u6807\u8BC6\u548C\u547D\u4EE4\u6743\u9650\u3002");if(typeof n.canExecuteCommands!="boolean")throw so("\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");return Object.freeze({id:V1(n.id),canExecuteCommands:n.canExecuteCommands})}function W1(n,{listMessage:t,duplicateMessage:o}){if(!Array.isArray(n))throw so(t);let a=n.map(Zue);if(new Set(a.map(({id:e})=>e)).size!==a.length)throw so(o);return Object.freeze(a)}function Xue(n){if(!ou(n,que))throw so("\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");if(typeof n.defaultCanExecuteCommands!="boolean")throw so("\u5F00\u653E\u6A21\u5F0F\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");return Object.freeze({defaultCanExecuteCommands:n.defaultCanExecuteCommands,commandPermissionOverrides:W1(n.commandPermissionOverrides,{listMessage:"\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",duplicateMessage:"\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"})})}function $ue(n){if(!ou(n,zue))throw so("\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");return Object.freeze({users:W1(n.users,{listMessage:"\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",duplicateMessage:"\u767D\u540D\u5355\u6A21\u5F0F\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"})})}function gT(n){if(!ou(n,Jue))throw so("\u8BBF\u95EE\u573A\u666F\u8BBE\u7F6E\u5FC5\u987B\u540C\u65F6\u5305\u542B\u6A21\u5F0F\u3001\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u548C\u767D\u540D\u5355\u6A21\u5F0F\u8BBE\u7F6E\u3002");if(!xue.includes(n.mode))throw so("\u8BBF\u95EE\u6A21\u5F0F\u53EA\u80FD\u662F open \u6216 allowlist\u3002");return Object.freeze({mode:n.mode,open:Xue(n.open),allowlist:$ue(n.allowlist)})}function fc(n){if(!ou(n,jue))throw so("\u8BF7\u540C\u65F6\u63D0\u4EA4\u5B8C\u6574\u7684\u79C1\u804A\u548C\u7FA4\u804A\u8BBF\u95EE\u8BBE\u7F6E\u3002");return Object.freeze({direct:gT(n.direct),group:gT(n.group)})}function qp(n){try{return fc(n)}catch{return null}}function ZQ(n){return gT(n===void 0?{mode:"allowlist",open:{defaultCanExecuteCommands:!1,commandPermissionOverrides:[]},allowlist:{users:[]}}:n)}var J1=ZQ(),q1=Object.freeze({direct:J1,group:J1});function Cg({direct:n=q1.direct,group:t=q1.group}={}){return fc({direct:n,group:t})}var eCe=Object.freeze({allowed:!0,reason:"allowed"}),ACe=Object.freeze({allowed:!1,reason:"policy-unavailable"}),z1=Object.freeze({allowed:!1,reason:"invalid-context"}),tCe=Object.freeze({allowed:!1,reason:"sender-unavailable"}),rCe=Object.freeze({allowed:!1,reason:"sender-not-allowed"}),iCe=Object.freeze({allowed:!1,reason:"command-not-allowed"});function Z1(n,{conversationType:t,senderIds:o,isCommand:a=!1,equals:e=(i,A)=>i===A}={}){let i=qp(n);if(!i)return ACe;if(!Yue.includes(t)||typeof a!="boolean"||typeof e!="function")return z1;let A=(Array.isArray(o)?o:[o]).flatMap(c=>{try{return[V1(c)]}catch{return[]}});if(A.length===0)return tCe;let r=i[t],s=r.mode==="open"?r.open.commandPermissionOverrides:r.allowlist.users,g;try{g=s.filter(c=>A.some(I=>e(I,c.id)===!0))}catch{return z1}return r.mode==="allowlist"&&g.length===0?rCe:a&&!(r.mode==="open"?g.length>0?g.every(I=>I.canExecuteCommands):r.open.defaultCanExecuteCommands:g.every(I=>I.canExecuteCommands))?iCe:eCe}var aCe=new Set(["/help","/status","/new"]);function XQ(n,{hasImages:t=!1,hasFiles:o=!1}={}){if(typeof n!="string")return!1;let a=n.trim();return a?Pa(a)||Ki(a)||!o&&(la(a)||pa(a)||da(a))?!0:t||o?!1:aCe.has(a.toLowerCase())||F_(a)||R_(a):!1}var go="\u4F60\u53EF\u4EE5\u53D1\u9001\u666E\u901A\u6D88\u606F\uFF0C\u4F46\u6CA1\u6709\u6267\u884C\u547D\u4EE4\u7684\u6743\u9650\u3002",oCe=Object.freeze({allowed:!0,reason:"policy-not-configured"}),nCe=Object.freeze({allowed:!0,reason:"privileged-sender"});function Mi(n,{conversationType:t,senderIds:o,text:a="",hasImages:e=!1,hasFiles:i=!1,isCommand:A=XQ(a,{hasImages:e,hasFiles:i})}={}){if(!n)return oCe;try{if(typeof n.isPrivileged=="function"&&n.isPrivileged(o,t)===!0)return nCe}catch{}let r=null;try{r=n.getSettings()}catch{}return Z1(r,{conversationType:t,senderIds:o,isCommand:A,...typeof n.equals=="function"?{equals:n.equals}:{}})}var sCe="\u5DF2\u8FDE\u63A5 DeepSeek Harness\uFF0C\u6B63\u5728\u601D\u8003\u2026",cT="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",gCe=["\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\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A","/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84","/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D","/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898","/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD","/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 \u6216 /presets \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 cCe(){return gCe.map(n=>w(n)).join(` +`)}function ZA(n){return typeof n=="string"&&n.trim()?n.trim():null}function ICe(n){let t=Ur(n),o=ZA(n?.processQueryKey);return o&&!t.includes(o)&&t.push(o),t}function $Q(n){let t=[],o=new Set,a=n;for(;a&&typeof a=="object"&&t.length<3&&!o.has(a);){o.add(a);let e=ZA(a.name)?.slice(0,80),i=ZA(a.code)?.slice(0,80),A=ZA(a.providerCode)?.slice(0,160),r=Number.isInteger(a.status)?a.status:void 0;t.push({...e?{name:e}:{},...i?{code:i}:{},...A?{providerCode:A}:{},...r?{status:r}:{}}),a=a.cause}return t}function lCe(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 w("\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 w("\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 w("\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 No(n)}function X1(n){return ZA(n?.senderStaffId)??ZA(n?.senderId)}function $1(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 e3(n){let t=n?.richText??n?.rich_text;return Array.isArray(t)?t:[]}function pCe(n){return typeof n?.text=="string"?ZA(n.text):typeof n?.text?.content=="string"?ZA(n.text.content):String(n?.type).toLowerCase()==="text"&&typeof n?.content=="string"?ZA(n.content):null}function IT(n){return ZA(n?.downloadCode)??ZA(n?.pictureDownloadCode)}function A3(n){let t=typeof n=="string"&&n.trim()?Number(n):n;return!Number.isFinite(t)||t<0?null:Math.trunc(t<1e10?t*1e3:t)}function ey(n){let t=ZA(n);return t&&!/^\[interactive card message\]$/iu.test(t)?t:null}function dCe(n,t){let o=n?.text;if(o?.isReplyMsg!==!0)return null;let a=o?.repliedMsg;if(!a||typeof a!="object")return{unavailableReason:"not-delivered"};let e=ZA(a.msgType??a.msgtype)?.toLowerCase()??"",i=$1({content:a.content})??{},A={msgtype:e,text:{content:ZA(i.text)??(typeof a.content=="string"?a.content:"")},content:i},r=t3(A,t),s=[];if(e==="picture")s=[{kind:"image"}];else if(e==="file"){let m=ZA(i.fileName??i.file_name);s=[{kind:"file",...m?{name:m}:{}}]}else e==="richtext"?s=e3(i).filter(m=>String(m?.type??"").toLowerCase()==="picture").map(()=>({kind:"image"})):e==="voice"||e==="audio"?s=[{kind:"audio"}]:e==="video"&&(s=[{kind:"video"}]);let g=ZA(a.msgId??a.messageId),c=ZA(a.senderId??a.senderStaffId),I=ZA(a.senderNick??a.senderName),p=ey(r.content)??ey(i.text)??ey(i.summary)??ey(i.title),B=ZA(n?.originalProcessQueryKey??i.processQueryKey),f=A3(a.createdAt??a.createTime),Q=!p&&s.length===0&&typeof t?.loadReplyContent=="function"?({signal:m}={})=>t.loadReplyContent({...g?{messageId:g}:{},...B?{processQueryKey:B}:{},...f===null?{}:{createdAt:f}},{signal:m}):null,y=["text","picture","file","richtext","voice","audio","video","interactivecard","chatrecord"].includes(e);return{...g?{messageId:g}:{},...c?{authorId:c}:{},...I?{authorName:I}:{},...p?{content:p}:{},...s.length>0?{attachments:s}:{},...Q?{load:Q}:{},...!p&&s.length===0&&!Q?{unavailableReason:y?"not-delivered":"unsupported"}:{}}}function t3(n,{api:t,clientId:o,clientSecret:a,loadReplyContent:e}={}){let i=String(n?.msgtype??"").toLowerCase(),A=$1(n),r=i==="richtext"?e3(A):[],s=i==="text"?ZA(n?.text?.content)??"":r.map(pCe).filter(Boolean).join(` +`),g=[];if(i==="picture"){let p=IT(A);p&&g.push(p)}else if(i==="richtext")for(let p of r){if(String(p?.type??"").toLowerCase()!=="picture")continue;let B=IT(p);B&&g.push(B)}let c=i==="file"?IT(A):null,I=dCe(n,{api:t,clientId:o,clientSecret:a,loadReplyContent:e});return{content:s,images:g.map((p,B)=>({name:B===0?"image":`image-${B+1}`,load:({signal:f,maxBytes:Q})=>{if(typeof t?.downloadImage!="function")throw new Error("DingTalk API does not support image downloads");return t.downloadImage({clientId:o,clientSecret:a,robotCode:n?.robotCode,downloadCode:p,signal:f,maxBytes:Q})}})),files:c?[{name:ZA(A?.fileName??A?.file_name)??"file",load:({signal:p}={})=>{if(typeof t?.downloadFile!="function")throw new Error("DingTalk API does not support file downloads");return t.downloadFile({clientId:o,clientSecret:a,robotCode:n?.robotCode,downloadCode:c,signal:p})}}]:[],...I?{replyTo:I}:{}}}function hCe(n,t){if(String(n?.conversationType)==="2"){let o=ZA(n?.conversationId);if(!o)throw new Error("DingTalk group message has no conversation id");return`group:${o}`}return`p2p:${t}`}function ECe(n,t){return String(n?.conversationType)==="2"?{type:"group",openConversationId:ZA(n?.conversationId),atUserIds:{[t]:ZA(n?.senderNick)??t}}:{type:"user",userId:t}}function uCe(n,t,o){let a=ZA(n?.robotCode)??o;return String(n?.conversationType)==="2"?{type:"group",openConversationId:ZA(n?.conversationId),robotCode:a}:{type:"user",userId:t,robotCode:a}}function CCe(n,t){let o=String(n??w("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim()||w("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return w("\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 w("\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 w("\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 w("\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 w("\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 w("\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 w("\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 BCe(n){return n?.type==="text"&&ZA(n.text)?n.text:n?.type==="tool"?n.name==="web_search"?w("_\u6B63\u5728\u641C\u7D22\u7F51\u7EDC\u5E76\u6574\u7406\u4FE1\u606F\u2026_"):w("_\u6B63\u5728\u4F7F\u7528 {name}\u2026_",{name:ZA(n.name)??w("\u5DE5\u5177")}):w("_{text}_",{text:ZA(n?.text)??w("\u6B63\u5728\u5904\u7406\u2026")})}function fCe(n,t,o){if(t.needsPresentation||!t.questions[t.index]||t.actor!==o||String(n?.conversationType)==="2"&&n?.isInAtList!==!0||n?.msgtype!=="text"||!ZA(n?.text?.content))return!1;try{return Cc(n.sessionWebhook),!0}catch{return!1}}function QCe(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 Kr(n,t){n[t]=(n[t]??0)+1,n.stats??={},n.stats[t]=n[t]}function lT({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 Ay=class{#e;#A;#t;#r;#I;#o;#c;#i;#a;#s;#p;#g;#l;#n=new Map;#h=new Map;#d=new Map;#C=new Set;#u=new Set;#B=new Map;#f;#m=new va;constructor({api:t,clientId:o,clientSecret:a,harness:e,state:i,contextEnhancement:A,accessPolicy:r,status:s=lT(),logger:g=console,replyTimeoutMs:c=6e5,reactionTimeoutMs:I=5e3,maxMessageChars:p=4e3,signal:B}){if(!t||typeof t.sendText!="function")throw new TypeError("DingTalk API is required");if(!ZA(o)||!ZA(a))throw new TypeError("DingTalk app credentials are required");if(!e||!i)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o.trim(),this.#t=a.trim(),this.#r=e,this.#I=i,this.#o=A,this.#c=r,this.#i=s,this.#a=g,this.#f=new _a({label:"DingTalk",logger:g}),this.#s=c,this.#p=Number.isFinite(I)&&I>0?Math.floor(I):5e3,this.#g=p,this.#l=B,QCe(this.#i),this.#U()}get status(){return this.#U(),structuredClone(this.#i)}accept(t,{contextSnapshot:o}={}){if(this.#l?.aborted)return Promise.resolve();let a=ZA(t?.msgId),e=X1(t);if(!a||!e||this.#I.hasSeen(a)||this.#B.has(a))return Promise.resolve();let i=String(t.conversationType)==="2"?"group":String(t.conversationType)==="1"?"direct":null,A;try{A=hCe(t,e)}catch{return Kr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),Promise.resolve()}let r=null;try{r=Cc(t.sessionWebhook)}catch{}let s=this.#h.get(A),g=this.#E(t,A),c=ZA(g.content)??"",I=String(t.conversationType)!=="2"||t?.isInAtList===!0,p=String(t.conversationType)!=="2";if(I){let _=Mi(this.#c,{conversationType:i,senderIds:e,text:c,hasImages:Rt(g),hasFiles:Ot(g)});if(!_.allowed)return this.#B.set(a,null),this.#S(t,a,r,_)}this.#B.set(a,o===void 0?ai(this.#o,i):o),r&&p&&bo(this.#I,{sessionWebhook:r});let B=r&&I?this.#Q(t):null,f=_=>Promise.resolve(_).then(R=>(this.#y(B,this.#l?.aborted?"clear":"success"),R),R=>{throw this.#y(B,this.#l?.aborted||R?.name==="AbortError"||R?.code==="turn-stopped"?"clear":"error"),R}),Q=String(t?.msgtype).toLowerCase()==="text"&&Pa(c),y=this.#m.status(A);if(Q&&!p&&r&&I)return f(this.#D(a,r,{message:cs()},B));if(p&&r&&(Q||y.phase==="collecting")){let R=/^\/batch$/iu.test(c)&&y.phase==="idle"&&(this.#n.has(A)||s||this.#f.hasPending(A))?{handled:!0,kind:"busy",message:Po()}:this.#m.handle(A,c,{plainText:!!c&&String(t?.msgtype).toLowerCase()==="text"&&!Ot(g)&&!Rt(g)&&!Hr(g)});if(R.handled)return R.kind==="submit"?f(this.#b({...t,msgtype:"text",text:{content:R.prompt}},a,e,A,{batchSubmission:R,statusReaction:B})):f(this.#D(a,r,R,B))}let m=Ki(c)?oo:Ot(g)?null:la(c)?Ra:pa(c)?no:da(c)?ka:null;if(m&&r&&I){let _;return _=this.#M(t,a,A,r,g,m).catch(R=>{if(R?.code==="turn-stopped"||this.#l?.aborted){this.#y(B,"clear");return}this.#y(B,"error"),this.#i.lastError=R?.message??String(R);let L=rt(this.#i,R);return this.#a.error?.(`[dsh-dingtalk] failed to process a command [${L.referenceId}]`,$Q(R)),this.#L(r,ut(L),this.#F(t)).catch(()=>{})}).finally(()=>{this.#B.delete(a),this.#u.delete(_)}),this.#u.add(_),f(_)}let T=this.#f.claimReply({key:A,actor:e,messageId:a,text:r&&t?.msgtype==="text"?ZA(t?.text?.content)??"":"",addressed:String(t?.conversationType)!=="2"||t?.isInAtList===!0,hasPendingQuestion:!!s,questionCompletion:s?.submitting||s?.claimedReplyMessageId?s.queue:null,isQuestionPending:()=>this.#h.has(A),send:r?_=>this.#L(r,_,this.#F(t)):async()=>{}});if(T){let _;return _=T.process(async()=>this.#I.hasSeen(a)?!1:(await this.#I.markSeen(a),Kr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),r||(Kr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002")),!0)).catch(R=>{if(this.#l?.aborted){this.#y(B,"clear");return}this.#y(B,"error"),this.#i.lastError=w("\u9489\u9489\u5BA1\u6279\u5904\u7406\u5931\u8D25\u3002"),this.#a.error?.("[dsh-dingtalk] failed to process an approval reply",R)}).finally(()=>{this.#B.delete(a),this.#C.delete(_)}),this.#C.add(_),f(_)}if(s&&s.actor!==e)return f(this.#b(t,a,e,A,{statusReaction:B}));if(s?.submitting||s?.claimedReplyMessageId)return f(this.#b(t,a,e,A,{statusReaction:B}));if(s){fCe(t,s,e)&&(s.claimedReplyMessageId=a);let R=(s.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#N(t,a,e,A,s,B)).finally(()=>{this.#B.delete(a),s.claimedReplyMessageId===a&&(s.claimedReplyMessageId=null),s.queue===R&&(s.queue=null)});return s.queue=R,f(R)}return f(this.#b(t,a,e,A,{statusReaction:B}))}#w(t,o,a,e){let i=new AbortController,A=Promise.resolve().then(()=>this.#e[t]({clientId:this.#A,clientSecret:this.#t,...o,reactionName:a,signal:i.signal})),r,s=new Promise((g,c)=>{r=setTimeout(()=>{let I=new DOMException("DingTalk reaction timed out","TimeoutError");i.abort(I),c(I)},this.#p),r.unref?.()});return Promise.race([A,s]).then(()=>(Kr(this.#i,e==="add"?"reactionsAdded":"reactionsRemoved"),!0)).catch(g=>(Kr(this.#i,"reactionErrors"),this.#a.debug?.(`[dsh-dingtalk] ${t} failed`,$Q(g)),!1)).finally(()=>clearTimeout(r))}#Q(t){if(typeof this.#e.addReaction!="function"||typeof this.#e.recallReaction!="function")return null;let o=ZA(t?.msgId),a=ZA(t?.conversationId);if(!o||!a)return null;let e={messageId:o,conversationId:a,robotCode:ZA(t?.robotCode)??this.#A};return{target:e,attached:this.#w("addReaction",e,HI,"add"),terminal:!1}}#y(t,o){if(!t||t.terminal)return;t.terminal=!0;let a=o==="success"?uY:o==="error"?CY:null;t.attached.then(async e=>{let i=await this.#w("recallReaction",t.target,HI,"remove");(!e||!i)&&(await new Promise(A=>{setTimeout(A,Math.min(1e3,this.#p)).unref?.()}),i=await this.#w("recallReaction",t.target,HI,"remove")||i),!(!i||!a||this.#l?.aborted)&&await this.#w("addReaction",t.target,a,"add")}).catch(()=>{})}#b(t,o,a,e,{releaseMessageId:i=!0,alreadyRecorded:A=!1,batchSubmission:r=null,statusReaction:s=null}={}){let g=!1;try{Cc(t.sessionWebhook),g=!0}catch{}let c=String(t.conversationType)!=="2"||t.isInAtList===!0,I=g&&c?Yp(this.#E(t,e),{signal:this.#l}):void 0,B=(this.#n.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#T(t,o,a,e,{alreadyRecorded:A,preparedMessage:I,batchSubmission:r,statusReaction:s})).finally(()=>{i&&this.#B.delete(o),this.#n.get(e)===B&&this.#n.delete(e)});return this.#n.set(e,B),B}#E(t,o){return t3(t,{api:this.#e,clientId:this.#A,clientSecret:this.#t,loadReplyContent:(a,e)=>this.#k(o,a,e)})}async#k(t,o,{signal:a}={}){let e=this.#I.recentOutboundTextFor?.({conversationKey:t,...o});if(e)return{content:e};let i=A3(o?.createdAt);if(i===null)return{unavailableReason:"not-delivered"};let A=this.#I.sessionFor(t),r=typeof A=="string"&&A?this.#r.workspaceSession?.(A):null,s=await Jp({session:r,quotedAt:i,signal:a,toleranceMs:VQ});if(!s)return{unavailableReason:"not-delivered"};try{await this.#I.rememberOutboundMessage?.({conversationKey:t,text:s,sentAt:i,completedAt:i,providerMessageIds:[o?.processQueryKey,o?.messageId].map(ZA).filter(Boolean)})}catch(g){this.#a.warn?.("[dsh-dingtalk] failed to remember a recovered quote:",g)}return{content:s}}async waitForIdle(){await Promise.allSettled([...this.#n.values(),...[...this.#h.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#C,...this.#u])}async#M(t,o,a,e,i,A){if(this.#l?.throwIfAborted(),this.#I.hasSeen(o))return;await this.#I.markSeen(o),Kr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let r=await A(ZA(i.content)??"",this.#r,this.#I,a,{signal:this.#l,isDirect:String(t.conversationType)==="1",hasImages:Rt(i),hasFiles:Ot(i),pendingInteraction:this.#h.has(a)||this.#f.hasPending(a),control:{owner:this,key:a}});r?.stopped&&await Promise.allSettled([this.#J(a),this.#f.closeRoute(a)]);for(let s of r?.messages??[r?.message])s&&await this.#L(e,s,this.#F(t));this.#i.lastError=null}#D(t,o,a,e){let i;return i=Promise.resolve().then(async()=>{this.#I.hasSeen(t)||(await this.#I.markSeen(t),Kr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),a.message&&await this.#L(o,a.message),this.#i.lastError=null)}).catch(async A=>{if(this.#l?.aborted){this.#y(e,"clear");return}this.#y(e,"error"),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-dingtalk] failed to process a batch input message [${r.referenceId}]`,$Q(A)),await this.#L(o,ut(r)).catch(()=>{})}).finally(()=>{this.#B.delete(t),this.#u.delete(i)}),this.#u.add(i),i}#S(t,o,a,e){let i;return i=Promise.resolve().then(async()=>{this.#I.hasSeen(o)||(await this.#I.markSeen(o),e.reason==="command-not-allowed"&&a?(Kr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),await this.#L(a,w(go),this.#F(t)),Kr(this.#i,"messagesReplied"),this.#i.lastReplyAt=new Date().toISOString()):(Kr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString()),this.#i.lastError=null)}).catch(A=>{this.#l?.aborted||(this.#i.lastError=A?.message??String(A),this.#a.error?.("[dsh-dingtalk] failed to apply inbound access policy",A))}).finally(()=>{this.#B.delete(o),this.#u.delete(i)}),this.#u.add(i),i}async#T(t,o,a,e,{alreadyRecorded:i=!1,preparedMessage:A,batchSubmission:r=null,statusReaction:s=null}={}){if(this.#l?.throwIfAborted(),!i){if(this.#I.hasSeen(o))return;await this.#I.markSeen(o),Kr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString()}if(String(t.conversationType)==="2"&&t.isInAtList!==!0){Kr(this.#i,"messagesIgnored");return}let g;try{g=Cc(t.sessionWebhook)}catch{Kr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=A??this.#E(t,e),I=c.content,p=Rt(c),B=Ot(c),f=Hr(c),Q=String(t?.msgtype).toLowerCase()==="text",y=null,m=!1,T=null,_=r===null;try{if(!I&&!p&&!B&&!f){await this.#L(g,w("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"),this.#F(t));return}let R=I.toLowerCase();if(Q&&!p&&!B&&R==="/help"){await this.#L(g,cCe(),this.#F(t));return}if(Q&&!p&&!B&&R==="/status"){await this.#r.ensureRunning({signal:this.#l}),await this.#L(g,w("\u9489\u9489\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002"),this.#F(t));return}if(Q&&!p&&!B&&R==="/new"){await this.#I.clearSession(e),await this.#L(g,w("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"),this.#F(t));return}let L=Q&&!p&&!B?await Ro(I,this.#r,e):null;if(L){for(let ie of L.messages??[L.message])await this.#L(g,ie,this.#F(t));return}let U=Q&&!p&&!B?await Na(I,this.#r,this.#I,e,{signal:this.#l}):null;if(U){await this.#L(g,U.message,this.#F(t));return}let F=p||f?await Uo(c,{signal:this.#l}):void 0,q=this.#B.get(o),z=!1;if(q){let ie=F??I;F=vo(ie,q,()=>({channel:"dingtalk",senderId:a,senderName:t.senderNick,conversationTitle:t.conversationTitle,chatId:t.conversationId})),z=F!==ie}if(typeof this.#e.createAiCard=="function"&&typeof this.#e.updateAiCard=="function"&&typeof this.#e.finishAiCard=="function"){y=mY({api:this.#e,clientId:this.#A,clientSecret:this.#t,target:ECe(t,a),signal:this.#l,logger:this.#a});let ie=Date.now();m=await y.start(w(sCe)),m&&(T=ie)}let{answer:K,artifacts:G=[]}=await Ta({harness:this.#r,state:this.#I,key:e,text:I,content:F,contextEnhanced:z,createOptions:{signal:this.#l},existsOptions:{signal:this.#l},askOptions:{timeoutMs:this.#s,signal:this.#l,control:{owner:this,key:e},onUpdate:m?ie=>y.push(BCe(ie)):void 0,onInteraction:ie=>this.#P(ie,{key:e,actor:a,sessionWebhook:g,requiresMention:String(t.conversationType)==="2"}),onInteractionResolved:ie=>this.#_(ie),files:c.files}});r&&(this.#m.complete(e,r.token),_=!0);let V=typeof K=="string"&&K.trim()?K:G.length>0?w("\u7ED3\u679C\u6587\u4EF6\u5DF2\u751F\u6210\u3002"):K,H=null,N=null,k=!1,J=T??Date.now();try{k=m&&await y.finish(V),k?N=tr({deliveryId:o,presentation:"dingtalk-card",providerMessageIds:y.providerMessageIds}):N=tr({deliveryId:o,presentation:"dingtalk-text",providerMessageIds:await this.#L(g,V,this.#F(t))});try{await this.#I.rememberOutboundMessage?.({conversationKey:e,text:V,sentAt:J,completedAt:Date.now(),providerMessageIds:Ur(N)})}catch(ie){this.#a.warn?.("[dsh-dingtalk] failed to remember an outbound message:",ie)}}catch(ie){H=Hi(ie)}let X=await this.#V(uCe(t,a,this.#A),g,o,G,N);if(H&&!X.userVisible)throw H;return H&&X.artifactSendErrors===0&&rt(this.#i,H),Kr(this.#i,"messagesReplied"),this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!H&&X.artifactSendErrors===0&&Mo(this.#i),X.receipt}catch(R){let L=null;if(!_&&r&&(R?.code==="turn-stopped"?this.#m.complete(e,r.token):L=this.#m.fail(e,r.token).message??null,_=!0),R?.code==="turn-stopped"){this.#y(s,"clear"),m&&await y.finish(w("\u5DF2\u505C\u6B62\u3002")).catch(()=>{});return}if(this.#l?.aborted){this.#y(s,"clear");return}this.#y(s,"error"),this.#i.lastError=R?.message??String(R);let U=Fo(R)??lCe(R),F=rt(this.#i,R,{userMessage:U,reason:ao(R)?.reason});this.#a.error?.(`[dsh-dingtalk] failed to process an inbound message [${F.referenceId}]`,$Q(R));try{let q=ut(F),z=L?`${q} -${H}`:q;m&&await y.finish(z)||await this.#L(g,z,this.#G(t))}catch{this.#n.error?.("[dsh-dingtalk] failed to send the safe error reply")}}finally{await this.#J(e),await this.#f.closeRoute(e)}}async#M(t,o,i,e,a,A){this.#g?.throwIfAborted();let r=this.#p.get(e),s=a.claimedReplyMessageId===o;if(!r||r!==a||r.submitting)return s&&(!r||r!==a)?this.#k(t,o):this.#b(t,o,i,e,{releaseMessageId:!1,statusReaction:A});if(this.#l.hasSeen(o))return;if(await this.#l.markSeen(o),Kr(this.#a,"messagesReceived"),this.#a.lastMessageAt=new Date().toISOString(),String(t.conversationType)==="2"&&t.isInAtList!==!0){Kr(this.#a,"messagesIgnored");return}let g;try{g=pc(t.sessionWebhook)}catch{Kr(this.#a,"messagesRejected"),this.#a.lastRejectedAt=new Date().toISOString(),this.#a.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=t?.msgtype==="text"?ZA(t?.text?.content):null;if(!c){try{await this.#L(g,w("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"),this.#G(t))}catch{this.#n.error?.("[dsh-dingtalk] failed to reject a non-text interaction reply")}return}let I=this.#p.get(e);if(!I||I!==a||I.submitting){if(s&&(!I||I!==a)){try{await this.#L(g,w(iT),this.#G(t))}catch{this.#n.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}return}return this.#b(t,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0,statusReaction:A})}if(I.sessionWebhook=g,I.needsPresentation){try{await this.#F(I)}catch{this.#y(A,"error"),this.#a.lastError=w("\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002"),this.#n.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.#L(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=>!Di(c))){this.#n.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.#L(e,w("\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.#n.error?.("[dsh-dingtalk] failed to send an interaction recovery notice")}return}let s=this.#p.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#F(s);return}if(this.#E.has(r))return;if(s){this.#n.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.#p.set(o,g),this.#E.set(g.interactionId,o),await this.#F(g)}async#N(t){if(await this.#f.handleResolved(t))return;let o=t?.interactionId;if(t?.kind!=="question"||typeof o!="string")return;let i=this.#E.get(o);i&&this.#U(i,o)}async#F(t){let o=t.questions[t.index];o&&(await this.#L(t.sessionWebhook,gi(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1)}async#k(t,o){if(this.#l.hasSeen(o))return;await this.#l.markSeen(o),Kr(this.#a,"messagesReceived"),this.#a.lastMessageAt=new Date().toISOString();let i;try{i=pc(t.sessionWebhook)}catch{Kr(this.#a,"messagesRejected"),this.#a.lastRejectedAt=new Date().toISOString();return}try{await this.#L(i,w(iT),this.#G(t))}catch{this.#n.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}}#K(t,o){let i=this.#p.get(t);return!i||o!==void 0&&i.interactionId!==o?null:(this.#p.delete(t),this.#E.delete(i.interactionId),i)}#U(t,o){return this.#K(t,o)!==null}async#J(t){let o=this.#K(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.#n.warn?.("[dsh-dingtalk] failed to cancel a pending Harness interaction")}}#x(){typeof this.#l.pendingSenders=="function"&&(this.#a.pendingSenders=this.#l.pendingSenders())}#G(t){let o=q1(t);return String(t?.conversationType)==="2"&&o?{atUserIds:[o]}:void 0}async#L(t,o,i){let e=[];for(let a of hY(o,this.#c)){this.#g?.throwIfAborted();let A=await this.#e.sendText({clientId:this.#A,clientSecret:this.#t,sessionWebhook:t,text:a,at:i,signal:this.#g});e.push(...Ur(A))}return e}async#V(t,o,i,e,a){let A=async(s,g)=>iCe(await this.#e[s]({clientId:this.#A,clientSecret:this.#t,target:t,file:g,signal:this.#g})),r=await Go({artifacts:e,baseReceipt:a,deliveryId:i,aggregatePresentation:a?"dingtalk-text-and-files":"dingtalk-files",channelKey:"dingtalk",signal:this.#g,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)=>rt(this.#a,g,{userMessage:lCe(s?.fileName,g),reason:g?.code}),sendFailureNotice:(s,g,c)=>this.#L(o,ut(c)),logger:this.#n});return this.#a.artifactsSent=(this.#a.artifactsSent??0)+r.artifactsSent,this.#a.artifactSendErrors=(this.#a.artifactSendErrors??0)+r.artifactSendErrors,{receipt:r.receipt,userVisible:r.userVisible,artifactSendErrors:r.artifactSendErrors}}};function ZQ(n){return typeof n=="string"&&n.trim()?n.trim():null}function X1(n){let t=Array.isArray(n?.approvedSenders)?n.approvedSenders:n?.approvedSenders instanceof Set?[...n.approvedSenders]:[];return new Set(t.map(o=>ZQ(typeof o=="string"?o:o?.staffId)).filter(Boolean))}function ECe(n){return X1(n).size}function $1(n){return n?.connected===!0||n?.socket?.readyState===1}function uCe(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 CCe(n,t,o){for(;;){if(o?.throwIfAborted(),$1(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 BCe(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 uCe(r,a),await CCe(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 fCe({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 QCe({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,...nT({pendingSenders:n})}}var Au=class{#e;#A;#t;#r;#l;#o;#i;#a;#n;#s;#d;#c;#g;#I;#p=null;#E=null;#u=null;#C=null;#B=null;#f=null;#Q=new Set;constructor({config:t,clientSecret:o,harness:i,state:e,contextEnhancement:a,accessPolicy:A,logger:r=console,replyTimeoutMs:s=6e5,maxMessageChars:g=4e3,connectTimeoutMs:c=15e3,connectPollIntervalMs:I=25,api:d=EY(),streamFactory:B=fCe}){if(!t||!ZQ(t.clientId)||!ZQ(o))throw new TypeError("DingtalkRuntime requires app credentials");if(!i||!e)throw new TypeError("DingtalkRuntime requires Harness and state");if(typeof B!="function")throw new TypeError("streamFactory must be a function");this.#e=t,this.#A=o.trim(),this.#t=i,this.#r=e,this.#l=a,this.#o=A,this.#i=r,this.#a=s,this.#n=g,this.#s=c,this.#d=I,this.#c=d,this.#g=B,this.#I=QCe({pendingSenders:this.#m(),approvedSenders:ECe(t)})}get status(){if(this.#E){let t=this.#E.status;Object.assign(this.#I,t)}else this.#I.pendingSenders=this.#m();return structuredClone(this.#I)}pendingSender(t){return typeof this.#r.pendingSender=="function"?this.#r.pendingSender(t):null}pendingSenders(){return this.#m()}async start(){return this.#p&&this.#I.ready?this.status:this.#C?this.#C:(this.#C=this.#S().finally(()=>{this.#C=null}),this.#C)}async#S(){await this.stop();let t=new AbortController;this.#f=t;let{signal:o}=t;this.#I.startedAt=new Date().toISOString(),this.#I.dingtalkStreamState="connecting",this.#I.lastError=null;let i="dingtalk-harness-connect-failed";try{if(await this.#t.ensureRunning({signal:o}),this.#I.harnessReachable=!0,i="dingtalk-runtime-prepare-failed",typeof this.#r.removePendingSenderByStaffId=="function"){for(let r of X1(this.#e))await this.#r.removePendingSenderByStaffId(r);this.#I.pendingSenders=this.#m()}this.#E=new WQ({api:this.#c,clientId:this.#e.clientId,clientSecret:this.#A,approvedSenders:this.#e.approvedSenders,harness:this.#t,state:this.#r,contextEnhancement:this.#l,accessPolicy:this.#o,status:this.#I,logger:this.#i,replyTimeoutMs:this.#a,maxMessageChars:this.#n,signal:o}),i="dingtalk-stream-client-load-failed";let e=await this.#g({clientId:this.#e.clientId,clientSecret:this.#A});if(o.throwIfAborted(),this.#p=e?.client??e,this.#u=e?.topic??e?.TOPIC_ROBOT??"/v1.0/im/bot/messages/get",!this.#p||typeof this.#p.registerCallbackListener!="function"||typeof this.#p.connect!="function"||typeof this.#p.disconnect!="function"||typeof this.#p.socketCallBackResponse!="function")throw new TypeError("streamFactory returned an invalid DingTalk Stream client");let a=this.#p,A=this.#E;return i="dingtalk-stream-listener-failed",a.registerCallbackListener(this.#u,r=>{if(this.#p!==a||this.#E!==A)return;let s=ZQ(r?.headers?.messageId);if(s)try{a.socketCallBackResponse(s,{success:!0})}catch{this.#i.warn?.("[dsh-dingtalk] unable to acknowledge an inbound callback")}let g=this.#l,c;try{c=g?.getSettings?.()}catch{}let I=Promise.resolve().then(async()=>{if(this.#E!==A)return;let d;try{d=typeof r?.data=="string"?JSON.parse(r.data):r?.data}catch{this.#I.lastError=w("\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002"),this.#i.warn?.("[dsh-dingtalk] ignored an invalid callback payload");return}if(!d||typeof d!="object")return;this.#I.lastCallbackAt=Date.now();let B=aa({getSettings:()=>c,get botId(){return g?.botId}},d.conversationType==="1"||d.conversationType===1?"direct":d.conversationType==="2"||d.conversationType===2?"group":null);await A.accept(d,{contextSnapshot:B})}).catch(()=>{o.aborted||this.#E!==A||(this.#I.lastError=w("\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002"),this.#i.error?.("[dsh-dingtalk] callback processing failed"))}).finally(()=>this.#Q.delete(I));this.#Q.add(I)}),i="dingtalk-stream-connect-failed",await BCe(a,this.#s,this.#d,o),this.#I.ready=!0,this.#I.dingtalkStreamState="connected",this.#I.lastConnectedAt=Date.now(),this.#I.lastCheckedAt=Date.now(),this.#I.lastError=null,this.#B=setInterval(()=>{let r=$1(a);this.#I.ready=r,this.#I.dingtalkStreamState=r?"connected":"reconnecting",this.#I.lastCheckedAt=Date.now(),r&&(this.#I.lastError=null)},1e3),this.#B.unref?.(),this.status}catch(e){let a=o.aborted,A=a?e:Rd(i,e);throw this.#I.ready=!1,this.#I.dingtalkStreamState=a?"idle":"failed",this.#I.lastError=a?null:A?.message??String(A),await this.stop({preserveError:!a}),A}}async stop({preserveError:t=!1}={}){let o=t?this.#I.lastError:null,i=this.#f;this.#f=null,i?.abort(new DOMException("DingTalk runtime stopped","AbortError")),this.#B&&clearInterval(this.#B),this.#B=null,this.#I.ready=!1;let e=this.#p;if(this.#p=null,this.#u=null,e)try{await e.disconnect()}catch{this.#i.warn?.("[dsh-dingtalk] DingTalk Stream disconnect failed")}return await Promise.allSettled([...this.#Q]),this.#Q.clear(),this.#E&&await this.#E.waitForIdle(),this.#E=null,this.#I.dingtalkStreamState=t?"failed":"idle",this.#I.lastError=o,this.status}async sendConnectionTest(t){return lc({state:this.#r,text:t,channelLabel:w("\u9489\u9489\u673A\u5668\u4EBA"),send:async({sessionWebhook:o},i)=>{if(!this.#I.ready||!this.#f)throw new Error("DingTalk runtime is not connected");await this.#c.sendText({clientId:this.#e.clientId,clientSecret:this.#A,sessionWebhook:o,text:i,signal:this.#f.signal})}})}async sendProactiveText(t,o,{signal:i}={}){let e=typeof t?.route?.userId=="string"?t.route.userId.trim():"",a=typeof t?.route?.openConversationId=="string"?t.route.openConversationId.trim():"";if(t?.kind==="user"&&(!e||a)||t?.kind==="group"&&(!a||e)||t?.kind!=="user"&&t?.kind!=="group"){let A=new TypeError("Invalid DingTalk proactive delivery target");throw A.code="invalid-target",A}if(!this.#I.ready||!this.#f){let A=new Error("DingTalk runtime is not connected");throw A.code="bot-not-connected",A}i?.throwIfAborted();try{await this.#c.sendRobotText({clientId:this.#e.clientId,clientSecret:this.#A,target:{type:t.kind,robotCode:this.#e.clientId,...t.kind==="user"?{userId:e}:{openConversationId:a}},text:o,signal:i??this.#f.signal})}catch(A){if(A?.code!=="send-rejected")throw A;let r=new Error("DingTalk rejected the proactive delivery target",{cause:A});throw r.code="target-rejected",r}return{sent:!0}}#m(){return typeof this.#r.pendingSenders=="function"?this.#r.pendingSenders():[]}};import{spawn as TCe}from"node:child_process";import{randomUUID as sT}from"node:crypto";import{isAbsolute as NCe}from"node:path";import{isAbsolute as yCe}from"node:path";var mCe=256,SCe=/[\p{White_Space}\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,wCe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;function tu(n,t){let o=new Error(t);return o.code=n,o}function DCe(n){if(typeof n!="string"||!n||n.length>mCe||SCe.test(n))throw tu("session-id-invalid","A non-empty, safe session id is required");return n}function OCe(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"||!yCe(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 tu("session-not-registered","The session is not registered to a Harness workspace");if(o.length!==1)throw tu("session-workspace-ambiguous","The session is registered to more than one Harness workspace");if(wCe.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 bCe(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 tu("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 tu("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 e3(n,t,o={},i=3e4){let e=DCe(t);await n.ensureRunning(o);let a=await n.rpc("workspace.list",{},i,o),{workspace:A,archived:r}=OCe(e,a),s=bCe(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 ru(n,t,o){try{let i=n?.(t);i&&typeof i.then=="function"&&Promise.resolve(i).catch(o)}catch(i){o(i)}}async function MCe({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||ru(i,A,c);!a.signal.aborted;){let{value:I,done:d}=await s;if(d||a.signal.aborted)break;ru(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 _Ce({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=_=>{if(!I){I=!0,g.removeEventListener("open",f),g.removeEventListener("message",Q),g.removeEventListener("close",y),g.removeEventListener("error",m),o.removeEventListener("abort",T);try{(g.readyState===0||g.readyState===1)&&g.close()}catch{}_&&!o.aborted?s(_):r()}},B=()=>d(),f=()=>{I||c||(c=!0,ru(i,B,d))},Q=_=>{if(I)return;let R;try{if(typeof _.data!="string")throw new Error("binary WebSocket frame");R=JSON.parse(_.data)}catch(H){ru(a,H,()=>{});return}ru(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")),T=()=>d();g.addEventListener("open",f),g.addEventListener("message",Q),g.addEventListener("close",y,{once:!0}),g.addEventListener("error",m,{once:!0}),o.addEventListener("abort",T,{once:!0}),o.aborted&&T()})}async function A3(n){if(!n.signal.aborted)return n.baseUrl!==void 0&&n.baseUrl!==null?_Ce(n):MCe(n)}var RCe=new Map,kCe=new WeakMap,vCe=64;async function PCe(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>vCe)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 GCe(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 FCe(n,t){return n.status===401?"harness-auth-required":n.status===407?"harness-proxy-auth-required":n.status===403?(await PCe(n))?.trim()!=="forbidden"?"harness-request-forbidden":GCe(t)?"harness-loopback-forbidden":"harness-host-untrusted":n.status===404?"harness-api-not-found":"harness-http-failed"}function n3(n){let t=typeof n=="string"?RCe:kCe,o=t.get(n);return o||(o={ownerships:new Map,claims:new Map,controls:new WeakMap,nextOrder:0},t.set(n,o)),o}function t3(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 r3(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 gT(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 LCe(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 a3(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&&!LCe(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&&(!gT(n.current)||typeof n.routable!="boolean"))throw new Error(`Harness returned an invalid response for ${t}`);return n}function i3(){let n=new Error("Harness turn was stopped before producing a text reply");return n.code="turn-stopped",n}function UCe(n){return Array.isArray(n?.items)?n.items.flatMap(t=>typeof t?.path=="string"&&NCe(t.path)?[t.path]:[]):[]}function HCe(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 KCe(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 xCe(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=KCe(o);if(i!==null)return i}return null}function YCe(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=xCe(A);return c!==null&&(s.time=c),s})}}function au(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 jCe(n){return(n?.data?.message?.content??[]).filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` -`).trim()}function vi(n){return typeof n=="string"&&n.trim()?n.trim():null}function JCe(n){if(!n||typeof n!="object")return null;let t=vi(n.message);if(t)return t;let o=vi(n.name),i=vi(n.code);return o||i?[o??"Error",i].filter(Boolean).join(": "):null}function s3(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))}}function g3(n,t,o=[]){if(!n||!["object","function","string"].includes(typeof n)||typeof t!="string"||!t)return!1;let i=n3(n).ownerships.get(t);if(!i||i.size===0)return!1;for(let e of i)s3(e,o);return[...i].some(e=>e.active&&!e.completed&&typeof e.reconnect=="function")}var Jd=class{#e;#A;#t=null;#r=null;#l=new Map;#o="";#i=!1;#a=null;#n=new Map;#s=null;constructor({promptRpcId:t,afterSeq:o=-1}){this.#e=t,this.#A=o}get finished(){return this.#i}get lastSeq(){return this.#A}get answer(){return this.#o.trim()}get reason(){return this.#a}get tracking(){return this.#r!==null&&!this.#i}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.#i=!0,this.#a=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.#l.set(g,(this.#l.get(g)??"")+a.data.chunk.text);let c=`${r}:`,I=[...this.#l.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.#o&&(this.#o=I,i({type:"text",text:I}));continue}if(a.type==="assistant/message"){let r=jCe(a);r&&r!==this.#o&&(this.#o=r,i({type:"text",text:r}));continue}if(a.type==="tool/call"){let r=vi(a.data?.name)??w("\u5DE5\u5177"),s=vi(a.data?.callId)??vi(a.data?.subCallId);s&&this.#n.set(s,r),this.#s=r,i({type:"tool",name:r,...s?{callId:s}:{}})}else if(a.type==="tool/result"){let r=vi(a.data?.message?.source?.callId)??vi(a.data?.callId)??vi(a.data?.subCallId),s=(r?this.#n.get(r):null)??this.#s,g=JCe(a.data?.error);i({type:"status",text:w("\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026"),...s?{toolName:s}:{},...g?{error:g}:{}})}}}}}return o}consume(t){return this.consumeAll(t).at(-1)??null}},Sn=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??{}}},cs=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)}},cT=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"}},qd=class extends Error{constructor(t,o){super(o),this.name="HarnessInteractionError",this.code=t}},Is=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 o3(n){let t=vi(n?.kind)??vi(n);if(t==="error"){let o=n?.error??n?.failure;return new Is("harness-turn-failed",{reason:n,providerCode:vi(o?.code)??void 0})}return t==="max-tokens"?new Is("model-max-tokens",{reason:n}):t==="blocked"?new Is("turn-blocked",{reason:n}):["interrupted","stopped","cancelled","canceled"].includes(t)?new Is("turn-interrupted",{reason:n}):t==="aborted"?new Is("turn-aborted",{reason:n}):t==="completed"?new Is("model-empty-response",{reason:n}):new Is("harness-turn-failed",{reason:n})}function qCe(n){return n==null?!0:(vi(n?.kind)??vi(n))==="completed"}var Qr=class{#e;#A;#t;#r;#l;#o;#i;#a;#n;#s;#d;#c;#g;#I;#p;#E=null;#u;#C;#B;#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.#l=!!(this.#e&&A),this.#o=r,this.#i=s,this.#a=g,this.#n=c,this.#s=I.trim(),this.#d=d.trim(),this.#c=B,this.#g=f,this.#I=Q,this.#p=y,this.#u=n3(this.#e?.origin??i),this.#C=this.#u.ownerships,this.#B=this.#u.claims,this.#f=this.#u.controls}async rpc(t,o={},i=3e4,e={}){let a=e.rpcId??`${this.#s}-${sT()}`,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 cs("harness-api-not-found",t);s={type:"server-response",...await t3(()=>B[c]({rpcId:a,payload:o},r),r)}}else{let g=await this.#i(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 FCe(g,this.#e.hostname);throw new cs(c,t,{status:g.status})}try{s=await g.json()}catch(c){throw new cs("harness-response-invalid",t,{cause:c})}}}catch(g){throw e.signal?.aborted||g instanceof cs?g:new cs(A.aborted?"harness-timeout":"harness-connect-failed",t,{cause:g})}if(s?.type!=="server-response"||s?.rpcId!==a)throw new cs("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 cs("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid result for ${t}`)});if(!s.result?.ok)throw new Sn(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 Sn?new cT(o):o}}async ensureRunning(t={}){try{return await this.health(t)}catch(e){if(!this.#l)throw e}if(!this.#E||this.#E.exitCode!==null){let e=this.#e.port||(this.#e.protocol==="https:"?"443":"80");this.#E=TCe(this.#o,["web","--host",this.#e.hostname,"--port",e],{cwd:this.#t,env:process.env,stdio:["ignore","inherit","inherit"]}),this.#E.on("error",a=>{console.error(`[${this.#d}] 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.#I?await this.#I({sessionId:t,operation:e}):await e();if(!a||typeof a!="object"||!gT(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 e3(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 renameSession(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("session title is required");return this.rpc("session.rename",{sessionId:t,title:o},3e4,i)}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.#c){let e=new Error("Harness command execution is unavailable");throw e.code="commands-unavailable",e}try{return await this.#c(t,o,i)}catch(e){throw e?.failure&&typeof e.failure=="object"?new Sn("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 Sn&&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 t3(()=>this.#A.respond(A),a);else{let g=await this.#i(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 qd(`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.#M(t,{signal:o,onInteraction:i,onResolved:e,onOpen:a,ownership:A})}catch(r){if(o.aborted)return;console.warn(`[${this.#d}] Harness interaction stream disconnected:`,r.message)}if(o.aborted)return;try{await au(this.#n,o)}catch{if(o.aborted)return;throw new Error("Harness interaction reconnect wait failed")}}}#Q(t,o){let i=this.#C.get(t)??new Set;o.order=this.#u.nextOrder,this.#u.nextOrder+=1,i.add(o),this.#C.set(t,i)}#S(t,o){let i=this.#C.get(t);i?.delete(o),i?.size===0&&this.#C.delete(t);for(let[e,a]of this.#B)a.ownership===o&&this.#B.delete(e)}#m(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)}#y(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)}#b(t,o){let i=r3(o);return i?[...this.#f.get(i.owner)?.get(i.key)??[]].filter(a=>a.sessionId===t).sort((a,A)=>a.order-A.order):[]}#h(t,o){return this.#b(t,o).find(i=>i.started&&i.active&&!i.completed&&i.turn!==null)??null}async#R(t,o,i){let e=this.#b(t,o);if(e.length===0)return null;try{let a=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,i);this.#_(t,a.events??[])}catch(a){if(!(a instanceof Sn)||a.code!=="session-not-found")throw a;for(let A of e)A.active=!1,A.completed=!0;return null}return this.#h(t,o)}async hasActiveTurn(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");return!!await this.#R(t,o,i)}async stopActiveTurn(t,o,i={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");let e=await this.#R(t,o,i);if(!e)return!1;if(e.stopRequested)return!0;if(this.#h(t,o)!==e)return!1;e.stopRequested=!0;try{if(this.#g){let a=this.#g({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.#h(t,o)===e&&(e.stopRequested=!1),a instanceof Sn&&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.#R(t,i,e);if(!a||a.stopRequested||this.#h(t,i)!==a)return!1;if(this.#g){let A=this.#g({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}#_(t,o){for(let i of this.#C.get(t)??[])s3(i,o)}async#D(t,o){let i=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:o});this.#_(t,i.events??[])}#w(t,o,i){let e=this.#B.get(o);if(e&&this.#C.get(t)?.has(e.ownership))return e;let a=[...this.#C.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#T(t,o,i){if(!this.#p)throw new vo("inbound-file-ingress-unavailable","Harness file ingress is unavailable in this Host process.");let a=(await this.rpc("session.list",{},3e4,{signal:i}))?.items?.find(A=>A?.sessionId===t)?.cwd;return this.#p({sessionId:t,workspace:a,files:o,signal:i})}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=r3(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:V})=>V.seq??-1)),Q=`${this.#s}-${sT()}`,y=new Jd({promptRpcId:Q,afterSeq:f}),m=g||c?new AbortController:null,T=m?a?AbortSignal.any([a,m.signal]):m.signal:null,_=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,F=0,L=[],q=!1,z=!1,K=async()=>{if(!s||H||y.turn===null)return F;H=!0;let V=KI.take(t,y.turn,{signal:a});for(let U of V)try{await s(U),F+=1}catch(N){KI.release(U),console.warn(`[${this.#d}] ignored an artifact handoff failure:`,N.message)}return F};_&&(this.#Q(t,_),this.#m(_));let G=KI.openConsumer(t,Q);try{let V=o;if(d.length>0){let J=await this.#T(t,d,a);L.push(J),o=z_(o,J)}if(T){let J,X=new Promise(ae=>{J=ae});R=this.watchInteractions(t,{signal:T,onInteraction:g,onResolved:c,onOpen:J,ownership:_}),R.catch(()=>{}),await Promise.race([X,au(3e4,T).then(()=>{throw new Error("Harness interaction stream did not open within 30 seconds")})])}let U=typeof o=="string"?[{type:"text",text:o}]:o;if(!Array.isArray(U)||U.length===0)throw new TypeError("Harness prompt content is required");let N=Intl.DateTimeFormat().resolvedOptions().timeZone,k=J=>this.rpc("session.prompt",{sessionId:t,mode:"queue",content:J,clientTimeZone:N},3e4,{rpcId:Q,signal:a});try{await k(U)}catch(J){let X=sY(J)?oY(U):[];if(X.length===0)throw J;let ae;try{ae=await this.#T(t,X,a)}catch(Se){throw a?.aborted?a.reason??Se:(console.warn(`[${this.#d}] unable to restage rejected images as workspace files:`,Se?.message??String(Se)),J)}L.push(ae);let oe=z_([...nY(typeof V=="string"?[{type:"text",text:V}]:V),{type:"text",text:w(aY)}],{files:L.flatMap(Se=>Se?.files??[])});await k(oe)}q=!0;try{let J=Date.now(),X=y.lastSeq;for(;;){await au(300,a);let ae=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:a}),De=_?.active===!0;_&&(this.#_(t,ae.events??[]),!De&&_.active&&_.reconnect?.());let oe=y.consumeAll(ae.events??[]),Se=y.lastSeq>X;if(X=y.lastSeq,Se&&(J=Date.now()),A){let Re=r==="all"?oe:oe.slice(-1);for(let Ne of Re)try{await A(Ne)}catch(Je){console.warn(`[${this.#d}] ignored a progress update failure:`,Je.message)}}if(y.finished){if(z=!0,!_?.stopRequested&&!qCe(y.reason))throw o3(y.reason);let Re=_?.stopRequested?0:await K();if(y.answer)return y.answer;if(Re>0)return"";throw _?.stopRequested?i3():o3(y.reason)}if(Date.now()-J{})}}async#M(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(T){console.warn(`[${this.#d}] ignored an interaction open callback failure:`,T.message)}A&&this.#D(t,o).then(()=>{if(!r){c=!0;for(let T of I.splice(0))Q(T)}}).catch(T=>{s??=T,d()})},f=(m,T)=>{m&&(g=g.then(()=>m(T)).catch(_=>{s??=_,d()}))},Q=m=>{let T=m.payload;if(A&&T.type==="session/event"){this.#_(t,[T.event]);return}if(T.type==="question/requested"||T.type==="approval/requested"){let _=T.type==="question/requested"?"question":"approval",R=_==="question"?m.rpcId:T.approvalId,H=`${_}:${R}`;if(A){let L=this.#w(t,H,_);if(L?.ownership!==A)return;this.#B.set(H,L)}let F=_==="approval"&&A&&typeof T.callId=="string"?this.#B.get(H)?.ownership.toolCalls.get(T.callId):void 0;f(i,Object.freeze({kind:_,interactionId:R,rpcId:m.rpcId,sessionId:t,payload:T,recovered:A?this.#B.get(H)?.recovered===!0:!1,...F?{toolCall:F}:{},reconnect:d,respond:(L,q={})=>this.respondInteraction(m.rpcId,L,{...q,signal:q.signal??o})}));return}if(T.type==="question/resolved"||T.type==="approval/resolved"){let _=T.type==="question/resolved"?"question":"approval",R=_==="question"?T.questionRpcId:T.approvalId,H=`${_}:${R}`;if(A){if(this.#B.get(H)?.ownership!==A)return;this.#B.delete(H)}f(e,Object.freeze({kind:_,interactionId:R,sessionId:t,outcome:T.outcome,payload:T}))}},y=m=>{try{let T=m?.payload;if(m?.type!=="server-request"||typeof m.rpcId!="string"||!T||typeof T!="object"||m.method!==T.type)throw new Error("invalid server-request envelope");if(T.sessionId!==t)return;c?Q(m):I.push(m)}catch(T){console.warn(`[${this.#d}] ignored a malformed Harness interaction frame:`,T.message)}};try{await this.#P({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.#P({signal:t,onOpen:()=>{try{i?.()}catch(e){console.warn(`[${this.#d}] 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.#d}] ignored a malformed global mux frame:`,a.message)}}})}catch(e){if(t.aborted)return;console.warn(`[${this.#d}] Harness event mux disconnected:`,e.message)}if(t.aborted)return;try{await au(this.#n,t)}catch{if(t.aborted)return;throw new Error("Harness event mux reconnect wait failed")}}}#P(t){return A3({apiProxy:this.#A,baseUrl:this.#e,createWebSocket:this.#a,rpcId:`${this.#s}-${sT()}`,...t,onMalformed:o=>{console.warn(`[${this.#d}] ignored a malformed Harness mux frame:`,o.message)}})}stopManagedProcess(){this.#E?.exitCode===null&&this.#E.kill("SIGTERM")}};var XQ=class extends Qr{constructor(t){super({...t,rpcIdPrefix:"dingtalk",logPrefix:"dsh-dingtalk"})}};import{mkdir as zCe,readFile as VCe,realpath as WCe,rename as ZCe,stat as XCe,unlink as $Ce,writeFile as eBe}from"node:fs/promises";import{dirname as ABe,isAbsolute as l3,resolve as ou}from"node:path";var UtA=Object.freeze({version:1,workspaces:Object.freeze({})});function xI(n){let t=new Error(n);return t.code=wa,t}async function IT(n){return ou(await WCe(n))}async function tBe(n,t){if(n===t)return!0;try{return await IT(n)===await IT(t)}catch{return!1}}function jt(n){if(typeof n!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n))throw new TypeError("Invalid bot id");return n}function di(n,t,o){let i=new Error(t,o);return i.code=n,i}function $Q(n){if(typeof n!="string"||!/^[A-Za-z0-9._:@-]{1,128}$/.test(n))throw di("invalid-target","Invalid target id");return n}function rBe(n){if(!n||typeof n!="object"||Array.isArray(n))throw di("invalid-target","Invalid target route");try{let t=JSON.stringify(n);if(t===void 0)throw new TypeError("route is not JSON");let o=JSON.parse(t);if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("route is not an object");return o}catch(t){throw di("invalid-target","Invalid target route",{cause:t})}}function YI(n,{targetId:t}={}){if(!n||typeof n!="object"||Array.isArray(n))throw di("invalid-target","Invalid delivery target");let o=t===void 0?new Set(["targetId","name","kind","route"]):new Set(["name","kind","route"]);if(Object.keys(n).some(a=>!o.has(a)))throw di("invalid-target","Invalid delivery target");let i=$Q(t??n.targetId);if(typeof n.kind!="string"||!/^[a-z][a-z0-9-]{0,31}$/.test(n.kind))throw di("invalid-target","Invalid target kind");let e;if(n.name!==void 0){if(typeof n.name!="string"||!n.name.trim()||n.name.trim().length>80)throw di("invalid-target","Invalid target name");e=n.name.trim()}return{targetId:i,...e===void 0?{}:{name:e},kind:n.kind,route:rBe(n.route)}}function aBe(n){let t=Object.create(null);if(n===void 0)return t;if(!n||typeof n!="object"||Array.isArray(n))return null;try{for(let[o,i]of Object.entries(n)){if(jt(o),!i||typeof i!="object"||Array.isArray(i))return null;let e=Object.create(null);for(let[a,A]of Object.entries(i)){let r=YI(A,{targetId:a}),{targetId:s,...g}=r;e[a]=g}t[o]=e}}catch{return null}return t}function iBe(n,t){let o=Object.create(null);if(n===void 0)return o;if(!n||typeof n!="object"||Array.isArray(n)){for(let i of Object.keys(t))o[i]=null;return o}for(let[i,e]of Object.entries(n))try{jt(i),o[i]=jd(e)}catch{}return o}function oBe(n){if(!n||![1,2].includes(n.version)||!n.workspaces||typeof n.workspaces!="object"||Array.isArray(n.workspaces))return null;let t={};for(let[r,s]of Object.entries(n.workspaces)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(r)||typeof s!="string"||!l3(s))return null;t[r]=ou(s)}let o={};if(n.agentPresets!==void 0){if(!n.agentPresets||typeof n.agentPresets!="object"||Array.isArray(n.agentPresets))return null;for(let[r,s]of Object.entries(n.agentPresets)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(r))return null;try{let g=Ld(s);if(!g)return null;o[r]=g}catch{return null}}}let i=Object.create(null);if(n.contextEnhancement&&typeof n.contextEnhancement=="object"&&!Array.isArray(n.contextEnhancement))for(let[r,s]of Object.entries(n.contextEnhancement))/^[A-Za-z0-9_-]{1,128}$/.test(r)&&(i[r]=Hd(s));if(n.version===1&&n.deliveryTargets!==void 0)return null;let e=aBe(n.deliveryTargets);if(!e)return null;let a=iBe(n.accessPolicies,t);return{version:n.accessPolicies===void 0?n.version:2,workspaces:t,agentPresets:o,contextEnhancement:i,deliveryTargets:e,accessPolicies:a}}function nBe({version:n,workspaces:t,agentPresets:o,contextEnhancement:i,deliveryTargets:e,accessPolicies:a}){let A={version:n,workspaces:t};return Object.keys(o).length>0&&(A.agentPresets=o),Object.keys(i).length>0&&(A.contextEnhancement=i),n>=2&&Object.keys(e).length>0&&(A.deliveryTargets=e),n>=2&&Object.keys(a).length>0&&(A.accessPolicies=a),A}async function sBe(n,t){await zCe(ABe(n),{recursive:!0,mode:448});let o=`${n}.tmp`;await eBe(o,`${JSON.stringify(t,null,2)} -`,{encoding:"utf8",mode:384}),await ZCe(o,n)}async function c3(n){if(typeof n!="string"||!n.trim()||!l3(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=ou(n.trim()),o;try{o=await XCe(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 oa=class{#e;#A;#t=1;#r={};#l={};#o={};#i=Object.create(null);#a=Object.create(null);#n=new Map;#s=1;#d=new Map;#c=1;#g=new Map;#I=new WeakMap;#p=new Set;#E=Promise.resolve();#u=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=ou(o)}async load(){try{let t=oBe(JSON.parse(await VCe(this.#e,"utf8")));if(!t)throw new Error("dsh-im workspace config is invalid");this.#t=t.version,this.#r=t.workspaces,this.#l=t.agentPresets,this.#o=t.contextEnhancement,this.#i=t.deliveryTargets,this.#a=t.accessPolicies}catch(t){if(t?.code!=="ENOENT")throw t;this.#t=1,this.#r={},this.#l={},this.#o={},this.#i=Object.create(null),this.#a=Object.create(null)}this.#n.clear(),this.#s=1,this.#d.clear(),this.#c=1,this.#g.clear(),this.#p.clear();for(let t of Object.keys(this.#r))this.#n.set(t,this.#C()),this.#d.set(t,this.#B());return this}has(t){let o=jt(t);return Object.hasOwn(this.#r,o)&&!this.#g.has(o)}incarnationFor(t){return this.#d.get(jt(t))??null}workspaceFor(t){return this.#r[jt(t)]??this.#A}agentPresetFor(t){return this.#l[jt(t)]??null}contextEnhancementFor(t){let o=jt(t);return this.has(o)&&Object.hasOwn(this.#o,o)?this.#o[o]:Y_}accessPolicyFor(t){let o=jt(t);return this.has(o)&&Object.hasOwn(this.#a,o)?this.#a[o]:null}listDeliveryTargets(t){let o=jt(t);if(!this.has(o))throw di("unknown-bot","Unknown bot");return Object.entries(this.#i[o]??{}).map(([i,e])=>YI(e,{targetId:i})).sort((i,e)=>i.targetId.localeCompare(e.targetId))}deliveryTargetFor(t,o){let i=jt(t),e=$Q(o);if(!this.has(i))throw di("unknown-bot","Unknown bot");let a=this.#i[i]?.[e];return a?YI(a,{targetId:e}):null}async createDeliveryTarget(t,o){let i=jt(t),e=YI(o);return this.#S(i,async()=>{if(!this.has(i))throw di("unknown-bot","Unknown bot");if(Object.hasOwn(this.#i[i]??{},e.targetId))throw di("target-conflict","Target already exists");let{targetId:a,...A}=e,r={...this.#i,[i]:{...this.#i[i]??{},[a]:A}};return await this.#m(this.#o,r,2),this.#i=r,this.#t=2,YI(A,{targetId:a})})}async updateDeliveryTarget(t,o,i){let e=jt(t),a=$Q(o),A=YI(i,{targetId:a});return this.#S(e,async()=>{if(!this.has(e))throw di("unknown-bot","Unknown bot");if(!Object.hasOwn(this.#i[e]??{},a))throw di("unknown-target","Unknown target");let{targetId:r,...s}=A,g={...this.#i,[e]:{...this.#i[e],[a]:s}};return await this.#m(this.#o,g,2),this.#i=g,this.#t=2,YI(s,{targetId:a})})}async deleteDeliveryTarget(t,o){let i=jt(t),e=$Q(o);return this.#S(i,async()=>{if(!this.has(i))throw di("unknown-bot","Unknown bot");if(!Object.hasOwn(this.#i[i]??{},e))throw di("unknown-target","Unknown target");let a={...this.#i[i]};delete a[e];let A={...this.#i};return Object.keys(a).length>0?A[i]=a:delete A[i],await this.#m(this.#o,A,2),this.#i=A,this.#t=2,!0})}generationFor(t){return this.#n.get(jt(t))??null}async whenIdle(){await this.#E}async whenBotIdle(t){let o=jt(t);for(;;){let i=this.#u.get(o);if(!i||(await i,this.#u.get(o)===i))return}}async ensure(t,{workspace:o=this.#A,defaultAgentPreset:i,initialAccessPolicy:e}={}){let a=jt(t),A=ou(o);return this.#S(a,async()=>{let r=!this.#r[a],s=e!==void 0&&!Object.hasOwn(this.#a,a);if(r||s){let g=s?Ec(e):void 0,c=r?Ld(i):null,I=Object.hasOwn(this.#l,a),d=this.#l[a],B=s?{...this.#a,[a]:g}:this.#a;r&&(this.#r[a]=A,c&&(this.#l[a]=c),this.#n.set(a,this.#C()),this.#d.set(a,this.#B()));let f=s?2:this.#t;try{await this.#m(this.#o,this.#i,f,B)}catch(Q){throw r&&(delete this.#r[a],I?this.#l[a]=d:delete this.#l[a],this.#n.delete(a),this.#d.delete(a)),Q}this.#a=B,this.#t=f}else this.#n.has(a)||this.#n.set(a,this.#C());return this.#r[a]})}async setWorkspace(t,o,{clearSessions:i,incarnation:e}={}){let a=jt(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 c3(o);return this.#S(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.#r[a];this.#n.set(a,this.#C()),await i?.(),this.#r[a]=A;try{await this.#m()}catch(s){throw this.#r[a]=r,s}return A})}async setAgentPreset(t,o,{incarnation:i}={}){let e=jt(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=Ld(o);return this.#S(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.#l[e]??null;if(A===a)return a;a?this.#l[e]=a:delete this.#l[e];try{await this.#m()}catch(r){throw A?this.#l[e]=A:delete this.#l[e],r}return a})}async setContextEnhancement(t,o,{incarnation:i}={}){let e=jt(t),a=i===void 0?this.incarnationFor(e):i,A=HI(o);return this.#S(e,async()=>{if(!this.has(e)||a!==this.incarnationFor(e)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}let r={...this.#o,[e]:A};return await this.#m(r),this.#o=r,A})}async setAccessPolicy(t,o,{incarnation:i}={}){let e=jt(t),a=i===void 0?this.incarnationFor(e):i,A=Ec(o);return this.#S(e,async()=>{if(!this.has(e)||a!==this.incarnationFor(e)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}let r={...this.#a,[e]:A};return await this.#m(this.#o,this.#i,2,r),this.#a=r,this.#t=2,A})}async bindWorkspaceSession(t,o,{conversationKey:i,sessionId:e,clearSessions:a,setSession:A,incarnation:r,expectedGeneration:s}={}){let g=jt(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 IT(await c3(o));return this.#S(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 xI("The bot workspace changed before the session binding could be committed.");if(!await tBe(c,this.workspaceFor(g))){let I=this.#r[g];this.#n.set(g,this.#C()),await a(),this.#r[g]=c;try{await this.#m()}catch(d){throw this.#r[g]=I,d}}return await A(i,e),{workspace:c,sessionId:e,generation:this.#n.get(g)}})}async invalidateSessions(t,{clearSessions:o}={}){let i=jt(t);return this.#S(i,async()=>{this.#n.set(i,this.#C()),await o?.()})}async beginRemoval(t,{clearSessions:o}={}){let i=jt(t);return this.#S(i,async()=>{let e=this.#g.get(i);if(e)return e;let a=Object.freeze({});this.#g.set(i,a),this.#I.set(a,{botId:i,incarnation:this.incarnationFor(i)}),this.#n.set(i,this.#C());try{await o?.()}catch(A){throw this.#g.get(i)===a&&this.#g.delete(i),A}return a})}async abortRemoval(t){let{botId:o}=this.#f(t);return this.#S(o,async()=>this.#g.get(o)!==t?!1:(this.#g.delete(o),Object.hasOwn(this.#r,o)&&(this.#n.set(o,this.#C()),this.#d.has(o)||this.#d.set(o,this.#B())),!0))}async finishRemoval(t){let{botId:o,incarnation:i}=this.#f(t);return this.#S(o,async()=>this.#g.get(o)!==t?{removed:!1,persisted:!0,error:null,stale:!0}:this.incarnationFor(o)!==i?(this.#g.delete(o),{removed:!1,persisted:!0,error:null,stale:!0}):(this.#g.delete(o),this.#Q(o)))}async retireAfterConfigCommit(t){let o=jt(t);return this.#S(o,async()=>(this.#g.delete(o),this.#Q(o)))}flushPendingRemoval(t){if(this.#p.has(t))return this.#S(t,async()=>{this.#p.has(t)&&await this.#y()})}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(jt)),i=new Set([...Object.keys(this.#r),...Object.keys(this.#l),...Object.keys(this.#o),...Object.keys(this.#i),...Object.keys(this.#a),...this.#p]);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),contextEnhancement:this.contextEnhancementFor(o.botId),accessPolicy:this.accessPolicyFor(o.botId)}:o)}}#C(){let t=this.#s;return this.#s+=1,t}#B(){let t=this.#c;return this.#c+=1,t}#f(t){if(!t||typeof t!="object")throw new TypeError("Invalid workspace removal transaction");let o=this.#I.get(t);if(!o)throw new TypeError("Invalid workspace removal transaction");return o}async#Q(t){let o=Object.hasOwn(this.#r,t),i=Object.hasOwn(this.#l,t),e=Object.hasOwn(this.#o,t),a=Object.hasOwn(this.#i,t),A=Object.hasOwn(this.#a,t),r=o||i||e||a||A||this.#p.has(t);if(delete this.#r[t],delete this.#l[t],delete this.#o[t],delete this.#i[t],delete this.#a[t],this.#n.delete(t),this.#d.delete(t),!r)return{removed:!1,persisted:!0,error:null,stale:!1};try{return await this.#y(),{removed:o,persisted:!0,error:null,stale:!1}}catch(s){return this.#p.add(t),{removed:o,persisted:!1,error:s,stale:!1}}}async#S(t,o){let i=this.#E.then(o,o),e=i.then(()=>{},()=>{});return this.#E=e,this.#u.set(t,e),e.finally(()=>{this.#u.get(t)===e&&this.#u.delete(t)}),i}async#m(t=this.#o,o=this.#i,i=this.#t,e=this.#a){await sBe(this.#e,nBe({version:i,workspaces:this.#r,agentPresets:this.#l,contextEnhancement:t,deliveryTargets:o,accessPolicies:e})),this.#p.clear()}async#y(){if(Object.keys(this.#r).length>0||Object.keys(this.#l).length>0||Object.keys(this.#o).length>0||Object.keys(this.#i).length>0||Object.keys(this.#a).length>0){await this.#m();return}try{await $Ce(this.#e),this.#p.clear()}catch(t){if(t?.code!=="ENOENT")throw t;this.#p.clear()}}};function iu(n){if(!n)return null;let t=typeof n=="function"?n():n;return t&&typeof t.then=="function"?t.then(os):os(t)}function d3(){let n=new Error("Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002");return n.code="agent-preset-unavailable",n}function zd(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 I3(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=iu(o);return r&&typeof r.then=="function"?r.then(A):A(r)};return t&&typeof t.then=="function"?t.then(i):i(t)}function gBe(n){return Promise.resolve(n.status())}function Ya(n,{workspaces:t,method:o="remove",botIdFromRemoved:i=A=>A?.botId,saveMethod:e="save",botIdFromSave:a=A=>A?.botId}){if(!n||!t||typeof n[o]!="function")throw new TypeError("configStore removal observer dependencies are required");return new Proxy(n,{get(A,r){let s=Reflect.get(A,r,A);return r===o?async(...g)=>{let c=await s.apply(A,g),I=c?i(c,g):null;return I&&await t.retireAfterConfigCommit(I),c}:r===e&&typeof s=="function"?(...g)=>{let c=t.flushPendingRemoval(a(g[0],g));return c?c.then(()=>s.apply(A,g)):s.apply(A,g)}:typeof s=="function"?s.bind(A):s}})}function ja(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 iu(I)??os(null)}catch(B){throw zd(A),B}return zd(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(),zd(A);let Q=await r();return f?.signal?.throwIfAborted(),Q};if(d==="updateAgentPreset")return async(f,Q={})=>{Q?.signal?.throwIfAborted(),zd(A);let y=f==="--default"?null:Ld(f),m=null;if(y&&({agentPresetCatalog:m}=await r(),Q?.signal?.throwIfAborted(),!m.items.some(T=>T.id===y)))throw d3();if(await o.setAgentPreset(t,y,{incarnation:a}),zd(A),m)return{agentPreset:o.agentPresetFor(t),agentPresetCatalog:m};try{return await r()}catch(T){if(T?.code==="workspace-bot-not-found")throw T;return zd(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:os(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 _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}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 _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(y!==o.generationFor(t))throw xI("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 T=await o.bindWorkspaceSession(t,m.workspace,{conversationKey:f,sessionId:Q,clearSessions:()=>i.clearSessions(),setSession:(_,R)=>i.setSession(_,R),incarnation:a,expectedGeneration:y});if(!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(T.generation!==o.generationFor(t))throw xI("The bot workspace changed before the session binding completed.");return s.set(Q,T.generation),{...m,workspace:T.workspace,sessionId:T.sessionId}};if(d==="createSession")return async(f={})=>{if(await o.whenBotIdle(t),!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}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(_,R,H)=>{if(!y())throw xI(`The bot workspace changed before this ${H} started.`);let F=await I[_](f,...R);if(!y())throw xI(`The bot workspace changed while this ${H} was running.`);return F},T=async(_,R,H)=>{if(!y())throw xI(`The bot workspace changed before this ${H} started.`);return I[_](f,...R)};return Object.freeze({sessionId:f,async sessionExists(..._){if(!y())return!1;let R=await I.sessionExists(f,..._);return y()&&R},models(..._){return m("getSessionModels",_,"model listing")},readHistory(..._){return m("readSessionHistory",_,"history read")},...typeof I.renameSession=="function"?{renameTitle(..._){return T("renameSession",_,"title rename")}}:{},selectModel(..._){return m("selectSessionModel",_,"model selection")},isRunning(..._){return m("isSessionRunning",_,"run-state check")},hasActiveTurn(..._){return m("hasActiveTurn",_,"turn ownership check")},stopActiveTurn(..._){return T("stopActiveTurn",_,"turn stop")},steerActiveTurn(..._){return T("steerActiveTurn",_,"turn steering")},ask(..._){if(!y())throw xI("The bot workspace changed before this prompt started.");return I.ask(f,..._)}})};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=wa,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=wa,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===c_)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 Ja(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=(d,B)=>{let Q=(e.get(d)??Promise.resolve()).catch(()=>{}).then(B);return e.set(d,Q),Q.finally(()=>{e.get(d)===Q&&e.delete(d)})},A=d=>I3(t,d,i),r=(d,B)=>{let f=t.incarnationFor(d);return a(d,async()=>{if(!(await n.status())?.bots?.some(m=>m?.botId===d)){let m=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw m.code="workspace-bot-not-found",m}let y=await o(d);return await t.setWorkspace(d,B,{clearSessions:()=>y.clearSessions(),incarnation:f}),A(await n.status())})},s=(d,B)=>{let f=t.incarnationFor(d),Q=Ld(B);return a(d,async()=>{if(!(await n.status())?.bots?.some(T=>T?.botId===d)){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}let m=Q&&i?await iu(i):null;if(Q&&i&&!m?.items.some(T=>T.id===Q))throw d3();return await t.setAgentPreset(d,Q,{incarnation:f}),I3(t,await n.status(),m??i)})},g=(d,B,f)=>{let Q=t.incarnationFor(d),y=HI(B);return a(d,async()=>{let m=await n.status();if(!m?.bots?.some(F=>F?.botId===d)){let F=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw F.code="workspace-bot-not-found",F}let T=await iu(i),_=t.decorateStatus(m),R={..._,bots:_.bots.map(F=>F?.botId===d?{...F,contextEnhancement:y}:F),...T?{agentPresetCatalog:T}:{}},H=f?await f(R):R;return await t.setContextEnhancement(d,y,{incarnation:Q}),H})},c=(d,B,f)=>{let Q=t.incarnationFor(d),y=Ec(B);return a(d,async()=>{let m=await n.status();if(!m?.bots?.some(F=>F?.botId===d)){let F=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw F.code="workspace-bot-not-found",F}let T=await iu(i),_=t.decorateStatus(m),R={..._,bots:_.bots.map(F=>F?.botId===d?{...F,accessPolicy:y}:F),...T?{agentPresetCatalog:T}:{}},H=f?await f(R):R;return await t.setAccessPolicy(d,y,{incarnation:Q}),H})},I=(d,B)=>a(d,async()=>{let f=await t.beginRemoval(d,{clearSessions:async()=>{try{let Q=await o(d);if(!Q||typeof Q.clearSessions!="function")throw new TypeError("bot state does not support session cleanup");await Q.clearSessions()}catch(Q){console.warn(`[dsh-im] ignored session cleanup failure while deleting bot ${d}:`,Q?.message??Q)}}});try{let Q=await B();return await t.finishRemoval(f),A(Q)}catch(Q){let y=await gBe(n).catch(()=>null);throw Array.isArray(y?.bots)&&!y.bots.some(T=>T?.botId===d)?await t.finishRemoval(f):await t.abortRemoval(f),Q}});return new Proxy(n,{get(d,B){if(B==="updateWorkspace")return r;if(B==="updateAgentPreset")return s;if(B==="updateContextEnhancement")return g;if(B==="updateAccessPolicy")return c;let f=Reflect.get(d,B,d);return typeof f!="function"?f:B==="deleteBot"?(Q,...y)=>I(Q,()=>f.call(d,Q,...y)):B==="disconnect"?async(...Q)=>{let m=(await d.status())?.bots?.[0]?.botId;return m?I(m,()=>f.apply(d,Q)):A(f.apply(d,Q))}:(...Q)=>A(f.apply(d,Q))}})}var p3=new Set(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp"]);function cBe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function IBe(n){return typeof n=="string"&&n.length>0&&n.length<=512&&n.trim()===n&&!/[\s:\u0000-\u001f\u007f]/u.test(n)}function lT(n,t){let o=`${t}:`;if(!n.startsWith(o))return null;let i=n.slice(o.length);return IBe(i)?i:null}function nu(n,t){for(let[o,i,e]of t){let a=lT(n,o);if(a)return{kind:i,route:{[e]:a}}}return null}function lBe(n){let t=lT(n,"p2p");return t?.startsWith("ou_")?{kind:"user",route:{openId:t}}:nu(n,[["group","group","chatId"]])}function dBe(n){let t=lT(n,"direct");if(t&&/^[A-Za-z0-9_-]{1,128}$/.test(t))return{kind:"conversation",route:{channelId:t}};let o=/^group:([^:]+):(\d{1,20}(?:\.\d{1,20})?)$/.exec(n);return!o||!/^[A-Za-z0-9_-]{1,128}$/.test(o[1])?null:{kind:"thread",route:{channelId:o[1],threadTs:o[2]}}}function pBe(n){let t=/^(direct|group):(-?\d+)(?::([1-9]\d*))?$/.exec(n);if(!t)return null;let o=Number(t[2]);if(!Number.isSafeInteger(o)||t[1]==="direct"&&t[3]!==void 0)return null;if(t[3]===void 0)return{kind:"chat",route:{chatId:t[2]}};let i=Number(t[3]);return!Number.isSafeInteger(i)||i<=0?null:{kind:"topic",route:{chatId:t[2],messageThreadId:i}}}function hBe(n){let t=/^(?:direct|group):(\d{1,32})$/.exec(n);return t?{kind:"channel",route:{channelId:t[1]}}:null}function EBe(n){let t=/^direct:(\d{5,32}@(s\.whatsapp\.net|lid))$/.exec(n);if(t)return{kind:"user",route:{jid:t[1]}};let o=/^group:(\d{5,32}(?:-\d{1,32})?@g\.us)$/.exec(n);return o?{kind:"group",route:{jid:o[1]}}:null}function uBe(n,t){if(!p3.has(n)||typeof t!="string")return null;switch(n){case"weixin":return nu(t,[["p2p","user","toUserId"]]);case"feishu":return lBe(t);case"dingtalk":return nu(t,[["p2p","user","userId"],["group","group","openConversationId"]]);case"wecom":return nu(t,[["direct","user","chatId"],["group","group","chatId"]]);case"qq":return nu(t,[["c2c","user","userOpenId"],["group","group","groupOpenId"]]);case"slack":return dBe(t);case"telegram":return pBe(t);case"discord":return hBe(t);case"whatsapp":return EBe(t);default:return null}}function h3(n,t){if(!p3.has(n)||!cBe(t))return[];let o=[],i=new Set;for(let e of Object.keys(t)){let a=uBe(n,e);if(!a)continue;let A=JSON.stringify(a);i.has(A)||(i.add(A),o.push(a))}return o}var CBe=new Set(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp"]);function Ay(n){return CBe.has(n)}function Cc(n){let t=new Error(n);return t.code="invalid-target",t}function BBe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function dT(n,t,o){if(!BBe(n))throw Cc(`${o} must be an object`);if(Object.keys(n).find(e=>!t.includes(e))!==void 0)throw Cc(`${o} contains an unknown field`)}function ey(n,t){if(typeof n!="string"||!n||n.trim()!==n)throw Cc(`${t} must be a non-empty string without surrounding whitespace`);return n}function fBe(n){if(typeof n!="string"||!n.trim()||n.trim().length>80)throw Cc("target.name must contain 1 to 80 characters");return n.trim()}function uc(n,t){dT(n,t,"route");let o={};for(let i of t)o[i]=ey(n[i],`route.${i}`);return o}function ug(n,t){if(!t.includes(n))throw Cc("target kind is not supported by this channel");return n}function QBe(n,t,o){switch(n){case"weixin":return ug(t,["user"]),uc(o,["toUserId"]);case"feishu":return ug(t,["user","group"]),uc(o,t==="user"?["openId"]:["chatId"]);case"dingtalk":return ug(t,["user","group"]),uc(o,t==="user"?["userId"]:["openConversationId"]);case"wecom":return ug(t,["user","group"]),uc(o,["chatId"]);case"qq":return ug(t,["user","group"]),uc(o,t==="user"?["userOpenId"]:["groupOpenId"]);case"slack":return ug(t,["conversation","thread"]),uc(o,t==="conversation"?["channelId"]:["channelId","threadTs"]);case"telegram":{ug(t,["chat","topic"]),dT(o,t==="chat"?["chatId"]:["chatId","messageThreadId"],"route");let i=ey(o.chatId,"route.chatId");if(!/^-?\d+$/.test(i))throw Cc("route.chatId must be a decimal string");if(t==="chat")return{chatId:i};if(!Number.isSafeInteger(o.messageThreadId)||o.messageThreadId<=0)throw Cc("route.messageThreadId must be a positive integer");return{chatId:i,messageThreadId:o.messageThreadId}}case"discord":return ug(t,["channel"]),uc(o,["channelId"]);case"whatsapp":{ug(t,["user","group"]);let i=uc(o,["jid"]);if(!(t==="user"?/^\d{5,32}@(s\.whatsapp\.net|lid)$/.test(i.jid):/^\d{5,32}(?:-\d{1,32})?@g\.us$/.test(i.jid)))throw Cc(`route.jid must be a ${t} WhatsApp JID`);return i}default:throw new TypeError(`Unsupported delivery channel: ${n}`)}}function Vd(n,t,{targetIdRequired:o=!0}={}){if(!Ay(n))throw new TypeError(`Unsupported delivery channel: ${n}`);dT(t,o?["targetId","name","kind","route"]:["name","kind","route"],"target");let i={};return o&&(i.targetId=ey(t.targetId,"target.targetId")),t.name!==void 0&&(i.name=fBe(t.name)),i.kind=ey(t.kind,"target.kind"),i.route=QBe(n,i.kind,t.route),i}function qa({channel:n,workspaces:t,coreController:o,stateFor:i}){if(!Ay(n))throw new TypeError(`Unsupported delivery channel: ${n}`);if(!t||typeof t!="object")throw new TypeError("delivery adapter requires a workspace store");if(!o||typeof o!="object")throw new TypeError("delivery adapter requires a proactive text controller");if(typeof i!="function")throw new TypeError("delivery adapter requires a bot state getter");return Object.freeze({channel:n,ownsBot:e=>t.has(e),listTargets:e=>t.listDeliveryTargets(e),async listSuggestions(e){let a=await i(e);if(!a||typeof a.snapshot!="function")throw new TypeError("delivery suggestion state cannot be inspected");return h3(n,a.snapshot()?.sessions).map(r=>Vd(n,r,{targetIdRequired:!1}))},createTarget:(e,a)=>t.createDeliveryTarget(e,Vd(n,a)),updateTarget:(e,a,A)=>t.updateDeliveryTarget(e,a,Vd(n,A,{targetIdRequired:!1})),deleteTarget:(e,a)=>t.deleteDeliveryTarget(e,a),async sendText(e,a,A,r={}){let s=Vd(n,a);if(typeof o.sendProactiveText!="function")throw new TypeError("delivery controller cannot send proactive text");return await o.sendProactiveText(e,s,A,r),{sent:!0}}})}var E3=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function yBe(n){if(!Array.isArray(n)||n.length===0)return[...E3];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...E3]}var ty=class{#e;#A;#t;#r;#l;#o;#i;#a=null;#n=null;#s=0;#d=!1;#c=!1;#g;#I;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=yBe(e),this.#l=Number.isFinite(a)&&a>=0?a:15e3,this.#o=A,this.#i=r,this.#g=new Promise(s=>{this.#I=s})}get ready(){return this.#g}start(){return this.#c||this.#d?this:(this.#c=!0,this.#p(0),this)}async close(){this.#d||(this.#d=!0,this.#a!==null&&this.#i(this.#a),this.#a=null,await this.#n?.catch(()=>{}),this.#I?.(null),this.#I=null)}#p(t){this.#d||(this.#a=this.#o(()=>{this.#a=null,this.#E()},t),this.#a?.unref?.())}async#E(){if(this.#d||this.#n)return;let t=this.#u();this.#n=t;try{await t}finally{this.#n===t&&(this.#n=null)}}async#u(){try{if(await this.#A.ensureRunning(),this.#d)return;let t=await this.#e.initialize();if(this.#d)return;this.#I?.(t),this.#I=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}})}}}}import{randomUUID as hT}from"node:crypto";var ry=new WeakMap;function mBe(n){let t=n?.failure;return t&&typeof t=="object"&&typeof t.code=="string"&&typeof t.message=="string"?{code:t.code,message:t.message,details:t.details&&typeof t.details=="object"?t.details:{}}:n?.name==="AbortError"||n?.name==="RemoteInvocationCancelled"?{code:"cancelled",message:n instanceof Error?n.message:"Harness request was cancelled",details:{}}:{code:"internal",message:n instanceof Error?n.message:String(n),details:{}}}function Lo(n,t){return Promise.resolve().then(t).then(o=>({rpcId:n.rpcId,result:{ok:!0,value:o}}),o=>({rpcId:n.rpcId,result:{ok:!1,error:mBe(o)}}))}function u3(n,t,o,i){return{namespace:n,method:t,args:o,...i===void 0?{}:{signal:i}}}function ay(n,t){let o=new Error(n);return o.name="UserQuestionError",o.code=t,o}function SBe(n){if(typeof n?.snapshotEvents=="function"){let o=n.snapshotEvents();if(Array.isArray(o))return o}let t=n?.events;return Array.isArray(t)?t:null}function wBe(n,t){return!n||typeof n!="object"||n.sessionId!==t.sessionId||!n.answer||typeof n.answer!="object"||!Array.isArray(n.answer.answers)||n.answer.answers.length!==t.questions.length?!1:n.answer.answers.every((o,i)=>{let e=t.questions[i];if(!o||typeof o!="object"||o.id!==e.id||!Array.isArray(o.selected)||o.selected.some(r=>typeof r!="string")||new Set(o.selected).size!==o.selected.length||o.custom!==void 0&&typeof o.custom!="string")return!1;let a=o.custom?.trim();if(a!==void 0&&!a||e.multiSelect!==!0&&(a!==void 0&&o.selected.length>0||o.selected.length>1))return!1;let A=new Set(e.options?.map(r=>r.label)??[]);return o.selected.every(r=>A.has(r))})}function DBe(n){if(n?.type==="event"&&n.event&&typeof n.event=="object")return[{event:n.event}];let t=n?.type==="chunks"?n.event:null;if(!t||typeof t!="object")throw new Error("Harness returned an invalid session history record");let{data:o}=t,i=t.type,e=i==="chunkrow/tool-call-chunks"?o?.args:o?.texts;if(!o||!Array.isArray(e)||e.length===0||e.some(A=>typeof A!="string")||!Array.isArray(o.dt)||o.dt.length!==e.length-1)throw new Error("Harness returned an invalid packed session chunk");let a=t.time;return e.map((A,r)=>{r>0&&(a+=o.dt[r-1]);let s;if(i==="chunkrow/text-chunks")s={type:"text-delta",index:o.index,text:A};else if(i==="chunkrow/reasoning-chunks")s={type:"reasoning-delta",index:o.index,text:A};else if(i==="chunkrow/tool-call-chunks")s={type:"tool-call-delta",index:o.index,id:o.id,...Object.hasOwn(o,"name")?{name:o.name}:{},argumentsDelta:A};else throw new Error(`Harness returned an unsupported packed session chunk: ${String(i)}`);return{event:{type:"assistant/chunk",seq:t.seq+r,time:a,data:{turn:o.turn,step:o.step,chunk:s}}}})}function C3(n){if(!Array.isArray(n))throw new Error("Harness returned invalid session history records");return n.flatMap(DBe)}var ET=class{#e=[];#A=null;#t=!1;#r;#l;#o;constructor(t,o){this.#r=t,this.#o=o,this.#l=()=>this.close(),t?.addEventListener("abort",this.#l,{once:!0}),t?.aborted&&this.close()}push(t){if(!this.#t)if(this.#A){let o=this.#A;this.#A=null,o({value:t,done:!1})}else this.#e.push(t)}next(){return this.#e.length>0?Promise.resolve({value:this.#e.shift(),done:!1}):this.#t?Promise.resolve({value:void 0,done:!0}):new Promise(t=>{this.#A=t})}return(){return this.close(),Promise.resolve({value:void 0,done:!0})}close(){if(!this.#t&&(this.#t=!0,this.#r?.removeEventListener("abort",this.#l),this.#o?.(),this.#o=null,this.#A)){let t=this.#A;this.#A=null,t({value:void 0,done:!0})}}[Symbol.asyncIterator](){return this}},uT=class{#e;#A;#t=new Set;#r=new Map;#l=new Map;#o=new Map;#i=[];#a=!1;constructor(t,o,i){this.#e=o,this.#A=i,this.host=Object.freeze({describe:e=>Lo(e,()=>({ready:!0,transport:"typert"}))}),this.workspace=Object.freeze({list:(e,a)=>Lo(e,()=>this.#d(a)),create:(e,a)=>Lo(e,()=>this.#n("workspace","create",{request:e.payload},a))}),this.sessions=Object.freeze({list:(e,a)=>Lo(e,()=>this.#n("session","list",{_request:e.payload},a)),create:(e,a)=>Lo(e,()=>this.#n("session","create",{request:e.payload},a)),history:(e,a)=>Lo(e,()=>this.#g(e.payload,a)),prompt:(e,a)=>Lo(e,()=>this.#n("session","prompt",{request:{requestId:e.rpcId,...e.payload}},a)),rename:(e,a)=>Lo(e,()=>this.#n("session","rename",{request:e.payload},a)),cancel:(e,a)=>Lo(e,()=>this.#n("session","cancel",{request:{sessionId:e.payload.sessionId}},a)),models:(e,a)=>Lo(e,()=>this.#E(e.payload.sessionId,a)),selectModel:(e,a)=>Lo(e,()=>this.#n("session","selectModel",{request:e.payload},a))}),this.llm=Object.freeze({models:(e,a)=>Lo(e,async()=>{let A=await this.#p(a);return{groups:A.groups,failures:A.failures}})}),this.events=Object.freeze({mux:(e,a)=>this.#u(a)}),this.respond=e=>Promise.resolve(this.#y(e)),typeof t?.on=="function"&&(this.#i.push(t.on("session/event",(e,a)=>{let A=e?.id;typeof A!="string"||!a||typeof a!="object"||(Number.isSafeInteger(a.seq)&&this.#I(A,a.seq),this.#C({type:"session/event",sessionId:A,event:a}))},{global:!0})),this.#i.push(t.on("approval/request",(e,a)=>this.#m(e,a),{global:!0,prepend:!0})),this.#i.push(t.on("user-questions/request",(e,a)=>this.#Q(e,a),{global:!0,prepend:!0})))}async#n(t,o,i,e){return this.#e.invoke(u3(t,o,i,e))}async#s(t,o,i,e){let a=new AbortController,A=e?AbortSignal.any([e,a.signal]):a.signal,r;try{r=(await this.#e.stream(u3(t,o,i,A)))[Symbol.asyncIterator]();let g=await r.next();if(g.done)throw new Error(`Harness ${t}.${o} stream ended before its baseline`);return g.value}finally{a.abort(new DOMException("Baseline received","AbortError")),await Promise.resolve(r?.return?.()).catch(()=>{})}}async#d(t){let o=await this.#s("workspace","follow",{},t);if(o?.type!=="baseline"||!o.value||typeof o.value!="object")throw new Error("Harness workspace.follow returned no baseline");return o.value}async#c(t,o,i){let e=await this.#s("session","follow",{request:{address:{kind:"session",sessionId:t},maxMessages:o}},i);if(e?.type!=="snapshot"||!Number.isSafeInteger(e.cursor))throw new Error("Harness session.follow returned no snapshot");return this.#I(t,e.cursor),e}async#g(t,o){let{sessionId:i,maxMessages:e=50,beforeSeq:a}=t,A=this.#o.get(i);if(A===void 0){let s=await this.#c(i,e,o);if(A=this.#o.get(i)??s.cursor,a===void 0&&A===s.cursor)return{events:C3(s.records),hasMore:s.hasMore===!0,...s.projections===void 0?{}:{projections:s.projections}}}let r=await this.#n("session","page",{request:{address:{kind:"session",sessionId:i},throughSeq:A,maxMessages:e,...a===void 0?{}:{beforeSeq:a}}},o);return{events:C3(r.records),hasMore:r.hasMore===!0}}#I(t,o){let i=this.#o.get(t);(i===void 0||o>i)&&this.#o.set(t,o)}#p(t){return this.#n("session","modelCatalog",{},t)}async#E(t,o){let[i,e]=await Promise.all([this.#p(o),this.#n("session","list",{_request:{}},o)]),a=e?.items?.find(s=>s?.sessionId===t);if(!a){let s=new Error(`session "${t}" not found`);throw s.failure={code:"session-not-found",message:s.message,details:{sessionId:t}},s}let A=a.projections?.values?.modelSelection,r=A?.next??A?.lastUsed??i.default;return{current:r,routable:i.routableProviders.includes(r.provider),groups:i.groups,failures:i.failures}}#u(t){let o;o=new ET(t,()=>this.#t.delete(o)),this.#t.add(o);for(let i of this.#r.values())o.push(this.#f(i));for(let i of this.#l.values())o.push(this.#S(i));return o}#C(t,o=hT()){let i={rpcId:o,payload:t};for(let e of this.#t)e.push(i)}#B(t){let o=t?.session,i=o?.id??t?.id,e=SBe(o);return typeof i!="string"||!e?null:g3(this.#A,i,e)?{sessionId:i,events:e}:null}#f(t){return{rpcId:t.rpcId,payload:{type:"question/requested",sessionId:t.sessionId,questions:t.questions}}}#Q(t,o){let i=this.#B(t?.agent);return i?t.signal?.aborted?Promise.reject(ay("ask_user_question was aborted before the user answered","ASK_ABORTED")):new Promise((e,a)=>{let A={rpcId:hT(),sessionId:i.sessionId,questions:t.questions,signal:t.signal,settle:(s,g)=>{this.#r.delete(A.rpcId)&&(t.signal?.removeEventListener("abort",r),this.#C({type:"question/resolved",sessionId:A.sessionId,questionRpcId:A.rpcId,outcome:s}),s==="answered"?e(g):a(g))}},r=()=>A.settle("cancelled",ay("ask_user_question was aborted before the user answered","ASK_ABORTED"));this.#r.set(A.rpcId,A),t.signal?.addEventListener("abort",r,{once:!0}),this.#C(this.#f(A).payload,A.rpcId)}):o()}#S(t){return{rpcId:t.rpcId,payload:{type:"approval/requested",sessionId:t.sessionId,approvalId:t.approvalId,toolName:t.toolName,...t.callId===void 0?{}:{callId:t.callId},...t.reason===void 0?{}:{reason:t.reason}}}}#m(t,o){let i=this.#B(t?.agent);if(!i)return o();if(t.signal?.aborted)return Promise.resolve("cancelled");let e=new Set([...this.#l.values()].map(r=>r.approvalId)),a=new Set,A;for(let r=i.events.length-1;r>=0;r-=1){let s=i.events[r];if(s.type==="approval/decided")a.add(s.data?.id);else if(s.type==="approval/asked"){let g=s.data?.id;if(!g||a.has(g)||e.has(g)||(t.callId??null)!==(s.data?.callId??null))continue;A=g;break}}return A===void 0?o():new Promise(r=>{let s={rpcId:hT(),sessionId:i.sessionId,approvalId:A,toolName:t.toolName,callId:t.callId,reason:t.reason,settle:c=>{this.#l.delete(s.rpcId)&&(t.signal?.removeEventListener("abort",g),this.#C({type:"approval/resolved",sessionId:s.sessionId,approvalId:s.approvalId,outcome:c}),r(c))}},g=()=>s.settle("cancelled");this.#l.set(s.rpcId,s),t.signal?.addEventListener("abort",g,{once:!0}),this.#C(this.#S(s).payload,s.rpcId)})}#y(t){let o=this.#l.get(t?.rpcId);if(o){let a=t?.result?.value;return t?.result?.ok!==!0||!a||typeof a!="object"||a.sessionId!==o.sessionId||a.approvalId!==o.approvalId||a.outcome!=="allowed-once"&&a.outcome!=="rejected"?{accepted:!1,reason:"bad-response"}:(o.settle(a.outcome),{accepted:!0})}let i=this.#r.get(t?.rpcId);if(!i)return{accepted:!1,reason:"not-pending"};if(t?.result?.ok!==!0)return t?.result?.error?.code!=="cancelled"?{accepted:!1,reason:"bad-response"}:(i.settle("cancelled",ay("the user cancelled ask_user_question","ASK_CANCELLED")),{accepted:!0});if(!wBe(t.result.value,i))return{accepted:!1,reason:"bad-response"};let e={answers:t.result.value.answer.answers.map(a=>({id:a.id,selected:[...a.selected],...a.custom===void 0?{}:{custom:a.custom}}))};return i.settle("answered",e),{accepted:!0}}dispose(){if(!this.#a){this.#a=!0;for(let t of[...this.#t])t.close();for(let t of[...this.#l.values()])t.settle("cancelled");for(let t of[...this.#r.values()])t.settle("cancelled",ay("dsh-im interaction adapter was disposed","ASK_ABORTED"));for(let t of this.#i.splice(0).reverse())t?.()}}};function B3(n){let t=n?.root??n;if(!t||!["object","function"].includes(typeof t))throw new TypeError("dsh-im requires a Cordis Host context");let o=ry.get(t);if(o)return o;let i=n?.typertGateway;if(!i||typeof i.invoke!="function"||typeof i.stream!="function")throw new TypeError("dsh-im requires the modern Host Typert gateway");let e=new uT(n,i,t);return ry.set(t,e),typeof n.effect=="function"&&n.effect(()=>()=>{ry.get(t)===e&&ry.delete(t),e.dispose()},"dsh-im: modern Harness compatibility API"),e}function OBe(n,t){return n&&Object.hasOwn(n,t)?n[t]:typeof n?.get=="function"?n.get(t):void 0}function na(n,t={}){return t.harnessBaseUrl!==void 0?{baseUrl:new URL(t.harnessBaseUrl)}:{apiProxy:OBe(n,"apiProxy")??B3(n),interactionScope:n.root??n}}import{randomUUID as bBe}from"node:crypto";function MBe(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 _Be(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 f3(n){if(!n||typeof n!="object"||Object.isFrozen(n))return n;for(let t of Object.values(n))f3(t);return Object.freeze(n)}function TBe(n){return f3({id:bBe(),role:"user",content:[{type:"text",text:n}],source:{kind:"user"}})}function NBe(n){let t=new Error("Session is busy with an active turn or maintenance task",{cause:n});return t.code="agent-busy",t}function RBe(n){return({sessionId:t,expectedTurn:o,promptRpcId:i,action:e,text:a})=>{let A=n.get(t);if(A){if(!_Be(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(TBe(a)),!0);throw new TypeError(`Unsupported Harness control action: ${String(e)}`)}}}function kBe(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 NBe(e)}}}function vBe(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 vo("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");return B1({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:MBe(n);return{controlExecutor:o??(a?RBe(a):void 0),sessionMaintenanceExecutor:i??(a?kBe(a):void 0),fileIngressExecutor:e??vBe(a??{get:()=>{}})}}function Q3(n){return n.map(t=>({id:t,canExecuteCommands:!0}))}function Cg(n=[]){return JQ({mode:"open",open:{defaultCanExecuteCommands:!0,commandPermissionOverrides:[]},allowlist:{users:Q3(n)}})}function Bc(n=[]){return JQ({mode:"allowlist",open:{defaultCanExecuteCommands:!1,commandPermissionOverrides:[]},allowlist:{users:Q3(n)}})}function Bg(n){return[...new Set((Array.isArray(n)?n:[n]).filter(t=>typeof t=="string"||typeof t=="number"||typeof t=="bigint").map(t=>String(t).trim()).filter(Boolean))]}function PBe(n){return Bg(n).map(t=>`${t.replace(/^\+/,"")}@s.whatsapp.net`)}function cr(n,t={}){let o=String(n??"").trim().toLowerCase();if(o==="weixin")return Eg({direct:Bc(),group:Bc()});if(o==="feishu"){let e=Bg(t.ownerOpenIds??t.ownerOpenId).includes("*")?Cg():Bc();return Eg({direct:e,group:e})}if(o==="qq"){let i=Bg(t.ownerUserOpenid);return Eg({direct:i.includes("*")?Cg():Bc(),group:Cg()})}if(o==="telegram"){let i=Bg(t.allowedUsers);return(t.accessMode??"compatible")==="private-allowlist"?Eg({direct:Bc(i),group:Bc()}):Eg({direct:Cg(i),group:Cg()})}if(o==="whatsapp"){let i=t.accessMode??"self-only",e=PBe(t.allowedNumbers);return i==="open"?Eg({direct:Cg(e),group:Cg()}):Eg({direct:Bc(i==="private-allowlist"?e:[]),group:Bc()})}if(["dingtalk","wecom","slack","discord"].includes(o))return Eg({direct:Cg(),group:Cg()});throw new TypeError(`Unsupported access-policy channel: ${n}`)}function GBe(n,t={}){let o=String(n??"").trim().toLowerCase();if(o==="weixin")return Bg(t.ownerUserId);if(o==="feishu")return Bg(t.ownerOpenIds??t.ownerOpenId).filter(i=>i!=="*");if(o==="dingtalk"){let i=Array.isArray(t.approvedSenders)?t.approvedSenders:[];return Bg(i.map(e=>e?.staffId))}return o==="qq"?Bg(t.ownerUserOpenid).filter(i=>i!=="*"):o==="whatsapp"?Bg(t.accountJid):[]}function Wa(n,t,{channel:o,config:i,equals:e}={}){if(!n||typeof n.accessPolicyFor!="function")throw new TypeError("A workspace store with access policies is required");let a=new Set(GBe(o,i)),A=typeof e=="function"?e:(r,s)=>r===s;return Object.freeze({botId:t,getSettings:()=>n.accessPolicyFor(t),isPrivileged(r,s){if(!["direct","group"].includes(s))return!1;let g=Array.isArray(r)?r:[r];try{return g.some(c=>typeof c=="string"&&[...a].some(I=>A(c.trim(),I)===!0))}catch{return!1}}})}function UBe(n){let t=jI(n.dshHome??process.env.DSH_HOME??su(LBe(),".dsh")),o=jI(n.dataDir??su(t,"integrations","dsh-dingtalk"));return{root:o,config:jI(n.configPath??su(o,"config.json")),bots:jI(n.botsDir??su(o,"bots")),workspaces:jI(n.workspacesPath??su(o,"workspaces.json"))}}async function CT(n,t={},o={}){if(!n?.credentials)throw new TypeError("dsh-dingtalk requires ctx.credentials");let i=na(n,t),e=o.ConfigStore??DQ,a=o.DeviceAuth??bQ,A=o.StateStore??jQ,r=o.HarnessClient??XQ,s=o.Controller??JE,g=o.Runtime??Au,c=o.createConnectionSupervisor??pT,I=typeof n.logger=="function"?n.logger("dsh-dingtalk"):n.logger??console,d=()=>xa(n),B=UBe(t),f=await new e(B.config).load(),Q=jI(t.workspace??process.cwd()),y=o.WorkspaceStore??oa,m=o.workspaces??await new y(B.workspaces,{defaultWorkspace:Q}).load(),T=typeof f.list=="function",_=T?f.list():[];T&&await m.reconcile(_.map(X=>X.botId)),await Promise.all(_.map(X=>m.ensure(X.botId,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:cr("dingtalk",X)})));let R=typeof f.remove=="function"?Ya(f,{workspaces:m}):f,H=o.deviceAuth??new a({baseUrl:t.registrationBaseUrl}),F=new Map,L=X=>jI(B.bots,X,"state.json"),q=async X=>{let ae=F.get(X);return ae||(ae=await new A(L(X)).load(),F.set(X,ae)),ae},z=za(n,o.commandExecutor),{controlExecutor:K,sessionMaintenanceExecutor:G,fileIngressExecutor:V}=Va(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),U=new r({...i,workspace:Q,autostart:!1,dshBin:t.dshBin??"dsh",...z?{commandExecutor:z}:{},...K?{controlExecutor:K}:{},...G?{sessionMaintenanceExecutor:G}:{},...V?{fileIngressExecutor:V}:{}}),N=new s({deviceAuth:H,credentials:n.credentials,configStore:R,logger:I,createRuntime:async({botId:X,config:ae,clientSecret:De})=>{let oe=await q(X);await m.ensure(X,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:cr("dingtalk",ae)});let Se=ja(U,{botId:X,workspaces:m,state:oe,agentPresetCatalog:d});return new g({config:ae,clientSecret:De,harness:Se.harness,state:Se.state,contextEnhancement:{botId:X,getSettings:()=>m.contextEnhancementFor(X)},accessPolicy:Wa(m,X,{channel:"dingtalk",config:ae}),replyTimeoutMs:t.replyTimeoutMs??6e5,maxMessageChars:t.maxMessageChars??4e3,connectTimeoutMs:t.connectTimeoutMs??15e3,logger:{error:(...Be)=>I.error?.(`[${X}]`,...Be),warn:(...Be)=>I.warn?.(`[${X}]`,...Be),info:(...Be)=>I.info?.(`[${X}]`,...Be),debug:(...Be)=>I.debug?.(`[${X}]`,...Be)}})},deleteState:async({botId:X})=>{let ae=F.get(X);if(F.delete(X),ae&&typeof ae.remove=="function")await ae.remove();else try{await FBe(L(X))}catch(De){if(De?.code!=="ENOENT")throw De}}}),k=Ja(N,{workspaces:m,stateFor:q,agentPresetCatalog:d}),J=c({controller:k,harness:U,logger:I,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:k,deliveryAdapter:qa({channel:"dingtalk",workspaces:m,coreController:N,stateFor:q}),ready:J.ready,async close(){await J.close(),await k.close(),U.stopManagedProcess()}}}import YBe from"qrcode";var Pi="bot.context-enhancement.set";function Za(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"config")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(HI(n.config),!0)}catch{return!1}}var Xa="bot.access-policy.set";function $a(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"policy")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(Ec(n.policy),!0)}catch{return!1}}var HBe=new Set(["loopback","trusted-host"]);function yr(n){if(n===void 0)return"loopback";if(HBe.has(n))return n;throw new TypeError('dsh-im rpcAuthority must be "loopback" or "trusted-host"')}import{isAbsolute as KBe}from"node:path";var Gi="bot.workspace.set";function ei(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&&KBe(n.workspace.trim())}function Ai(n){return["workspace-not-absolute","workspace-not-found","workspace-not-directory","workspace-bot-not-found","agent-preset-invalid","agent-preset-unavailable","context-enhancement-invalid"].includes(n?.code)?{code:n.code,message:n.message}:null}var Fi="bot.preset.set";function xBe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function ti(n){return xBe(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"&&L_.test(n.agentPreset))}var m3="/dingtalk",Lt=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:Gi,setAgentPreset:Fi,setContextEnhancement:Pi,setAccessPolicy:Xa,approveSender:"bot.sender.approve",revokeSender:"bot.sender.revoke"}),S3=Object.freeze(Object.values(Lt)),jBe=new Set(["clientSecret","client_secret","deviceCode","device_code","secretRef","staffId","senderStaffId","verificationUrl","verificationUri","userCode"]);function oy(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function fc(n,t){return oy(n)&&Object.keys(n).every(o=>t.includes(o))}function JI(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function y3(n,t){return typeof n=="string"&&n.trim().length>0&&n.length<=t}function JBe(n,t){return oy(t)?n===Lt.status?fc(t,[])?null:"connection.status does not accept fields.":n===Lt.beginProvisioning?fc(t,["locale"])&&(t.locale===void 0||t.locale==="zh-CN")?null:"provision.begin received unsupported fields.":[Lt.pollProvisioning,Lt.cancelProvisioning].includes(n)?fc(t,["attemptId"])&&JI(t.attemptId)?null:`${n} requires an attemptId.`:n===Lt.bindCredentials?fc(t,["clientId","clientSecret"])&&y3(t.clientId,256)&&y3(t.clientSecret,1024)?null:"bot.bind-credentials requires Client ID and Client Secret.":n===Lt.reconnectBot?fc(t,["botId","sendTest"])&&JI(t.botId)&&(t.sendTest===void 0||t.sendTest===!0)?null:"bot.reconnect requires a botId and optional sendTest=true.":n===Lt.deleteBot?fc(t,["botId","confirm"])&&JI(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Lt.setWorkspace?ei(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Lt.setAgentPreset?ti(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===Lt.setContextEnhancement?Za(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":n===Lt.setAccessPolicy?$a(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u8BBF\u95EE\u8BBE\u7F6E\u3002":n===Lt.approveSender?fc(t,["botId","requestId","confirm"])&&JI(t.botId)&&JI(t.requestId)&&t.confirm===!0?null:"bot.sender.approve requires botId, requestId, and confirm=true.":n===Lt.revokeSender?fc(t,["botId","senderKey","confirm"])&&JI(t.botId)&&JI(t.senderKey)&&t.confirm===!0?null:"bot.sender.revoke requires botId, senderKey, and confirm=true.":"Unknown DingTalk endpoint.":"Payload must be an object."}function iy(n){return{ok:!1,error:{code:"bad-request",message:n}}}function gu(){return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}}function qBe(){return{ok:!1,error:{code:"dingtalk-operation-failed",message:"\u9489\u9489\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}}function zBe(n){if(n?.name!=="DingtalkPublicConnectionError"||!oy(n.publicError))return null;let t=n.publicError,o=typeof t.code=="string"&&/^[a-z][a-z\d-]{1,79}$/.test(t.code)?t.code:null,i=typeof t.message=="string"&&t.message.trim()?t.message.trim().slice(0,240):null,e=typeof t.hint=="string"&&t.hint.trim()?t.hint.trim().slice(0,480):null,a=typeof t.referenceId=="string"&&/^DT-CONN-[A-F0-9]{8}$/.test(t.referenceId)?t.referenceId:null;return o&&i&&e&&a?{code:o,message:i,hint:e,referenceId:a}:null}function Wd(n){if(Array.isArray(n))return n.map(Wd);if(!oy(n))return n;let t={};for(let[o,i]of Object.entries(n))jBe.has(o)||(t[o]=Wd(i));return t}async function VBe(n){return YBe.toDataURL(n,{type:"image/png",errorCorrectionLevel:"M",margin:2,width:320})}async function BT(n,t){return!n||typeof n.verificationUrl!="string"?Wd(n):Wd({...n,qrCodeDataUrl:await t(n.verificationUrl)})}async function ls(n,t){let o=structuredClone(n);return o?.provisioning&&(o.provisioning=await BT(o.provisioning,t)),Wd(o)}function WBe(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 w3(n,{encodeQr:t=VBe}={}){WBe(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 gu();if(!S3.includes(e))return iy("Unknown DingTalk endpoint.");let r=JBe(e,a);if(r)return iy(r);try{let s;if(e===Lt.status)s=await ls(await n.status(),i);else if(e===Lt.beginProvisioning){let g=await n.startProvisioning({signal:A});if(A?.aborted)return await n.cancelProvisioning(g.attemptId),gu();s=await BT(g,i)}else if(e===Lt.pollProvisioning){let g=await n.registrationStatus(a.attemptId);if(!g)return iy("The provisioning attempt no longer exists.");s=await BT(g,i)}else if(e===Lt.cancelProvisioning){if(s=await n.cancelProvisioning(a.attemptId),!s)return iy("The provisioning attempt no longer exists.");s=Wd(s)}else if(e===Lt.bindCredentials)s=await ls(await n.bindCredentials(a),i);else if(e===Lt.reconnectBot){let g=await n.reconnectBot(a.botId);if(A?.aborted)return gu();let c;if(a.sendTest===!0)if(!g?.bots?.some(d=>d?.botId===a.botId&&d?.connected===!0)||typeof n.sendConnectionTest!="function")c=gr(fr("\u9489\u9489\u673A\u5668\u4EBA"));else try{await n.sendConnectionTest(a.botId),c=gr()}catch(d){c=gr(d)}s=await ls({...g,...c?{testMessage:c}:{}},i)}else if(e===Lt.deleteBot)s=await ls(await n.deleteBot(a.botId),i);else if(e===Lt.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");s=await ls(await n.updateWorkspace(a.botId,a.workspace),i)}else if(e===Lt.setContextEnhancement){if(typeof n.updateContextEnhancement!="function")throw new Error("Context enhancement update is unavailable");s=await n.updateContextEnhancement(a.botId,a.config,g=>ls(g,i))}else if(e===Lt.setAccessPolicy){if(typeof n.updateAccessPolicy!="function")throw new Error("Access policy update is unavailable");s=await n.updateAccessPolicy(a.botId,a.policy,g=>ls(g,i))}else if(e===Lt.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");s=await ls(await n.updateAgentPreset(a.botId,a.agentPreset),i)}else e===Lt.approveSender?s=await ls(await n.approveSender(a.botId,a.requestId),i):s=await ls(await n.revokeSender(a.botId,a.senderKey),i);return A?.aborted?gu():{ok:!0,value:s}}catch(s){let g=Ai(s),c=zBe(s);return A?.aborted?gu():g?{ok:!1,error:g}:c?{ok:!1,error:c}:qBe()}}}function ny(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(m3,w3(t,o),{authority:yr(i)})}async function D3(n,t={}){if(t?.controller)return ny(n,t.controller,t.rpcOptions,t.rpcAuthority);let o=await CT(n,t,t.internals),i=t.deliveryService&&o.deliveryAdapter?t.deliveryService.registerAdapter(o.deliveryAdapter):void 0,e=ny(n,o.controller,t.rpcOptions,t.rpcAuthority);return n.effect(()=>async()=>{await i?.(),await o.close()},"dsh-dingtalk: close bot connections"),e}import{createHash as ZBe}from"node:crypto";import{mkdir as XBe,readFile as $Be,rename as efe,unlink as Afe,writeFile as tfe}from"node:fs/promises";import{dirname as rfe}from"node:path";var fT=Object.freeze({version:1,bots:Object.freeze([])});function fg(n){return typeof n=="string"&&n.trim()?n.trim():null}function O3(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cu(n,{botPrefix:t,tokenRefPrefix:o}){let i=fg(n);if(!i)throw new TypeError("platformId is required");let e=ZBe("sha256").update(i).digest("hex").slice(0,24);return{botId:`${t}_${e}`,tokenRef:`${o}_${e.toUpperCase()}`}}function sy(n,t){let o=fg(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 Zd=class{#e;#A;#t;#r;#l;#o;#i;#a=fT;#n=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.#l=a,this.#o=new RegExp(`^${O3(i)}_[a-f0-9]{24}$`),this.#i=new RegExp(`^${O3(e)}_[A-F0-9]{24}$`)}async load(){try{let t=this.#d(JSON.parse(await $Be(this.#e,"utf8")));if(!t)throw new Error(`dsh-im ${this.#A} config contains invalid bot data`);this.#a=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#a=fT}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}getByPlatformId(t){let o=this.#a.bots.find(i=>i.platformId===t);return o?structuredClone(o):null}async save(t){let o=this.#s(t);if(!o)throw new Error(`Refusing to persist incomplete ${this.#A} bot data`);return this.#c(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.#o.test(t))throw new TypeError(`Invalid ${this.#A} bot id`);return this.#c(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.#n.then(async()=>{try{await Afe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#a=fT});this.#n=t.then(()=>{},()=>{}),await t}#s(t){if(!t||typeof t!="object")return null;let o=fg(t.platformId),i=fg(t.botId),e=fg(t.tokenRef),a=fg(t.name);if(!o||!i||!e||!a||!this.#o.test(i)||!this.#i.test(e))return null;let A=cu(o,{botPrefix:this.#t,tokenRefPrefix:this.#r});if(A.botId!==i||A.tokenRef!==e)return null;let r=this.#l(t);return!r||typeof r!="object"||Array.isArray(r)?null:Object.freeze({botId:i,platformId:o,tokenRef:e,name:a,username:fg(t.username),createdAt:fg(t.createdAt)??new Date().toISOString(),connectedAt:fg(t.connectedAt),...r})}#d(t){if(!t||t.version!==1||!Array.isArray(t.bots))return null;let o=t.bots.map(A=>this.#s(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#c(t){let o,i=this.#n.then(async()=>{let e=[...this.#a.bots];o=t(e);let a=Object.freeze({version:1,bots:Object.freeze(e)});await this.#g(a),this.#a=a});return this.#n=i.then(()=>{},()=>{}),await i,o}async#g(t){await XBe(rfe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await tfe(o,`${JSON.stringify(t,null,2)} -`,{encoding:"utf8",mode:384}),await efe(o,this.#e)}};var b3=Object.freeze({botPrefix:"discord",tokenRefPrefix:"DSH_DISCORD_BOT_TOKEN"});function M3(n){return cu(n,b3)}function _3(n){return sy(n,w("Discord\u673A\u5668\u4EBA"))}var gy=class extends Zd{constructor(t){super(t,{channel:"Discord",...b3})}};function Iu(n){return typeof n=="string"&&n.trim()?n.trim():null}function lu(n,t){return Object.freeze({code:n,message:t})}var Xd=class{#e;#A;#t;#r;#l;#o;#i;#a;#n;#s=new Map;#d=new Map;#c=new Map;#g=0;#I=!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.#l=a,this.#o=A,this.#i=r,this.#a=s,this.#n=g}async initialize(){if(this.#I)return this.status();for(let t of this.#t.list())await this.#B(t.botId,async()=>{if(this.#I||this.#s.get(t.botId)?.status?.ready)return;let o=await this.#u(t.tokenRef);if(!o){this.#d.set(t.botId,lu("missing-token",w("{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.#p(t,o),this.#d.delete(t.botId)}catch(i){this.#d.set(t.botId,lu("connection-failed",w("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002",{label:this.#e.label}))),this.#n.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.#I)throw new Error(`${this.#e.label} controller is closed`);let o=Iu(t);if(!o)throw new TypeError(`${this.#e.label} Bot Token is required`);let i=await this.#r(o),e=Iu(i?.platformId),a=Iu(i?.name);if(!e||!a)throw new Error(`${this.#e.label} returned an invalid bot identity`);let A=this.#l(e);return await this.#B(A.botId,async()=>{if(this.#I)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:Iu(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.#C(A.tokenRef,s),c}try{await this.#p(g,o),this.#d.delete(A.botId)}catch(c){this.#d.set(A.botId,lu("connection-failed",w("{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002",{label:this.#e.label}))),this.#n.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.#B(t,async()=>{let i=await this.#u(o.tokenRef);if(!i)throw new Error(`${this.#e.label} bot token is missing`);try{await this.#p(o,i),this.#d.delete(t)}catch(e){throw this.#d.set(t,lu("connection-failed",w("{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.#I)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.#B(t,async()=>{if(this.#I)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.#u(i.tokenRef);if(!e)throw new Error(`${this.#e.label} bot token is missing`);if(this.#I)throw new Error(`${this.#e.label} controller is closed`);let a=o(i),A=await this.#t.save(a);try{await this.#p(A,e),this.#d.delete(t)}catch(r){throw this.#d.set(t,lu("connection-failed",w("{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.#B(t,async()=>{let i=this.#s.get(t);if(!i?.status?.ready||typeof i.sendConnectionTest!="function"){let a=new Error(w("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw a.code="test-target-unavailable",a}let e=w("{name}\uFF08{id}\uFF09",{name:o.name,id:this.#o(o.platformId)});return await i.sendConnectionTest(Ua(e,w("{label}\u673A\u5668\u4EBA",{label:this.#e.label}))),{sent:!0}})}async sendProactiveText(t,o,i,e={}){if(!this.#t.get(t))throw new Error(`Unknown ${this.#e.label} bot`);return this.#B(t,async()=>{let A=this.#s.get(t);if(!A?.status?.ready||typeof A.sendProactiveText!="function"){let r=new Error(w("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw r.code="bot-not-connected",r}return A.sendProactiveText(o,i,e)})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(t,async()=>{let i=await this.#A.resolve(o.tokenRef).catch(()=>{});await this.#E(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.#p(o,i.value).catch(()=>{})),new Error(`Unable to remove the ${this.#e.label} bot safely.`,{cause:e})}await this.#a({botId:t,config:o}).catch(e=>{this.#n.warn?.(`[dsh-im:${this.#e.key}] bot ${t} state cleanup failed:`,e)}),this.#d.delete(t),this.#f()}),this.status()}status(){let t=this.#t.list().map(i=>{let e=this.#s.get(i.botId)?.status??null,a=e?.ready===!0&&e.connectionState==="connected"&&e.harnessReachable===!0,A=a?"connected":e?.connectionState==="connecting"?"connecting":this.#d.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.#o(i.platformId)},health:{status:a?"healthy":A==="error"?"error":"offline",summary:a?w("{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38",{label:this.#e.label,connectionLabel:w(this.#e.connectionLabel)}):A==="error"?w("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5",{label:this.#e.label}):w("{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:Aa(e?.lastMessageError),error:structuredClone(this.#d.get(i.botId)??null)}}),o=t.filter(i=>i.connected).length;return{schemaVersion:1,revision:this.#g,state:t.length===0?"disconnected":o===t.length?"connected":o>0?"degraded":"offline",bots:t,totals:{configured:t.length,connected:o}}}async close(){this.#I||(this.#I=!0,await Promise.allSettled([...this.#c.values()]),await Promise.allSettled([...this.#s.keys()].map(t=>this.#E(t))))}async#p(t,o){if(this.#I)throw new Error(`${this.#e.label} controller is closed`);if(await this.#E(t.botId),this.#I)throw new Error(`${this.#e.label} controller is closed`);let i=await this.#i({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.#s.set(t.botId,i);try{await i.start()}catch(e){throw await i.stop().catch(()=>{}),this.#s.delete(t.botId),e}}async#E(t){let o=this.#s.get(t);this.#s.delete(t),await o?.stop().catch(i=>{this.#n.warn?.(`[dsh-im:${this.#e.key}] bot ${t} failed to stop cleanly:`,i)})}async#u(t){let o=await this.#A.resolve(t).catch(()=>{});return Iu(o?.value)}async#C(t,o){o?.value?await this.#A.set(t,o.value).catch(()=>{}):await this.#A.unset(t).catch(()=>{})}#B(t,o){let a=(this.#c.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#c.get(t)===a&&this.#c.delete(t)});return this.#c.set(t,a),a}#f(){this.#g+=1}};import{createHash as afe}from"node:crypto";var ife="https://discord.com/api/v10/",ofe=12e4,nfe=new Set([50001,50013]),sfe=new Set([40005]);function ds(n){return typeof n=="string"&&n.trim()?n.trim():null}function T3(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}function QT(n){return n?.reason instanceof Error?n.reason:new DOMException("The operation was aborted","AbortError")}function gfe(n,t){if(!Number.isInteger(n)||n<1)throw new TypeError(`${t} must be a positive integer`);return n}function R3(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 cfe(n){let t=Number(n?.providerCode),o=Number(n?.status),i=ds(n?.message)??"",e="artifact-provider-rejected",a="Discord rejected the attachment.";o===401||o===403||nfe.has(t)?(e="artifact-permission-required",a="Discord denied permission to send the attachment."):o===413||sfe.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,R3(A,n)}function Ife(n){let t=new Error("Discord attachment delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",R3(t,n)}function lfe(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 sa(n,t){let o=ds(n);if(!o||!/^\d{5,30}$/.test(o))throw new TypeError(`Invalid Discord ${t}`);return o}function N3(n){let t=ds(n);if(!t)throw new TypeError("A Discord reaction emoji is required");return t}function dfe(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{20,}$/.test(n.trim())}var du=class{#e;#A;#t;#r;constructor({token:t,fetchImpl:o=fetch,baseUrl:i=ife,fileUploadTimeoutMs:e=ofe}){if(!dfe(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=gfe(e,"fileUploadTimeoutMs")}getCurrentUser(t={}){return this.#l("users/@me",{...t,method:"GET"})}getGatewayBot(t={}){return this.#l("gateway/bot",{...t,method:"GET"})}getChannel({channelId:t,signal:o}={}){return this.#l(`channels/${sa(t,"channel id")}`,{method:"GET",signal:o})}getMessage({channelId:t,messageId:o,signal:i}={}){return this.#l(`channels/${sa(t,"channel id")}/messages/${sa(o,"message id")}`,{method:"GET",signal:i})}startThreadFromMessage({channelId:t,messageId:o,name:i,signal:e}={}){let a=ds(i);if(!a||[...a].length>100)throw new TypeError("Discord thread name must contain 1-100 characters");if(e?.aborted)throw QT(e);return this.#l(`channels/${sa(t,"channel id")}/messages/${sa(o,"message id")}/threads`,{method:"POST",signal:e,body:{name:a}})}createMessage({channelId:t,content:o,replyToMessageId:i,signal:e}){return this.#l(`channels/${sa(t,"channel id")}/messages`,{method:"POST",signal:e,body:{content:o,allowed_mentions:{parse:[],replied_user:!1},...i?{message_reference:{message_id:sa(i,"message id"),channel_id:sa(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=ds(o.deliveryKey)??ds(o.artifactId),A=a?afe("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:sa(i,"message id"),channel_id:sa(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=sa(t,"channel id");if(e?.aborted)throw QT(e);let g=T3(e,this.#r);try{return await this.#l(`channels/${s}/messages`,{method:"POST",signal:g,timeoutMs:this.#r,body:r,multipart:!0})}catch(c){throw e?.aborted?QT(e):c?.code?.startsWith?.("discord-")?cfe(c):Ife(c)}}editMessage({channelId:t,messageId:o,content:i,signal:e}){return this.#l(`channels/${sa(t,"channel id")}/messages/${sa(o,"message id")}`,{method:"PATCH",signal:e,body:{content:i,allowed_mentions:{parse:[],replied_user:!1}}})}sendTyping({channelId:t,signal:o}){return this.#l(`channels/${sa(t,"channel id")}/typing`,{method:"POST",signal:o,expectBody:!1})}async addOwnReaction({channelId:t,messageId:o,emoji:i,signal:e}={}){let a=N3(i);return await this.#l(`channels/${sa(t,"channel id")}/messages/${sa(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=N3(i);return this.#l(`channels/${sa(t,"channel id")}/messages/${sa(o,"message id")}/reactions/${encodeURIComponent(a)}/@me`,{method:"DELETE",signal:e,expectBody:!1,retry:!1})}async#l(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:T3(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 lfe(I,e),this.#l(t,{method:o,body:i,signal:e,timeoutMs:a,expectBody:A,retry:!1,multipart:s})}if(!g.ok){let I=new Error(ds(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 k3(n,t={}){let i=await new du({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:ds(i.global_name)??ds(i.username)??w("Discord\u673A\u5668\u4EBA"),username:ds(i.username)}}var pfe=Object.freeze({success(){},error(){},clear(){},settled:()=>Promise.resolve()});function v3(n,t){!n||typeof n!="object"||(n[t]=(n[t]??0)+1)}async function hfe(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 cy({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 pfe;let r=null,s=!1,g=async(B,f)=>{try{let Q=await hfe(f,A);return v3(i,B==="add"?"reactionsAdded":"reactionsRemoved"),{ok:!0,value:Q}}catch(Q){return v3(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 P3="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",Efe="\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002";function pi(n){return typeof n=="string"?n.trim():""}function ufe(n,t,o){return t.actor===o&&(n.kind!=="group"||n.addressed===!0)&&!Nt(n)&&!Dt(n)&&!!pi(n.content)}function Cfe(n,t,o){let i=String(n??w("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim().slice(0,255)||w("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return w("\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"?w("\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"?w("\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"?w("\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}):w("\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 w("\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 w("\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 w("\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 w("\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 w("\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 w("\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 so(){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}var ps=class{#e;#A;#t;#r;#l;#o;#i;#a;#n;#s;#d=new Map;#c=new Map;#g=new Map;#I=new Map;#p=new Set;#E=new Set;#u;#C=new Ri;constructor({descriptor:t,bot:o,harness:i,state:e,contextEnhancement:a,accessPolicy:A,status:r=so(),logger:s=console,replyTimeoutMs:g=6e5,signal:c}){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.#l=a,this.#o=A,this.#i=r,this.#a=s,this.#n=g,this.#s=c,this.#u=new bi({label:t.key,logger:s})}get status(){return structuredClone(this.#i)}accept(t,{contextSnapshot:o,accessDecision:i}={}){if(this.#s?.aborted)return Promise.resolve();let e=pi(t?.conversationId),a=t?.kind==="group"?"group":"direct",A={...t,kind:a,conversationId:e},r=pi(A.messageId),s=pi(A.senderId);if(!r||!s||!e||A.senderIsBot===!0||this.#r.hasSeen(r)||this.#I.has(r))return Promise.resolve();if(a==="group"&&A.addressed!==!0)return this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString(),this.#I.set(r,null),this.#f(A,r,null);if(this.#o||i){let I=Nt(A),d=Dt(A),B=i??Oa(this.#o,{conversationType:a,senderIds:[s,pi(A.senderAlternateId)].filter(Boolean),text:A.content,hasImages:I,hasFiles:d});if(!B.allowed)return this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString(),this.#I.set(r,null),this.#f(A,r,B.reason==="command-not-allowed"?w(no):null,{recordReceived:B.reason==="command-not-allowed"})}this.#I.set(r,o===void 0?aa(this.#l,t?.kind):o);let g=cy({adapter:this.#A,target:A.kind==="direct"||A.addressed===!0?A.reactionTarget:null,reactions:this.#e.reactions,status:this.#i,logger:this.#a,label:this.#e.key});A.statusReaction=g;let c=this.#B(A,r,s);return c.then(()=>g.success(),()=>g.error()),c}#B(t,o,i){t.kind==="direct"&&Do(this.#r,t.connectionTestTarget??t.replyTarget);let e=`${t.kind}:${t.conversationId}`,a=this.#c.get(e),A=pi(t.content),r=ki(A);if(r&&t.kind==="group"&&t.addressed===!0)return this.#f(t,o,ns());if(r&&t.kind==="direct"){if(/^\/batch$/iu.test(A)&&(this.#d.has(e)||a||this.#u.hasPending(e)))return this.#f(t,o,ko());let d=this.#C.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!Nt(t)&&!Dt(t)&&!Hr(t)});if(d.handled)return d.kind==="submit"?this.#Q({...t,content:d.prompt,batchSubmission:{token:d.token}},o,i,e):this.#f(t,o,d.message)}else if(t.kind==="direct"&&this.#C.status(e).phase==="collecting"){let I=this.#C.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!Nt(t)&&!Dt(t)&&!Hr(t)});if(I.handled)return this.#f(t,o,I.message)}let g=t.kind==="direct"&&this.#C.status(e).phase==="collecting"?null:Ka(A)?ao:Dt(t)?null:ci(A)?Ti:Ii(A)?io:li(A)?Ni:null;if(g&&(t.kind!=="group"||t.addressed===!0)){let I;return I=this.#S(t,o,e,g).finally(()=>{this.#I.delete(o),this.#E.delete(I)}),this.#E.add(I),I}let c=this.#u.claimReply({key:e,actor:i,messageId:o,text:Nt(t)||Dt(t)?"":t.content,addressed:t.kind!=="group"||t.addressed===!0,hasPendingQuestion:!!a,questionCompletion:a?.submitting||a?.claimedReplyMessageId?a.queue:null,isQuestionPending:()=>this.#c.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.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString(),!0)).finally(()=>{this.#I.delete(o),this.#p.delete(I)}),this.#p.add(I),I}if(a&&a.actor!==i)return this.#Q(t,o,i,e);if(a?.submitting||a?.claimedReplyMessageId)return this.#Q(t,o,i,e);if(a){ufe(t,a,i)&&(a.claimedReplyMessageId=o);let d=(a.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#b(t,o,i,e,a)).finally(()=>{this.#I.delete(o),a.claimedReplyMessageId===o&&(a.claimedReplyMessageId=null),a.queue===d&&(a.queue=null)});return a.queue=d,d}return this.#Q(t,o,i,e)}#f(t,o,i,{recordReceived:e=!0}={}){let a;return a=(async()=>{this.#r.hasSeen(o)||(await this.#r.markSeen(o),e&&(this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()),i&&await this.#A.sendText(t.replyTarget,i),this.#i.lastError=null)})().catch(async A=>{if(this.#s?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a batch input message [${r.referenceId}]:`,A)}).finally(()=>{this.#I.delete(o),this.#E.delete(a)}),this.#E.add(a),a}#Q(t,o,i,e,{releaseMessageId:a=!0,alreadyRecorded:A=!1}={}){let s=(this.#d.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#y(t,o,i,e,{alreadyRecorded:A})).finally(()=>{a&&this.#I.delete(o),this.#d.get(e)===s&&this.#d.delete(e)});return this.#d.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#d.values(),...[...this.#c.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#p,...this.#E])}async#S(t,o,i,e){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString();let a=t.replyTarget;try{let A=await e(pi(t.content),this.#t,this.#r,i,{signal:this.#s,isDirect:t.kind==="direct",hasImages:Nt(t),hasFiles:Dt(t),pendingInteraction:this.#c.has(i)||this.#u.hasPending(i),control:{owner:this,key:i}});A?.stopped&&await Promise.allSettled([this.#P(i),this.#u.closeRoute(i)]);for(let r of A?.messages??[A?.message])r&&await this.#A.sendText(a,r);this.#i.lastError=null}catch(A){if(A?.code==="turn-stopped"||this.#s?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a command [${r.referenceId}]:`,A),await this.#A.sendText(a,ut(r)).catch(()=>{})}}sendConnectionTest(t){return lc({state:this.#r,text:t,channelLabel:w("{label}\u673A\u5668\u4EBA",{label:this.#e.label}),send:(o,i)=>this.#A.sendText(o,i)})}sendProactiveText(t,o,{signal:i}={}){return i?.throwIfAborted(),this.#A.sendText(t,o)}async#m(t,o,i=[],e){let a=await Go({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)=>rt(this.#i,r,{userMessage:Cfe(A?.fileName,r,this.#e),reason:r?.code}),sendFailureNotice:(A,r,s)=>this.#A.sendText(t,ut(s)),logger:this.#a});return this.#i.artifactsSent=(this.#i.artifactsSent??0)+a.artifactsSent,this.#i.artifactSendErrors=(this.#i.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.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()}let A=t.replyTarget,r=pi(t.content),s=t.batchSubmission,g=null,c=!1;try{if(this.#s?.throwIfAborted(),t.kind==="group"&&t.addressed!==!0){this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString();return}let I=Nt(t),d=Dt(t),B=Hr(t);if(!r&&!I&&!d&&!B){await this.#A.sendText(A,w("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"));return}let f=r.toLowerCase();if(!I&&!d&&f==="/help"){await this.#A.sendText(A,[w("{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002",{label:this.#e.label}),"",w("\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002"),w("/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD"),w("/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587"),w("/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09"),w("/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A"),w("/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"),w("/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D"),w("/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898"),w("/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD"),w("/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD"),w("/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B"),w("/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7"),w("/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7"),w("/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B"),w("\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]"),w("/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset"),w("/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset"),w("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),w("/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"),w("/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1"),w("/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1"),w("/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09"),w("/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21"),w("/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21"),w("/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001"),w("/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C"),w("/help \u663E\u793A\u672C\u5E2E\u52A9")].join(` -`));return}if(!I&&!d&&f==="/status"){await this.#t.ensureRunning({signal:this.#s}),await this.#A.sendText(A,w("{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002",{label:this.#e.label}));return}let Q=!I&&!d?await To(r,this.#t,e):null;if(Q){for(let N of Q.messages??[Q.message])await this.#A.sendText(A,N);return}if(!I&&!d&&f==="/new"){await this.#r.clearSession(e),await this.#A.sendText(A,w("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"));return}let y=!I&&!d?await _i(r,this.#t,this.#r,e,{signal:this.#s}):null;if(y){await this.#A.sendText(A,y.message);return}await this.#A.sendTyping?.(A).catch(N=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] typing indicator failed:`,N)});let m=!1;if(typeof this.#A.openDeliveryStream=="function")try{g=await this.#A.openDeliveryStream(A),c=!0}catch(N){this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to start a semantic reply stream; using final delivery:`,N)}else if(typeof this.#A.openStream=="function")try{g=await this.#A.openStream(A)}catch(N){this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to start a streamed reply; using text:`,N)}let T=I||B?await Fo(t,{signal:this.#s}):void 0,_=this.#I.get(o),R=!1;if(_){let N=T??r,k=t.contextSource?.();T=Ro(N,_,()=>({channel:this.#e.key,senderId:i,senderName:k?.senderName,conversationTitle:k?.conversationTitle,chatId:k?.chatId??t.conversationId,threadId:k?.threadId})),R=T!==N}let{answer:H,artifacts:F=[]}=await Mi({harness:this.#t,state:this.#r,key:e,text:r,content:T,contextEnhanced:R,createOptions:this.#s?{signal:this.#s}:void 0,existsOptions:this.#s?{signal:this.#s}:void 0,askOptions:{timeoutMs:this.#n,signal:this.#s,control:{owner:this,key:e},onUpdate:g?async N=>{let k=N.type==="text"?N.text:N.type==="tool"?w("\u6B63\u5728\u4F7F\u7528{name}\u2026",{name:N.name}):N.text;if(k){let J=N.type==="text"?"markdown":"plain";await g.update(c?gs(k,J):k)}}:void 0,onInteraction:N=>this.#h(N,{key:e,actor:i,target:A,requiresMention:t.kind==="group"&&t.requiresMention!==!1}),onInteractionResolved:N=>this.#R(N),files:t.files}});s&&this.#C.complete(e,s.token);let L=!pi(H)&&F.length>0,q=L?w(Efe):H,z=L?"plain":"markdown",K=null,G=null;if(g)try{let N=await g.finish(c?gs(q,z):q);m=!0,G=$t({deliveryId:o,presentation:N?.presentation??g.presentation??`${this.#e.key}-stream`,providerMessageIds:[...Ur(g),...Ur(N)],deliveryOutcome:N?.deliveryOutcome,reason:N?.reason})}catch(N){g.cancel?.(),this.#a.warn?.(`[dsh-im:${this.#e.key}] streamed reply finalization failed; using text:`,N)}if(!m)try{let N=typeof this.#A.sendDelivery=="function"?await this.#A.sendDelivery(A,gs(q,z)):await this.#A.sendText(A,q);G=$t({deliveryId:o,presentation:N?.presentation??`${this.#e.key}-text`,providerMessageIds:Ur(N),deliveryOutcome:N?.deliveryOutcome,reason:N?.reason})}catch(N){K=Ha(N)}let V=G?.deliveryOutcome==="unknown";G?.deliveryOutcome==="failed"?K=Ha(new Error(`Final text delivery failed (${G.reason??"unknown"})`),{uncertain:!1}):V&&(K=Ha(new Error(`Final text delivery outcome is unknown (${G.reason??"unknown"})`)));let U=await this.#m(A,o,F,G);if(K&&(!U.userVisible||V))throw K.deliveryReceipt=U.receipt,K;return K&&U.artifactSendErrors===0&&rt(this.#i,K),U.userVisible&&(this.#i.messagesReplied+=1,this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!K&&U.artifactSendErrors===0&&Oo(this.#i)),U.receipt}catch(I){let d=I?.code==="turn-stopped";s&&d&&this.#C.complete(e,s.token);let B=s&&!d?this.#C.fail(e,s.token):null;if(d){if(t.statusReaction?.clear(),g)try{await g.finish(w("\u5DF2\u505C\u6B62\u3002"))}catch{g.cancel?.()}return}if(this.#s?.aborted){t.statusReaction?.clear(),g?.cancel?.();return}t.statusReaction?.error(),this.#i.lastError=I?.message??String(I);let f=async _=>{let R=typeof g?.fail=="function"?"fail":typeof g?.finish=="function"?"finish":null;if(!R)return!1;try{let H=await g[R](_);return R==="fail"?!!H&&H.deliveryOutcome!=="failed":H!==!1&&H?.deliveryOutcome!=="failed"}catch(H){return this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to finalize the failed stream:`,H),!1}},Q=_o(I),y=Po(I),m=rt(this.#i,I,{userMessage:y??Q,reason:ro(I)?.reason}),T=B?.retained?`${ut(m)} +${L}`:q;m&&await y.finish(z)||await this.#L(g,z,this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send the safe error reply")}}finally{await this.#J(e),await this.#f.closeRoute(e)}}async#N(t,o,a,e,i,A){this.#l?.throwIfAborted();let r=this.#h.get(e),s=i.claimedReplyMessageId===o;if(!r||r!==i||r.submitting)return s&&(!r||r!==i)?this.#R(t,o):this.#b(t,o,a,e,{releaseMessageId:!1,statusReaction:A});if(this.#I.hasSeen(o))return;if(await this.#I.markSeen(o),Kr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString(),String(t.conversationType)==="2"&&t.isInAtList!==!0){Kr(this.#i,"messagesIgnored");return}let g;try{g=Cc(t.sessionWebhook)}catch{Kr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString(),this.#i.lastError=w("\u9489\u9489\u6D88\u606F\u6CA1\u6709\u5B89\u5168\u7684\u56DE\u590D\u5730\u5740\u3002");return}let c=t?.msgtype==="text"?ZA(t?.text?.content):null;if(!c){try{await this.#L(g,w("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to reject a non-text interaction reply")}return}let I=this.#h.get(e);if(!I||I!==i||I.submitting){if(s&&(!I||I!==i)){try{await this.#L(g,w(cT),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}return}return this.#b(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0,statusReaction:A})}if(I.sessionWebhook=g,I.needsPresentation){try{await this.#G(I)}catch{this.#y(A,"error"),this.#i.lastError=w("\u9489\u9489\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002"),this.#a.error?.("[dsh-dingtalk] failed to retry an interaction question"),I.interaction.reconnect?.()}return}let p=I.questions[I.index];if(p){if(I.answers.push(Ma(p,c)),I.index+=1,I.indexthis.#L(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=>!ba(c))){this.#a.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.#L(e,w("\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.#a.error?.("[dsh-dingtalk] failed to send an interaction recovery notice")}return}let s=this.#h.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#G(s);return}if(this.#d.has(r))return;if(s){this.#a.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:a,requiresMention:i,questions:A,answers:[],index:0,sessionWebhook:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0};this.#h.set(o,g),this.#d.set(g.interactionId,o),await this.#G(g)}async#_(t){if(await this.#f.handleResolved(t))return;let o=t?.interactionId;if(t?.kind!=="question"||typeof o!="string")return;let a=this.#d.get(o);a&&this.#K(a,o)}async#G(t){let o=t.questions[t.index];o&&(await this.#L(t.sessionWebhook,Ia(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1)}async#R(t,o){if(this.#I.hasSeen(o))return;await this.#I.markSeen(o),Kr(this.#i,"messagesReceived"),this.#i.lastMessageAt=new Date().toISOString();let a;try{a=Cc(t.sessionWebhook)}catch{Kr(this.#i,"messagesRejected"),this.#i.lastRejectedAt=new Date().toISOString();return}try{await this.#L(a,w(cT),this.#F(t))}catch{this.#a.error?.("[dsh-dingtalk] failed to send an expired interaction notice")}}#x(t,o){let a=this.#h.get(t);return!a||o!==void 0&&a.interactionId!==o?null:(this.#h.delete(t),this.#d.delete(a.interactionId),a)}#K(t,o){return this.#x(t,o)!==null}async#J(t){let o=this.#x(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(a){a?.code!=="interaction-not-pending"&&this.#a.warn?.("[dsh-dingtalk] failed to cancel a pending Harness interaction")}}#U(){typeof this.#I.pendingSenders=="function"&&(this.#i.pendingSenders=this.#I.pendingSenders())}#F(t){let o=X1(t);return String(t?.conversationType)==="2"&&o?{atUserIds:[o]}:void 0}async#L(t,o,a){let e=[];for(let i of fY(o,this.#g)){this.#l?.throwIfAborted();let A=await this.#e.sendText({clientId:this.#A,clientSecret:this.#t,sessionWebhook:t,text:i,at:a,signal:this.#l});e.push(...Ur(A))}return e}async#V(t,o,a,e,i){let A=async(s,g)=>ICe(await this.#e[s]({clientId:this.#A,clientSecret:this.#t,target:t,file:g,signal:this.#l})),r=await Lo({artifacts:e,baseReceipt:i,deliveryId:a,aggregatePresentation:i?"dingtalk-text-and-files":"dingtalk-files",channelKey:"dingtalk",signal:this.#l,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)=>rt(this.#i,g,{userMessage:CCe(s?.fileName,g),reason:g?.code}),sendFailureNotice:(s,g,c)=>this.#L(o,ut(c)),logger:this.#a});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 ty(n){return typeof n=="string"&&n.trim()?n.trim():null}function r3(n){let t=Array.isArray(n?.approvedSenders)?n.approvedSenders:n?.approvedSenders instanceof Set?[...n.approvedSenders]:[];return new Set(t.map(o=>ty(typeof o=="string"?o:o?.staffId)).filter(Boolean))}function yCe(n){return r3(n).size}function i3(n){return n?.connected===!0||n?.socket?.readyState===1}function mCe(n,t){return new Promise((o,a)=>{if(t.aborted){a(t.reason);return}let e=()=>a(t.reason);t.addEventListener("abort",e,{once:!0}),Promise.resolve(n).then(i=>{t.removeEventListener("abort",e),o(i)},i=>{t.removeEventListener("abort",e),a(i)})})}async function SCe(n,t,o){for(;;){if(o?.throwIfAborted(),i3(n))return;await new Promise((a,e)=>{let i=setTimeout(()=>{o?.removeEventListener("abort",A),a()},t),A=()=>{clearTimeout(i),e(o.reason??new DOMException("Aborted","AbortError"))};o?.addEventListener("abort",A,{once:!0})})}}async function wCe(n,t,o,a){let e=AbortSignal.timeout(t),i=AbortSignal.any([a,e]),A=!1,r=Promise.resolve().then(()=>n.connect()).finally(()=>{A=!0});try{await mCe(r,i),await SCe(n,o,i)}catch(s){throw i.aborted?(A||r.then(()=>n.disconnect()).catch(()=>{}),a.aborted?a.reason:new Error(`DingTalk Stream handshake timed out after ${t}ms`)):s}}async function DCe({clientId:n,clientSecret:t}){let{DWClient:o,TOPIC_ROBOT:a}=await import("dingtalk-stream");return{client:new o({clientId:n,clientSecret:t,endpoint:"https://api.dingtalk.com",autoReconnect:!1,keepAlive:!0,debug:!1}),topic:a}}function OCe({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,...lT({pendingSenders:n})}}var nu=class{#e;#A;#t;#r;#I;#o;#c;#i;#a;#s;#p;#g;#l;#n;#h=null;#d=null;#C=null;#u=null;#B=null;#f=null;#m=new Set;constructor({config:t,clientSecret:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,logger:r=console,replyTimeoutMs:s=6e5,maxMessageChars:g=4e3,connectTimeoutMs:c=15e3,connectPollIntervalMs:I=25,api:p=QY(),streamFactory:B=DCe}){if(!t||!ty(t.clientId)||!ty(o))throw new TypeError("DingtalkRuntime requires app credentials");if(!a||!e)throw new TypeError("DingtalkRuntime requires Harness and state");if(typeof B!="function")throw new TypeError("streamFactory must be a function");this.#e=t,this.#A=o.trim(),this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#c=r,this.#i=s,this.#a=g,this.#s=c,this.#p=I,this.#g=p,this.#l=B,this.#n=OCe({pendingSenders:this.#Q(),approvedSenders:yCe(t)})}get status(){if(this.#d){let t=this.#d.status;Object.assign(this.#n,t)}else this.#n.pendingSenders=this.#Q();return structuredClone(this.#n)}pendingSender(t){return typeof this.#r.pendingSender=="function"?this.#r.pendingSender(t):null}pendingSenders(){return this.#Q()}async start(){return this.#h&&this.#n.ready?this.status:this.#u?this.#u:(this.#u=this.#w().finally(()=>{this.#u=null}),this.#u)}async#w(){await this.stop();let t=new AbortController;this.#f=t;let{signal:o}=t;this.#n.startedAt=new Date().toISOString(),this.#n.dingtalkStreamState="connecting",this.#n.lastError=null;let a="dingtalk-harness-connect-failed";try{if(await this.#t.ensureRunning({signal:o}),this.#n.harnessReachable=!0,a="dingtalk-runtime-prepare-failed",typeof this.#r.removePendingSenderByStaffId=="function"){for(let r of r3(this.#e))await this.#r.removePendingSenderByStaffId(r);this.#n.pendingSenders=this.#Q()}this.#d=new Ay({api:this.#g,clientId:this.#e.clientId,clientSecret:this.#A,approvedSenders:this.#e.approvedSenders,harness:this.#t,state:this.#r,contextEnhancement:this.#I,accessPolicy:this.#o,status:this.#n,logger:this.#c,replyTimeoutMs:this.#i,maxMessageChars:this.#a,signal:o}),a="dingtalk-stream-client-load-failed";let e=await this.#l({clientId:this.#e.clientId,clientSecret:this.#A});if(o.throwIfAborted(),this.#h=e?.client??e,this.#C=e?.topic??e?.TOPIC_ROBOT??"/v1.0/im/bot/messages/get",!this.#h||typeof this.#h.registerCallbackListener!="function"||typeof this.#h.connect!="function"||typeof this.#h.disconnect!="function"||typeof this.#h.socketCallBackResponse!="function")throw new TypeError("streamFactory returned an invalid DingTalk Stream client");let i=this.#h,A=this.#d;return a="dingtalk-stream-listener-failed",i.registerCallbackListener(this.#C,r=>{if(this.#h!==i||this.#d!==A)return;let s=ty(r?.headers?.messageId);if(s)try{i.socketCallBackResponse(s,{success:!0})}catch{this.#c.warn?.("[dsh-dingtalk] unable to acknowledge an inbound callback")}let g=this.#I,c;try{c=g?.getSettings?.()}catch{}let I=Promise.resolve().then(async()=>{if(this.#d!==A)return;let p;try{p=typeof r?.data=="string"?JSON.parse(r.data):r?.data}catch{this.#n.lastError=w("\u9489\u9489\u6D88\u606F\u683C\u5F0F\u65E0\u6548\u3002"),this.#c.warn?.("[dsh-dingtalk] ignored an invalid callback payload");return}if(!p||typeof p!="object")return;this.#n.lastCallbackAt=Date.now();let B=ai({getSettings:()=>c,get botId(){return g?.botId}},p.conversationType==="1"||p.conversationType===1?"direct":p.conversationType==="2"||p.conversationType===2?"group":null);await A.accept(p,{contextSnapshot:B})}).catch(()=>{o.aborted||this.#d!==A||(this.#n.lastError=w("\u9489\u9489\u6D88\u606F\u5904\u7406\u5931\u8D25\u3002"),this.#c.error?.("[dsh-dingtalk] callback processing failed"))}).finally(()=>this.#m.delete(I));this.#m.add(I)}),a="dingtalk-stream-connect-failed",await wCe(i,this.#s,this.#p,o),this.#n.ready=!0,this.#n.dingtalkStreamState="connected",this.#n.lastConnectedAt=Date.now(),this.#n.lastCheckedAt=Date.now(),this.#n.lastError=null,this.#B=setInterval(()=>{let r=i3(i);this.#n.ready=r,this.#n.dingtalkStreamState=r?"connected":"reconnecting",this.#n.lastCheckedAt=Date.now(),r&&(this.#n.lastError=null)},1e3),this.#B.unref?.(),this.status}catch(e){let i=o.aborted,A=i?e:vp(a,e);throw this.#n.ready=!1,this.#n.dingtalkStreamState=i?"idle":"failed",this.#n.lastError=i?null:A?.message??String(A),await this.stop({preserveError:!i}),A}}async stop({preserveError:t=!1}={}){let o=t?this.#n.lastError:null,a=this.#f;this.#f=null,a?.abort(new DOMException("DingTalk runtime stopped","AbortError")),this.#B&&clearInterval(this.#B),this.#B=null,this.#n.ready=!1;let e=this.#h;if(this.#h=null,this.#C=null,e)try{await e.disconnect()}catch{this.#c.warn?.("[dsh-dingtalk] DingTalk Stream disconnect failed")}return await Promise.allSettled([...this.#m]),this.#m.clear(),this.#d&&await this.#d.waitForIdle(),this.#d=null,this.#n.dingtalkStreamState=t?"failed":"idle",this.#n.lastError=o,this.status}async sendConnectionTest(t){return Ec({state:this.#r,text:t,channelLabel:w("\u9489\u9489\u673A\u5668\u4EBA"),send:async({sessionWebhook:o},a)=>{if(!this.#n.ready||!this.#f)throw new Error("DingTalk runtime is not connected");await this.#g.sendText({clientId:this.#e.clientId,clientSecret:this.#A,sessionWebhook:o,text:a,signal:this.#f.signal})}})}async sendProactiveText(t,o,{signal:a}={}){let e=typeof t?.route?.userId=="string"?t.route.userId.trim():"",i=typeof t?.route?.openConversationId=="string"?t.route.openConversationId.trim():"";if(t?.kind==="user"&&(!e||i)||t?.kind==="group"&&(!i||e)||t?.kind!=="user"&&t?.kind!=="group"){let A=new TypeError("Invalid DingTalk proactive delivery target");throw A.code="invalid-target",A}if(!this.#n.ready||!this.#f){let A=new Error("DingTalk runtime is not connected");throw A.code="bot-not-connected",A}a?.throwIfAborted();try{await this.#g.sendRobotText({clientId:this.#e.clientId,clientSecret:this.#A,target:{type:t.kind,robotCode:this.#e.clientId,...t.kind==="user"?{userId:e}:{openConversationId:i}},text:o,signal:a??this.#f.signal})}catch(A){if(A?.code!=="send-rejected")throw A;let r=new Error("DingTalk rejected the proactive delivery target",{cause:A});throw r.code="target-rejected",r}return{sent:!0}}#Q(){return typeof this.#r.pendingSenders=="function"?this.#r.pendingSenders():[]}};import{spawn as GCe}from"node:child_process";import{randomUUID as pT}from"node:crypto";import{isAbsolute as FCe}from"node:path";import{isAbsolute as bCe}from"node:path";var MCe=256,_Ce=/[\p{White_Space}\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,TCe=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u;function su(n,t){let o=new Error(t);return o.code=n,o}function NCe(n){if(typeof n!="string"||!n||n.length>MCe||_Ce.test(n))throw su("session-id-invalid","A non-empty, safe session id is required");return n}function RCe(n,t){if(!Array.isArray(t?.items)||!Array.isArray(t?.archivedSessionIds)||t.archivedSessionIds.some(a=>typeof a!="string"||!a))throw new Error("Harness returned an invalid response for workspace.list");let o=[];for(let a of t.items){if(typeof a?.workspaceId!="string"||!a.workspaceId||typeof a.path!="string"||!bCe(a.path)||!Array.isArray(a.sessionIds)||a.sessionIds.some(e=>typeof e!="string"||!e))throw new Error("Harness returned an invalid response for workspace.list");for(let e of a.sessionIds)e===n&&o.push(a)}if(o.length===0)throw su("session-not-registered","The session is not registered to a Harness workspace");if(o.length!==1)throw su("session-workspace-ambiguous","The session is registered to more than one Harness workspace");if(TCe.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 kCe(n,t){if(!Array.isArray(t?.items)||t.items.some(i=>typeof i?.sessionId!="string"||!i.sessionId))throw new Error("Harness returned an invalid response for session.list");let o=t.items.filter(i=>i.sessionId===n);if(o.length===0)throw su("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[a]=o;if(a.origin==="subagent")throw su("session-subagent-unsupported","Subagent sessions cannot be adopted as a bot conversation");if(a.origin!==void 0)throw new Error("Harness returned an invalid session origin for session.list");let e=a.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 a3(n,t,o={},a=3e4){let e=NCe(t);await n.ensureRunning(o);let i=await n.rpc("workspace.list",{},a,o),{workspace:A,archived:r}=RCe(e,i),s=kCe(e,await n.rpc("session.list",{},a,o)),g=await n.rpc("session.create",{workspaceId:A.workspaceId,sessionId:e},a,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 gu(n,t,o){try{let a=n?.(t);a&&typeof a.then=="function"&&Promise.resolve(a).catch(o)}catch(a){o(a)}}async function vCe({apiProxy:n,rpcId:t,signal:o,onOpen:a,onEnvelope:e}){let i=new AbortController,A=()=>i.abort(o.reason),r,s,g,c=I=>{i.signal.aborted||(g=I,A())};o.addEventListener("abort",A,{once:!0});try{for(r=n.events.mux({rpcId:t,payload:{}},i.signal)[Symbol.asyncIterator](),s=Promise.resolve(r.next()),i.signal.aborted||gu(a,A,c);!i.signal.aborted;){let{value:I,done:p}=await s;if(p||i.signal.aborted)break;gu(e,{type:"server-request",rpcId:I?.rpcId,method:I?.payload?.type,payload:I?.payload},c),i.signal.aborted||(s=Promise.resolve(r.next()))}}catch(I){c(I)}finally{let I=i.signal.aborted;o.removeEventListener("abort",A),A(),await s?.catch(()=>{});try{await r?.return?.()}catch(p){I||(g??=p)}}if(g)throw g}function PCe({baseUrl:n,createWebSocket:t,signal:o,onOpen:a,onEnvelope:e,onMalformed:i}){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,p=_=>{if(!I){I=!0,g.removeEventListener("open",f),g.removeEventListener("message",Q),g.removeEventListener("close",y),g.removeEventListener("error",m),o.removeEventListener("abort",T);try{(g.readyState===0||g.readyState===1)&&g.close()}catch{}_&&!o.aborted?s(_):r()}},B=()=>p(),f=()=>{I||c||(c=!0,gu(a,B,p))},Q=_=>{if(I)return;let R;try{if(typeof _.data!="string")throw new Error("binary WebSocket frame");R=JSON.parse(_.data)}catch(L){gu(i,L,()=>{});return}gu(e,R,p)},y=()=>p(c?void 0:new Error("Harness event mux WebSocket closed before opening")),m=()=>p(new Error(c?"Harness event mux WebSocket failed":"Harness event mux WebSocket failed before opening")),T=()=>p();g.addEventListener("open",f),g.addEventListener("message",Q),g.addEventListener("close",y,{once:!0}),g.addEventListener("error",m,{once:!0}),o.addEventListener("abort",T,{once:!0}),o.aborted&&T()})}async function o3(n){if(!n.signal.aborted)return n.baseUrl!==void 0&&n.baseUrl!==null?PCe(n):vCe(n)}var LCe=new Map,UCe=new WeakMap,HCe=64;async function KCe(n){let t=n?.body;if(!t||typeof t.getReader!="function")return null;let o=t.getReader(),a=[],e=0;try{for(;;){let{done:r,value:s}=await o.read();if(r)break;if(!(s instanceof Uint8Array)||e+s.byteLength>HCe)return null;a.push(s),e+=s.byteLength}}catch{return null}finally{try{await o.cancel()}catch{}}let i=new Uint8Array(e),A=0;for(let r of a)i.set(r,A),A+=r.byteLength;return new TextDecoder().decode(i)}function xCe(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 YCe(n,t){return n.status===401?"harness-auth-required":n.status===407?"harness-proxy-auth-required":n.status===403?(await KCe(n))?.trim()!=="forbidden"?"harness-request-forbidden":xCe(t)?"harness-loopback-forbidden":"harness-host-untrusted":n.status===404?"harness-api-not-found":"harness-http-failed"}function l3(n){let t=typeof n=="string"?LCe:UCe,o=t.get(n);return o||(o={ownerships:new Map,claims:new Map,controls:new WeakMap,nextOrder:0},t.set(n,o)),o}function n3(n,t){return new Promise((o,a)=>{let e=()=>t.removeEventListener("abort",i),i=()=>{e(),a(t.reason)};if(t.aborted){i();return}t.addEventListener("abort",i,{once:!0}),Promise.resolve().then(()=>(t.throwIfAborted(),n())).then(A=>{e(),o(A)},A=>{e(),a(A)})})}function s3(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 dT(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 jCe(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 g3(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 a of n.groups){if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name||!Array.isArray(a.models))throw new Error(`Harness returned an invalid response for ${t}`);for(let e of a.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&&!jCe(e.reasoning))throw new Error(`Harness returned an invalid response for ${t}`)}for(let a of n.failures)if(!a||typeof a!="object"||typeof a.id!="string"||!a.id||typeof a.name!="string"||!a.name||a.message!==void 0&&typeof a.message!="string")throw new Error(`Harness returned an invalid response for ${t}`);if(o&&(!dT(n.current)||typeof n.routable!="boolean"))throw new Error(`Harness returned an invalid response for ${t}`);return n}function c3(){let n=new Error("Harness turn was stopped before producing a text reply");return n.code="turn-stopped",n}function JCe(n){return Array.isArray(n?.items)?n.items.flatMap(t=>typeof t?.path=="string"&&FCe(t.path)?[t.path]:[]):[]}function qCe(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(a=>a?.path===n);if(!o)return null;if(!Array.isArray(o.sessionIds)||o.sessionIds.some(a=>typeof a!="string"))throw new Error("Harness returned invalid session IDs for workspace.list");return o}function zCe(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 VCe(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 a=zCe(o);if(a!==null)return a}return null}function WCe(n,t,o){if(!Array.isArray(o?.items))throw new Error("Harness returned an invalid response for session.list");let a=new Set(t),e=new Map(o.items.flatMap(i=>typeof i?.sessionId=="string"?[[i.sessionId,i]]:[]));return{workspace:n.path,sessions:n.sessionIds.map(i=>{let A=e.get(i),r=A?.projections?.values?.title,s={sessionId:i,title:typeof r=="string"?r:null,archived:a.has(i),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=VCe(A);return c!==null&&(s.time=c),s})}}function cu(n,t){return new Promise((o,a)=>{if(t?.aborted){a(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(()=>{t?.removeEventListener("abort",i),o()},n),i=()=>{clearTimeout(e),a(t.reason??new DOMException("Aborted","AbortError"))};t?.addEventListener("abort",i,{once:!0})})}function ZCe(n){return(n?.data?.message?.content??[]).filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(` +`).trim()}function Ga(n){return typeof n=="string"&&n.trim()?n.trim():null}function XCe(n){if(!n||typeof n!="object")return null;let t=Ga(n.message);if(t)return t;let o=Ga(n.name),a=Ga(n.code);return o||a?[o??"Error",a].filter(Boolean).join(": "):null}function p3(n,t){let o=[...t].map(a=>a?.event??a).filter(Boolean).sort((a,e)=>(a.seq??-1)-(e.seq??-1));for(let a of o){let e=a.seq??-1;if(e<=n.lastSeq)continue;if(n.lastSeq=e,a.type==="turn/start"){let A=a.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(a.type==="user/message"&&a.data?.source?.rpcId===n.promptRpcId){n.active=!0,n.started=!0,n.completed=!1,n.turn=a.data?.turn??n.openTurn;continue}if(a.type==="turn/end"&&a.data?.turn===n.turn){n.active=!1,n.completed=!0;continue}let i=null;if(a.type==="tool/call"&&n.active&&a.data?.turn===n.turn&&typeof a.data?.callId=="string"&&a.data.callId)i={callId:a.data.callId,name:a.data?.name,arguments:a.data?.arguments};else if(a.type==="tool/code-dispatch-start"&&n.active&&typeof a.data?.subCallId=="string"&&a.data.subCallId){let A;try{A=JSON.stringify(a.data?.arguments)}catch{A=void 0}i={callId:a.data.subCallId,name:a.data?.name,arguments:A}}i&&n.toolCalls.set(i.callId,Object.freeze(i))}}function d3(n,t,o=[]){if(!n||!["object","function","string"].includes(typeof n)||typeof t!="string"||!t)return!1;let a=l3(n).ownerships.get(t);if(!a||a.size===0)return!1;for(let e of a)p3(e,o);return[...a].some(e=>e.active&&!e.completed&&typeof e.reconnect=="function")}var zp=class{#e;#A;#t=null;#r=null;#I=new Map;#o="";#c=!1;#i=null;#a=new Map;#s=null;constructor({promptRpcId:t,afterSeq:o=-1}){this.#e=t,this.#A=o}get finished(){return this.#c}get lastSeq(){return this.#A}get answer(){return this.#o.trim()}get reason(){return this.#i}get tracking(){return this.#r!==null&&!this.#c}get turn(){return this.#r}consumeAll(t){let o=[],a=i=>{if(i.type==="text"&&o.length>0&&o[o.length-1].type==="text"){o[o.length-1]=i;return}o.push(i)},e=[...t].map(i=>i?.event??i).filter(Boolean).sort((i,A)=>(i.seq??-1)-(A.seq??-1));for(let i of e){let A=i.seq??-1;if(!(A<=this.#A)){if(this.#A=A,i.type==="turn/start"&&(this.#t=i.data?.turn??null),i.type==="user/message"&&i.data?.source?.rpcId===this.#e){this.#r=this.#t;continue}if(this.#r!==null){if(i.type==="turn/end"){if(i.data?.turn!==this.#r)continue;this.#c=!0,this.#i=i.data?.reason??null,this.#t=null;continue}if(i.data?.turn===this.#r){if(i.type==="assistant/chunk"&&i.data?.chunk?.type==="text-delta"){let r=i.data?.step??0,s=i.data.chunk.index??0,g=`${r}:${s}`;this.#I.set(g,(this.#I.get(g)??"")+i.data.chunk.text);let c=`${r}:`,I=[...this.#I.entries()].filter(([p])=>p.startsWith(c)).sort(([p],[B])=>Number(p.split(":")[1])-Number(B.split(":")[1])).map(([,p])=>p).join(` +`).trim();I&&I!==this.#o&&(this.#o=I,a({type:"text",text:I}));continue}if(i.type==="assistant/message"){let r=ZCe(i);r&&r!==this.#o&&(this.#o=r,a({type:"text",text:r}));continue}if(i.type==="tool/call"){let r=Ga(i.data?.name)??w("\u5DE5\u5177"),s=Ga(i.data?.callId)??Ga(i.data?.subCallId);s&&this.#a.set(s,r),this.#s=r,a({type:"tool",name:r,...s?{callId:s}:{}})}else if(i.type==="tool/result"){let r=Ga(i.data?.message?.source?.callId)??Ga(i.data?.callId)??Ga(i.data?.subCallId),s=(r?this.#a.get(r):null)??this.#s,g=XCe(i.data?.error);a({type:"status",text:w("\u6B63\u5728\u6574\u7406\u7ED3\u679C\u2026"),...s?{toolName:s}:{},...g?{error:g}:{}})}}}}}return o}consume(t){return this.consumeAll(t).at(-1)??null}},Dn=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??{}}},ps=class extends Error{constructor(t,o,{cause:a,status:e}={}){let i=Number.isInteger(e)?`, HTTP ${e}`:"";super(`Harness ${o} transport failed (${t}${i})`,{cause:a}),this.name="HarnessTransportError",this.code=t,this.method=o,Number.isInteger(e)&&(this.status=e)}},hT=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"}},Vp=class extends Error{constructor(t,o){super(o),this.name="HarnessInteractionError",this.code=t}},ds=class extends Error{constructor(t,{reason:o,providerCode:a}={}){super(`Harness turn failed (${t})`),this.name="HarnessTurnError",this.code=t,this.promptAccepted=!0,o&&typeof o=="object"&&(this.reason=o),typeof a=="string"&&a&&(this.providerCode=a)}};function I3(n){let t=Ga(n?.kind)??Ga(n);if(t==="error"){let o=n?.error??n?.failure;return new ds("harness-turn-failed",{reason:n,providerCode:Ga(o?.code)??void 0})}return t==="max-tokens"?new ds("model-max-tokens",{reason:n}):t==="blocked"?new ds("turn-blocked",{reason:n}):["interrupted","stopped","cancelled","canceled"].includes(t)?new ds("turn-interrupted",{reason:n}):t==="aborted"?new ds("turn-aborted",{reason:n}):t==="completed"?new ds("model-empty-response",{reason:n}):new ds("harness-turn-failed",{reason:n})}function $Ce(n){return n==null?!0:(Ga(n?.kind)??Ga(n))==="completed"}var yr=class{#e;#A;#t;#r;#I;#o;#c;#i;#a;#s;#p;#g;#l;#n;#h;#d=null;#C;#u;#B;#f;constructor({baseUrl:t,apiProxy:o,interactionScope:a=o,workspace:e,agentPreset:i,autostart:A=!1,dshBin:r="dsh",fetchImpl:s=fetch,createWebSocket:g=m=>new WebSocket(m),interactionReconnectDelayMs:c=500,rpcIdPrefix:I="im",logPrefix:p="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 p!="string"||!p.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&&(!a||!["object","function"].includes(typeof a)))throw new TypeError("interactionScope must identify the current Host");this.#t=e,this.#r=i??void 0,this.#I=!!(this.#e&&A),this.#o=r,this.#c=s,this.#i=g,this.#a=c,this.#s=I.trim(),this.#p=p.trim(),this.#g=B,this.#l=f,this.#n=Q,this.#h=y,this.#C=l3(this.#e?.origin??a),this.#u=this.#C.ownerships,this.#B=this.#C.claims,this.#f=this.#C.controls}async rpc(t,o={},a=3e4,e={}){let i=e.rpcId??`${this.#s}-${pT()}`,A=AbortSignal.timeout(a),r=e.signal?AbortSignal.any([e.signal,A]):A,s;try{if(this.#A){let[g,c,I]=t.split("."),p={host:"host",workspace:"workspace",session:"sessions",llm:"llm"}[g],B=p&&this.#A[p];if(I!==void 0||!Object.hasOwn(B??{},c)||typeof B[c]!="function")throw new ps("harness-api-not-found",t);s={type:"server-response",...await n3(()=>B[c]({rpcId:i,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:i,method:t,payload:o}),signal:r});if(!g.ok){let c=await YCe(g,this.#e.hostname);throw new ps(c,t,{status:g.status})}try{s=await g.json()}catch(c){throw new ps("harness-response-invalid",t,{cause:c})}}}catch(g){throw e.signal?.aborted||g instanceof ps?g:new ps(A.aborted?"harness-timeout":"harness-connect-failed",t,{cause:g})}if(s?.type!=="server-response"||s?.rpcId!==i)throw new ps("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 ps("harness-response-invalid",t,{cause:new Error(`Harness returned an invalid result for ${t}`)});if(!s.result?.ok)throw new Dn(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 Dn?new hT(o):o}}async ensureRunning(t={}){try{return await this.health(t)}catch(e){if(!this.#I)throw e}if(!this.#d||this.#d.exitCode!==null){let e=this.#e.port||(this.#e.protocol==="https:"?"443":"80");this.#d=GCe(this.#o,["web","--host",this.#e.hostname,"--port",e],{cwd:this.#t,env:process.env,stdio:["ignore","inherit","inherit"]}),this.#d.on("error",i=>{console.error(`[${this.#p}] failed to start Harness:`,i.message)})}let o=Date.now()+6e4,a;for(;Date.now(){let r=A&&a.signal?AbortSignal.any([A,a.signal]):A??a.signal;return this.rpc("session.selectModel",{sessionId:t,provider:o.provider,model:o.model,...o.reasoningEffort===void 0?{}:{reasoningEffort:o.reasoningEffort}},3e4,r?{...a,signal:r}:a)},i=this.#n?await this.#n({sessionId:t,operation:e}):await e();if(!i||typeof i!="object"||!dT(i.selected))throw new Error("Harness returned an invalid response for session.selectModel");return i}async isSessionRunning(t,o={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");await this.ensureRunning(o);let a=await this.rpc("session.list",{},3e4,o);if(!a||typeof a!="object"||!Array.isArray(a.items))throw new Error("Harness returned an invalid response for session.list");for(let e of a.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 a.items.find(e=>e.sessionId===t)?.running??!1}async adoptWorkspaceSession(t,o={}){return a3(this,t,o)}async workspaceId(t={}){let{workspace:o=this.#t,...a}=t,{items:e}=await this.rpc("workspace.list",{},3e4,a),i=e.find(r=>r.path===o);return i?i.workspaceId:(await this.rpc("workspace.create",{path:o},3e4,a)).workspace.workspaceId}async createSession(t={}){let{agentPreset:o,...a}=t;await this.ensureRunning(a);let i={workspaceId:await this.workspaceId(a)},A=o!==void 0?o:this.#r;return A!=null&&(i.agentPreset=A),(await this.rpc("session.create",i,3e4,a)).sessionId}async renameSession(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(typeof o!="string"||!o.trim())throw new TypeError("session title is required");return this.rpc("session.rename",{sessionId:t,title:o},3e4,a)}async executeCommand(t,o,a={}){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,a)}catch(e){throw e?.failure&&typeof e.failure=="object"?new Dn("commands.execute",e.failure):e}}async readSessionHistory(t,{maxMessages:o=50,beforeSeq:a,timeoutMs:e=1e4,...i}={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");if(!Number.isSafeInteger(o)||o<1||a!==void 0&&(!Number.isSafeInteger(a)||a<0))throw new TypeError("Invalid history pagination");return this.rpc("session.history",{sessionId:t,maxMessages:o,...a===void 0?{}:{beforeSeq:a}},e,i)}async sessionExists(t,o={}){try{return await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,o),!0}catch(a){if(a instanceof Dn&&a.code==="session-not-found")return!1;throw a}}async respondInteraction(t,o,a={}){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(a.timeoutMs??3e4),i=a.signal?AbortSignal.any([a.signal,e]):e,A={type:"client-response",rpcId:t,result:o},r;if(this.#A)r=await n3(()=>this.#A.respond(A),i);else{let g=await this.#c(new URL("/api/respond",this.#e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(A),signal:i});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 Vp(`interaction-${s}`,`Harness interaction response was rejected (${s})`)}async watchInteractions(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,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(a!==void 0&&typeof a!="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(i!==void 0&&typeof i!="function")throw new TypeError("onOpen must be a function");for(;!o.aborted;){try{await this.#N(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,ownership:A})}catch(r){if(o.aborted)return;console.warn(`[${this.#p}] Harness interaction stream disconnected:`,r.message)}if(o.aborted)return;try{await cu(this.#a,o)}catch{if(o.aborted)return;throw new Error("Harness interaction reconnect wait failed")}}}#m(t,o){let a=this.#u.get(t)??new Set;o.order=this.#C.nextOrder,this.#C.nextOrder+=1,a.add(o),this.#u.set(t,a)}#w(t,o){let a=this.#u.get(t);a?.delete(o),a?.size===0&&this.#u.delete(t);for(let[e,i]of this.#B)i.ownership===o&&this.#B.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 a=o.get(t.control.key)??new Set;a.add(t),o.set(t.control.key,a)}#y(t){if(!t.control)return;let o=this.#f.get(t.control.owner),a=o?.get(t.control.key);a?.delete(t),a?.size===0&&o.delete(t.control.key),o?.size===0&&this.#f.delete(t.control.owner)}#b(t,o){let a=s3(o);return a?[...this.#f.get(a.owner)?.get(a.key)??[]].filter(i=>i.sessionId===t).sort((i,A)=>i.order-A.order):[]}#E(t,o){return this.#b(t,o).find(a=>a.started&&a.active&&!a.completed&&a.turn!==null)??null}async#k(t,o,a){let e=this.#b(t,o);if(e.length===0)return null;try{let i=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,a);this.#M(t,i.events??[])}catch(i){if(!(i instanceof Dn)||i.code!=="session-not-found")throw i;for(let A of e)A.active=!1,A.completed=!0;return null}return this.#E(t,o)}async hasActiveTurn(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");return!!await this.#k(t,o,a)}async stopActiveTurn(t,o,a={}){if(typeof t!="string"||!t)throw new TypeError("sessionId is required");let e=await this.#k(t,o,a);if(!e)return!1;if(e.stopRequested)return!0;if(this.#E(t,o)!==e)return!1;e.stopRequested=!0;try{if(this.#l){let i=this.#l({sessionId:t,expectedTurn:e.turn,promptRpcId:e.promptRpcId,action:"stop"});if(i&&typeof i.then=="function")throw new TypeError("controlExecutor must return synchronously");if(i!==void 0){if(typeof i!="boolean")throw new TypeError("controlExecutor must return a boolean or undefined");return i||(e.stopRequested=!1),i}}return await this.rpc("session.cancel",{sessionId:t,keepInbox:!0},3e4,a),!0}catch(i){if(this.#E(t,o)===e&&(e.stopRequested=!1),i instanceof Dn&&i.code==="session-not-found")return!1;throw i}}async steerActiveTurn(t,o,a,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 i=await this.#k(t,a,e);if(!i||i.stopRequested||this.#E(t,a)!==i)return!1;if(this.#l){let A=this.#l({sessionId:t,expectedTurn:i.turn,promptRpcId:i.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}#M(t,o){for(let a of this.#u.get(t)??[])p3(a,o)}async#D(t,o){let a=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:o});this.#M(t,a.events??[])}#S(t,o,a){let e=this.#B.get(o);if(e&&this.#u.get(t)?.has(e.ownership))return e;let i=[...this.#u.get(t)??[]],A=i.filter(s=>s.active).sort((s,g)=>s.order-g.order);if(A.length>0)return{ownership:A[0],recovered:!1};let r=i.filter(s=>!s.started&&!s.completed).sort((s,g)=>s.order-g.order)[0]??null;return r?{ownership:r,recovered:!0}:null}async#T(t,o,a){if(!this.#h)throw new Go("inbound-file-ingress-unavailable","Harness file ingress is unavailable in this Host process.");let i=(await this.rpc("session.list",{},3e4,{signal:a}))?.items?.find(A=>A?.sessionId===t)?.cwd;return this.#h({sessionId:t,workspace:i,files:o,signal:a})}async ask(t,o,a={}){typeof a=="number"&&(a={timeoutMs:a});let e=a.timeoutMs??6e5,i=a.signal,A=typeof a.onUpdate=="function"?a.onUpdate:null,r=a.progressMode==="all"?"all":"latest",s=typeof a.onArtifact=="function"?a.onArtifact:null,g=typeof a.onInteraction=="function"?a.onInteraction:void 0,c=typeof a.onInteractionResolved=="function"?a.onInteractionResolved:void 0,I=s3(a.control),p=Array.isArray(a.files)?a.files.filter(Boolean):[];await this.ensureRunning({signal:i});let B=await this.rpc("session.history",{sessionId:t,maxMessages:1},3e4,{signal:i}),f=Math.max(-1,...(B.events??[]).map(({event:V})=>V.seq??-1)),Q=`${this.#s}-${pT()}`,y=new zp({promptRpcId:Q,afterSeq:f}),m=g||c?new AbortController:null,T=m?i?AbortSignal.any([i,m.signal]):m.signal:null,_=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,L=!1,U=0,F=[],q=!1,z=!1,K=async()=>{if(!s||L||y.turn===null)return U;L=!0;let V=JI.take(t,y.turn,{signal:i});for(let H of V)try{await s(H),U+=1}catch(N){JI.release(H),console.warn(`[${this.#p}] ignored an artifact handoff failure:`,N.message)}return U};_&&(this.#m(t,_),this.#Q(_));let G=JI.openConsumer(t,Q);try{let V=o;if(p.length>0){let J=await this.#T(t,p,i);F.push(J),o=$_(o,J)}if(T){let J,X=new Promise(ie=>{J=ie});R=this.watchInteractions(t,{signal:T,onInteraction:g,onResolved:c,onOpen:J,ownership:_}),R.catch(()=>{}),await Promise.race([X,cu(3e4,T).then(()=>{throw new Error("Harness interaction stream did not open within 30 seconds")})])}let H=typeof o=="string"?[{type:"text",text:o}]:o;if(!Array.isArray(H)||H.length===0)throw new TypeError("Harness prompt content is required");let N=Intl.DateTimeFormat().resolvedOptions().timeZone,k=J=>this.rpc("session.prompt",{sessionId:t,mode:"queue",content:J,clientTimeZone:N},3e4,{rpcId:Q,signal:i});try{await k(H)}catch(J){let X=pY(J)?IY(H):[];if(X.length===0)throw J;let ie;try{ie=await this.#T(t,X,i)}catch(Se){throw i?.aborted?i.reason??Se:(console.warn(`[${this.#p}] unable to restage rejected images as workspace files:`,Se?.message??String(Se)),J)}F.push(ie);let oe=$_([...lY(typeof V=="string"?[{type:"text",text:V}]:V),{type:"text",text:w(gY)}],{files:F.flatMap(Se=>Se?.files??[])});await k(oe)}q=!0;try{let J=Date.now(),X=y.lastSeq;for(;;){await cu(300,i);let ie=await this.rpc("session.history",{sessionId:t,maxMessages:50},3e4,{signal:i}),De=_?.active===!0;_&&(this.#M(t,ie.events??[]),!De&&_.active&&_.reconnect?.());let oe=y.consumeAll(ie.events??[]),Se=y.lastSeq>X;if(X=y.lastSeq,Se&&(J=Date.now()),A){let Re=r==="all"?oe:oe.slice(-1);for(let Ne of Re)try{await A(Ne)}catch(Je){console.warn(`[${this.#p}] ignored a progress update failure:`,Je.message)}}if(y.finished){if(z=!0,!_?.stopRequested&&!$Ce(y.reason))throw I3(y.reason);let Re=_?.stopRequested?0:await K();if(y.answer)return y.answer;if(Re>0)return"";throw _?.stopRequested?c3():I3(y.reason)}if(Date.now()-J{})}}async#N(t,{signal:o,onInteraction:a,onResolved:e,onOpen:i,ownership:A}){let r=!1,s=null,g=Promise.resolve(),c=A==null,I=[],p=()=>{},B=m=>{p=m,A&&(A.reconnect=p);try{i?.()}catch(T){console.warn(`[${this.#p}] ignored an interaction open callback failure:`,T.message)}A&&this.#D(t,o).then(()=>{if(!r){c=!0;for(let T of I.splice(0))Q(T)}}).catch(T=>{s??=T,p()})},f=(m,T)=>{m&&(g=g.then(()=>m(T)).catch(_=>{s??=_,p()}))},Q=m=>{let T=m.payload;if(A&&T.type==="session/event"){this.#M(t,[T.event]);return}if(T.type==="question/requested"||T.type==="approval/requested"){let _=T.type==="question/requested"?"question":"approval",R=_==="question"?m.rpcId:T.approvalId,L=`${_}:${R}`;if(A){let F=this.#S(t,L,_);if(F?.ownership!==A)return;this.#B.set(L,F)}let U=_==="approval"&&A&&typeof T.callId=="string"?this.#B.get(L)?.ownership.toolCalls.get(T.callId):void 0;f(a,Object.freeze({kind:_,interactionId:R,rpcId:m.rpcId,sessionId:t,payload:T,recovered:A?this.#B.get(L)?.recovered===!0:!1,...U?{toolCall:U}:{},reconnect:p,respond:(F,q={})=>this.respondInteraction(m.rpcId,F,{...q,signal:q.signal??o})}));return}if(T.type==="question/resolved"||T.type==="approval/resolved"){let _=T.type==="question/resolved"?"question":"approval",R=_==="question"?T.questionRpcId:T.approvalId,L=`${_}:${R}`;if(A){if(this.#B.get(L)?.ownership!==A)return;this.#B.delete(L)}f(e,Object.freeze({kind:_,interactionId:R,sessionId:t,outcome:T.outcome,payload:T}))}},y=m=>{try{let T=m?.payload;if(m?.type!=="server-request"||typeof m.rpcId!="string"||!T||typeof T!="object"||m.method!==T.type)throw new Error("invalid server-request envelope");if(T.sessionId!==t)return;c?Q(m):I.push(m)}catch(T){console.warn(`[${this.#p}] ignored a malformed Harness interaction frame:`,T.message)}};try{await this.#P({signal:o,onOpen:B,onEnvelope:y})}finally{r=!0,A?.reconnect===p&&(A.reconnect=null),o.aborted||await g}if(!o.aborted&&s)throw s}async watchHarnessEvents({signal:t,onSessionEvent:o,onReconnect:a}={}){if(typeof o!="function")throw new TypeError("watchHarnessEvents requires onSessionEvent");if(!t||typeof t.addEventListener!="function")throw new TypeError("watchHarnessEvents requires an AbortSignal");if(a!==void 0&&typeof a!="function")throw new TypeError("onReconnect must be a function");for(;!t.aborted;){try{await this.#P({signal:t,onOpen:()=>{try{a?.()}catch(e){console.warn(`[${this.#p}] mux reconnect hook failed:`,e.message)}},onEnvelope:e=>{try{let i=e?.payload;if(e?.type!=="server-request"||!i||typeof i!="object"||e.method!==i.type||i.type!=="session/event"||typeof i.sessionId!="string"||!i.event||typeof i.event!="object")return;o({sessionId:i.sessionId,event:i.event})}catch(i){console.warn(`[${this.#p}] ignored a malformed global mux frame:`,i.message)}}})}catch(e){if(t.aborted)return;console.warn(`[${this.#p}] Harness event mux disconnected:`,e.message)}if(t.aborted)return;try{await cu(this.#a,t)}catch{if(t.aborted)return;throw new Error("Harness event mux reconnect wait failed")}}}#P(t){return o3({apiProxy:this.#A,baseUrl:this.#e,createWebSocket:this.#i,rpcId:`${this.#s}-${pT()}`,...t,onMalformed:o=>{console.warn(`[${this.#p}] ignored a malformed Harness mux frame:`,o.message)}})}stopManagedProcess(){this.#d?.exitCode===null&&this.#d.kill("SIGTERM")}};var ry=class extends yr{constructor(t){super({...t,rpcIdPrefix:"dingtalk",logPrefix:"dsh-dingtalk"})}};import{mkdir as eBe,readFile as ABe,realpath as tBe,rename as rBe,stat as iBe,unlink as aBe,writeFile as oBe}from"node:fs/promises";import{dirname as nBe,isAbsolute as C3,resolve as Iu}from"node:path";var LtA=Object.freeze(["chat","user_in_chat"]),Wp="user_in_chat";function Zp(n){let t=String(n??"").trim().toLowerCase();return t==="chat"||t==="shared"||t==="shared_chat"?"chat":t==="user_in_chat"||t==="user"||t==="per_user"||t==="member"?"user_in_chat":Wp}function Xp(n){let t=String(n??"").trim().toLowerCase();if(t==="chat"||t==="user_in_chat")return t;let o=new TypeError(`Invalid group session scope: ${String(n)}`);throw o.code="invalid-group-session-scope",o}function h3({kind:n,conversationId:t,senderId:o,groupSessionScope:a=Wp}){let e=String(t??"").trim(),i=String(o??"").trim();if(!e)throw new TypeError("conversationId is required");if(n==="group"){if(Zp(a)==="user_in_chat"){if(!i)throw new TypeError("senderId is required for user_in_chat group sessions");return`group:${e}:user:${i}`}return`group:${e}`}return`direct:${e}`}var VtA=Object.freeze({version:1,workspaces:Object.freeze({})});function qI(n){let t=new Error(n);return t.code=Oi,t}async function ET(n){return Iu(await tBe(n))}async function sBe(n,t){if(n===t)return!0;try{return await ET(n)===await ET(t)}catch{return!1}}function Ut(n){if(typeof n!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n))throw new TypeError("Invalid bot id");return n}function ha(n,t,o){let a=new Error(t,o);return a.code=n,a}function iy(n){if(typeof n!="string"||!/^[A-Za-z0-9._:@-]{1,128}$/.test(n))throw ha("invalid-target","Invalid target id");return n}function gBe(n){if(!n||typeof n!="object"||Array.isArray(n))throw ha("invalid-target","Invalid target route");try{let t=JSON.stringify(n);if(t===void 0)throw new TypeError("route is not JSON");let o=JSON.parse(t);if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("route is not an object");return o}catch(t){throw ha("invalid-target","Invalid target route",{cause:t})}}function zI(n,{targetId:t}={}){if(!n||typeof n!="object"||Array.isArray(n))throw ha("invalid-target","Invalid delivery target");let o=t===void 0?new Set(["targetId","name","kind","route"]):new Set(["name","kind","route"]);if(Object.keys(n).some(i=>!o.has(i)))throw ha("invalid-target","Invalid delivery target");let a=iy(t??n.targetId);if(typeof n.kind!="string"||!/^[a-z][a-z0-9-]{0,31}$/.test(n.kind))throw ha("invalid-target","Invalid target kind");let e;if(n.name!==void 0){if(typeof n.name!="string"||!n.name.trim()||n.name.trim().length>80)throw ha("invalid-target","Invalid target name");e=n.name.trim()}return{targetId:a,...e===void 0?{}:{name:e},kind:n.kind,route:gBe(n.route)}}function cBe(n){let t=Object.create(null);if(n===void 0)return t;if(!n||typeof n!="object"||Array.isArray(n))return null;try{for(let[o,a]of Object.entries(n)){if(Ut(o),!a||typeof a!="object"||Array.isArray(a))return null;let e=Object.create(null);for(let[i,A]of Object.entries(a)){let r=zI(A,{targetId:i}),{targetId:s,...g}=r;e[i]=g}t[o]=e}}catch{return null}return t}function IBe(n,t){let o=Object.create(null);if(n===void 0)return o;if(!n||typeof n!="object"||Array.isArray(n)){for(let a of Object.keys(t))o[a]=null;return o}for(let[a,e]of Object.entries(n))try{Ut(a),o[a]=qp(e)}catch{}return o}function lBe(n){if(!n||![1,2].includes(n.version)||!n.workspaces||typeof n.workspaces!="object"||Array.isArray(n.workspaces))return null;let t={};for(let[s,g]of Object.entries(n.workspaces)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(s)||typeof g!="string"||!C3(g))return null;t[s]=Iu(g)}let o={};if(n.agentPresets!==void 0){if(!n.agentPresets||typeof n.agentPresets!="object"||Array.isArray(n.agentPresets))return null;for(let[s,g]of Object.entries(n.agentPresets)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(s))return null;try{let c=Hp(g);if(!c)return null;o[s]=c}catch{return null}}}let a={};if(n.groupSessionScopes!==void 0){if(!n.groupSessionScopes||typeof n.groupSessionScopes!="object"||Array.isArray(n.groupSessionScopes))return null;for(let[s,g]of Object.entries(n.groupSessionScopes)){if(!/^[A-Za-z0-9_-]{1,128}$/.test(s))return null;try{a[s]=Xp(g)}catch{return null}}}let e=Object.create(null);if(n.contextEnhancement&&typeof n.contextEnhancement=="object"&&!Array.isArray(n.contextEnhancement))for(let[s,g]of Object.entries(n.contextEnhancement))/^[A-Za-z0-9_-]{1,128}$/.test(s)&&(e[s]=xp(g));if(n.version===1&&n.deliveryTargets!==void 0)return null;let i=cBe(n.deliveryTargets);if(!i)return null;let A=IBe(n.accessPolicies,t);return{version:n.accessPolicies===void 0?n.version:2,workspaces:t,agentPresets:o,groupSessionScopes:a,contextEnhancement:e,deliveryTargets:i,accessPolicies:A}}function pBe({version:n,workspaces:t,agentPresets:o,groupSessionScopes:a,contextEnhancement:e,deliveryTargets:i,accessPolicies:A}){let r={version:n,workspaces:t};return Object.keys(o).length>0&&(r.agentPresets=o),Object.keys(a).length>0&&(r.groupSessionScopes=a),Object.keys(e).length>0&&(r.contextEnhancement=e),n>=2&&Object.keys(i).length>0&&(r.deliveryTargets=i),n>=2&&Object.keys(A).length>0&&(r.accessPolicies=A),r}async function dBe(n,t){await eBe(nBe(n),{recursive:!0,mode:448});let o=`${n}.tmp`;await oBe(o,`${JSON.stringify(t,null,2)} +`,{encoding:"utf8",mode:384}),await rBe(o,n)}async function E3(n){if(typeof n!="string"||!n.trim()||!C3(n.trim())){let a=new Error("\u5DE5\u4F5C\u533A\u5FC5\u987B\u662F\u7EDD\u5BF9\u8DEF\u5F84\u3002");throw a.code="workspace-not-absolute",a}let t=Iu(n.trim()),o;try{o=await iBe(t)}catch(a){let e=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u4E0D\u5B58\u5728\u3002",{cause:a});throw e.code="workspace-not-found",e}if(!o.isDirectory()){let a=new Error("\u5DE5\u4F5C\u533A\u8DEF\u5F84\u5FC5\u987B\u6307\u5411\u4E00\u4E2A\u76EE\u5F55\u3002");throw a.code="workspace-not-directory",a}return t}var ni=class{#e;#A;#t=1;#r={};#I={};#o={};#c={};#i=Object.create(null);#a=Object.create(null);#s=new Map;#p=1;#g=new Map;#l=1;#n=new Map;#h=new WeakMap;#d=new Set;#C=Promise.resolve();#u=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=Iu(o)}async load(){try{let t=lBe(JSON.parse(await ABe(this.#e,"utf8")));if(!t)throw new Error("dsh-im workspace config is invalid");this.#t=t.version,this.#r=t.workspaces,this.#I=t.agentPresets,this.#o=t.groupSessionScopes,this.#c=t.contextEnhancement,this.#i=t.deliveryTargets,this.#a=t.accessPolicies}catch(t){if(t?.code!=="ENOENT")throw t;this.#t=1,this.#r={},this.#I={},this.#o={},this.#c={},this.#i=Object.create(null),this.#a=Object.create(null)}this.#s.clear(),this.#p=1,this.#g.clear(),this.#l=1,this.#n.clear(),this.#d.clear();for(let t of Object.keys(this.#r))this.#s.set(t,this.#B()),this.#g.set(t,this.#f());return this}has(t){let o=Ut(t);return Object.hasOwn(this.#r,o)&&!this.#n.has(o)}incarnationFor(t){return this.#g.get(Ut(t))??null}workspaceFor(t){return this.#r[Ut(t)]??this.#A}agentPresetFor(t){return this.#I[Ut(t)]??null}groupSessionScopeFor(t){let o=Ut(t);return this.has(o)&&Object.hasOwn(this.#o,o)?Zp(this.#o[o]):Wp}contextEnhancementFor(t){let o=Ut(t);return this.has(o)&&Object.hasOwn(this.#c,o)?this.#c[o]:V_}accessPolicyFor(t){let o=Ut(t);return this.has(o)&&Object.hasOwn(this.#a,o)?this.#a[o]:null}listDeliveryTargets(t){let o=Ut(t);if(!this.has(o))throw ha("unknown-bot","Unknown bot");return Object.entries(this.#i[o]??{}).map(([a,e])=>zI(e,{targetId:a})).sort((a,e)=>a.targetId.localeCompare(e.targetId))}deliveryTargetFor(t,o){let a=Ut(t),e=iy(o);if(!this.has(a))throw ha("unknown-bot","Unknown bot");let i=this.#i[a]?.[e];return i?zI(i,{targetId:e}):null}async createDeliveryTarget(t,o){let a=Ut(t),e=zI(o);return this.#Q(a,async()=>{if(!this.has(a))throw ha("unknown-bot","Unknown bot");if(Object.hasOwn(this.#i[a]??{},e.targetId))throw ha("target-conflict","Target already exists");let{targetId:i,...A}=e,r={...this.#i,[a]:{...this.#i[a]??{},[i]:A}};return await this.#y(this.#c,r,2),this.#i=r,this.#t=2,zI(A,{targetId:i})})}async updateDeliveryTarget(t,o,a){let e=Ut(t),i=iy(o),A=zI(a,{targetId:i});return this.#Q(e,async()=>{if(!this.has(e))throw ha("unknown-bot","Unknown bot");if(!Object.hasOwn(this.#i[e]??{},i))throw ha("unknown-target","Unknown target");let{targetId:r,...s}=A,g={...this.#i,[e]:{...this.#i[e],[i]:s}};return await this.#y(this.#c,g,2),this.#i=g,this.#t=2,zI(s,{targetId:i})})}async deleteDeliveryTarget(t,o){let a=Ut(t),e=iy(o);return this.#Q(a,async()=>{if(!this.has(a))throw ha("unknown-bot","Unknown bot");if(!Object.hasOwn(this.#i[a]??{},e))throw ha("unknown-target","Unknown target");let i={...this.#i[a]};delete i[e];let A={...this.#i};return Object.keys(i).length>0?A[a]=i:delete A[a],await this.#y(this.#c,A,2),this.#i=A,this.#t=2,!0})}generationFor(t){return this.#s.get(Ut(t))??null}async whenIdle(){await this.#C}async whenBotIdle(t){let o=Ut(t);for(;;){let a=this.#u.get(o);if(!a||(await a,this.#u.get(o)===a))return}}async ensure(t,{workspace:o=this.#A,defaultAgentPreset:a,initialAccessPolicy:e}={}){let i=Ut(t),A=Iu(o);return this.#Q(i,async()=>{let r=!this.#r[i],s=e!==void 0&&!Object.hasOwn(this.#a,i);if(r||s){let g=s?fc(e):void 0,c=r?Hp(a):null,I=Object.hasOwn(this.#I,i),p=this.#I[i],B=s?{...this.#a,[i]:g}:this.#a;r&&(this.#r[i]=A,c&&(this.#I[i]=c),this.#s.set(i,this.#B()),this.#g.set(i,this.#f()));let f=s?2:this.#t;try{await this.#y(this.#c,this.#i,f,B)}catch(Q){throw r&&(delete this.#r[i],I?this.#I[i]=p:delete this.#I[i],this.#s.delete(i),this.#g.delete(i)),Q}this.#a=B,this.#t=f}else this.#s.has(i)||this.#s.set(i,this.#B());return this.#r[i]})}async setWorkspace(t,o,{clearSessions:a,incarnation:e}={}){let i=Ut(t);if(!this.has(i)||e!==void 0&&e!==this.incarnationFor(i)){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 E3(o);return this.#Q(i,async()=>{if(!this.has(i)||e!==void 0&&e!==this.incarnationFor(i)){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(i))return A;let r=this.#r[i];this.#s.set(i,this.#B()),await a?.(),this.#r[i]=A;try{await this.#y()}catch(s){throw this.#r[i]=r,s}return A})}async setAgentPreset(t,o,{incarnation:a}={}){let e=Ut(t);if(!this.has(e)||a!==void 0&&a!==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 i=Hp(o);return this.#Q(e,async()=>{if(!this.has(e)||a!==void 0&&a!==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.#I[e]??null;if(A===i)return i;i?this.#I[e]=i:delete this.#I[e];try{await this.#y()}catch(r){throw A?this.#I[e]=A:delete this.#I[e],r}return i})}async setGroupSessionScope(t,o,{incarnation:a}={}){let e=Ut(t);if(!this.has(e)||a!==void 0&&a!==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 i=Xp(o);return this.#Q(e,async()=>{if(!this.has(e)||a!==void 0&&a!==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=Object.hasOwn(this.#o,e)?this.#o[e]:void 0;if(A===i)return i;this.#o[e]=i;try{await this.#y()}catch(r){throw A===void 0?delete this.#o[e]:this.#o[e]=A,r}return i})}async setContextEnhancement(t,o,{incarnation:a}={}){let e=Ut(t),i=a===void 0?this.incarnationFor(e):a,A=jI(o);return this.#Q(e,async()=>{if(!this.has(e)||i!==this.incarnationFor(e)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}let r={...this.#c,[e]:A};return await this.#y(r),this.#c=r,A})}async setAccessPolicy(t,o,{incarnation:a}={}){let e=Ut(t),i=a===void 0?this.incarnationFor(e):a,A=fc(o);return this.#Q(e,async()=>{if(!this.has(e)||i!==this.incarnationFor(e)){let s=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw s.code="workspace-bot-not-found",s}let r={...this.#a,[e]:A};return await this.#y(this.#c,this.#i,2,r),this.#a=r,this.#t=2,A})}async bindWorkspaceSession(t,o,{conversationKey:a,sessionId:e,clearSessions:i,setSession:A,incarnation:r,expectedGeneration:s}={}){let g=Ut(t);if(typeof a!="string"||!a||typeof e!="string"||!e)throw new TypeError("conversationKey and sessionId are required");if(typeof i!="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 ET(await E3(o));return this.#Q(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 qI("The bot workspace changed before the session binding could be committed.");if(!await sBe(c,this.workspaceFor(g))){let I=this.#r[g];this.#s.set(g,this.#B()),await i(),this.#r[g]=c;try{await this.#y()}catch(p){throw this.#r[g]=I,p}}return await A(a,e),{workspace:c,sessionId:e,generation:this.#s.get(g)}})}async invalidateSessions(t,{clearSessions:o}={}){let a=Ut(t);return this.#Q(a,async()=>{this.#s.set(a,this.#B()),await o?.()})}async beginRemoval(t,{clearSessions:o}={}){let a=Ut(t);return this.#Q(a,async()=>{let e=this.#n.get(a);if(e)return e;let i=Object.freeze({});this.#n.set(a,i),this.#h.set(i,{botId:a,incarnation:this.incarnationFor(a)}),this.#s.set(a,this.#B());try{await o?.()}catch(A){throw this.#n.get(a)===i&&this.#n.delete(a),A}return i})}async abortRemoval(t){let{botId:o}=this.#m(t);return this.#Q(o,async()=>this.#n.get(o)!==t?!1:(this.#n.delete(o),Object.hasOwn(this.#r,o)&&(this.#s.set(o,this.#B()),this.#g.has(o)||this.#g.set(o,this.#f())),!0))}async finishRemoval(t){let{botId:o,incarnation:a}=this.#m(t);return this.#Q(o,async()=>this.#n.get(o)!==t?{removed:!1,persisted:!0,error:null,stale:!0}:this.incarnationFor(o)!==a?(this.#n.delete(o),{removed:!1,persisted:!0,error:null,stale:!0}):(this.#n.delete(o),this.#w(o)))}async retireAfterConfigCommit(t){let o=Ut(t);return this.#Q(o,async()=>(this.#n.delete(o),this.#w(o)))}flushPendingRemoval(t){if(this.#d.has(t))return this.#Q(t,async()=>{this.#d.has(t)&&await this.#b()})}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(Ut)),a=new Set([...Object.keys(this.#r),...Object.keys(this.#I),...Object.keys(this.#o),...Object.keys(this.#c),...Object.keys(this.#i),...Object.keys(this.#a),...this.#d]);for(let e of a)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),groupSessionScope:this.groupSessionScopeFor(o.botId),contextEnhancement:this.contextEnhancementFor(o.botId),accessPolicy:this.accessPolicyFor(o.botId)}:o)}}#B(){let t=this.#p;return this.#p+=1,t}#f(){let t=this.#l;return this.#l+=1,t}#m(t){if(!t||typeof t!="object")throw new TypeError("Invalid workspace removal transaction");let o=this.#h.get(t);if(!o)throw new TypeError("Invalid workspace removal transaction");return o}async#w(t){let o=Object.hasOwn(this.#r,t),a=Object.hasOwn(this.#I,t),e=Object.hasOwn(this.#o,t),i=Object.hasOwn(this.#c,t),A=Object.hasOwn(this.#i,t),r=Object.hasOwn(this.#a,t),s=o||a||e||i||A||r||this.#d.has(t);if(delete this.#r[t],delete this.#I[t],delete this.#o[t],delete this.#c[t],delete this.#i[t],delete this.#a[t],this.#s.delete(t),this.#g.delete(t),!s)return{removed:!1,persisted:!0,error:null,stale:!1};try{return await this.#b(),{removed:o,persisted:!0,error:null,stale:!1}}catch(g){return this.#d.add(t),{removed:o,persisted:!1,error:g,stale:!1}}}async#Q(t,o){let a=this.#C.then(o,o),e=a.then(()=>{},()=>{});return this.#C=e,this.#u.set(t,e),e.finally(()=>{this.#u.get(t)===e&&this.#u.delete(t)}),a}async#y(t=this.#c,o=this.#i,a=this.#t,e=this.#a){await dBe(this.#e,pBe({version:a,workspaces:this.#r,agentPresets:this.#I,groupSessionScopes:this.#o,contextEnhancement:t,deliveryTargets:o,accessPolicies:e})),this.#d.clear()}async#b(){if(Object.keys(this.#r).length>0||Object.keys(this.#I).length>0||Object.keys(this.#o).length>0||Object.keys(this.#c).length>0||Object.keys(this.#i).length>0||Object.keys(this.#a).length>0){await this.#y();return}try{await aBe(this.#e),this.#d.clear()}catch(t){if(t?.code!=="ENOENT")throw t;this.#d.clear()}}};function ed(n){if(!n)return null;let t=typeof n=="function"?n():n;return t&&typeof t.then=="function"?t.then(gs):gs(t)}function B3(){let n=new Error("Agent Preset \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002");return n.code="agent-preset-unavailable",n}function $p(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 u3(n,t,o){let a=e=>{let i=n.decorateStatus(e);if(!o||!i||typeof i!="object")return i;let A=s=>s?{...i,agentPresetCatalog:s}:i,r=ed(o);return r&&typeof r.then=="function"?r.then(A):A(r)};return t&&typeof t.then=="function"?t.then(a):a(t)}function hBe(n){return Promise.resolve(n.status())}function Yi(n,{workspaces:t,method:o="remove",botIdFromRemoved:a=A=>A?.botId,saveMethod:e="save",botIdFromSave:i=A=>A?.botId}){if(!n||!t||typeof n[o]!="function")throw new TypeError("configStore removal observer dependencies are required");return new Proxy(n,{get(A,r){let s=Reflect.get(A,r,A);return r===o?async(...g)=>{let c=await s.apply(A,g),I=c?a(c,g):null;return I&&await t.retireAfterConfigCommit(I),c}:r===e&&typeof s=="function"?(...g)=>{let c=t.flushPendingRemoval(i(g[0],g));return c?c.then(()=>s.apply(A,g)):s.apply(A,g)}:typeof s=="function"?s.bind(A):s}})}function ji(n,{botId:t,workspaces:o,state:a,agentPresetCatalog:e}={}){if(!n||!o||!a)throw new TypeError("harness, workspaces, and state are required");let i=o.incarnationFor(t),A=()=>o.has(t)&&o.incarnationFor(t)===i,r=async(I=e)=>{let p;try{p=await ed(I)??gs(null)}catch(B){throw $p(A),B}return $p(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:p}},s=new Map,g=new Proxy(n,{get(I,p){if(p==="agentPresetSettings")return async(f={})=>{f?.signal?.throwIfAborted(),$p(A);let Q=await r();return f?.signal?.throwIfAborted(),Q};if(p==="updateAgentPreset")return async(f,Q={})=>{Q?.signal?.throwIfAborted(),$p(A);let y=f==="--default"?null:Hp(f),m=null;if(y&&({agentPresetCatalog:m}=await r(),Q?.signal?.throwIfAborted(),!m.items.some(T=>T.id===y)))throw B3();if(await o.setAgentPreset(t,y,{incarnation:i}),$p(A),m)return{agentPreset:o.agentPresetFor(t),agentPresetCatalog:m};try{return await r()}catch(T){if(T?.code==="workspace-bot-not-found")throw T;return $p(A),{agentPreset:o.agentPresetFor(t),agentPresetCatalog:gs(null)}}};if(p==="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(p==="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((p==="listWorkspaces"||p==="listWorkspaceSessions"||p==="listModels")&&typeof I[p]=="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[p](...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(p==="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:()=>a.clearSessions(),incarnation:i})};if(p==="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 _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}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 _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(y!==o.generationFor(t))throw qI("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 T=await o.bindWorkspaceSession(t,m.workspace,{conversationKey:f,sessionId:Q,clearSessions:()=>a.clearSessions(),setSession:(_,R)=>a.setSession(_,R),incarnation:i,expectedGeneration:y});if(!A()){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}if(T.generation!==o.generationFor(t))throw qI("The bot workspace changed before the session binding completed.");return s.set(Q,T.generation),{...m,workspace:T.workspace,sessionId:T.sessionId}};if(p==="createSession")return async(f={})=>{if(await o.whenBotIdle(t),!A()){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}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(p==="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(_,R,L)=>{if(!y())throw qI(`The bot workspace changed before this ${L} started.`);let U=await I[_](f,...R);if(!y())throw qI(`The bot workspace changed while this ${L} was running.`);return U},T=async(_,R,L)=>{if(!y())throw qI(`The bot workspace changed before this ${L} started.`);return I[_](f,...R)};return Object.freeze({sessionId:f,async sessionExists(..._){if(!y())return!1;let R=await I.sessionExists(f,..._);return y()&&R},models(..._){return m("getSessionModels",_,"model listing")},readHistory(..._){return m("readSessionHistory",_,"history read")},...typeof I.renameSession=="function"?{renameTitle(..._){return T("renameSession",_,"title rename")}}:{},selectModel(..._){return m("selectSessionModel",_,"model selection")},isRunning(..._){return m("isSessionRunning",_,"run-state check")},hasActiveTurn(..._){return m("hasActiveTurn",_,"turn ownership check")},stopActiveTurn(..._){return T("stopActiveTurn",_,"turn stop")},steerActiveTurn(..._){return T("steerActiveTurn",_,"turn steering")},ask(..._){if(!y())throw qI("The bot workspace changed before this prompt started.");return I.ask(f,..._)}})};if(p==="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(p==="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=Oi,m}return I.ask(f,...Q)};if(p==="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=Oi,m}return I.executeCommand(f,...Q)};let B=Reflect.get(I,p,I);return typeof B=="function"?B.bind(I):B}}),c=new Proxy(a,{get(I,p){if(p===h_)return I;if(p==="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(p==="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,p,I);return typeof B=="function"?B.bind(I):B}});return Object.freeze({harness:g,state:c})}function Ji(n,{workspaces:t,stateFor:o,agentPresetCatalog:a}={}){if(!n||!t||typeof o!="function")throw new TypeError("controller, workspaces, and stateFor are required");let e=new Map,i=(B,f)=>{let y=(e.get(B)??Promise.resolve()).catch(()=>{}).then(f);return e.set(B,y),y.finally(()=>{e.get(B)===y&&e.delete(B)})},A=B=>u3(t,B,a),r=(B,f)=>{let Q=t.incarnationFor(B);return i(B,async()=>{if(!(await n.status())?.bots?.some(T=>T?.botId===B)){let T=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw T.code="workspace-bot-not-found",T}let m=await o(B);return await t.setWorkspace(B,f,{clearSessions:()=>m.clearSessions(),incarnation:Q}),A(await n.status())})},s=(B,f)=>{let Q=t.incarnationFor(B),y=Hp(f);return i(B,async()=>{if(!(await n.status())?.bots?.some(_=>_?.botId===B)){let _=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw _.code="workspace-bot-not-found",_}let T=y&&a?await ed(a):null;if(y&&a&&!T?.items.some(_=>_.id===y))throw B3();return await t.setAgentPreset(B,y,{incarnation:Q}),u3(t,await n.status(),T??a)})},g=(B,f,Q)=>{let y=t.incarnationFor(B),m=jI(f);return i(B,async()=>{let T=await n.status();if(!T?.bots?.some(F=>F?.botId===B)){let F=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw F.code="workspace-bot-not-found",F}let _=await ed(a),R=t.decorateStatus(T),L={...R,bots:R.bots.map(F=>F?.botId===B?{...F,contextEnhancement:m}:F),..._?{agentPresetCatalog:_}:{}},U=Q?await Q(L):L;return await t.setContextEnhancement(B,m,{incarnation:y}),U})},c=(B,f,Q)=>{let y=t.incarnationFor(B),m=fc(f);return i(B,async()=>{let T=await n.status();if(!T?.bots?.some(F=>F?.botId===B)){let F=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw F.code="workspace-bot-not-found",F}let _=await ed(a),R=t.decorateStatus(T),L={...R,bots:R.bots.map(F=>F?.botId===B?{...F,accessPolicy:m}:F),..._?{agentPresetCatalog:_}:{}},U=Q?await Q(L):L;return await t.setAccessPolicy(B,m,{incarnation:y}),U})},I=(B,f,Q)=>{let y=t.incarnationFor(B),m=Xp(f);return i(B,async()=>{let T=await n.status();if(!T?.bots?.some(F=>F?.botId===B)){let F=new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");throw F.code="workspace-bot-not-found",F}let _=await ed(a),R=t.decorateStatus(T),L={...R,bots:R.bots.map(F=>F?.botId===B?{...F,groupSessionScope:m}:F),..._?{agentPresetCatalog:_}:{}},U=Q?await Q(L):L;return await t.setGroupSessionScope(B,m,{incarnation:y}),U})},p=(B,f)=>i(B,async()=>{let Q=await t.beginRemoval(B,{clearSessions:async()=>{try{let y=await o(B);if(!y||typeof y.clearSessions!="function")throw new TypeError("bot state does not support session cleanup");await y.clearSessions()}catch(y){console.warn(`[dsh-im] ignored session cleanup failure while deleting bot ${B}:`,y?.message??y)}}});try{let y=await f();return await t.finishRemoval(Q),A(y)}catch(y){let m=await hBe(n).catch(()=>null);throw Array.isArray(m?.bots)&&!m.bots.some(_=>_?.botId===B)?await t.finishRemoval(Q):await t.abortRemoval(Q),y}});return new Proxy(n,{get(B,f){if(f==="updateWorkspace")return r;if(f==="updateAgentPreset")return s;if(f==="updateContextEnhancement")return g;if(f==="updateAccessPolicy")return c;if(f==="updateGroupSessionScope")return I;let Q=Reflect.get(B,f,B);return typeof Q!="function"?Q:f==="deleteBot"?(y,...m)=>p(y,()=>Q.call(B,y,...m)):f==="disconnect"?async(...y)=>{let T=(await B.status())?.bots?.[0]?.botId;return T?p(T,()=>Q.apply(B,y)):A(Q.apply(B,y))}:(...y)=>A(Q.apply(B,y))}})}var f3=new Set(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp"]);function EBe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function uBe(n){return typeof n=="string"&&n.length>0&&n.length<=512&&n.trim()===n&&!/[\s:\u0000-\u001f\u007f]/u.test(n)}function uT(n,t){let o=`${t}:`;if(!n.startsWith(o))return null;let a=n.slice(o.length);return uBe(a)?a:null}function lu(n,t){for(let[o,a,e]of t){let i=uT(n,o);if(i)return{kind:a,route:{[e]:i}}}return null}function CBe(n){let t=uT(n,"p2p");return t?.startsWith("ou_")?{kind:"user",route:{openId:t}}:lu(n,[["group","group","chatId"]])}function BBe(n){let t=uT(n,"direct");if(t&&/^[A-Za-z0-9_-]{1,128}$/.test(t))return{kind:"conversation",route:{channelId:t}};let o=/^group:([^:]+):(\d{1,20}(?:\.\d{1,20})?)$/.exec(n);return!o||!/^[A-Za-z0-9_-]{1,128}$/.test(o[1])?null:{kind:"thread",route:{channelId:o[1],threadTs:o[2]}}}function fBe(n){let t=/^(direct|group):(-?\d+)(?::([1-9]\d*))?$/.exec(n);if(!t)return null;let o=Number(t[2]);if(!Number.isSafeInteger(o)||t[1]==="direct"&&t[3]!==void 0)return null;if(t[3]===void 0)return{kind:"chat",route:{chatId:t[2]}};let a=Number(t[3]);return!Number.isSafeInteger(a)||a<=0?null:{kind:"topic",route:{chatId:t[2],messageThreadId:a}}}function QBe(n){let t=/^(?:direct|group):(\d{1,32})$/.exec(n);return t?{kind:"channel",route:{channelId:t[1]}}:null}function yBe(n){let t=/^direct:(\d{5,32}@(s\.whatsapp\.net|lid))$/.exec(n);if(t)return{kind:"user",route:{jid:t[1]}};let o=/^group:(\d{5,32}(?:-\d{1,32})?@g\.us)$/.exec(n);return o?{kind:"group",route:{jid:o[1]}}:null}function mBe(n,t){if(!f3.has(n)||typeof t!="string")return null;switch(n){case"weixin":return lu(t,[["p2p","user","toUserId"]]);case"feishu":return CBe(t);case"dingtalk":return lu(t,[["p2p","user","userId"],["group","group","openConversationId"]]);case"wecom":return lu(t,[["direct","user","chatId"],["group","group","chatId"]]);case"qq":return lu(t,[["c2c","user","userOpenId"],["group","group","groupOpenId"]]);case"slack":return BBe(t);case"telegram":return fBe(t);case"discord":return QBe(t);case"whatsapp":return yBe(t);default:return null}}function Q3(n,t){if(!f3.has(n)||!EBe(t))return[];let o=[],a=new Set;for(let e of Object.keys(t)){let i=mBe(n,e);if(!i)continue;let A=JSON.stringify(i);a.has(A)||(a.add(A),o.push(i))}return o}var SBe=new Set(["weixin","feishu","dingtalk","wecom","qq","slack","telegram","discord","whatsapp"]);function oy(n){return SBe.has(n)}function yc(n){let t=new Error(n);return t.code="invalid-target",t}function wBe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function CT(n,t,o){if(!wBe(n))throw yc(`${o} must be an object`);if(Object.keys(n).find(e=>!t.includes(e))!==void 0)throw yc(`${o} contains an unknown field`)}function ay(n,t){if(typeof n!="string"||!n||n.trim()!==n)throw yc(`${t} must be a non-empty string without surrounding whitespace`);return n}function DBe(n){if(typeof n!="string"||!n.trim()||n.trim().length>80)throw yc("target.name must contain 1 to 80 characters");return n.trim()}function Qc(n,t){CT(n,t,"route");let o={};for(let a of t)o[a]=ay(n[a],`route.${a}`);return o}function Bg(n,t){if(!t.includes(n))throw yc("target kind is not supported by this channel");return n}function OBe(n,t,o){switch(n){case"weixin":return Bg(t,["user"]),Qc(o,["toUserId"]);case"feishu":return Bg(t,["user","group"]),Qc(o,t==="user"?["openId"]:["chatId"]);case"dingtalk":return Bg(t,["user","group"]),Qc(o,t==="user"?["userId"]:["openConversationId"]);case"wecom":return Bg(t,["user","group"]),Qc(o,["chatId"]);case"qq":return Bg(t,["user","group"]),Qc(o,t==="user"?["userOpenId"]:["groupOpenId"]);case"slack":return Bg(t,["conversation","thread"]),Qc(o,t==="conversation"?["channelId"]:["channelId","threadTs"]);case"telegram":{Bg(t,["chat","topic"]),CT(o,t==="chat"?["chatId"]:["chatId","messageThreadId"],"route");let a=ay(o.chatId,"route.chatId");if(!/^-?\d+$/.test(a))throw yc("route.chatId must be a decimal string");if(t==="chat")return{chatId:a};if(!Number.isSafeInteger(o.messageThreadId)||o.messageThreadId<=0)throw yc("route.messageThreadId must be a positive integer");return{chatId:a,messageThreadId:o.messageThreadId}}case"discord":return Bg(t,["channel"]),Qc(o,["channelId"]);case"whatsapp":{Bg(t,["user","group"]);let a=Qc(o,["jid"]);if(!(t==="user"?/^\d{5,32}@(s\.whatsapp\.net|lid)$/.test(a.jid):/^\d{5,32}(?:-\d{1,32})?@g\.us$/.test(a.jid)))throw yc(`route.jid must be a ${t} WhatsApp JID`);return a}default:throw new TypeError(`Unsupported delivery channel: ${n}`)}}function Ad(n,t,{targetIdRequired:o=!0}={}){if(!oy(n))throw new TypeError(`Unsupported delivery channel: ${n}`);CT(t,o?["targetId","name","kind","route"]:["name","kind","route"],"target");let a={};return o&&(a.targetId=ay(t.targetId,"target.targetId")),t.name!==void 0&&(a.name=DBe(t.name)),a.kind=ay(t.kind,"target.kind"),a.route=OBe(n,a.kind,t.route),a}function qi({channel:n,workspaces:t,coreController:o,stateFor:a}){if(!oy(n))throw new TypeError(`Unsupported delivery channel: ${n}`);if(!t||typeof t!="object")throw new TypeError("delivery adapter requires a workspace store");if(!o||typeof o!="object")throw new TypeError("delivery adapter requires a proactive text controller");if(typeof a!="function")throw new TypeError("delivery adapter requires a bot state getter");return Object.freeze({channel:n,ownsBot:e=>t.has(e),listTargets:e=>t.listDeliveryTargets(e),async listSuggestions(e){let i=await a(e);if(!i||typeof i.snapshot!="function")throw new TypeError("delivery suggestion state cannot be inspected");return Q3(n,i.snapshot()?.sessions).map(r=>Ad(n,r,{targetIdRequired:!1}))},createTarget:(e,i)=>t.createDeliveryTarget(e,Ad(n,i)),updateTarget:(e,i,A)=>t.updateDeliveryTarget(e,i,Ad(n,A,{targetIdRequired:!1})),deleteTarget:(e,i)=>t.deleteDeliveryTarget(e,i),async sendText(e,i,A,r={}){let s=Ad(n,i);if(typeof o.sendProactiveText!="function")throw new TypeError("delivery controller cannot send proactive text");return await o.sendProactiveText(e,s,A,r),{sent:!0}}})}var y3=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function bBe(n){if(!Array.isArray(n)||n.length===0)return[...y3];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...y3]}var ny=class{#e;#A;#t;#r;#I;#o;#c;#i=null;#a=null;#s=0;#p=!1;#g=!1;#l;#n;constructor({controller:t,harness:o,logger:a=console,retryDelaysMs:e,healthyIntervalMs:i=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=a,this.#r=bBe(e),this.#I=Number.isFinite(i)&&i>=0?i:15e3,this.#o=A,this.#c=r,this.#l=new Promise(s=>{this.#n=s})}get ready(){return this.#l}start(){return this.#g||this.#p?this:(this.#g=!0,this.#h(0),this)}async close(){this.#p||(this.#p=!0,this.#i!==null&&this.#c(this.#i),this.#i=null,await this.#a?.catch(()=>{}),this.#n?.(null),this.#n=null)}#h(t){this.#p||(this.#i=this.#o(()=>{this.#i=null,this.#d()},t),this.#i?.unref?.())}async#d(){if(this.#p||this.#a)return;let t=this.#C();this.#a=t;try{await t}finally{this.#a===t&&(this.#a=null)}}async#C(){try{if(await this.#A.ensureRunning(),this.#p)return;let t=await this.#e.initialize();if(this.#p)return;this.#n?.(t),this.#n=null;let{configured:o,connected:a}=t.totals;if(a{let A={namespace:"commands",method:"execute",args:{agentId:a,line:e,images:[]},signal:i.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 i.signal?.throwIfAborted(),o.invoke({...A,args:{agentId:a,line:e}})}}}}import{randomUUID as fT}from"node:crypto";var sy=new WeakMap;function MBe(n){let t=n?.failure;return t&&typeof t=="object"&&typeof t.code=="string"&&typeof t.message=="string"?{code:t.code,message:t.message,details:t.details&&typeof t.details=="object"?t.details:{}}:n?.name==="AbortError"||n?.name==="RemoteInvocationCancelled"?{code:"cancelled",message:n instanceof Error?n.message:"Harness request was cancelled",details:{}}:{code:"internal",message:n instanceof Error?n.message:String(n),details:{}}}function Ho(n,t){return Promise.resolve().then(t).then(o=>({rpcId:n.rpcId,result:{ok:!0,value:o}}),o=>({rpcId:n.rpcId,result:{ok:!1,error:MBe(o)}}))}function m3(n,t,o,a){return{namespace:n,method:t,args:o,...a===void 0?{}:{signal:a}}}function gy(n,t){let o=new Error(n);return o.name="UserQuestionError",o.code=t,o}function _Be(n){if(typeof n?.snapshotEvents=="function"){let o=n.snapshotEvents();if(Array.isArray(o))return o}let t=n?.events;return Array.isArray(t)?t:null}function TBe(n,t){return!n||typeof n!="object"||n.sessionId!==t.sessionId||!n.answer||typeof n.answer!="object"||!Array.isArray(n.answer.answers)||n.answer.answers.length!==t.questions.length?!1:n.answer.answers.every((o,a)=>{let e=t.questions[a];if(!o||typeof o!="object"||o.id!==e.id||!Array.isArray(o.selected)||o.selected.some(r=>typeof r!="string")||new Set(o.selected).size!==o.selected.length||o.custom!==void 0&&typeof o.custom!="string")return!1;let i=o.custom?.trim();if(i!==void 0&&!i||e.multiSelect!==!0&&(i!==void 0&&o.selected.length>0||o.selected.length>1))return!1;let A=new Set(e.options?.map(r=>r.label)??[]);return o.selected.every(r=>A.has(r))})}function NBe(n){if(n?.type==="event"&&n.event&&typeof n.event=="object")return[{event:n.event}];let t=n?.type==="chunks"?n.event:null;if(!t||typeof t!="object")throw new Error("Harness returned an invalid session history record");let{data:o}=t,a=t.type,e=a==="chunkrow/tool-call-chunks"?o?.args:o?.texts;if(!o||!Array.isArray(e)||e.length===0||e.some(A=>typeof A!="string")||!Array.isArray(o.dt)||o.dt.length!==e.length-1)throw new Error("Harness returned an invalid packed session chunk");let i=t.time;return e.map((A,r)=>{r>0&&(i+=o.dt[r-1]);let s;if(a==="chunkrow/text-chunks")s={type:"text-delta",index:o.index,text:A};else if(a==="chunkrow/reasoning-chunks")s={type:"reasoning-delta",index:o.index,text:A};else if(a==="chunkrow/tool-call-chunks")s={type:"tool-call-delta",index:o.index,id:o.id,...Object.hasOwn(o,"name")?{name:o.name}:{},argumentsDelta:A};else throw new Error(`Harness returned an unsupported packed session chunk: ${String(a)}`);return{event:{type:"assistant/chunk",seq:t.seq+r,time:i,data:{turn:o.turn,step:o.step,chunk:s}}}})}function S3(n){if(!Array.isArray(n))throw new Error("Harness returned invalid session history records");return n.flatMap(NBe)}var QT=class{#e=[];#A=null;#t=!1;#r;#I;#o;constructor(t,o){this.#r=t,this.#o=o,this.#I=()=>this.close(),t?.addEventListener("abort",this.#I,{once:!0}),t?.aborted&&this.close()}push(t){if(!this.#t)if(this.#A){let o=this.#A;this.#A=null,o({value:t,done:!1})}else this.#e.push(t)}next(){return this.#e.length>0?Promise.resolve({value:this.#e.shift(),done:!1}):this.#t?Promise.resolve({value:void 0,done:!0}):new Promise(t=>{this.#A=t})}return(){return this.close(),Promise.resolve({value:void 0,done:!0})}close(){if(!this.#t&&(this.#t=!0,this.#r?.removeEventListener("abort",this.#I),this.#o?.(),this.#o=null,this.#A)){let t=this.#A;this.#A=null,t({value:void 0,done:!0})}}[Symbol.asyncIterator](){return this}},yT=class{#e;#A;#t=new Set;#r=new Map;#I=new Map;#o=new Map;#c=[];#i=!1;constructor(t,o,a){this.#e=o,this.#A=a,this.host=Object.freeze({describe:e=>Ho(e,()=>({ready:!0,transport:"typert"}))}),this.workspace=Object.freeze({list:(e,i)=>Ho(e,()=>this.#p(i)),create:(e,i)=>Ho(e,()=>this.#a("workspace","create",{request:e.payload},i))}),this.sessions=Object.freeze({list:(e,i)=>Ho(e,()=>this.#a("session","list",{_request:e.payload},i)),create:(e,i)=>Ho(e,()=>this.#a("session","create",{request:e.payload},i)),history:(e,i)=>Ho(e,()=>this.#l(e.payload,i)),prompt:(e,i)=>Ho(e,()=>this.#a("session","prompt",{request:{requestId:e.rpcId,...e.payload}},i)),rename:(e,i)=>Ho(e,()=>this.#a("session","rename",{request:e.payload},i)),cancel:(e,i)=>Ho(e,()=>this.#a("session","cancel",{request:{sessionId:e.payload.sessionId}},i)),models:(e,i)=>Ho(e,()=>this.#d(e.payload.sessionId,i)),selectModel:(e,i)=>Ho(e,()=>this.#a("session","selectModel",{request:e.payload},i))}),this.llm=Object.freeze({models:(e,i)=>Ho(e,async()=>{let A=await this.#h(i);return{groups:A.groups,failures:A.failures}})}),this.events=Object.freeze({mux:(e,i)=>this.#C(i)}),this.respond=e=>Promise.resolve(this.#y(e)),typeof t?.on=="function"&&(this.#c.push(t.on("session/event",(e,i)=>{let A=e?.id;typeof A!="string"||!i||typeof i!="object"||(Number.isSafeInteger(i.seq)&&this.#n(A,i.seq),this.#u({type:"session/event",sessionId:A,event:i}))},{global:!0})),this.#c.push(t.on("approval/request",(e,i)=>this.#Q(e,i),{global:!0,prepend:!0})),this.#c.push(t.on("user-questions/request",(e,i)=>this.#m(e,i),{global:!0,prepend:!0})))}async#a(t,o,a,e){return this.#e.invoke(m3(t,o,a,e))}async#s(t,o,a,e){let i=new AbortController,A=e?AbortSignal.any([e,i.signal]):i.signal,r;try{r=(await this.#e.stream(m3(t,o,a,A)))[Symbol.asyncIterator]();let g=await r.next();if(g.done)throw new Error(`Harness ${t}.${o} stream ended before its baseline`);return g.value}finally{i.abort(new DOMException("Baseline received","AbortError")),await Promise.resolve(r?.return?.()).catch(()=>{})}}async#p(t){let o=await this.#s("workspace","follow",{},t);if(o?.type!=="baseline"||!o.value||typeof o.value!="object")throw new Error("Harness workspace.follow returned no baseline");return o.value}async#g(t,o,a){let e=await this.#s("session","follow",{request:{address:{kind:"session",sessionId:t},maxMessages:o}},a);if(e?.type!=="snapshot"||!Number.isSafeInteger(e.cursor))throw new Error("Harness session.follow returned no snapshot");return this.#n(t,e.cursor),e}async#l(t,o){let{sessionId:a,maxMessages:e=50,beforeSeq:i}=t,A=this.#o.get(a);if(A===void 0){let s=await this.#g(a,e,o);if(A=this.#o.get(a)??s.cursor,i===void 0&&A===s.cursor)return{events:S3(s.records),hasMore:s.hasMore===!0,...s.projections===void 0?{}:{projections:s.projections}}}let r=await this.#a("session","page",{request:{address:{kind:"session",sessionId:a},throughSeq:A,maxMessages:e,...i===void 0?{}:{beforeSeq:i}}},o);return{events:S3(r.records),hasMore:r.hasMore===!0}}#n(t,o){let a=this.#o.get(t);(a===void 0||o>a)&&this.#o.set(t,o)}#h(t){return this.#a("session","modelCatalog",{},t)}async#d(t,o){let[a,e]=await Promise.all([this.#h(o),this.#a("session","list",{_request:{}},o)]),i=e?.items?.find(s=>s?.sessionId===t);if(!i){let s=new Error(`session "${t}" not found`);throw s.failure={code:"session-not-found",message:s.message,details:{sessionId:t}},s}let A=i.projections?.values?.modelSelection,r=A?.next??A?.lastUsed??a.default;return{current:r,routable:a.routableProviders.includes(r.provider),groups:a.groups,failures:a.failures}}#C(t){let o;o=new QT(t,()=>this.#t.delete(o)),this.#t.add(o);for(let a of this.#r.values())o.push(this.#f(a));for(let a of this.#I.values())o.push(this.#w(a));return o}#u(t,o=fT()){let a={rpcId:o,payload:t};for(let e of this.#t)e.push(a)}#B(t){let o=t?.session,a=o?.id??t?.id,e=_Be(o);return typeof a!="string"||!e?null:d3(this.#A,a,e)?{sessionId:a,events:e}:null}#f(t){return{rpcId:t.rpcId,payload:{type:"question/requested",sessionId:t.sessionId,questions:t.questions}}}#m(t,o){let a=this.#B(t?.agent);return a?t.signal?.aborted?Promise.reject(gy("ask_user_question was aborted before the user answered","ASK_ABORTED")):new Promise((e,i)=>{let A={rpcId:fT(),sessionId:a.sessionId,questions:t.questions,signal:t.signal,settle:(s,g)=>{this.#r.delete(A.rpcId)&&(t.signal?.removeEventListener("abort",r),this.#u({type:"question/resolved",sessionId:A.sessionId,questionRpcId:A.rpcId,outcome:s}),s==="answered"?e(g):i(g))}},r=()=>A.settle("cancelled",gy("ask_user_question was aborted before the user answered","ASK_ABORTED"));this.#r.set(A.rpcId,A),t.signal?.addEventListener("abort",r,{once:!0}),this.#u(this.#f(A).payload,A.rpcId)}):o()}#w(t){return{rpcId:t.rpcId,payload:{type:"approval/requested",sessionId:t.sessionId,approvalId:t.approvalId,toolName:t.toolName,...t.callId===void 0?{}:{callId:t.callId},...t.reason===void 0?{}:{reason:t.reason}}}}#Q(t,o){let a=this.#B(t?.agent);if(!a)return o();if(t.signal?.aborted)return Promise.resolve("cancelled");let e=new Set([...this.#I.values()].map(r=>r.approvalId)),i=new Set,A;for(let r=a.events.length-1;r>=0;r-=1){let s=a.events[r];if(s.type==="approval/decided")i.add(s.data?.id);else if(s.type==="approval/asked"){let g=s.data?.id;if(!g||i.has(g)||e.has(g)||(t.callId??null)!==(s.data?.callId??null))continue;A=g;break}}return A===void 0?o():new Promise(r=>{let s={rpcId:fT(),sessionId:a.sessionId,approvalId:A,toolName:t.toolName,callId:t.callId,reason:t.reason,settle:c=>{this.#I.delete(s.rpcId)&&(t.signal?.removeEventListener("abort",g),this.#u({type:"approval/resolved",sessionId:s.sessionId,approvalId:s.approvalId,outcome:c}),r(c))}},g=()=>s.settle("cancelled");this.#I.set(s.rpcId,s),t.signal?.addEventListener("abort",g,{once:!0}),this.#u(this.#w(s).payload,s.rpcId)})}#y(t){let o=this.#I.get(t?.rpcId);if(o){let i=t?.result?.value;return t?.result?.ok!==!0||!i||typeof i!="object"||i.sessionId!==o.sessionId||i.approvalId!==o.approvalId||i.outcome!=="allowed-once"&&i.outcome!=="rejected"?{accepted:!1,reason:"bad-response"}:(o.settle(i.outcome),{accepted:!0})}let a=this.#r.get(t?.rpcId);if(!a)return{accepted:!1,reason:"not-pending"};if(t?.result?.ok!==!0)return t?.result?.error?.code!=="cancelled"?{accepted:!1,reason:"bad-response"}:(a.settle("cancelled",gy("the user cancelled ask_user_question","ASK_CANCELLED")),{accepted:!0});if(!TBe(t.result.value,a))return{accepted:!1,reason:"bad-response"};let e={answers:t.result.value.answer.answers.map(i=>({id:i.id,selected:[...i.selected],...i.custom===void 0?{}:{custom:i.custom}}))};return a.settle("answered",e),{accepted:!0}}dispose(){if(!this.#i){this.#i=!0;for(let t of[...this.#t])t.close();for(let t of[...this.#I.values()])t.settle("cancelled");for(let t of[...this.#r.values()])t.settle("cancelled",gy("dsh-im interaction adapter was disposed","ASK_ABORTED"));for(let t of this.#c.splice(0).reverse())t?.()}}};function w3(n){let t=n?.root??n;if(!t||!["object","function"].includes(typeof t))throw new TypeError("dsh-im requires a Cordis Host context");let o=sy.get(t);if(o)return o;let a=n?.typertGateway;if(!a||typeof a.invoke!="function"||typeof a.stream!="function")throw new TypeError("dsh-im requires the modern Host Typert gateway");let e=new yT(n,a,t);return sy.set(t,e),typeof n.effect=="function"&&n.effect(()=>()=>{sy.get(t)===e&&sy.delete(t),e.dispose()},"dsh-im: modern Harness compatibility API"),e}function RBe(n,t){return n&&Object.hasOwn(n,t)?n[t]:typeof n?.get=="function"?n.get(t):void 0}function si(n,t={}){return t.harnessBaseUrl!==void 0?{baseUrl:new URL(t.harnessBaseUrl)}:{apiProxy:RBe(n,"apiProxy")??w3(n),interactionScope:n.root??n}}import{randomUUID as kBe}from"node:crypto";function vBe(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 PBe(n,t,o){if(n?.status!=="running")return!1;let a=n?.session?.events;if(!Array.isArray(a))return!1;let e=null,i=!1;for(let A of a){if(A?.type==="turn/start"){e=A.data?.turn??null,i=!1;continue}if(A?.type==="turn/end"&&A.data?.turn===e){e=null,i=!1;continue}e===t&&A?.type==="user/message"&&A.data?.source?.rpcId===o&&(i=!0)}return e===t&&i}function D3(n){if(!n||typeof n!="object"||Object.isFrozen(n))return n;for(let t of Object.values(n))D3(t);return Object.freeze(n)}function GBe(n){return D3({id:kBe(),role:"user",content:[{type:"text",text:n}],source:{kind:"user"}})}function FBe(n){let t=new Error("Session is busy with an active turn or maintenance task",{cause:n});return t.code="agent-busy",t}function LBe(n){return({sessionId:t,expectedTurn:o,promptRpcId:a,action:e,text:i})=>{let A=n.get(t);if(A){if(!PBe(A,o,a))return!1;if(e==="stop")return A.cancel({kind:"user"},{keepInbox:!0}),!0;if(e==="steer")return typeof i!="string"||!i.trim()?!1:(A.inject(GBe(i)),!0);throw new TypeError(`Unsupported Harness control action: ${String(e)}`)}}}function UBe(n){return({sessionId:t,operation:o})=>{if(typeof o!="function")throw new TypeError("maintenance operation is required");let a=n.get(t);if(!a)return o();try{return a.runMaintenance(e=>{if(n.get(t)!==a){let i=new Error("Session agent changed before maintenance started");throw i.code="agent-unavailable",i}return o(e)})}catch(e){throw FBe(e)}}}function HBe(n){return({sessionId:t,workspace:o,files:a,signal:e})=>{let A=n.get(t)?.session?.header?.cwd,r=typeof A=="string"&&A?A:o;if(typeof r!="string"||!r)throw new Go("inbound-file-workspace-unavailable","The Harness Session workspace is unavailable for inbound files.");return S1({files:a},{workspace:r,signal:e})}}function Vi(n,t={}){let{controlExecutor:o,sessionMaintenanceExecutor:a,fileIngressExecutor:e}=t;if(o!==void 0&&typeof o!="function")throw new TypeError("controlExecutor must be a function");if(a!==void 0&&typeof a!="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 i=o&&a&&e?void 0:vBe(n);return{controlExecutor:o??(i?LBe(i):void 0),sessionMaintenanceExecutor:a??(i?UBe(i):void 0),fileIngressExecutor:e??HBe(i??{get:()=>{}})}}function O3(n){return n.map(t=>({id:t,canExecuteCommands:!0}))}function fg(n=[]){return ZQ({mode:"open",open:{defaultCanExecuteCommands:!0,commandPermissionOverrides:[]},allowlist:{users:O3(n)}})}function mc(n=[]){return ZQ({mode:"allowlist",open:{defaultCanExecuteCommands:!1,commandPermissionOverrides:[]},allowlist:{users:O3(n)}})}function Qg(n){return[...new Set((Array.isArray(n)?n:[n]).filter(t=>typeof t=="string"||typeof t=="number"||typeof t=="bigint").map(t=>String(t).trim()).filter(Boolean))]}function KBe(n){return Qg(n).map(t=>`${t.replace(/^\+/,"")}@s.whatsapp.net`)}function pr(n,t={}){let o=String(n??"").trim().toLowerCase();if(o==="weixin")return Cg({direct:mc(),group:mc()});if(o==="feishu"){let e=Qg(t.ownerOpenIds??t.ownerOpenId).includes("*")?fg():mc();return Cg({direct:e,group:e})}if(o==="qq"){let a=Qg(t.ownerUserOpenid);return Cg({direct:a.includes("*")?fg():mc(),group:fg()})}if(o==="telegram"){let a=Qg(t.allowedUsers);return(t.accessMode??"compatible")==="private-allowlist"?Cg({direct:mc(a),group:mc()}):Cg({direct:fg(a),group:fg()})}if(o==="whatsapp"){let a=t.accessMode??"self-only",e=KBe(t.allowedNumbers);return a==="open"?Cg({direct:fg(e),group:fg()}):Cg({direct:mc(a==="private-allowlist"?e:[]),group:mc()})}if(["dingtalk","wecom","slack","discord"].includes(o))return Cg({direct:fg(),group:fg()});throw new TypeError(`Unsupported access-policy channel: ${n}`)}function xBe(n,t={}){let o=String(n??"").trim().toLowerCase();if(o==="weixin")return Qg(t.ownerUserId);if(o==="feishu")return Qg(t.ownerOpenIds??t.ownerOpenId).filter(a=>a!=="*");if(o==="dingtalk"){let a=Array.isArray(t.approvedSenders)?t.approvedSenders:[];return Qg(a.map(e=>e?.staffId))}return o==="qq"?Qg(t.ownerUserOpenid).filter(a=>a!=="*"):o==="whatsapp"?Qg(t.accountJid):[]}function Wi(n,t,{channel:o,config:a,equals:e}={}){if(!n||typeof n.accessPolicyFor!="function")throw new TypeError("A workspace store with access policies is required");let i=new Set(xBe(o,a)),A=typeof e=="function"?e:(r,s)=>r===s;return Object.freeze({botId:t,getSettings:()=>n.accessPolicyFor(t),isPrivileged(r,s){if(!["direct","group"].includes(s))return!1;let g=Array.isArray(r)?r:[r];try{return g.some(c=>typeof c=="string"&&[...i].some(I=>A(c.trim(),I)===!0))}catch{return!1}}})}function JBe(n){let t=VI(n.dshHome??process.env.DSH_HOME??pu(jBe(),".dsh")),o=VI(n.dataDir??pu(t,"integrations","dsh-dingtalk"));return{root:o,config:VI(n.configPath??pu(o,"config.json")),bots:VI(n.botsDir??pu(o,"bots")),workspaces:VI(n.workspacesPath??pu(o,"workspaces.json"))}}async function mT(n,t={},o={}){if(!n?.credentials)throw new TypeError("dsh-dingtalk requires ctx.credentials");let a=si(n,t),e=o.ConfigStore??TQ,i=o.DeviceAuth??RQ,A=o.StateStore??WQ,r=o.HarnessClient??ry,s=o.Controller??XE,g=o.Runtime??nu,c=o.createConnectionSupervisor??BT,I=typeof n.logger=="function"?n.logger("dsh-dingtalk"):n.logger??console,p=()=>xi(n),B=JBe(t),f=await new e(B.config).load(),Q=VI(t.workspace??process.cwd()),y=o.WorkspaceStore??ni,m=o.workspaces??await new y(B.workspaces,{defaultWorkspace:Q}).load(),T=typeof f.list=="function",_=T?f.list():[];T&&await m.reconcile(_.map(X=>X.botId)),await Promise.all(_.map(X=>m.ensure(X.botId,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:pr("dingtalk",X)})));let R=typeof f.remove=="function"?Yi(f,{workspaces:m}):f,L=o.deviceAuth??new i({baseUrl:t.registrationBaseUrl}),U=new Map,F=X=>VI(B.bots,X,"state.json"),q=async X=>{let ie=U.get(X);return ie||(ie=await new A(F(X)).load(),U.set(X,ie)),ie},z=zi(n,o.commandExecutor),{controlExecutor:K,sessionMaintenanceExecutor:G,fileIngressExecutor:V}=Vi(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),H=new r({...a,workspace:Q,autostart:!1,dshBin:t.dshBin??"dsh",...z?{commandExecutor:z}:{},...K?{controlExecutor:K}:{},...G?{sessionMaintenanceExecutor:G}:{},...V?{fileIngressExecutor:V}:{}}),N=new s({deviceAuth:L,credentials:n.credentials,configStore:R,logger:I,createRuntime:async({botId:X,config:ie,clientSecret:De})=>{let oe=await q(X);await m.ensure(X,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:pr("dingtalk",ie)});let Se=ji(H,{botId:X,workspaces:m,state:oe,agentPresetCatalog:p});return new g({config:ie,clientSecret:De,harness:Se.harness,state:Se.state,contextEnhancement:{botId:X,getSettings:()=>m.contextEnhancementFor(X)},accessPolicy:Wi(m,X,{channel:"dingtalk",config:ie}),groupSessionScope:{getScope:()=>m.groupSessionScopeFor(X)},replyTimeoutMs:t.replyTimeoutMs??6e5,maxMessageChars:t.maxMessageChars??4e3,connectTimeoutMs:t.connectTimeoutMs??15e3,logger:{error:(...Be)=>I.error?.(`[${X}]`,...Be),warn:(...Be)=>I.warn?.(`[${X}]`,...Be),info:(...Be)=>I.info?.(`[${X}]`,...Be),debug:(...Be)=>I.debug?.(`[${X}]`,...Be)}})},deleteState:async({botId:X})=>{let ie=U.get(X);if(U.delete(X),ie&&typeof ie.remove=="function")await ie.remove();else try{await YBe(F(X))}catch(De){if(De?.code!=="ENOENT")throw De}}}),k=Ji(N,{workspaces:m,stateFor:q,agentPresetCatalog:p}),J=c({controller:k,harness:H,logger:I,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:k,deliveryAdapter:qi({channel:"dingtalk",workspaces:m,coreController:N,stateFor:q}),ready:J.ready,async close(){await J.close(),await k.close(),H.stopManagedProcess()}}}import WBe from"qrcode";var Fa="bot.context-enhancement.set";function Zi(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"config")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(jI(n.config),!0)}catch{return!1}}var Xi="bot.access-policy.set";function $i(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"policy")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(fc(n.policy),!0)}catch{return!1}}var ea="bot.group-session-scope.set";function Aa(n){try{return!n||typeof n!="object"||Array.isArray(n)||Reflect.ownKeys(n).length!==2||!Object.hasOwn(n,"botId")||!Object.hasOwn(n,"groupSessionScope")||typeof n.botId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(n.botId)?!1:(Xp(n.groupSessionScope),!0)}catch{return!1}}var qBe=new Set(["loopback","trusted-host"]);function mr(n){if(n===void 0)return"loopback";if(qBe.has(n))return n;throw new TypeError('dsh-im rpcAuthority must be "loopback" or "trusted-host"')}import{isAbsolute as zBe}from"node:path";var La="bot.workspace.set";function ta(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&&zBe(n.workspace.trim())}function ra(n){return["workspace-not-absolute","workspace-not-found","workspace-not-directory","workspace-bot-not-found","agent-preset-invalid","agent-preset-unavailable","context-enhancement-invalid"].includes(n?.code)?{code:n.code,message:n.message}:null}var Ua="bot.preset.set";function VBe(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function ia(n){return VBe(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"&&Y_.test(n.agentPreset))}var M3="/dingtalk",Tt=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:La,setAgentPreset:Ua,setContextEnhancement:Fa,setAccessPolicy:Xi,setGroupSessionScope:ea,approveSender:"bot.sender.approve",revokeSender:"bot.sender.revoke"}),_3=Object.freeze(Object.values(Tt)),ZBe=new Set(["clientSecret","client_secret","deviceCode","device_code","secretRef","staffId","senderStaffId","verificationUrl","verificationUri","userCode"]);function Iy(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Sc(n,t){return Iy(n)&&Object.keys(n).every(o=>t.includes(o))}function WI(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function b3(n,t){return typeof n=="string"&&n.trim().length>0&&n.length<=t}function XBe(n,t){return Iy(t)?n===Tt.status?Sc(t,[])?null:"connection.status does not accept fields.":n===Tt.beginProvisioning?Sc(t,["locale"])&&(t.locale===void 0||t.locale==="zh-CN")?null:"provision.begin received unsupported fields.":[Tt.pollProvisioning,Tt.cancelProvisioning].includes(n)?Sc(t,["attemptId"])&&WI(t.attemptId)?null:`${n} requires an attemptId.`:n===Tt.bindCredentials?Sc(t,["clientId","clientSecret"])&&b3(t.clientId,256)&&b3(t.clientSecret,1024)?null:"bot.bind-credentials requires Client ID and Client Secret.":n===Tt.reconnectBot?Sc(t,["botId","sendTest"])&&WI(t.botId)&&(t.sendTest===void 0||t.sendTest===!0)?null:"bot.reconnect requires a botId and optional sendTest=true.":n===Tt.deleteBot?Sc(t,["botId","confirm"])&&WI(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Tt.setWorkspace?ta(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Tt.setAgentPreset?ia(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===Tt.setContextEnhancement?Zi(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":n===Tt.setAccessPolicy?$i(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u8BBF\u95EE\u8BBE\u7F6E\u3002":n===Tt.setGroupSessionScope?Aa(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u7FA4\u4F1A\u8BDD\u7B56\u7565\u3002":n===Tt.approveSender?Sc(t,["botId","requestId","confirm"])&&WI(t.botId)&&WI(t.requestId)&&t.confirm===!0?null:"bot.sender.approve requires botId, requestId, and confirm=true.":n===Tt.revokeSender?Sc(t,["botId","senderKey","confirm"])&&WI(t.botId)&&WI(t.senderKey)&&t.confirm===!0?null:"bot.sender.revoke requires botId, senderKey, and confirm=true.":"Unknown DingTalk endpoint.":"Payload must be an object."}function cy(n){return{ok:!1,error:{code:"bad-request",message:n}}}function du(){return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}}function $Be(){return{ok:!1,error:{code:"dingtalk-operation-failed",message:"\u9489\u9489\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"}}}function efe(n){if(n?.name!=="DingtalkPublicConnectionError"||!Iy(n.publicError))return null;let t=n.publicError,o=typeof t.code=="string"&&/^[a-z][a-z\d-]{1,79}$/.test(t.code)?t.code:null,a=typeof t.message=="string"&&t.message.trim()?t.message.trim().slice(0,240):null,e=typeof t.hint=="string"&&t.hint.trim()?t.hint.trim().slice(0,480):null,i=typeof t.referenceId=="string"&&/^DT-CONN-[A-F0-9]{8}$/.test(t.referenceId)?t.referenceId:null;return o&&a&&e&&i?{code:o,message:a,hint:e,referenceId:i}:null}function td(n){if(Array.isArray(n))return n.map(td);if(!Iy(n))return n;let t={};for(let[o,a]of Object.entries(n))ZBe.has(o)||(t[o]=td(a));return t}async function Afe(n){return WBe.toDataURL(n,{type:"image/png",errorCorrectionLevel:"M",margin:2,width:320})}async function ST(n,t){return!n||typeof n.verificationUrl!="string"?td(n):td({...n,qrCodeDataUrl:await t(n.verificationUrl)})}async function On(n,t){let o=structuredClone(n);return o?.provisioning&&(o.provisioning=await ST(o.provisioning,t)),td(o)}function tfe(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 T3(n,{encodeQr:t=Afe}={}){tfe(n);let o=new Map,a=e=>{let i=o.get(e);return i||(o.size>=16&&o.delete(o.keys().next().value),i=Promise.resolve().then(()=>t(e)),o.set(e,i)),i};return async(e,i,A)=>{if(A?.aborted)return du();if(!_3.includes(e))return cy("Unknown DingTalk endpoint.");let r=XBe(e,i);if(r)return cy(r);try{let s;if(e===Tt.status)s=await On(await n.status(),a);else if(e===Tt.beginProvisioning){let g=await n.startProvisioning({signal:A});if(A?.aborted)return await n.cancelProvisioning(g.attemptId),du();s=await ST(g,a)}else if(e===Tt.pollProvisioning){let g=await n.registrationStatus(i.attemptId);if(!g)return cy("The provisioning attempt no longer exists.");s=await ST(g,a)}else if(e===Tt.cancelProvisioning){if(s=await n.cancelProvisioning(i.attemptId),!s)return cy("The provisioning attempt no longer exists.");s=td(s)}else if(e===Tt.bindCredentials)s=await On(await n.bindCredentials(i),a);else if(e===Tt.reconnectBot){let g=await n.reconnectBot(i.botId);if(A?.aborted)return du();let c;if(i.sendTest===!0)if(!g?.bots?.some(p=>p?.botId===i.botId&&p?.connected===!0)||typeof n.sendConnectionTest!="function")c=lr(Qr("\u9489\u9489\u673A\u5668\u4EBA"));else try{await n.sendConnectionTest(i.botId),c=lr()}catch(p){c=lr(p)}s=await On({...g,...c?{testMessage:c}:{}},a)}else if(e===Tt.deleteBot)s=await On(await n.deleteBot(i.botId),a);else if(e===Tt.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");s=await On(await n.updateWorkspace(i.botId,i.workspace),a)}else if(e===Tt.setContextEnhancement){if(typeof n.updateContextEnhancement!="function")throw new Error("Context enhancement update is unavailable");s=await n.updateContextEnhancement(i.botId,i.config,g=>On(g,a))}else if(e===Tt.setAccessPolicy){if(typeof n.updateAccessPolicy!="function")throw new Error("Access policy update is unavailable");s=await n.updateAccessPolicy(i.botId,i.policy,g=>On(g,a))}else if(e===Tt.setGroupSessionScope){if(typeof n.updateGroupSessionScope!="function")throw new Error("Group session scope update is unavailable");s=await n.updateGroupSessionScope(i.botId,i.groupSessionScope,g=>On(g,a))}else if(e===Tt.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");s=await On(await n.updateAgentPreset(i.botId,i.agentPreset),a)}else e===Tt.approveSender?s=await On(await n.approveSender(i.botId,i.requestId),a):s=await On(await n.revokeSender(i.botId,i.senderKey),a);return A?.aborted?du():{ok:!0,value:s}}catch(s){let g=ra(s),c=efe(s);return A?.aborted?du():g?{ok:!1,error:g}:c?{ok:!1,error:c}:$Be()}}}function ly(n,t,o,a){if(!n?.connection?.rpc||typeof n.connection.rpc.handle!="function")throw new TypeError("DSH Host Connection RPC is required");return n.connection.rpc.handle(M3,T3(t,o),{authority:mr(a)})}async function N3(n,t={}){if(t?.controller)return ly(n,t.controller,t.rpcOptions,t.rpcAuthority);let o=await mT(n,t,t.internals),a=t.deliveryService&&o.deliveryAdapter?t.deliveryService.registerAdapter(o.deliveryAdapter):void 0,e=ly(n,o.controller,t.rpcOptions,t.rpcAuthority);return n.effect(()=>async()=>{await a?.(),await o.close()},"dsh-dingtalk: close bot connections"),e}import{createHash as rfe}from"node:crypto";import{mkdir as ife,readFile as afe,rename as ofe,unlink as nfe,writeFile as sfe}from"node:fs/promises";import{dirname as gfe}from"node:path";var wT=Object.freeze({version:1,bots:Object.freeze([])});function yg(n){return typeof n=="string"&&n.trim()?n.trim():null}function R3(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hu(n,{botPrefix:t,tokenRefPrefix:o}){let a=yg(n);if(!a)throw new TypeError("platformId is required");let e=rfe("sha256").update(a).digest("hex").slice(0,24);return{botId:`${t}_${e}`,tokenRef:`${o}_${e.toUpperCase()}`}}function py(n,t){let o=yg(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 rd=class{#e;#A;#t;#r;#I;#o;#c;#i=wT;#a=Promise.resolve();constructor(t,{channel:o,botPrefix:a,tokenRefPrefix:e,normalizeBotExtension:i=()=>({})}){if(typeof i!="function")throw new TypeError("normalizeBotExtension must be a function");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=new RegExp(`^${R3(a)}_[a-f0-9]{24}$`),this.#c=new RegExp(`^${R3(e)}_[A-F0-9]{24}$`)}async load(){try{let t=this.#p(JSON.parse(await afe(this.#e,"utf8")));if(!t)throw new Error(`dsh-im ${this.#A} config contains invalid bot data`);this.#i=t}catch(t){if(t?.code!=="ENOENT")throw t;this.#i=wT}return this}list(){return structuredClone(this.#i.bots)}get(t){let o=this.#i.bots.find(a=>a.botId===t);return o?structuredClone(o):null}getByPlatformId(t){let o=this.#i.bots.find(a=>a.platformId===t);return o?structuredClone(o):null}async save(t){let o=this.#s(t);if(!o)throw new Error(`Refusing to persist incomplete ${this.#A} bot data`);return this.#g(a=>{let e=a.find(r=>r.platformId===o.platformId&&r.botId!==o.botId),i=a.find(r=>r.tokenRef===o.tokenRef&&r.botId!==o.botId);if(e||i)throw new Error(`Duplicate ${this.#A} bot identity`);let A=a.findIndex(r=>r.botId===o.botId);return A===-1?a.push(o):a[A]=o,structuredClone(o)})}async remove(t){if(!this.#o.test(t))throw new TypeError(`Invalid ${this.#A} bot id`);return this.#g(o=>{let a=o.findIndex(i=>i.botId===t);if(a===-1)return null;let[e]=o.splice(a,1);return structuredClone(e)})}async clear(){let t=this.#a.then(async()=>{try{await nfe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#i=wT});this.#a=t.then(()=>{},()=>{}),await t}#s(t){if(!t||typeof t!="object")return null;let o=yg(t.platformId),a=yg(t.botId),e=yg(t.tokenRef),i=yg(t.name);if(!o||!a||!e||!i||!this.#o.test(a)||!this.#c.test(e))return null;let A=hu(o,{botPrefix:this.#t,tokenRefPrefix:this.#r});if(A.botId!==a||A.tokenRef!==e)return null;let r=this.#I(t);return!r||typeof r!="object"||Array.isArray(r)?null:Object.freeze({botId:a,platformId:o,tokenRef:e,name:i,username:yg(t.username),createdAt:yg(t.createdAt)??new Date().toISOString(),connectedAt:yg(t.connectedAt),...r})}#p(t){if(!t||t.version!==1||!Array.isArray(t.bots))return null;let o=t.bots.map(A=>this.#s(A));if(o.some(A=>A===null))return null;let a=new Set,e=new Set,i=new Set;for(let A of o){if(a.has(A.botId)||e.has(A.platformId)||i.has(A.tokenRef))return null;a.add(A.botId),e.add(A.platformId),i.add(A.tokenRef)}return Object.freeze({version:1,bots:Object.freeze(o)})}async#g(t){let o,a=this.#a.then(async()=>{let e=[...this.#i.bots];o=t(e);let i=Object.freeze({version:1,bots:Object.freeze(e)});await this.#l(i),this.#i=i});return this.#a=a.then(()=>{},()=>{}),await a,o}async#l(t){await ife(gfe(this.#e),{recursive:!0,mode:448});let o=`${this.#e}.tmp`;await sfe(o,`${JSON.stringify(t,null,2)} +`,{encoding:"utf8",mode:384}),await ofe(o,this.#e)}};var k3=Object.freeze({botPrefix:"discord",tokenRefPrefix:"DSH_DISCORD_BOT_TOKEN"});function v3(n){return hu(n,k3)}function P3(n){return py(n,w("Discord\u673A\u5668\u4EBA"))}var dy=class extends rd{constructor(t){super(t,{channel:"Discord",...k3})}};function Eu(n){return typeof n=="string"&&n.trim()?n.trim():null}function uu(n,t){return Object.freeze({code:n,message:t})}var id=class{#e;#A;#t;#r;#I;#o;#c;#i;#a;#s=new Map;#p=new Map;#g=new Map;#l=0;#n=!1;constructor({descriptor:t,credentials:o,configStore:a,inspectToken:e,deriveIdentity:i,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(!a||typeof a.list!="function"||typeof a.save!="function"||typeof a.remove!="function")throw new TypeError(`${t.label} requires a config store`);if(typeof e!="function"||typeof i!="function"||typeof A!="function"||typeof r!="function")throw new TypeError(`${t.label} controller dependencies are incomplete`);this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#c=r,this.#i=s,this.#a=g}async initialize(){if(this.#n)return this.status();for(let t of this.#t.list())await this.#B(t.botId,async()=>{if(this.#n||this.#s.get(t.botId)?.status?.ready)return;let o=await this.#C(t.tokenRef);if(!o){this.#p.set(t.botId,uu("missing-token",w("{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.#h(t,o),this.#p.delete(t.botId)}catch(a){this.#p.set(t.botId,uu("connection-failed",w("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002",{label:this.#e.label}))),this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t.botId} failed to initialize:`,a)}finally{this.#f()}});return this.status()}async bindCredentials({token:t}={}){if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let o=Eu(t);if(!o)throw new TypeError(`${this.#e.label} Bot Token is required`);let a=await this.#r(o),e=Eu(a?.platformId),i=Eu(a?.name);if(!e||!i)throw new Error(`${this.#e.label} returned an invalid bot identity`);let A=this.#I(e);return await this.#B(A.botId,async()=>{if(this.#n)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:i,username:Eu(a.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.#u(A.tokenRef,s),c}try{await this.#h(g,o),this.#p.delete(A.botId)}catch(c){this.#p.set(A.botId,uu("connection-failed",w("{label}\u673A\u5668\u4EBA\u5DF2\u63A5\u5165\uFF0C\u6D88\u606F\u8FDE\u63A5\u6682\u672A\u5C31\u7EEA\u3002",{label:this.#e.label}))),this.#a.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.#B(t,async()=>{let a=await this.#C(o.tokenRef);if(!a)throw new Error(`${this.#e.label} bot token is missing`);try{await this.#h(o,a),this.#p.delete(t)}catch(e){throw this.#p.set(t,uu("connection-failed",w("{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.#n)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.#B(t,async()=>{if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let a=this.#t.get(t);if(!a)throw new Error(`Unknown ${this.#e.label} bot`);let e=await this.#C(a.tokenRef);if(!e)throw new Error(`${this.#e.label} bot token is missing`);if(this.#n)throw new Error(`${this.#e.label} controller is closed`);let i=o(a),A=await this.#t.save(i);try{await this.#h(A,e),this.#p.delete(t)}catch(r){throw this.#p.set(t,uu("connection-failed",w("{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.#B(t,async()=>{let a=this.#s.get(t);if(!a?.status?.ready||typeof a.sendConnectionTest!="function"){let i=new Error(w("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw i.code="test-target-unavailable",i}let e=w("{name}\uFF08{id}\uFF09",{name:o.name,id:this.#o(o.platformId)});return await a.sendConnectionTest(Ui(e,w("{label}\u673A\u5668\u4EBA",{label:this.#e.label}))),{sent:!0}})}async sendProactiveText(t,o,a,e={}){if(!this.#t.get(t))throw new Error(`Unknown ${this.#e.label} bot`);return this.#B(t,async()=>{let A=this.#s.get(t);if(!A?.status?.ready||typeof A.sendProactiveText!="function"){let r=new Error(w("{label}\u673A\u5668\u4EBA\u5C1A\u672A\u8FDE\u63A5",{label:this.#e.label}));throw r.code="bot-not-connected",r}return A.sendProactiveText(o,a,e)})}async deleteBot(t){let o=this.#t.get(t);if(!o)throw new Error(`Unknown ${this.#e.label} bot`);return await this.#B(t,async()=>{let a=await this.#A.resolve(o.tokenRef).catch(()=>{});await this.#d(t);try{await this.#A.unset(o.tokenRef),await this.#t.remove(t)}catch(e){throw a?.value&&(await this.#A.set(o.tokenRef,a.value).catch(()=>{}),await this.#h(o,a.value).catch(()=>{})),new Error(`Unable to remove the ${this.#e.label} bot safely.`,{cause:e})}await this.#i({botId:t,config:o}).catch(e=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t} state cleanup failed:`,e)}),this.#p.delete(t),this.#f()}),this.status()}status(){let t=this.#t.list().map(a=>{let e=this.#s.get(a.botId)?.status??null,i=e?.ready===!0&&e.connectionState==="connected"&&e.harnessReachable===!0,A=i?"connected":e?.connectionState==="connecting"?"connecting":this.#p.has(a.botId)||e?.connectionState==="failed"?"error":"offline";return{botId:a.botId,state:A,connected:i,configured:!0,bot:{name:a.name,username:a.username,idMasked:this.#o(a.platformId)},health:{status:i?"healthy":A==="error"?"error":"offline",summary:i?w("{label}{connectionLabel}\u8FD0\u884C\u6B63\u5E38",{label:this.#e.label,connectionLabel:w(this.#e.connectionLabel)}):A==="error"?w("{label}\u8FDE\u63A5\u672A\u5C31\u7EEA\uFF0C\u63D2\u4EF6\u4F1A\u81EA\u52A8\u91CD\u8BD5",{label:this.#e.label}):w("{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:ti(e?.lastMessageError),error:structuredClone(this.#p.get(a.botId)??null)}}),o=t.filter(a=>a.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.#n||(this.#n=!0,await Promise.allSettled([...this.#g.values()]),await Promise.allSettled([...this.#s.keys()].map(t=>this.#d(t))))}async#h(t,o){if(this.#n)throw new Error(`${this.#e.label} controller is closed`);if(await this.#d(t.botId),this.#n)throw new Error(`${this.#e.label} controller is closed`);let a=await this.#c({botId:t.botId,config:t,token:o});if(!a||typeof a.start!="function"||typeof a.stop!="function")throw new TypeError(`createRuntime returned an invalid ${this.#e.label} runtime`);this.#s.set(t.botId,a);try{await a.start()}catch(e){throw await a.stop().catch(()=>{}),this.#s.delete(t.botId),e}}async#d(t){let o=this.#s.get(t);this.#s.delete(t),await o?.stop().catch(a=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] bot ${t} failed to stop cleanly:`,a)})}async#C(t){let o=await this.#A.resolve(t).catch(()=>{});return Eu(o?.value)}async#u(t,o){o?.value?await this.#A.set(t,o.value).catch(()=>{}):await this.#A.unset(t).catch(()=>{})}#B(t,o){let i=(this.#g.get(t)??Promise.resolve()).catch(()=>{}).then(o).finally(()=>{this.#g.get(t)===i&&this.#g.delete(t)});return this.#g.set(t,i),i}#f(){this.#l+=1}};import{createHash as cfe}from"node:crypto";var Ife="https://discord.com/api/v10/",lfe=12e4,pfe=new Set([50001,50013]),dfe=new Set([40005]);function hs(n){return typeof n=="string"&&n.trim()?n.trim():null}function G3(n,t){let o=AbortSignal.timeout(t);return n?AbortSignal.any([n,o]):o}function DT(n){return n?.reason instanceof Error?n.reason:new DOMException("The operation was aborted","AbortError")}function hfe(n,t){if(!Number.isInteger(n)||n<1)throw new TypeError(`${t} must be a positive integer`);return n}function L3(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 Efe(n){let t=Number(n?.providerCode),o=Number(n?.status),a=hs(n?.message)??"",e="artifact-provider-rejected",i="Discord rejected the attachment.";o===401||o===403||pfe.has(t)?(e="artifact-permission-required",i="Discord denied permission to send the attachment."):o===413||dfe.has(t)||/(?:request|attachment|file).{0,24}too large/i.test(a)?(e="artifact-too-large",i="The attachment exceeds Discord's size limit."):o===429?(e="artifact-rate-limited",i="Discord rate-limited attachment delivery."):o>=500&&(e="artifact-delivery-uncertain",i="Discord attachment delivery result is uncertain.");let A=new Error(i,{cause:n});return A.code=e,L3(A,n)}function ufe(n){let t=new Error("Discord attachment delivery result is uncertain",{cause:n});return t.code="artifact-delivery-uncertain",L3(t,n)}function Cfe(n,t){return new Promise((o,a)=>{if(t?.aborted){a(t.reason??new DOMException("Aborted","AbortError"));return}let e=setTimeout(o,n);e?.unref?.(),t?.addEventListener("abort",()=>{clearTimeout(e),a(t.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function gi(n,t){let o=hs(n);if(!o||!/^\d{5,30}$/.test(o))throw new TypeError(`Invalid Discord ${t}`);return o}function F3(n){let t=hs(n);if(!t)throw new TypeError("A Discord reaction emoji is required");return t}function Bfe(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{20,}$/.test(n.trim())}var Cu=class{#e;#A;#t;#r;constructor({token:t,fetchImpl:o=fetch,baseUrl:a=Ife,fileUploadTimeoutMs:e=lfe}){if(!Bfe(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(a),this.#r=hfe(e,"fileUploadTimeoutMs")}getCurrentUser(t={}){return this.#I("users/@me",{...t,method:"GET"})}getGatewayBot(t={}){return this.#I("gateway/bot",{...t,method:"GET"})}getChannel({channelId:t,signal:o}={}){return this.#I(`channels/${gi(t,"channel id")}`,{method:"GET",signal:o})}getMessage({channelId:t,messageId:o,signal:a}={}){return this.#I(`channels/${gi(t,"channel id")}/messages/${gi(o,"message id")}`,{method:"GET",signal:a})}startThreadFromMessage({channelId:t,messageId:o,name:a,signal:e}={}){let i=hs(a);if(!i||[...i].length>100)throw new TypeError("Discord thread name must contain 1-100 characters");if(e?.aborted)throw DT(e);return this.#I(`channels/${gi(t,"channel id")}/messages/${gi(o,"message id")}/threads`,{method:"POST",signal:e,body:{name:i}})}createMessage({channelId:t,content:o,replyToMessageId:a,signal:e}){return this.#I(`channels/${gi(t,"channel id")}/messages`,{method:"POST",signal:e,body:{content:o,allowed_mentions:{parse:[],replied_user:!1},...a?{message_reference:{message_id:gi(a,"message id"),channel_id:gi(t,"channel id"),fail_if_not_exists:!1}}:{}}})}async createFileMessage({channelId:t,file:o,replyToMessageId:a,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 i=hs(o.deliveryKey)??hs(o.artifactId),A=i?cfe("sha256").update(i).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}:{},...a?{message_reference:{message_id:gi(a,"message id"),channel_id:gi(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=gi(t,"channel id");if(e?.aborted)throw DT(e);let g=G3(e,this.#r);try{return await this.#I(`channels/${s}/messages`,{method:"POST",signal:g,timeoutMs:this.#r,body:r,multipart:!0})}catch(c){throw e?.aborted?DT(e):c?.code?.startsWith?.("discord-")?Efe(c):ufe(c)}}editMessage({channelId:t,messageId:o,content:a,signal:e}){return this.#I(`channels/${gi(t,"channel id")}/messages/${gi(o,"message id")}`,{method:"PATCH",signal:e,body:{content:a,allowed_mentions:{parse:[],replied_user:!1}}})}sendTyping({channelId:t,signal:o}){return this.#I(`channels/${gi(t,"channel id")}/typing`,{method:"POST",signal:o,expectBody:!1})}async addOwnReaction({channelId:t,messageId:o,emoji:a,signal:e}={}){let i=F3(a);return await this.#I(`channels/${gi(t,"channel id")}/messages/${gi(o,"message id")}/reactions/${encodeURIComponent(i)}/@me`,{method:"PUT",signal:e,expectBody:!1,retry:!1}),i}removeOwnReaction({channelId:t,messageId:o,emoji:a,signal:e}={}){let i=F3(a);return this.#I(`channels/${gi(t,"channel id")}/messages/${gi(o,"message id")}/reactions/${encodeURIComponent(i)}/@me`,{method:"DELETE",signal:e,expectBody:!1,retry:!1})}async#I(t,{method:o,body:a,signal:e,timeoutMs:i=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)"},...a===void 0?{}:{body:s?a:JSON.stringify(a)},signal:G3(e,i),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 Cfe(I,e),this.#I(t,{method:o,body:a,signal:e,timeoutMs:i,expectBody:A,retry:!1,multipart:s})}if(!g.ok){let I=new Error(hs(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 p=Number(c?.retry_after);throw Number.isFinite(p)&&p>=0&&(I.retry_after=p,I.retryAfter=p),I}return A?c:null}};async function U3(n,t={}){let a=await new Cu({token:n,...t}).getCurrentUser();if(!a?.id||a?.bot!==!0)throw new Error("Discord token does not belong to a bot");return{platformId:String(a.id),name:hs(a.global_name)??hs(a.username)??w("Discord\u673A\u5668\u4EBA"),username:hs(a.username)}}var ffe=Object.freeze({success(){},error(){},clear(){},settled:()=>Promise.resolve()});function H3(n,t){!n||typeof n!="object"||(n[t]=(n[t]??0)+1)}async function Qfe(n,t){let o=AbortSignal.timeout(t),a,e=new Promise((i,A)=>{a=()=>A(o.reason??new DOMException("Timed out","TimeoutError")),o.addEventListener("abort",a,{once:!0})});try{return await Promise.race([n(o),e])}finally{o.removeEventListener("abort",a)}}function hy({adapter:n,target:t,reactions:o,status:a,logger:e=console,label:i="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 ffe;let r=null,s=!1,g=async(B,f)=>{try{let Q=await Qfe(f,A);return H3(a,B==="add"?"reactionsAdded":"reactionsRemoved"),{ok:!0,value:Q}}catch(Q){return H3(a,"reactionErrors"),e.warn?.(`[dsh-im:${i}] 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),p=B=>{s||(s=!0,I=I.then(()=>c(B),()=>c(B)),I.catch(()=>{}))};return Object.freeze({success:()=>p(o.success),error:()=>p(o.error),clear:()=>p(null),settled:()=>I})}var K3="\u8FD9\u4E2A\u95EE\u9898\u5DF2\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u5904\u7406\uFF0C\u65E0\u9700\u518D\u6B21\u56DE\u7B54\u3002",yfe="\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002";function Ea(n){return typeof n=="string"?n.trim():""}function mfe(n,t,o){return t.actor===o&&(n.kind!=="group"||n.addressed===!0)&&!Rt(n)&&!Ot(n)&&!!Ea(n.content)}function Sfe(n,t,o){let a=String(n??w("\u7ED3\u679C\u6587\u4EF6")).replace(/[\r\n]+/g," ").trim().slice(0,255)||w("\u7ED3\u679C\u6587\u4EF6");switch(t?.code){case"artifact-delivery-uncertain":return w("\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:a});case"artifact-permission-required":return o?.key==="slack"?w("\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:a}):o?.key==="discord"?w("\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:a}):o?.key==="telegram"?w("\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:a}):w("\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:a});case"artifact-too-large":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u8D85\u8FC7\u5F53\u524D\u6E20\u9053\u5927\u5C0F\u4E0A\u9650\uFF0C\u672A\u53D1\u9001\u3002",{name:a});case"artifact-empty":return w("\u7ED3\u679C\u6587\u4EF6\u300C{name}\u300D\u4E3A\u7A7A\uFF0C\u672A\u53D1\u9001\u3002",{name:a});case"artifact-invalid":case"artifact-changed":case"artifact-unavailable":return w("\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:a});case"artifact-rate-limited":return w("\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:a});case"artifact-provider-rejected":return w("\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:a});default:return w("\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:a})}}function co(){return{messagesReceived:0,messagesReplied:0,messagesRejected:0,lastMessageAt:null,lastReplyAt:null,lastRejectedAt:null,lastError:null,lastMessageError:null,reactionsAdded:0,reactionsRemoved:0,reactionErrors:0}}var Es=class{#e;#A;#t;#r;#I;#o;#c;#i;#a;#s;#p;#g=new Map;#l=new Map;#n=new Map;#h=new Map;#d=new Set;#C=new Set;#u;#B=new va;constructor({descriptor:t,bot:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,groupSessionScope:r=Wp,status:s=co(),logger:g=console,replyTimeoutMs:c=6e5,signal:I}){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(!a||!e)throw new TypeError("Harness client and state store are required");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#c=r,this.#i=s,this.#a=g,this.#s=c,this.#p=I,this.#u=new _a({label:t.key,logger:g})}get status(){return structuredClone(this.#i)}#f(){let t=this.#c;return t&&typeof t=="object"&&typeof t.getScope=="function"?Zp(t.getScope()):Zp(t)}accept(t,{contextSnapshot:o,accessDecision:a}={}){if(this.#p?.aborted)return Promise.resolve();let e=Ea(t?.conversationId),i=t?.kind==="group"?"group":"direct",A={...t,kind:i,conversationId:e},r=Ea(A.messageId),s=Ea(A.senderId);if(!r||!s||!e||A.senderIsBot===!0||this.#r.hasSeen(r)||this.#h.has(r))return Promise.resolve();if(i==="group"&&A.addressed!==!0)return this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString(),this.#h.set(r,null),this.#w(A,r,null);if(this.#o||a){let I=Rt(A),p=Ot(A),B=a??Mi(this.#o,{conversationType:i,senderIds:[s,Ea(A.senderAlternateId)].filter(Boolean),text:A.content,hasImages:I,hasFiles:p});if(!B.allowed)return this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString(),this.#h.set(r,null),this.#w(A,r,B.reason==="command-not-allowed"?w(go):null,{recordReceived:B.reason==="command-not-allowed"})}this.#h.set(r,o===void 0?ai(this.#I,t?.kind):o);let g=hy({adapter:this.#A,target:A.kind==="direct"||A.addressed===!0?A.reactionTarget:null,reactions:this.#e.reactions,status:this.#i,logger:this.#a,label:this.#e.key});A.statusReaction=g;let c=this.#m(A,r,s);return c.then(()=>g.success(),()=>g.error()),c}#m(t,o,a){t.kind==="direct"&&bo(this.#r,t.connectionTestTarget??t.replyTarget);let e=h3({kind:t.kind,conversationId:t.conversationId,senderId:a,groupSessionScope:this.#f()}),i=this.#l.get(e),A=Ea(t.content),r=Pa(A);if(r&&t.kind==="group"&&t.addressed===!0)return this.#w(t,o,cs());if(r&&t.kind==="direct"){if(/^\/batch$/iu.test(A)&&(this.#g.has(e)||i||this.#u.hasPending(e)))return this.#w(t,o,Po());let p=this.#B.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!Rt(t)&&!Ot(t)&&!Hr(t)});if(p.handled)return p.kind==="submit"?this.#Q({...t,content:p.prompt,batchSubmission:{token:p.token}},o,a,e):this.#w(t,o,p.message)}else if(t.kind==="direct"&&this.#B.status(e).phase==="collecting"){let I=this.#B.handle(e,A,{plainText:!!A&&t.plainText!==!1&&!Rt(t)&&!Ot(t)&&!Hr(t)});if(I.handled)return this.#w(t,o,I.message)}let g=t.kind==="direct"&&this.#B.status(e).phase==="collecting"?null:Ki(A)?oo:Ot(t)?null:la(A)?Ra:pa(A)?no:da(A)?ka:null;if(g&&(t.kind!=="group"||t.addressed===!0)){let I;return I=this.#y(t,o,e,g).finally(()=>{this.#h.delete(o),this.#C.delete(I)}),this.#C.add(I),I}let c=this.#u.claimReply({key:e,actor:a,messageId:o,text:Rt(t)||Ot(t)?"":t.content,addressed:t.kind!=="group"||t.addressed===!0,hasPendingQuestion:!!i,questionCompletion:i?.submitting||i?.claimedReplyMessageId?i.queue:null,isQuestionPending:()=>this.#l.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.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString(),!0)).finally(()=>{this.#h.delete(o),this.#d.delete(I)}),this.#d.add(I),I}if(i&&i.actor!==a)return this.#Q(t,o,a,e);if(i?.submitting||i?.claimedReplyMessageId)return this.#Q(t,o,a,e);if(i){mfe(t,i,a)&&(i.claimedReplyMessageId=o);let p=(i.queue??Promise.resolve()).catch(()=>{}).then(()=>this.#k(t,o,a,e,i)).finally(()=>{this.#h.delete(o),i.claimedReplyMessageId===o&&(i.claimedReplyMessageId=null),i.queue===p&&(i.queue=null)});return i.queue=p,p}return this.#Q(t,o,a,e)}#w(t,o,a,{recordReceived:e=!0}={}){let i;return i=(async()=>{this.#r.hasSeen(o)||(await this.#r.markSeen(o),e&&(this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()),a&&await this.#A.sendText(t.replyTarget,a),this.#i.lastError=null)})().catch(async A=>{if(this.#p?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a batch input message [${r.referenceId}]:`,A)}).finally(()=>{this.#h.delete(o),this.#C.delete(i)}),this.#C.add(i),i}#Q(t,o,a,e,{releaseMessageId:i=!0,alreadyRecorded:A=!1}={}){let s=(this.#g.get(e)??Promise.resolve()).catch(()=>{}).then(()=>this.#E(t,o,a,e,{alreadyRecorded:A})).finally(()=>{i&&this.#h.delete(o),this.#g.get(e)===s&&this.#g.delete(e)});return this.#g.set(e,s),s}async waitForIdle(){await Promise.allSettled([...this.#g.values(),...[...this.#l.values()].flatMap(t=>t.queue?[t.queue]:[]),...this.#d,...this.#C])}async#y(t,o,a,e){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString();let i=t.replyTarget;try{let A=await e(Ea(t.content),this.#t,this.#r,a,{signal:this.#p,isDirect:t.kind==="direct",hasImages:Rt(t),hasFiles:Ot(t),pendingInteraction:this.#l.has(a)||this.#u.hasPending(a),control:{owner:this,key:a}});A?.stopped&&await Promise.allSettled([this.#G(a),this.#u.closeRoute(a)]);for(let r of A?.messages??[A?.message])r&&await this.#A.sendText(i,r);this.#i.lastError=null}catch(A){if(A?.code==="turn-stopped"||this.#p?.aborted){t.statusReaction?.clear();return}t.statusReaction?.error(),this.#i.lastError=A?.message??String(A);let r=rt(this.#i,A);this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a command [${r.referenceId}]:`,A),await this.#A.sendText(i,ut(r)).catch(()=>{})}}sendConnectionTest(t){return Ec({state:this.#r,text:t,channelLabel:w("{label}\u673A\u5668\u4EBA",{label:this.#e.label}),send:(o,a)=>this.#A.sendText(o,a)})}sendProactiveText(t,o,{signal:a}={}){return a?.throwIfAborted(),this.#A.sendText(t,o)}async#b(t,o,a=[],e){let i=await Lo({artifacts:a,baseReceipt:e,deliveryId:o,channelKey:this.#e.key,signal:this.#p,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)=>rt(this.#i,r,{userMessage:Sfe(A?.fileName,r,this.#e),reason:r?.code}),sendFailureNotice:(A,r,s)=>this.#A.sendText(t,ut(s)),logger:this.#a});return this.#i.artifactsSent=(this.#i.artifactsSent??0)+i.artifactsSent,this.#i.artifactSendErrors=(this.#i.artifactSendErrors??0)+i.artifactSendErrors,{receipt:i.receipt,userVisible:i.userVisible,artifactSendErrors:i.artifactSendErrors}}async#E(t,o,a,e,{alreadyRecorded:i=!1}={}){if(!i){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()}let A=t.replyTarget,r=Ea(t.content),s=t.batchSubmission,g=null,c=!1;try{if(this.#p?.throwIfAborted(),t.kind==="group"&&t.addressed!==!0){this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString();return}let I=Rt(t),p=Ot(t),B=Hr(t);if(!r&&!I&&!p&&!B){await this.#A.sendText(A,w("\u76EE\u524D\u652F\u6301\u6587\u5B57\u3001\u56FE\u7247\u548C\u6587\u4EF6\u6D88\u606F\u3002"));return}let f=r.toLowerCase();if(!I&&!p&&f==="/help"){await this.#A.sendText(A,[w("{label}\u673A\u5668\u4EBA\u5DF2\u8FDE\u63A5 DeepSeek Harness\u3002",{label:this.#e.label}),"",w("\u76F4\u63A5\u53D1\u9001\u6587\u5B57\u3001\u56FE\u7247\u6216\u6587\u4EF6\u5373\u53EF\u7EE7\u7EED\u5F53\u524D\u4F1A\u8BDD\u3002"),w("/new \u5F00\u542F\u4E00\u4E2A\u5168\u65B0\u4F1A\u8BDD"),w("/compact \u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u7684\u8F83\u65E9\u4E0A\u4E0B\u6587"),w("/history [\u6570\u91CF] \u67E5\u770B\u6700\u8FD1\u5386\u53F2\u6D88\u606F\uFF08\u9ED8\u8BA4 3 \u6761\uFF0C\u6700\u591A 5 \u6761\uFF09"),w("/workspace \u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84 \u5207\u6362\u5DE5\u4F5C\u533A"),w("/workspacelist \u5217\u51FA\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84"),w("/ws\u3001/wsl\u3001/workspaces \u5DE5\u4F5C\u533A\u547D\u4EE4\u522B\u540D"),w("/sessionlist \u6216 /sessions [\u5DE5\u4F5C\u533A\u5E8F\u53F7\u6216\u7EDD\u5BF9\u8DEF\u5F84] \u5217\u51FA\u4F1A\u8BDD ID \u548C\u6807\u9898"),w("/sessionlist --limit N \u4EC5\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u524D N \u4E2A\u4F1A\u8BDD"),w("/session Session ID \u6216\u5F53\u524D\u5DE5\u4F5C\u533A\u5E8F\u53F7 \u5C06\u5F53\u524D\u804A\u5929\u7ED1\u5B9A\u5230\u6307\u5B9A\u4F1A\u8BDD"),w("/models \u6309\u5E8F\u53F7\u5217\u51FA\u6240\u6709\u53EF\u7528\u6A21\u578B"),w("/reasoninglist \u6216 /reasonings \u6309\u5E8F\u53F7\u5217\u51FA\u5F53\u524D\u6A21\u578B\u53EF\u7528\u63A8\u7406\u7B49\u7EA7"),w("/reasoning [\u5E8F\u53F7\u3001\u7B49\u7EA7ID\u6216 --default] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u63A8\u7406\u7B49\u7EA7"),w("/model [\u5E8F\u53F7\u6216\u5B8C\u6574\u6A21\u578BID] [\u63A8\u7406\u7B49\u7EA7ID] \u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u4F1A\u8BDD\u6A21\u578B"),w("\u793A\u4F8B\uFF1A\u5148\u53D1 /models\uFF0C\u518D\u53D1 /model 2 [\u63A8\u7406\u7B49\u7EA7ID]"),w("/presetlist \u6216 /presets \u6309\u5E8F\u53F7\u5217\u51FA\u53EF\u7528 Agent Preset"),w("/preset [\u5E8F\u53F7\u6216\u5B8C\u6574ID] \u67E5\u770B\u6216\u8BBE\u7F6E\u5F53\u524D\u673A\u5668\u4EBA Agent Preset"),w("\u7EAF\u6570\u5B57 ID\uFF1A/preset id:"),w("/preset --default \u8DDF\u968F Host \u9ED8\u8BA4"),w("/stop \u505C\u6B62\u5F53\u524D\u4EFB\u52A1"),w("/steer \u8865\u5145\u6307\u4EE4 \u7EA0\u504F\u5F53\u524D\u4EFB\u52A1"),w("/batch \u5F00\u59CB\u6279\u91CF\u8F93\u5165\uFF08\u4EC5\u79C1\u804A\uFF0C\u6700\u591A 10 \u6761\u6587\u5B57\uFF09"),w("/send \u63D0\u4EA4\u5F53\u524D\u6279\u6B21"),w("/cancel \u53D6\u6D88\u5F53\u524D\u6279\u6B21"),w("/status \u68C0\u67E5\u8FDE\u63A5\u72B6\u6001"),w("/version \u67E5\u770B\u63D2\u4EF6\u7248\u672C"),w("/help \u663E\u793A\u672C\u5E2E\u52A9")].join(` +`));return}if(!I&&!p&&f==="/status"){await this.#t.ensureRunning({signal:this.#p}),await this.#A.sendText(A,w("{label}\u673A\u5668\u4EBA\u4E0E DeepSeek Harness \u8FDE\u63A5\u6B63\u5E38\u3002",{label:this.#e.label}));return}let Q=!I&&!p?await Ro(r,this.#t,e):null;if(Q){for(let N of Q.messages??[Q.message])await this.#A.sendText(A,N);return}if(!I&&!p&&f==="/new"){await this.#r.clearSession(e),await this.#A.sendText(A,w("\u5DF2\u5F00\u542F\u65B0\u4F1A\u8BDD\u3002\u8BF7\u53D1\u9001\u4F60\u7684\u95EE\u9898\u3002"));return}let y=!I&&!p?await Na(r,this.#t,this.#r,e,{signal:this.#p}):null;if(y){await this.#A.sendText(A,y.message);return}await this.#A.sendTyping?.(A).catch(N=>{this.#a.warn?.(`[dsh-im:${this.#e.key}] typing indicator failed:`,N)});let m=!1;if(typeof this.#A.openDeliveryStream=="function")try{g=await this.#A.openDeliveryStream(A),c=!0}catch(N){this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to start a semantic reply stream; using final delivery:`,N)}else if(typeof this.#A.openStream=="function")try{g=await this.#A.openStream(A)}catch(N){this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to start a streamed reply; using text:`,N)}let T=I||B?await Uo(t,{signal:this.#p}):void 0,_=this.#h.get(o),R=!1;if(_){let N=T??r,k=t.contextSource?.();T=vo(N,_,()=>({channel:this.#e.key,senderId:a,senderName:k?.senderName,conversationTitle:k?.conversationTitle,chatId:k?.chatId??t.conversationId,threadId:k?.threadId})),R=T!==N}let{answer:L,artifacts:U=[]}=await Ta({harness:this.#t,state:this.#r,key:e,text:r,content:T,contextEnhanced:R,createOptions:this.#p?{signal:this.#p}:void 0,existsOptions:this.#p?{signal:this.#p}:void 0,askOptions:{timeoutMs:this.#s,signal:this.#p,control:{owner:this,key:e},onUpdate:g?async N=>{let k=N.type==="text"?N.text:N.type==="tool"?w("\u6B63\u5728\u4F7F\u7528{name}\u2026",{name:N.name}):N.text;if(k){let J=N.type==="text"?"markdown":"plain";await g.update(c?ls(k,J):k)}}:void 0,onInteraction:N=>this.#M(N,{key:e,actor:a,target:A,requiresMention:t.kind==="group"&&t.requiresMention!==!1}),onInteractionResolved:N=>this.#D(N),files:t.files}});s&&this.#B.complete(e,s.token);let F=!Ea(L)&&U.length>0,q=F?w(yfe):L,z=F?"plain":"markdown",K=null,G=null;if(g)try{let N=await g.finish(c?ls(q,z):q);m=!0,G=tr({deliveryId:o,presentation:N?.presentation??g.presentation??`${this.#e.key}-stream`,providerMessageIds:[...Ur(g),...Ur(N)],deliveryOutcome:N?.deliveryOutcome,reason:N?.reason})}catch(N){g.cancel?.(),this.#a.warn?.(`[dsh-im:${this.#e.key}] streamed reply finalization failed; using text:`,N)}if(!m)try{let N=typeof this.#A.sendDelivery=="function"?await this.#A.sendDelivery(A,ls(q,z)):await this.#A.sendText(A,q);G=tr({deliveryId:o,presentation:N?.presentation??`${this.#e.key}-text`,providerMessageIds:Ur(N),deliveryOutcome:N?.deliveryOutcome,reason:N?.reason})}catch(N){K=Hi(N)}let V=G?.deliveryOutcome==="unknown";G?.deliveryOutcome==="failed"?K=Hi(new Error(`Final text delivery failed (${G.reason??"unknown"})`),{uncertain:!1}):V&&(K=Hi(new Error(`Final text delivery outcome is unknown (${G.reason??"unknown"})`)));let H=await this.#b(A,o,U,G);if(K&&(!H.userVisible||V))throw K.deliveryReceipt=H.receipt,K;return K&&H.artifactSendErrors===0&&rt(this.#i,K),H.userVisible&&(this.#i.messagesReplied+=1,this.#i.lastReplyAt=new Date().toISOString(),this.#i.lastError=null,!K&&H.artifactSendErrors===0&&Mo(this.#i)),H.receipt}catch(I){let p=I?.code==="turn-stopped";s&&p&&this.#B.complete(e,s.token);let B=s&&!p?this.#B.fail(e,s.token):null;if(p){if(t.statusReaction?.clear(),g)try{await g.finish(w("\u5DF2\u505C\u6B62\u3002"))}catch{g.cancel?.()}return}if(this.#p?.aborted){t.statusReaction?.clear(),g?.cancel?.();return}t.statusReaction?.error(),this.#i.lastError=I?.message??String(I);let f=async _=>{let R=typeof g?.fail=="function"?"fail":typeof g?.finish=="function"?"finish":null;if(!R)return!1;try{let L=await g[R](_);return R==="fail"?!!L&&L.deliveryOutcome!=="failed":L!==!1&&L?.deliveryOutcome!=="failed"}catch(L){return this.#a.warn?.(`[dsh-im:${this.#e.key}] unable to finalize the failed stream:`,L),!1}},Q=No(I),y=Fo(I),m=rt(this.#i,I,{userMessage:y??Q,reason:ao(I)?.reason}),T=B?.retained?`${ut(m)} -${B.message}`:ut(m);if(this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a message [${m.referenceId}]:`,I),await f(T))return I.deliveryReceipt;g?.cancel?.();try{await this.#A.sendText(A,T)}catch(_){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send the safe error reply:`,_)}return I.deliveryReceipt}finally{await Promise.allSettled([this.#P(e),this.#u.closeRoute(e)])}}async#b(t,o,i,e,a){if(this.#s?.aborted){t.statusReaction?.clear();return}let A=this.#c.get(e),r=a.claimedReplyMessageId===o;if(!A||A!==a||A.submitting)return r&&(!A||A!==a)?this.#D(t,o):this.#Q(t,o,i,e,{releaseMessageId:!1});if(this.#r.hasSeen(o))return;if(await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString(),t.kind==="group"&&t.addressed!==!0){this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString();return}let s=t.replyTarget,g=pi(t.content);if(!g||Nt(t)||Dt(t)){try{await this.#A.sendText(s,w("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"))}catch(d){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to reject a non-text interaction reply:`,d)}return}let c=this.#c.get(e);if(!c||c!==a||c.submitting)return r&&(!c||c!==a)?this.#D(t,o,{alreadyRecorded:!0}):this.#Q(t,o,i,e,{releaseMessageId:!1,alreadyRecorded:!0});if(c.target=s,c.needsPresentation){let d=c.presentationTask!==null;try{await this.#_(c)}catch(f){t.statusReaction?.error(),this.#i.lastError=w("{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",{label:this.#e.label}),this.#a.error?.(`[dsh-im:${this.#e.key}] failed to retry an interaction question:`,f),c.interaction.reconnect?.();return}let B=this.#c.get(e);if(!B||B!==a||B.submitting)return r&&(!B||B!==a)?this.#D(t,o,{alreadyRecorded:!0}):this.#Q(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=pi(t?.interactionId)||pi(t?.rpcId);if(!pi(t?.rpcId)||!r||!pi(t?.sessionId)||!Array.isArray(A)||A.length===0||A.some(c=>!Di(c))){this.#a.warn?.(`[dsh-im:${this.#e.key}] ignored an invalid Harness question interaction`);return}if(t.recovered===!0){await this.#M(t,`${this.#e.label} safely cancelled an interaction left by an earlier client.`);try{await this.#A.sendText(e,w("\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.#a.error?.(`[dsh-im:${this.#e.key}] failed to send an interaction recovery notice:`,c)}return}let s=this.#c.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#_(s);return}if(this.#g.has(r))return;if(s){this.#a.warn?.(`[dsh-im:${this.#e.key}] cancelled a second pending Harness question`),await this.#M(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.#c.set(o,g),this.#g.set(r,o),await this.#_(g)}async#R(t){if(t?.kind==="approval"){await this.#u.handleResolved(t);return}let o=pi(t?.interactionId);if(t?.kind!=="question"||!o)return;let i=this.#g.get(o);i&&this.#T(i,o)}#_(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,gi(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#D(t,o,{alreadyRecorded:i=!1}={}){if(!i){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()}try{await this.#A.sendText(t.replyTarget,w(P3))}catch(e){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send an expired interaction notice:`,e)}}#w(t,o){let i=this.#c.get(t);return!i||o!==void 0&&i.interactionId!==o?null:(this.#c.delete(t),this.#g.delete(i.interactionId),i)}#T(t,o){return this.#w(t,o)!==null}async#M(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#P(t){let o=this.#w(t);if(!(!o||o.kind!=="question"))try{await this.#M(o.interaction,`The ${this.#e.label} interaction ended before the user answered.`)}catch(i){this.#a.warn?.(`[dsh-im:${this.#e.key}] failed to cancel a pending Harness interaction:`,i)}}};var yT=Object.freeze({key:"discord",label:"Discord",connectionLabel:" Gateway \u957F\u8FDE\u63A5",reactions:Object.freeze({processing:"\u{1F440}",success:"\u2705",error:"\u274C"})}),Iy=class extends ps{constructor(t){super({descriptor:yT,...t})}};var pu=class extends Xd{constructor(t){super({...t,descriptor:yT,inspectToken:t.inspectToken??k3,deriveIdentity:M3,maskPlatformId:_3})}};var ly=class extends Qr{constructor(t){super({...t,rpcIdPrefix:"discord",logPrefix:"dsh-discord"})}};function hs(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=hs(y,t)[0]??n;d=Promise.resolve(m===f?void 0:e(s,m)).then(()=>{f=m}).catch(T=>r.warn?.("[dsh-im] streamed message update failed:",T)).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=hs(y,t),T=m[0]??w("\u5904\u7406\u5B8C\u6210\u3002");T!==f&&await e(s,T),f=T;for(let _ of m.slice(1)){let R=await a(_),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 G3(n){try{await n?.body?.cancel?.()}catch{}}function Bfe(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 $d(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(!Bfe(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 G3(A);let r=new Error(`File download redirect was blocked (HTTP ${A.status})`);throw r.code="file-redirect-blocked",r}if(!A?.ok){await G3(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 ffe=37377,Qfe=5e3,F3=Object.freeze([1e3,3e3,5e3,1e4,3e4]),yfe=0,mfe=5,Sfe=10,wfe=11,Dfe=12,Ofe=new Set([Sfe,wfe,Dfe]),bfe=new Set(["image/jpeg","image/png","image/webp","image/gif"]),Mfe=new Map([[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".gif","image/gif"]]),K3=Object.freeze(["cdn.discordapp.com"]);function _fe(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 mT(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 Tfe(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 Nfe(n){if(n===4004){let o=new Error(w("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(w("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 x3(n,t){return typeof n!="string"?"":n.replace(new RegExp(`<@!?${t}>`,"g"),"").trim()}function Rfe(n,t){return[...x3(n?.content??"",t).replace(/\s+/g," ").trim()||"DeepSeek Harness"].slice(0,100).join("")}function DT(n){return Ofe.has(Number(n?.type))}function Y3(n,t){return DT(n)&&String(n?.id??"")===String(t?.id??"")&&String(n?.parent_id??"")===String(t?.channel_id??"")}function ST(n,t){return n?.id&&t?.(n),n}function qI(n,t,o,{fromSourceMessage:i=!1,fallback:e=null,notice:a=null}={}){let A=String(t?.id??n.conversationId),r=DT(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 kfe(n){let t=Number(n?.status);return!Number.isInteger(t)||t>=500}function L3(n){let t=new Error("Discord Thread creation result is uncertain",{cause:n});return t.code="discord-thread-create-uncertain",t}async function vfe(n,t,{signal:o,onChannel:i}={}){try{let e=ST(await n.getChannel({channelId:String(t.id),signal:o}),i);return Y3(e,t)?e:null}catch(e){if(e?.status===404)return null;throw e}}async function U3(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 j3(n){let t=typeof n?.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"";if(bfe.has(t))return t;let o=typeof n?.filename=="string"?n.filename.toLowerCase():"";for(let[i,e]of Mfe)if(o.endsWith(i))return e;return null}function J3(n){return Number.isSafeInteger(n)&&n>=0?n:void 0}function Pfe(n,t){let o=j3(n);return!o||typeof n?.url!="string"?null:{name:typeof n.filename=="string"?n.filename:void 0,mediaType:o,size:J3(n.size),load:i=>Mo(n.url,{...i,fetchImpl:t,allowedHosts:K3})}}function Gfe(n,t){if(j3(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:J3(n.size),load:({signal:i}={})=>$d(n.url,{fetchImpl:t,signal:i,allowedHosts:K3})}}function Ffe(n){if(!n||typeof n!="object")return null;let t=typeof n.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"",o=t.startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":"file",i=typeof n.filename=="string"&&n.filename?n.filename:void 0;return{kind:o,...i?{name:i}:{}}}function H3(n,t){if(!n||typeof n!="object")return null;let o=typeof n.id=="string"&&n.id?n.id:t,i=typeof n.author?.id=="string"&&n.author.id?n.author.id:void 0,e=[n.member?.nick,n.author?.global_name,n.author?.username].find(A=>typeof A=="string"&&A.trim()),a=Array.isArray(n.attachments)?n.attachments.map(Ffe).filter(Boolean):[];return Array.isArray(n.sticker_items)&&a.push(...n.sticker_items.map(A=>({kind:"image",...typeof A?.name=="string"&&A.name?{name:A.name}:{}}))),{...o?{messageId:String(o)}:{},...i?{authorId:i}:{},...e?{authorName:e}:{},content:typeof n.content=="string"?n.content:"",attachments:a}}function Lfe(n,t){let o=String(n?.channel_id??""),i=typeof n?.message_reference?.message_id=="string"&&n.message_reference.message_id?n.message_reference.message_id:void 0,e=n?.message_reference?.channel_id;if(e!==void 0&&String(e)!==o)return{...i?{messageId:i}:{},unavailableReason:"not-found"};if(Object.hasOwn(n??{},"referenced_message")){if(n.referenced_message===null)return{...i?{messageId:i}:{},unavailableReason:"deleted"};if(n.referenced_message&&typeof n.referenced_message=="object"){let a=typeof n.referenced_message.id=="string"&&n.referenced_message.id?n.referenced_message.id:void 0;return String(n.referenced_message.channel_id??"")!==o||!a||i&&a!==i?{...i?{messageId:i}:{},unavailableReason:"not-found"}:H3(n.referenced_message,i)??void 0}}if(i)return typeof t!="function"?{messageId:i,unavailableReason:"not-delivered"}:{messageId:i,load:async({signal:a}={})=>{let A=await t({channelId:o,messageId:i,signal:a});return!A||String(A.id??"")!==i||String(A.channel_id??"")!==o?null:H3(A,i)}}}function q3(n,t,{fetchImpl:o=fetch,loadReply:i}={}){if(!n?.id||!n?.channel_id||!n?.author?.id||Number(n.type)===21)return null;let e=!n.guild_id,a=e||n.mentions?.some(r=>String(r?.id)===String(t)),A=Lfe(n,i);return{messageId:String(n.id),senderId:String(n.author.id),contextSource:()=>({senderName:[n.member?.nick,n.author.global_name,n.author.username].find(r=>typeof r=="string"&&r.trim())}),senderIsBot:n.author.bot===!0,kind:e?"direct":"group",conversationId:String(n.channel_id),content:x3(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(r=>Pfe(r,o)).filter(Boolean):[],files:Array.isArray(n.attachments)?n.attachments.map(r=>Gfe(r,o)).filter(Boolean):[],...A?{replyTo:A}:{},addressed:a,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 Ufe(n,t,{api:o,channel:i,fetchImpl:e=fetch,signal:a,onChannel:A}={}){let r=q3(n,t,{fetchImpl:e,loadReply:typeof o?.getMessage=="function"?I=>o.getMessage(I):void 0});if(!r||r.senderIsBot)return r;if(a?.throwIfAborted(),r.kind==="direct")return qI(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=ST(i??await o.getChannel({channelId:r.conversationId,signal:a}),A);if(DT(s)||!r.addressed)return qI(r,s,t);let g=Number(s?.type);if(g!==yfe&&g!==mfe)return qI(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=ST(await o.startThreadFromMessage({channelId:r.conversationId,messageId:r.messageId,name:Rfe(n,t),signal:a}),A),!Y3(c,n))throw new Error("Discord returned an invalid thread for the source message")}catch(I){let d;try{d=await vfe(o,n,{signal:AbortSignal.timeout(Qfe),onChannel:A})}catch(B){throw a?.aborted?a.reason??I:(await U3(o,r,a),L3(B))}if(d)return qI(r,d,t,{fromSourceMessage:!0});if(a?.aborted)throw a.reason??I;if(kfe(I))throw await U3(o,r,a),L3(I);return qI(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 qI(r,c,t,{fromSourceMessage:!0})}var wT=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=hs(i?`${i} +${B.message}`:ut(m);if(this.#a.error?.(`[dsh-im:${this.#e.key}] failed to process a message [${m.referenceId}]:`,I),await f(T))return I.deliveryReceipt;g?.cancel?.();try{await this.#A.sendText(A,T)}catch(_){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send the safe error reply:`,_)}return I.deliveryReceipt}finally{await Promise.allSettled([this.#G(e),this.#u.closeRoute(e)])}}async#k(t,o,a,e,i){if(this.#p?.aborted){t.statusReaction?.clear();return}let A=this.#l.get(e),r=i.claimedReplyMessageId===o;if(!A||A!==i||A.submitting)return r&&(!A||A!==i)?this.#T(t,o):this.#Q(t,o,a,e,{releaseMessageId:!1});if(this.#r.hasSeen(o))return;if(await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString(),t.kind==="group"&&t.addressed!==!0){this.#i.messagesRejected+=1,this.#i.lastRejectedAt=new Date().toISOString();return}let s=t.replyTarget,g=Ea(t.content);if(!g||Rt(t)||Ot(t)){try{await this.#A.sendText(s,w("\u8BF7\u7528\u6587\u5B57\u56DE\u7B54\u5F53\u524D\u95EE\u9898\u3002"))}catch(p){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to reject a non-text interaction reply:`,p)}return}let c=this.#l.get(e);if(!c||c!==i||c.submitting)return r&&(!c||c!==i)?this.#T(t,o,{alreadyRecorded:!0}):this.#Q(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0});if(c.target=s,c.needsPresentation){let p=c.presentationTask!==null;try{await this.#S(c)}catch(f){t.statusReaction?.error(),this.#i.lastError=w("{label}\u4EA4\u4E92\u95EE\u9898\u53D1\u9001\u5931\u8D25\u3002",{label:this.#e.label}),this.#a.error?.(`[dsh-im:${this.#e.key}] failed to retry an interaction question:`,f),c.interaction.reconnect?.();return}let B=this.#l.get(e);if(!B||B!==i||B.submitting)return r&&(!B||B!==i)?this.#T(t,o,{alreadyRecorded:!0}):this.#Q(t,o,a,e,{releaseMessageId:!1,alreadyRecorded:!0});if(!p)return}let I=c.questions[c.index];if(I){if(c.answers.push(Ma(I,g)),c.index+=1,c.indexthis.#A.sendText(e,c)});if(t?.kind!=="question")return;let A=t?.payload?.questions,r=Ea(t?.interactionId)||Ea(t?.rpcId);if(!Ea(t?.rpcId)||!r||!Ea(t?.sessionId)||!Array.isArray(A)||A.length===0||A.some(c=>!ba(c))){this.#a.warn?.(`[dsh-im:${this.#e.key}] ignored an invalid Harness question interaction`);return}if(t.recovered===!0){await this.#_(t,`${this.#e.label} safely cancelled an interaction left by an earlier client.`);try{await this.#A.sendText(e,w("\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.#a.error?.(`[dsh-im:${this.#e.key}] failed to send an interaction recovery notice:`,c)}return}let s=this.#l.get(o);if(s?.interactionId===r){s.interaction=t,s.needsPresentation&&await this.#S(s);return}if(this.#n.has(r))return;if(s){this.#a.warn?.(`[dsh-im:${this.#e.key}] cancelled a second pending Harness question`),await this.#_(t,`${this.#e.label} is already handling another user interaction.`);return}let g={kind:"question",interactionId:r,sessionId:t.sessionId,interaction:t,actor:a,requiresMention:i,questions:A,answers:[],index:0,target:e,queue:null,claimedReplyMessageId:null,submitting:!1,needsPresentation:!0,presentationTask:null};this.#l.set(o,g),this.#n.set(r,o),await this.#S(g)}async#D(t){if(t?.kind==="approval"){await this.#u.handleResolved(t);return}let o=Ea(t?.interactionId);if(t?.kind!=="question"||!o)return;let a=this.#n.get(o);a&&this.#P(a,o)}#S(t){if(t.presentationTask)return t.presentationTask;let o=t.questions[t.index];if(!o)return Promise.resolve();let a=(async()=>{await this.#A.sendText(t.target,Ia(o,t.index,t.questions.length,{requiresMention:t.requiresMention})),t.needsPresentation=!1})();return t.presentationTask=a,a.then(()=>{t.presentationTask===a&&(t.presentationTask=null)},()=>{t.presentationTask===a&&(t.presentationTask=null)}),a}async#T(t,o,{alreadyRecorded:a=!1}={}){if(!a){if(this.#r.hasSeen(o))return;await this.#r.markSeen(o),this.#i.messagesReceived+=1,this.#i.lastMessageAt=new Date().toISOString()}try{await this.#A.sendText(t.replyTarget,w(K3))}catch(e){this.#a.error?.(`[dsh-im:${this.#e.key}] failed to send an expired interaction notice:`,e)}}#N(t,o){let a=this.#l.get(t);return!a||o!==void 0&&a.interactionId!==o?null:(this.#l.delete(t),this.#n.delete(a.interactionId),a)}#P(t,o){return this.#N(t,o)!==null}async#_(t,o){try{await t.respond({ok:!1,error:{code:"cancelled",message:o,details:{}}},{signal:AbortSignal.timeout(5e3)})}catch(a){if(a?.code!=="interaction-not-pending")throw a}}async#G(t){let o=this.#N(t);if(!(!o||o.kind!=="question"))try{await this.#_(o.interaction,`The ${this.#e.label} interaction ended before the user answered.`)}catch(a){this.#a.warn?.(`[dsh-im:${this.#e.key}] failed to cancel a pending Harness interaction:`,a)}}};var OT=Object.freeze({key:"discord",label:"Discord",connectionLabel:" Gateway \u957F\u8FDE\u63A5",reactions:Object.freeze({processing:"\u{1F440}",success:"\u2705",error:"\u274C"})}),Ey=class extends Es{constructor(t){super({descriptor:OT,...t})}};var Bu=class extends id{constructor(t){super({...t,descriptor:OT,inspectToken:t.inspectToken??U3,deriveIdentity:v3,maskPlatformId:P3})}};var uy=class extends yr{constructor(t){super({...t,rpcIdPrefix:"discord",logPrefix:"dsh-discord"})}};function us(n,t){let o=typeof n=="string"?n.trim():"";if(!o)return[];let a=[],e=o;for(;e.length>t;){let i=e.lastIndexOf(` +`,t);inull,logger:r=console}){let s,g=[],c=null,I=null,p=null,B=!1,f=n,Q=()=>{B||I!==null||p||!c||(I=setTimeout(()=>{I=null;let y=c;c=null;let m=us(y,t)[0]??n;p=Promise.resolve(m===f?void 0:e(s,m)).then(()=>{f=m}).catch(T=>r.warn?.("[dsh-im] streamed message update failed:",T)).finally(()=>{p=null,Q()})},o),I?.unref?.())};return{get messageId(){return s},get providerMessageIds(){return[...g]},async start(){return s=await a(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 p?.catch(()=>{});let m=us(y,t),T=m[0]??w("\u5904\u7406\u5B8C\u6210\u3002");T!==f&&await e(s,T),f=T;for(let _ of m.slice(1)){let R=await i(_),L=A(R);(typeof L=="string"&&L.trim()||Number.isSafeInteger(L))&&g.push(String(L))}},cancel(){B=!0,c=null,I!==null&&clearTimeout(I),I=null}}}async function x3(n){try{await n?.body?.cancel?.()}catch{}}function wfe(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 ad(n,{fetchImpl:t=fetch,headers:o,signal:a,allowedHosts:e}={}){let i=new URL(n);if(i.protocol!=="https:")throw new Error("File download URL must use HTTPS");if(!wfe(i,e))throw new Error("File download URL is not hosted by the messaging platform");let A=await t(i,{method:"GET",headers:o,signal:a,redirect:"manual"});if(Number.isInteger(A?.status)&&A.status>=300&&A.status<400){await x3(A);let r=new Error(`File download redirect was blocked (HTTP ${A.status})`);throw r.code="file-redirect-blocked",r}if(!A?.ok){await x3(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 Dfe=37377,Ofe=5e3,Y3=Object.freeze([1e3,3e3,5e3,1e4,3e4]),bfe=0,Mfe=5,_fe=10,Tfe=11,Nfe=12,Rfe=new Set([_fe,Tfe,Nfe]),kfe=new Set(["image/jpeg","image/png","image/webp","image/gif"]),vfe=new Map([[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".gif","image/gif"]]),z3=Object.freeze(["cdn.discordapp.com"]);function Pfe(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 bT(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 Gfe(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 Ffe(n){if(n===4004){let o=new Error(w("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(w("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 V3(n,t){return typeof n!="string"?"":n.replace(new RegExp(`<@!?${t}>`,"g"),"").trim()}function Lfe(n,t){return[...V3(n?.content??"",t).replace(/\s+/g," ").trim()||"DeepSeek Harness"].slice(0,100).join("")}function TT(n){return Rfe.has(Number(n?.type))}function W3(n,t){return TT(n)&&String(n?.id??"")===String(t?.id??"")&&String(n?.parent_id??"")===String(t?.channel_id??"")}function MT(n,t){return n?.id&&t?.(n),n}function ZI(n,t,o,{fromSourceMessage:a=!1,fallback:e=null,notice:i=null}={}){let A=String(t?.id??n.conversationId),r=TT(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,...!a&&n.replyTarget?.replyToMessageId?{replyToMessageId:n.replyTarget.replyToMessageId}:{},...i?{notice:i}:{}},connectionTestTarget:{channelId:A},conversationRoute:{peerId:g,...r?{threadId:A,managed:s}:{},...e?{fallback:e}:{}}}}function Ufe(n){let t=Number(n?.status);return!Number.isInteger(t)||t>=500}function j3(n){let t=new Error("Discord Thread creation result is uncertain",{cause:n});return t.code="discord-thread-create-uncertain",t}async function Hfe(n,t,{signal:o,onChannel:a}={}){try{let e=MT(await n.getChannel({channelId:String(t.id),signal:o}),a);return W3(e,t)?e:null}catch(e){if(e?.status===404)return null;throw e}}async function J3(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(a){if(o?.aborted)throw o.reason??a}}function Z3(n){let t=typeof n?.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"";if(kfe.has(t))return t;let o=typeof n?.filename=="string"?n.filename.toLowerCase():"";for(let[a,e]of vfe)if(o.endsWith(a))return e;return null}function X3(n){return Number.isSafeInteger(n)&&n>=0?n:void 0}function Kfe(n,t){let o=Z3(n);return!o||typeof n?.url!="string"?null:{name:typeof n.filename=="string"?n.filename:void 0,mediaType:o,size:X3(n.size),load:a=>To(n.url,{...a,fetchImpl:t,allowedHosts:z3})}}function xfe(n,t){if(Z3(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:X3(n.size),load:({signal:a}={})=>ad(n.url,{fetchImpl:t,signal:a,allowedHosts:z3})}}function Yfe(n){if(!n||typeof n!="object")return null;let t=typeof n.content_type=="string"?n.content_type.split(";",1)[0].trim().toLowerCase():"",o=t.startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":"file",a=typeof n.filename=="string"&&n.filename?n.filename:void 0;return{kind:o,...a?{name:a}:{}}}function q3(n,t){if(!n||typeof n!="object")return null;let o=typeof n.id=="string"&&n.id?n.id:t,a=typeof n.author?.id=="string"&&n.author.id?n.author.id:void 0,e=[n.member?.nick,n.author?.global_name,n.author?.username].find(A=>typeof A=="string"&&A.trim()),i=Array.isArray(n.attachments)?n.attachments.map(Yfe).filter(Boolean):[];return Array.isArray(n.sticker_items)&&i.push(...n.sticker_items.map(A=>({kind:"image",...typeof A?.name=="string"&&A.name?{name:A.name}:{}}))),{...o?{messageId:String(o)}:{},...a?{authorId:a}:{},...e?{authorName:e}:{},content:typeof n.content=="string"?n.content:"",attachments:i}}function jfe(n,t){let o=String(n?.channel_id??""),a=typeof n?.message_reference?.message_id=="string"&&n.message_reference.message_id?n.message_reference.message_id:void 0,e=n?.message_reference?.channel_id;if(e!==void 0&&String(e)!==o)return{...a?{messageId:a}:{},unavailableReason:"not-found"};if(Object.hasOwn(n??{},"referenced_message")){if(n.referenced_message===null)return{...a?{messageId:a}:{},unavailableReason:"deleted"};if(n.referenced_message&&typeof n.referenced_message=="object"){let i=typeof n.referenced_message.id=="string"&&n.referenced_message.id?n.referenced_message.id:void 0;return String(n.referenced_message.channel_id??"")!==o||!i||a&&i!==a?{...a?{messageId:a}:{},unavailableReason:"not-found"}:q3(n.referenced_message,a)??void 0}}if(a)return typeof t!="function"?{messageId:a,unavailableReason:"not-delivered"}:{messageId:a,load:async({signal:i}={})=>{let A=await t({channelId:o,messageId:a,signal:i});return!A||String(A.id??"")!==a||String(A.channel_id??"")!==o?null:q3(A,a)}}}function $3(n,t,{fetchImpl:o=fetch,loadReply:a}={}){if(!n?.id||!n?.channel_id||!n?.author?.id||Number(n.type)===21)return null;let e=!n.guild_id,i=e||n.mentions?.some(r=>String(r?.id)===String(t)),A=jfe(n,a);return{messageId:String(n.id),senderId:String(n.author.id),contextSource:()=>({senderName:[n.member?.nick,n.author.global_name,n.author.username].find(r=>typeof r=="string"&&r.trim())}),senderIsBot:n.author.bot===!0,kind:e?"direct":"group",conversationId:String(n.channel_id),content:V3(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(r=>Kfe(r,o)).filter(Boolean):[],files:Array.isArray(n.attachments)?n.attachments.map(r=>xfe(r,o)).filter(Boolean):[],...A?{replyTo:A}:{},addressed:i,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 Jfe(n,t,{api:o,channel:a,fetchImpl:e=fetch,signal:i,onChannel:A}={}){let r=$3(n,t,{fetchImpl:e,loadReply:typeof o?.getMessage=="function"?I=>o.getMessage(I):void 0});if(!r||r.senderIsBot)return r;if(i?.throwIfAborted(),r.kind==="direct")return ZI(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=MT(a??await o.getChannel({channelId:r.conversationId,signal:i}),A);if(TT(s)||!r.addressed)return ZI(r,s,t);let g=Number(s?.type);if(g!==bfe&&g!==Mfe)return ZI(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"});i?.throwIfAborted();let c;try{if(c=MT(await o.startThreadFromMessage({channelId:r.conversationId,messageId:r.messageId,name:Lfe(n,t),signal:i}),A),!W3(c,n))throw new Error("Discord returned an invalid thread for the source message")}catch(I){let p;try{p=await Hfe(o,n,{signal:AbortSignal.timeout(Ofe),onChannel:A})}catch(B){throw i?.aborted?i.reason??I:(await J3(o,r,i),j3(B))}if(p)return ZI(r,p,t,{fromSourceMessage:!0});if(i?.aborted)throw i.reason??I;if(Ufe(I))throw await J3(o,r,i),j3(I);return ZI(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 ZI(r,c,t,{fromSourceMessage:!0})}var _T=class{#e;#A;#t=new WeakSet;constructor({api:t,signal:o}){this.#e=t,this.#A=o}async sendText(t,o){let a=!this.#t.has(t)&&t?.notice?String(t.notice):null,e=us(a?`${a} -${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} +${o}`:o,1900),i=[];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});a&&A===0&&this.#t.add(t),typeof s?.id=="string"&&s.id&&i.push(s.id)}return{providerMessageIds:i}}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:a}={}){return this.#e.addOwnReaction({channelId:t.channelId,messageId:t.messageId,emoji:o,signal:this.#r(a)})}removeReaction(t,o,{signal:a}={}){return this.#e.removeOwnReaction({channelId:t.channelId,messageId:t.messageId,emoji:o,signal:this.#r(a)})}async openStream(t){let o=!this.#t.has(t)&&t?.notice?String(t.notice):null,a=i=>o?`${o} -${a}`:a;return dy({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 Hfe(){return{startedAt:null,ready:!1,connectionState:"idle",harnessReachable:!1,lastCheckedAt:null,lastConnectedAt:null,lastError:null,...so()}}var hu=class{#e;#A;#t;#r;#l;#o;#i;#a;#n;#s;#d;#c;#g=Hfe();#I=null;#p=null;#E=null;#u=null;#C=null;#B=null;#f=null;#Q=null;#S=null;#m=!0;#y=null;#b=0;#h=0;#R=!0;#_=null;#D=new Map;#w=new Map;constructor({config:t,token:o,harness:i,state:e,contextEnhancement:a,accessPolicy:A,logger:r=console,replyTimeoutMs:s=6e5,connectTimeoutMs:g=2e4,createApi:c=B=>new du(B),createWebSocket:I=B=>new WebSocket(B),random:d=Math.random}){if(!t||!o||!i||!e)throw new TypeError("DiscordRuntime requires config, token, Harness, and state");if(typeof I!="function")throw new TypeError("DiscordRuntime requires WebSocket");this.#e=t,this.#A=o,this.#t=i,this.#r=e,this.#l=a,this.#o=A,this.#i=r,this.#a=s,this.#n=g,this.#s=c,this.#d=I,this.#c=d}get status(){return structuredClone(this.#g)}async sendConnectionTest(t){if(!this.#g.ready||!this.#p){let o=new Error("Discord bot is not connected");throw o.code="test-target-unavailable",o}return this.#p.sendConnectionTest(t)}async sendProactiveText(t,o,i={}){if(!this.#g.ready||!this.#p){let a=new Error("Discord bot is not connected");throw a.code="bot-not-connected",a}let e=typeof t?.route?.channelId=="string"?t.route.channelId.trim():"";if(t?.kind!=="channel"||!e){let a=new TypeError("Invalid Discord proactive delivery target");throw a.code="invalid-target",a}return this.#p.sendProactiveText({channelId:e},o,i)}async start(){return this.#g.ready&&this.#u?this.status:this.#_?this.#_:(this.#_=this.#T().finally(()=>{this.#_=null}),this.#_)}async#T(){await this.stop(),this.#R=!1,this.#f=null,this.#B=null,this.#Q=null,this.#b=0,this.#D.clear(),this.#w.clear(),this.#g.startedAt=new Date().toISOString(),this.#g.connectionState="connecting",this.#g.lastError=null,await this.#t.ensureRunning(),this.#g.harnessReachable=!0;let t=new AbortController;this.#E=t;let o=this.#s({token:this.#A});this.#I=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.#C=e?.url;let a=new wT({api:o,signal:t.signal});this.#p=new Iy({bot:a,harness:this.#t,state:this.#r,contextEnhancement:this.#l,accessPolicy:this.#o,status:this.#g,logger:this.#i,replyTimeoutMs:this.#a,signal:t.signal});let A;try{await Promise.race([this.#M(!1),new Promise((r,s)=>{A=setTimeout(()=>s(new Error("Discord Gateway did not become ready in time")),this.#n)})])}finally{clearTimeout(A)}return this.status}catch(i){throw this.#g.ready=!1,this.#g.connectionState="failed",this.#g.lastError=i?.message??String(i),await this.stop(),i}}#M(t){if(this.#R)return Promise.reject(new Error("Discord runtime is stopped"));let o=++this.#h,i=_fe(t&&this.#B?this.#B:this.#C),e=this.#d(i);this.#u=e;let a=!1;return new Promise((A,r)=>{let s=()=>{if(a||o!==this.#h)return;a=!0,this.#b=0;let g=Date.now();this.#g.ready=!0,this.#g.connectionState="connected",this.#g.lastCheckedAt=g,this.#g.lastConnectedAt=g,this.#g.lastError=null,A()};mT(e,"message",g=>{if(o!==this.#h||this.#R)return;let c=Tfe(g);if(!c)return;let I;try{I=JSON.parse(c)}catch{this.#i.warn?.("[dsh-im:discord] ignored malformed Gateway JSON");return}if(Number.isSafeInteger(I.s)&&(this.#Q=I.s),I.op===10){this.#k(I.d?.heartbeat_interval,e,o),t&&this.#f?this.#F(e,{op:6,d:{token:this.#A,session_id:this.#f,seq:this.#Q}}):this.#F(e,{op:2,d:{token:this.#A,intents:ffe,properties:{os:process.platform,browser:"dsh-im",device:"dsh-im"}}});return}if(I.op===11){this.#m=!0,this.#g.lastCheckedAt=Date.now();return}if(I.op===1){this.#K(e);return}if(I.op===7){e.close(4e3,"Reconnect requested");return}if(I.op===9){I.d!==!0&&(this.#f=null,this.#B=null,this.#Q=null),e.close(4e3,"Invalid session");return}if(I.op===0){if(I.t==="READY")this.#f=I.d?.session_id??null,this.#B=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.#P(d);else if(I.t==="CHANNEL_CREATE"||I.t==="CHANNEL_UPDATE"||I.t==="THREAD_CREATE"||I.t==="THREAD_UPDATE")this.#P(I.d);else if(I.t==="CHANNEL_DELETE"||I.t==="THREAD_DELETE")I.d?.id&&this.#D.delete(String(I.d.id));else if(I.t==="THREAD_LIST_SYNC")for(let d of I.d?.threads??[])this.#P(d);else if(I.t==="MESSAGE_CREATE"){let d=this.#p;I.d&&d&&this.#N(I.d,d).catch(B=>{o!==this.#h||this.#R||this.#i.error?.(`[dsh-im:discord] bot ${this.#e.botId} message handling failed:`,B)})}}}),mT(e,"close",(g={})=>{if(o!==this.#h)return;if(this.#U(),this.#u===e&&(this.#u=null),this.#R){a||r(new DOMException("Stopped","AbortError"));return}let c=Nfe(Number(g.code)||0);if(this.#g.ready=!1,this.#g.connectionState="connecting",this.#g.lastError=c.message,a||(a=!0,r(c)),c.code==="discord-401"||c.code==="discord-intents"){this.#g.connectionState="failed";return}this.#J()}),mT(e,"error",()=>{o!==this.#h||this.#R||(this.#g.lastError="Discord Gateway WebSocket error")})})}#P(t){t?.id&&this.#D.set(String(t.id),t)}async#N(t,o){let i=String(t?.id??"");if(!i||this.#r.hasSeen(i))return;let e=q3(t,this.#e.platformId),a;if(e?.kind==="group"&&e.addressed===!0&&e.senderIsBot!==!0&&(a=Oa(this.#o,{conversationType:"group",senderIds:[e.senderId],text:e.content,hasImages:e.images.length>0,hasFiles:e.files.length>0}),!a.allowed)){await o.accept(e,{accessDecision:a});return}let A=this.#w.get(i);if(!A){let r=aa(this.#l,t.guild_id?"group":"direct"),s=Ufe(t,this.#e.platformId,{api:this.#I,channel:this.#D.get(String(t.channel_id)),signal:this.#E?.signal,onChannel:g=>this.#P(g)});A={pendingRoute:s,contextSnapshot:r},this.#w.set(i,A),s.finally(()=>{this.#w.get(i)===A&&this.#w.delete(i)}).catch(()=>{})}try{let r=await A.pendingRoute;r&&await o.accept(r,{contextSnapshot:A.contextSnapshot,...a?{accessDecision:a}:{}})}catch(r){throw r?.code==="discord-thread-create-uncertain"&&await this.#r.markSeen(i),r}}#F(t,o){t.readyState===1&&t.send(JSON.stringify(o))}#k(t,o,i){if(this.#U(),!Number.isFinite(t)||t<1e3){o.close(4e3,"Invalid heartbeat interval");return}this.#m=!0;let e=a=>{this.#S=setTimeout(()=>{if(!(this.#R||i!==this.#h||this.#u!==o)){if(!this.#m){o.close(4e3,"Heartbeat was not acknowledged");return}this.#K(o),e(t)}},a),this.#S?.unref?.()};e(Math.floor(t*this.#c()))}#K(t){this.#m=!1,this.#F(t,{op:1,d:this.#Q})}#U(){this.#S!==null&&clearTimeout(this.#S),this.#S=null,this.#m=!0}#J(){if(this.#R||this.#y!==null)return;let t=F3[Math.min(this.#b,F3.length-1)];this.#b+=1,this.#y=setTimeout(()=>{this.#y=null,this.#M(!!this.#f).catch(o=>{this.#R||(this.#i.warn?.("[dsh-im:discord] Gateway reconnect failed:",o),this.#J())})},t),this.#y?.unref?.()}async stop(){this.#R=!0,this.#h+=1,this.#E?.abort(),this.#E=null,this.#y!==null&&clearTimeout(this.#y),this.#y=null,this.#U();let t=this.#u,o=this.#p;this.#u=null,this.#p=null,this.#I=null,this.#w.clear();try{t&&t.readyState<2&&t.close(1e3,"Plugin stopped")}catch(i){this.#i.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.#g.ready=!1,this.#g.connectionState="idle",this.status}};import{mkdir as Kfe,readFile as xfe,rename as Yfe,unlink as jfe,writeFile as Jfe}from"node:fs/promises";import{dirname as qfe}from"node:path";var py=Object.freeze({version:1,sessions:{},seenMessageIds:[],cursor:null});function zfe(n){if(!n||typeof n!="object")return structuredClone(py);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 Es=class{#e;#A=structuredClone(py);#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{this.#A=zfe(JSON.parse(await xfe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(py),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 jfe(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(py)}async#r(){let t=`${JSON.stringify(this.#A,null,2)} -`,o=this.#t.then(async()=>{await Kfe(qfe(this.#e),{recursive:!0,mode:448});let i=`${this.#e}.tmp`;await Jfe(i,t,{encoding:"utf8",mode:384}),await Yfe(i,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var hy=class extends Es{};import{unlink as Wfe}from"node:fs/promises";import{homedir as Zfe}from"node:os";import{join as Eu,resolve as zI}from"node:path";var z3=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function Vfe(n){if(!Array.isArray(n)||n.length===0)return[...z3];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...z3]}var OT=class{#e;#A;#t;#r;#l;#o;#i;#a;#n=null;#s=null;#d=0;#c=!1;#g=!1;#I;#p;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.#l=Vfe(a),this.#o=Number.isFinite(A)&&A>=0?A:15e3,this.#i=r,this.#a=s,this.#I=new Promise(g=>{this.#p=g})}get ready(){return this.#I}start(){return this.#g||this.#c?this:(this.#g=!0,this.#E(0),this)}async close(){this.#c||(this.#c=!0,this.#n!==null&&this.#a(this.#n),this.#n=null,await this.#s?.catch(()=>{}),this.#p?.(null),this.#p=null)}#E(t){this.#c||(this.#n=this.#i(()=>{this.#n=null,this.#u()},t),this.#n?.unref?.())}async#u(){if(this.#c||this.#s)return;let t=this.#C();this.#s=t;try{await t}finally{this.#s===t&&(this.#s=null)}}async#C(){try{if(await this.#t.ensureRunning(),this.#c)return;let t=await this.#A.initialize();if(this.#c)return;this.#p?.(t),this.#p=null;let{configured:o,connected:i}=t.totals;if(icr(e==="telegram"?"telegram":"discord",Ne),R=typeof n.logger=="function"?n.logger(`dsh-im:${e}`):n.logger??console,H=()=>xa(n),F=bT(t,e),L=await new d(F.config).load(),q=zI(t.workspace??process.cwd()),z=o.WorkspaceStore??oa,K=o.workspaces??await new z(F.workspaces,{defaultWorkspace:q}).load(),G=L.list();await K.reconcile(G.map(Ne=>Ne.botId)),await Promise.all(G.map(Ne=>K.ensure(Ne.botId,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:_(Ne)})));let V=typeof L.remove=="function"?Ya(L,{workspaces:K}):L,U=new Map,N=Ne=>zI(F.bots,Ne,"state.json"),k=async Ne=>{let Je=U.get(Ne);return Je||(Je=await new B(N(Ne)).load(),U.set(Ne,Je)),Je},J=za(n,o.commandExecutor),{controlExecutor:X,sessionMaintenanceExecutor:ae,fileIngressExecutor:De}=Va(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),oe=new f({...I,workspace:q,autostart:!1,dshBin:t.dshBin??"dsh",...J?{commandExecutor:J}:{},...X?{controlExecutor:X}:{},...ae?{sessionMaintenanceExecutor:ae}:{},...De?{fileIngressExecutor:De}:{}}),Se=new Q({credentials:n.credentials,configStore:V,logger:R,...o.inspectToken?{inspectToken:o.inspectToken}:{},createRuntime:async({botId:Ne,config:Je,token:ve})=>{let aA=await k(Ne);await K.ensure(Ne,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:_(Je)});let fe=ja(oe,{botId:Ne,workspaces:K,state:aA,agentPresetCatalog:H});return new y({...m,config:Je,token:ve,harness:fe.harness,state:fe.state,contextEnhancement:{botId:Ne,getSettings:()=>K.contextEnhancementFor(Ne)},accessPolicy:Wa(K,Ne,{channel:e,config:Je}),replyTimeoutMs:t.replyTimeoutMs??6e5,connectTimeoutMs:t.connectTimeoutMs??2e4,logger:{error:(...Ie)=>R.error?.(`[${Ne}]`,...Ie),warn:(...Ie)=>R.warn?.(`[${Ne}]`,...Ie),info:(...Ie)=>R.info?.(`[${Ne}]`,...Ie),debug:(...Ie)=>R.debug?.(`[${Ne}]`,...Ie)}})},deleteState:async({botId:Ne})=>{let Je=U.get(Ne);if(U.delete(Ne),Je&&typeof Je.remove=="function")await Je.remove();else try{await Wfe(N(Ne))}catch(ve){if(ve?.code!=="ENOENT")throw ve}}}),Be=Ja(Se,{workspaces:K,stateFor:k,agentPresetCatalog:H}),Re=T({channel:e,controller:Be,harness:oe,logger:R,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:Be,...Ay(e)?{deliveryAdapter:qa({channel:e,workspaces:K,coreController:Se,stateFor:k})}:{},ready:Re.ready,async close(){await Re.close(),await Be.close(),oe.stopManagedProcess()}}}function MT(n,t={},o={}){return Ey(n,t,o,{channel:"discord",ConfigStore:gy,StateStore:hy,HarnessClient:ly,Controller:pu,Runtime:hu})}var Nr=Object.freeze({status:"connection.status",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:Gi,setAgentPreset:Fi,setContextEnhancement:Pi,setAccessPolicy:Xa}),Xfe=Object.freeze(Object.values(Nr)),$fe=new Set(["token","botToken","tokenRef","platformId","secret","secretRef"]),eQe=new Set(["telegram-transport-error","telegram-timeout","telegram-response-invalid"]);function TT(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function uy(n,t){return TT(n)&&Object.keys(n).every(o=>t.includes(o))}function V3(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function AQe(n){return typeof n=="string"&&n.trim().length>=20&&n.length<=4096}function tQe(n,t){return TT(t)?n===Nr.status?uy(t,[])?null:"connection.status does not accept fields.":n===Nr.bindCredentials?uy(t,["token"])&&AQe(t.token)?null:"bot.bind-credentials requires a Bot Token.":n===Nr.reconnectBot?uy(t,["botId","sendTest"])&&V3(t.botId)&&(t.sendTest===void 0||typeof t.sendTest=="boolean")?null:"bot.reconnect requires a botId.":n===Nr.deleteBot?uy(t,["botId","confirm"])&&V3(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Nr.setWorkspace?ei(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Nr.setAgentPreset?ti(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===Nr.setContextEnhancement?Za(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":n===Nr.setAccessPolicy?$a(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u8BBF\u95EE\u8BBE\u7F6E\u3002":"Unknown bot endpoint.":"Payload must be an object."}function _T(n){if(Array.isArray(n))return n.map(_T);if(!TT(n))return n;let t={};for(let[o,i]of Object.entries(n))$fe.has(o)||(t[o]=_T(i));return t}function rQe(n,t){let o=Ai(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"&&eQe.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 Cy(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(!Xfe.includes(o))return{ok:!1,error:{code:"bad-request",message:`Unknown ${t} endpoint.`}};let a=tQe(o,i);if(a)return{ok:!1,error:{code:"bad-request",message:a}};try{let A;if(o===Nr.status)A=await n.status();else if(o===Nr.bindCredentials)A=await n.bindCredentials(i);else if(o===Nr.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:gr(r)}}}else if(o===Nr.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");A=await n.updateWorkspace(i.botId,i.workspace)}else if(o===Nr.setContextEnhancement){if(typeof n.updateContextEnhancement!="function")throw new Error("Context enhancement update is unavailable");A=await n.updateContextEnhancement(i.botId,i.config)}else if(o===Nr.setAccessPolicy){if(typeof n.updateAccessPolicy!="function")throw new Error("Access policy update is unavailable");A=await n.updateAccessPolicy(i.botId,i.policy)}else if(o===Nr.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:_T(A)}}catch(A){return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!1,error:rQe(t,A)}}}}function W3(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,Cy(t,{channel:o}),{authority:yr(e)})}var Z3="/discord",X3=Nr,aQe=Object.freeze(Object.values(X3));function By(n,t,o){return W3(n,t,{channel:"Discord",rpcChannel:Z3,authority:o})}async function $3(n,t={}){if(t?.controller)return By(n,t.controller,t.rpcAuthority);let o=await MT(n,t,t.internals??{}),i=t.deliveryService&&o.deliveryAdapter?t.deliveryService.registerAdapter(o.deliveryAdapter):void 0,e=By(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>{await i?.(),await o.close()},"dsh-im: close Discord bot connections"),e}import{homedir as DQe}from"node:os";import{join as vT,resolve as PT}from"node:path";import{mkdir as iQe,readFile as oQe,rename as nQe,unlink as sQe,writeFile as gQe}from"node:fs/promises";import{dirname as cQe,isAbsolute as IQe}from"node:path";var Ap="office-harness.v1",ej="/office",tp=Object.freeze({status:"connection.status",configure:"connector.configure",reconnect:"connector.reconnect",test:"connector.test",remove:"connector.remove"}),wn=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 uu(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 fy(n){let t=uu(n);return Object.fromEntries(Object.entries(wn).map(([o,i])=>[o,new URL(i,t).toString()]))}var lQe=/^[a-z][a-z0-9-]{1,63}$/,dQe=/^[a-z0-9][a-z0-9_-]{2,63}$/i;function rp(n){return typeof n=="string"&&n.trim()?n.trim():null}function Aj(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=rp(i),A=rp(e);if(!a||!lQe.test(a)||!A||t==="workspace"&&!IQe(A)||t==="preset"&&A.length>8e3)return null;o[a]=A}return Object.freeze(o)}function Qy(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t;try{t=uu(n.baseUrl).origin}catch{return null}let o=rp(n.deviceId),i=rp(n.deviceTokenRef),e=Aj(n.workspaces??{},{kind:"workspace"}),a=Aj(n.instructionPresets??{},{kind:"preset"}),A=Number(n.maxConcurrency??1),r=Number(n.heartbeatSeconds??30);return!o||!dQe.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:Ap,baseUrl:t,deviceId:o,deviceTokenRef:i,maxConcurrency:A,heartbeatSeconds:r,workspaces:e,instructionPresets:a,createdAt:rp(n.createdAt)??new Date().toISOString(),updatedAt:rp(n.updatedAt)??new Date().toISOString()})}var yy=class{#e;#A=null;#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{let t=Qy(JSON.parse(await oQe(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=Qy(t);if(!o)throw new Error("Refusing to persist invalid AI Office configuration");let i=this.#t.then(async()=>{await iQe(cQe(this.#e),{recursive:!0,mode:448});let e=`${this.#e}.tmp`;await gQe(e,`${JSON.stringify(o,null,2)} -`,{mode:384}),await nQe(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 sQe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=null});this.#t=t.then(()=>{},()=>{}),await t}};import{createHash as SQe}from"node:crypto";import{setTimeout as yQe}from"node:timers/promises";function NT(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 ap(n,t="office-transport-failed",o){let i=new Error(n,o===void 0?void 0:{cause:o});return i.code=t,i}function RT(n,t){return t?.aborted||n?.name==="AbortError"}function pQe(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 my=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 fy(this.#e)}#l(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(wn.heartbeat,this.#e),{method:"POST",headers:this.#l({accept:"application/json","content-type":"application/json"}),body:JSON.stringify(t),signal:o,redirect:"error"})}catch(a){throw RT(a,o)?a:ap("AI Office heartbeat request could not be completed",void 0,a)}if(!i.ok)throw NT("heartbeat",i);let e;try{e=await i.json()}catch(a){throw ap("AI Office heartbeat returned invalid JSON","office-protocol-mismatch",a)}if(!e||typeof e!="object"||e.ok!==!0||e.protocolVersion!==Ap)throw ap("AI Office heartbeat protocol does not match","office-protocol-mismatch");return e}async#o(t,{method:o="POST",body:i,leaseToken:e,signal:a}={}){let A=this.#l({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 RT(s,a)?s:ap("AI Office Job request could not be completed",void 0,s)}if(!r.ok)throw NT("Job request",r);try{return await r.json()}catch(s){throw ap("AI Office Job returned invalid JSON","office-protocol-mismatch",s)}}async getJob(t,o={}){return this.#o(wn.job.replace(":id",t),{...o,method:"GET"})}async acceptJob(t,o={}){return this.#o(wn.accept.replace(":id",t),o)}async renewJob(t,o,i={}){return this.#o(wn.renew.replace(":id",t),{...i,leaseToken:o})}async progressJob(t,o,i,e={}){return this.#o(wn.progress.replace(":id",t),{...e,leaseToken:o,body:i})}async requestApproval(t,o,i,e={}){return this.#o(wn.approval.replace(":id",t),{...e,leaseToken:o,body:i})}async completeJob(t,o,i,e={}){return this.#o(wn.result.replace(":id",t),{...e,leaseToken:o,body:i})}async failJob(t,o,i,e={}){return this.#o(wn.fail.replace(":id",t),{...e,leaseToken:o,body:i})}async stream({signal:t,lastEventId:o,onOpen:i,onEvent:e}){let a=this.#l({accept:"text/event-stream"});o&&(a["last-event-id"]=o);let A;try{A=await this.#r(new URL(wn.stream,this.#e),{method:"GET",headers:a,signal:t,redirect:"error",cache:"no-store"})}catch(c){throw RT(c,t)?c:ap("AI Office SSE request could not be completed",void 0,c)}if(!A.ok)throw NT("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 +${i}`:i;return Cy({limit:o?1800:1900,create:async i=>{let A=await this.#e.createMessage({channelId:t.channelId,content:a(i),replyToMessageId:t.replyToMessageId,signal:this.#A});return o&&this.#t.add(t),A.id},edit:(i,A)=>this.#e.editMessage({channelId:t.channelId,messageId:i,content:a(A),signal:this.#A}),sendRemainder:i=>this.#e.createMessage({channelId:t.channelId,content:i,signal:this.#A}),messageIdForResult:i=>i?.id}).start()}#r(t){return t??this.#A}};function qfe(){return{startedAt:null,ready:!1,connectionState:"idle",harnessReachable:!1,lastCheckedAt:null,lastConnectedAt:null,lastError:null,...co()}}var fu=class{#e;#A;#t;#r;#I;#o;#c;#i;#a;#s;#p;#g;#l;#n=qfe();#h=null;#d=null;#C=null;#u=null;#B=null;#f=null;#m=null;#w=null;#Q=null;#y=!0;#b=null;#E=0;#k=0;#M=!0;#D=null;#S=new Map;#T=new Map;constructor({config:t,token:o,harness:a,state:e,contextEnhancement:i,accessPolicy:A,groupSessionScope:r,logger:s=console,replyTimeoutMs:g=6e5,connectTimeoutMs:c=2e4,createApi:I=f=>new Cu(f),createWebSocket:p=f=>new WebSocket(f),random:B=Math.random}){if(!t||!o||!a||!e)throw new TypeError("DiscordRuntime requires config, token, Harness, and state");if(typeof p!="function")throw new TypeError("DiscordRuntime requires WebSocket");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i,this.#o=A,this.#c=r,this.#i=s,this.#a=g,this.#s=c,this.#p=I,this.#g=p,this.#l=B}get status(){return structuredClone(this.#n)}async sendConnectionTest(t){if(!this.#n.ready||!this.#d){let o=new Error("Discord bot is not connected");throw o.code="test-target-unavailable",o}return this.#d.sendConnectionTest(t)}async sendProactiveText(t,o,a={}){if(!this.#n.ready||!this.#d){let i=new Error("Discord bot is not connected");throw i.code="bot-not-connected",i}let e=typeof t?.route?.channelId=="string"?t.route.channelId.trim():"";if(t?.kind!=="channel"||!e){let i=new TypeError("Invalid Discord proactive delivery target");throw i.code="invalid-target",i}return this.#d.sendProactiveText({channelId:e},o,a)}async start(){return this.#n.ready&&this.#u?this.status:this.#D?this.#D:(this.#D=this.#N().finally(()=>{this.#D=null}),this.#D)}async#N(){await this.stop(),this.#M=!1,this.#m=null,this.#f=null,this.#w=null,this.#E=0,this.#S.clear(),this.#T.clear(),this.#n.startedAt=new Date().toISOString(),this.#n.connectionState="connecting",this.#n.lastError=null,await this.#t.ensureRunning(),this.#n.harnessReachable=!0;let t=new AbortController;this.#C=t;let o=this.#p({token:this.#A});this.#h=o;try{let[a,e]=await Promise.all([o.getCurrentUser({signal:t.signal}),o.getGatewayBot({signal:t.signal})]);if(String(a?.id??"")!==this.#e.platformId||a?.bot!==!0)throw new Error("Discord token identity does not match the saved bot");this.#B=e?.url;let i=new _T({api:o,signal:t.signal});this.#d=new Ey({bot:i,harness:this.#t,state:this.#r,contextEnhancement:this.#I,accessPolicy:this.#o,groupSessionScope:this.#c,status:this.#n,logger:this.#i,replyTimeoutMs:this.#a,signal:t.signal});let A;try{await Promise.race([this.#P(!1),new Promise((r,s)=>{A=setTimeout(()=>s(new Error("Discord Gateway did not become ready in time")),this.#s)})])}finally{clearTimeout(A)}return this.status}catch(a){throw this.#n.ready=!1,this.#n.connectionState="failed",this.#n.lastError=a?.message??String(a),await this.stop(),a}}#P(t){if(this.#M)return Promise.reject(new Error("Discord runtime is stopped"));let o=++this.#k,a=Pfe(t&&this.#f?this.#f:this.#B),e=this.#g(a);this.#u=e;let i=!1;return new Promise((A,r)=>{let s=()=>{if(i||o!==this.#k)return;i=!0,this.#E=0;let g=Date.now();this.#n.ready=!0,this.#n.connectionState="connected",this.#n.lastCheckedAt=g,this.#n.lastConnectedAt=g,this.#n.lastError=null,A()};bT(e,"message",g=>{if(o!==this.#k||this.#M)return;let c=Gfe(g);if(!c)return;let I;try{I=JSON.parse(c)}catch{this.#i.warn?.("[dsh-im:discord] ignored malformed Gateway JSON");return}if(Number.isSafeInteger(I.s)&&(this.#w=I.s),I.op===10){this.#x(I.d?.heartbeat_interval,e,o),t&&this.#m?this.#R(e,{op:6,d:{token:this.#A,session_id:this.#m,seq:this.#w}}):this.#R(e,{op:2,d:{token:this.#A,intents:Dfe,properties:{os:process.platform,browser:"dsh-im",device:"dsh-im"}}});return}if(I.op===11){this.#y=!0,this.#n.lastCheckedAt=Date.now();return}if(I.op===1){this.#K(e);return}if(I.op===7){e.close(4e3,"Reconnect requested");return}if(I.op===9){I.d!==!0&&(this.#m=null,this.#f=null,this.#w=null),e.close(4e3,"Invalid session");return}if(I.op===0){if(I.t==="READY")this.#m=I.d?.session_id??null,this.#f=I.d?.resume_gateway_url??null,s();else if(I.t==="RESUMED")s();else if(I.t==="GUILD_CREATE")for(let p of[...I.d?.channels??[],...I.d?.threads??[]])this.#_(p);else if(I.t==="CHANNEL_CREATE"||I.t==="CHANNEL_UPDATE"||I.t==="THREAD_CREATE"||I.t==="THREAD_UPDATE")this.#_(I.d);else if(I.t==="CHANNEL_DELETE"||I.t==="THREAD_DELETE")I.d?.id&&this.#S.delete(String(I.d.id));else if(I.t==="THREAD_LIST_SYNC")for(let p of I.d?.threads??[])this.#_(p);else if(I.t==="MESSAGE_CREATE"){let p=this.#d;I.d&&p&&this.#G(I.d,p).catch(B=>{o!==this.#k||this.#M||this.#i.error?.(`[dsh-im:discord] bot ${this.#e.botId} message handling failed:`,B)})}}}),bT(e,"close",(g={})=>{if(o!==this.#k)return;if(this.#J(),this.#u===e&&(this.#u=null),this.#M){i||r(new DOMException("Stopped","AbortError"));return}let c=Ffe(Number(g.code)||0);if(this.#n.ready=!1,this.#n.connectionState="connecting",this.#n.lastError=c.message,i||(i=!0,r(c)),c.code==="discord-401"||c.code==="discord-intents"){this.#n.connectionState="failed";return}this.#U()}),bT(e,"error",()=>{o!==this.#k||this.#M||(this.#n.lastError="Discord Gateway WebSocket error")})})}#_(t){t?.id&&this.#S.set(String(t.id),t)}async#G(t,o){let a=String(t?.id??"");if(!a||this.#r.hasSeen(a))return;let e=$3(t,this.#e.platformId),i;if(e?.kind==="group"&&e.addressed===!0&&e.senderIsBot!==!0&&(i=Mi(this.#o,{conversationType:"group",senderIds:[e.senderId],text:e.content,hasImages:e.images.length>0,hasFiles:e.files.length>0}),!i.allowed)){await o.accept(e,{accessDecision:i});return}let A=this.#T.get(a);if(!A){let r=ai(this.#I,t.guild_id?"group":"direct"),s=Jfe(t,this.#e.platformId,{api:this.#h,channel:this.#S.get(String(t.channel_id)),signal:this.#C?.signal,onChannel:g=>this.#_(g)});A={pendingRoute:s,contextSnapshot:r},this.#T.set(a,A),s.finally(()=>{this.#T.get(a)===A&&this.#T.delete(a)}).catch(()=>{})}try{let r=await A.pendingRoute;r&&await o.accept(r,{contextSnapshot:A.contextSnapshot,...i?{accessDecision:i}:{}})}catch(r){throw r?.code==="discord-thread-create-uncertain"&&await this.#r.markSeen(a),r}}#R(t,o){t.readyState===1&&t.send(JSON.stringify(o))}#x(t,o,a){if(this.#J(),!Number.isFinite(t)||t<1e3){o.close(4e3,"Invalid heartbeat interval");return}this.#y=!0;let e=i=>{this.#Q=setTimeout(()=>{if(!(this.#M||a!==this.#k||this.#u!==o)){if(!this.#y){o.close(4e3,"Heartbeat was not acknowledged");return}this.#K(o),e(t)}},i),this.#Q?.unref?.()};e(Math.floor(t*this.#l()))}#K(t){this.#y=!1,this.#R(t,{op:1,d:this.#w})}#J(){this.#Q!==null&&clearTimeout(this.#Q),this.#Q=null,this.#y=!0}#U(){if(this.#M||this.#b!==null)return;let t=Y3[Math.min(this.#E,Y3.length-1)];this.#E+=1,this.#b=setTimeout(()=>{this.#b=null,this.#P(!!this.#m).catch(o=>{this.#M||(this.#i.warn?.("[dsh-im:discord] Gateway reconnect failed:",o),this.#U())})},t),this.#b?.unref?.()}async stop(){this.#M=!0,this.#k+=1,this.#C?.abort(),this.#C=null,this.#b!==null&&clearTimeout(this.#b),this.#b=null,this.#J();let t=this.#u,o=this.#d;this.#u=null,this.#d=null,this.#h=null,this.#T.clear();try{t&&t.readyState<2&&t.close(1e3,"Plugin stopped")}catch(a){this.#i.warn?.(`[dsh-im:discord] bot ${this.#e.botId} failed to close Gateway:`,a)}return await Promise.race([o?.waitForIdle()??Promise.resolve(),new Promise(a=>setTimeout(a,2e3))]),this.#n.ready=!1,this.#n.connectionState="idle",this.status}};import{mkdir as zfe,readFile as Vfe,rename as Wfe,unlink as Zfe,writeFile as Xfe}from"node:fs/promises";import{dirname as $fe}from"node:path";var By=Object.freeze({version:1,sessions:{},seenMessageIds:[],cursor:null});function eQe(n){if(!n||typeof n!="object")return structuredClone(By);let t={};if(n.sessions&&typeof n.sessions=="object"&&!Array.isArray(n.sessions))for(let[o,a]of Object.entries(n.sessions))typeof o=="string"&&o&&typeof a=="string"&&a&&(t[o]=a);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 Cs=class{#e;#A=structuredClone(By);#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{this.#A=eQe(JSON.parse(await Vfe(this.#e,"utf8")))}catch(t){if(t?.code!=="ENOENT")throw t;this.#A=structuredClone(By),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 Zfe(this.#e)}catch(t){if(t?.code!=="ENOENT")throw t}this.#A=structuredClone(By)}async#r(){let t=`${JSON.stringify(this.#A,null,2)} +`,o=this.#t.then(async()=>{await zfe($fe(this.#e),{recursive:!0,mode:448});let a=`${this.#e}.tmp`;await Xfe(a,t,{encoding:"utf8",mode:384}),await Wfe(a,this.#e)});this.#t=o.then(()=>{},()=>{}),await o}};var fy=class extends Cs{};import{unlink as tQe}from"node:fs/promises";import{homedir as rQe}from"node:os";import{join as Qu,resolve as XI}from"node:path";var ej=Object.freeze([250,1e3,3e3,5e3,1e4,3e4]);function AQe(n){if(!Array.isArray(n)||n.length===0)return[...ej];let t=n.filter(o=>Number.isFinite(o)&&o>=0);return t.length>0?t:[...ej]}var NT=class{#e;#A;#t;#r;#I;#o;#c;#i;#a=null;#s=null;#p=0;#g=!1;#l=!1;#n;#h;constructor({channel:t,controller:o,harness:a,logger:e=console,retryDelaysMs:i,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(!a||typeof a.ensureRunning!="function")throw new TypeError("TokenConnectionSupervisor requires a Harness client");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=AQe(i),this.#o=Number.isFinite(A)&&A>=0?A:15e3,this.#c=r,this.#i=s,this.#n=new Promise(g=>{this.#h=g})}get ready(){return this.#n}start(){return this.#l||this.#g?this:(this.#l=!0,this.#d(0),this)}async close(){this.#g||(this.#g=!0,this.#a!==null&&this.#i(this.#a),this.#a=null,await this.#s?.catch(()=>{}),this.#h?.(null),this.#h=null)}#d(t){this.#g||(this.#a=this.#c(()=>{this.#a=null,this.#C()},t),this.#a?.unref?.())}async#C(){if(this.#g||this.#s)return;let t=this.#u();this.#s=t;try{await t}finally{this.#s===t&&(this.#s=null)}}async#u(){try{if(await this.#t.ensureRunning(),this.#g)return;let t=await this.#A.initialize();if(this.#g)return;this.#h?.(t),this.#h=null;let{configured:o,connected:a}=t.totals;if(apr(e==="telegram"?"telegram":"discord",Ne),R=typeof n.logger=="function"?n.logger(`dsh-im:${e}`):n.logger??console,L=()=>xi(n),U=RT(t,e),F=await new p(U.config).load(),q=XI(t.workspace??process.cwd()),z=o.WorkspaceStore??ni,K=o.workspaces??await new z(U.workspaces,{defaultWorkspace:q}).load(),G=F.list();await K.reconcile(G.map(Ne=>Ne.botId)),await Promise.all(G.map(Ne=>K.ensure(Ne.botId,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:_(Ne)})));let V=typeof F.remove=="function"?Yi(F,{workspaces:K}):F,H=new Map,N=Ne=>XI(U.bots,Ne,"state.json"),k=async Ne=>{let Je=H.get(Ne);return Je||(Je=await new B(N(Ne)).load(),H.set(Ne,Je)),Je},J=zi(n,o.commandExecutor),{controlExecutor:X,sessionMaintenanceExecutor:ie,fileIngressExecutor:De}=Vi(n,{controlExecutor:o.controlExecutor,sessionMaintenanceExecutor:o.sessionMaintenanceExecutor,fileIngressExecutor:o.fileIngressExecutor}),oe=new f({...I,workspace:q,autostart:!1,dshBin:t.dshBin??"dsh",...J?{commandExecutor:J}:{},...X?{controlExecutor:X}:{},...ie?{sessionMaintenanceExecutor:ie}:{},...De?{fileIngressExecutor:De}:{}}),Se=new Q({credentials:n.credentials,configStore:V,logger:R,...o.inspectToken?{inspectToken:o.inspectToken}:{},createRuntime:async({botId:Ne,config:Je,token:ve})=>{let tA=await k(Ne);await K.ensure(Ne,{defaultAgentPreset:t.agentPreset,initialAccessPolicy:_(Je)});let fe=ji(oe,{botId:Ne,workspaces:K,state:tA,agentPresetCatalog:L});return new y({...m,config:Je,token:ve,harness:fe.harness,state:fe.state,contextEnhancement:{botId:Ne,getSettings:()=>K.contextEnhancementFor(Ne)},accessPolicy:Wi(K,Ne,{channel:e,config:Je}),groupSessionScope:{getScope:()=>K.groupSessionScopeFor(Ne)},replyTimeoutMs:t.replyTimeoutMs??6e5,connectTimeoutMs:t.connectTimeoutMs??2e4,logger:{error:(...Ie)=>R.error?.(`[${Ne}]`,...Ie),warn:(...Ie)=>R.warn?.(`[${Ne}]`,...Ie),info:(...Ie)=>R.info?.(`[${Ne}]`,...Ie),debug:(...Ie)=>R.debug?.(`[${Ne}]`,...Ie)}})},deleteState:async({botId:Ne})=>{let Je=H.get(Ne);if(H.delete(Ne),Je&&typeof Je.remove=="function")await Je.remove();else try{await tQe(N(Ne))}catch(ve){if(ve?.code!=="ENOENT")throw ve}}}),Be=Ji(Se,{workspaces:K,stateFor:k,agentPresetCatalog:L}),Re=T({channel:e,controller:Be,harness:oe,logger:R,retryDelaysMs:t.retryDelaysMs,healthyIntervalMs:t.healthyIntervalMs}).start();return{controller:Be,...oy(e)?{deliveryAdapter:qi({channel:e,workspaces:K,coreController:Se,stateFor:k})}:{},ready:Re.ready,async close(){await Re.close(),await Be.close(),oe.stopManagedProcess()}}}function kT(n,t={},o={}){return Qy(n,t,o,{channel:"discord",ConfigStore:dy,StateStore:fy,HarnessClient:uy,Controller:Bu,Runtime:fu})}var Sr=Object.freeze({status:"connection.status",bindCredentials:"bot.bind-credentials",reconnectBot:"bot.reconnect",deleteBot:"bot.delete",setWorkspace:La,setAgentPreset:Ua,setContextEnhancement:Fa,setAccessPolicy:Xi,setGroupSessionScope:ea}),iQe=Object.freeze(Object.values(Sr)),aQe=new Set(["token","botToken","tokenRef","platformId","secret","secretRef"]),oQe=new Set(["telegram-transport-error","telegram-timeout","telegram-response-invalid"]);function PT(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function yy(n,t){return PT(n)&&Object.keys(n).every(o=>t.includes(o))}function Aj(n){return typeof n=="string"&&/^[A-Za-z0-9_-]{1,128}$/.test(n)}function nQe(n){return typeof n=="string"&&n.trim().length>=20&&n.length<=4096}function sQe(n,t){return PT(t)?n===Sr.status?yy(t,[])?null:"connection.status does not accept fields.":n===Sr.bindCredentials?yy(t,["token"])&&nQe(t.token)?null:"bot.bind-credentials requires a Bot Token.":n===Sr.reconnectBot?yy(t,["botId","sendTest"])&&Aj(t.botId)&&(t.sendTest===void 0||typeof t.sendTest=="boolean")?null:"bot.reconnect requires a botId.":n===Sr.deleteBot?yy(t,["botId","confirm"])&&Aj(t.botId)&&t.confirm===!0?null:"bot.delete requires a botId and confirm=true.":n===Sr.setWorkspace?ta(t)?null:"\u8BF7\u8F93\u5165\u5DE5\u4F5C\u533A\u7EDD\u5BF9\u8DEF\u5F84\u3002":n===Sr.setAgentPreset?ia(t)?null:"\u8BF7\u9009\u62E9 Agent Preset\u3002":n===Sr.setContextEnhancement?Zi(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u4E0A\u4E0B\u6587\u589E\u5F3A\u8BBE\u7F6E\u3002":n===Sr.setAccessPolicy?$i(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u8BBF\u95EE\u8BBE\u7F6E\u3002":n===Sr.setGroupSessionScope?Aa(t)?null:"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u7FA4\u4F1A\u8BDD\u7B56\u7565\u3002":"Unknown bot endpoint.":"Payload must be an object."}function vT(n){if(Array.isArray(n))return n.map(vT);if(!PT(n))return n;let t={};for(let[o,a]of Object.entries(n))aQe.has(o)||(t[o]=vT(a));return t}function gQe(n,t){let o=ra(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"&&oQe.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 my(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,a,e)=>{if(e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(!iQe.includes(o))return{ok:!1,error:{code:"bad-request",message:`Unknown ${t} endpoint.`}};let i=sQe(o,a);if(i)return{ok:!1,error:{code:"bad-request",message:i}};try{let A;if(o===Sr.status)A=await n.status();else if(o===Sr.bindCredentials)A=await n.bindCredentials(a);else if(o===Sr.reconnectBot){if(A=await n.reconnectBot(a.botId),e?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};if(a.sendTest===!0){let r=null;try{if(A?.bots?.find(s=>s?.botId===a.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(a.botId)}catch(s){r=s}A={...A,testMessage:lr(r)}}}else if(o===Sr.setWorkspace){if(typeof n.updateWorkspace!="function")throw new Error("Workspace update is unavailable");A=await n.updateWorkspace(a.botId,a.workspace)}else if(o===Sr.setContextEnhancement){if(typeof n.updateContextEnhancement!="function")throw new Error("Context enhancement update is unavailable");A=await n.updateContextEnhancement(a.botId,a.config)}else if(o===Sr.setAccessPolicy){if(typeof n.updateAccessPolicy!="function")throw new Error("Access policy update is unavailable");A=await n.updateAccessPolicy(a.botId,a.policy)}else if(o===Sr.setGroupSessionScope){if(typeof n.updateGroupSessionScope!="function")throw new Error("Group session scope update is unavailable");A=await n.updateGroupSessionScope(a.botId,a.groupSessionScope)}else if(o===Sr.setAgentPreset){if(typeof n.updateAgentPreset!="function")throw new Error("Agent preset update is unavailable");A=await n.updateAgentPreset(a.botId,a.agentPreset)}else A=await n.deleteBot(a.botId);return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!0,value:vT(A)}}catch(A){return e?.aborted?{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}}:{ok:!1,error:gQe(t,A)}}}}function tj(n,t,{channel:o,rpcChannel:a,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(a,my(t,{channel:o}),{authority:mr(e)})}var rj="/discord",ij=Sr,cQe=Object.freeze(Object.values(ij));function Sy(n,t,o){return tj(n,t,{channel:"Discord",rpcChannel:rj,authority:o})}async function aj(n,t={}){if(t?.controller)return Sy(n,t.controller,t.rpcAuthority);let o=await kT(n,t,t.internals??{}),a=t.deliveryService&&o.deliveryAdapter?t.deliveryService.registerAdapter(o.deliveryAdapter):void 0,e=Sy(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>{await a?.(),await o.close()},"dsh-im: close Discord bot connections"),e}import{homedir as NQe}from"node:os";import{join as UT,resolve as HT}from"node:path";import{mkdir as IQe,readFile as lQe,rename as pQe,unlink as dQe,writeFile as hQe}from"node:fs/promises";import{dirname as EQe,isAbsolute as uQe}from"node:path";var nd="office-harness.v1",oj="/office",sd=Object.freeze({status:"connection.status",configure:"connector.configure",reconnect:"connector.reconnect",test:"connector.test",remove:"connector.remove"}),bn=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 yu(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 wy(n){let t=yu(n);return Object.fromEntries(Object.entries(bn).map(([o,a])=>[o,new URL(a,t).toString()]))}var CQe=/^[a-z][a-z0-9-]{1,63}$/,BQe=/^[a-z0-9][a-z0-9_-]{2,63}$/i;function gd(n){return typeof n=="string"&&n.trim()?n.trim():null}function nj(n,{kind:t}){if(!n||typeof n!="object"||Array.isArray(n))return null;let o={};for(let[a,e]of Object.entries(n)){let i=gd(a),A=gd(e);if(!i||!CQe.test(i)||!A||t==="workspace"&&!uQe(A)||t==="preset"&&A.length>8e3)return null;o[i]=A}return Object.freeze(o)}function Dy(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t;try{t=yu(n.baseUrl).origin}catch{return null}let o=gd(n.deviceId),a=gd(n.deviceTokenRef),e=nj(n.workspaces??{},{kind:"workspace"}),i=nj(n.instructionPresets??{},{kind:"preset"}),A=Number(n.maxConcurrency??1),r=Number(n.heartbeatSeconds??30);return!o||!BQe.test(o)||!a||!/^DSH_OFFICE_DEVICE_TOKEN_[A-F0-9]{24}$/.test(a)||!e||!i||!Number.isInteger(A)||A<1||A>4||!Number.isInteger(r)||r<10||r>300?null:Object.freeze({version:1,protocolVersion:nd,baseUrl:t,deviceId:o,deviceTokenRef:a,maxConcurrency:A,heartbeatSeconds:r,workspaces:e,instructionPresets:i,createdAt:gd(n.createdAt)??new Date().toISOString(),updatedAt:gd(n.updatedAt)??new Date().toISOString()})}var Oy=class{#e;#A=null;#t=Promise.resolve();constructor(t){this.#e=t}async load(){try{let t=Dy(JSON.parse(await lQe(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=Dy(t);if(!o)throw new Error("Refusing to persist invalid AI Office configuration");let a=this.#t.then(async()=>{await IQe(EQe(this.#e),{recursive:!0,mode:448});let e=`${this.#e}.tmp`;await hQe(e,`${JSON.stringify(o,null,2)} +`,{mode:384}),await pQe(e,this.#e),this.#A=o});return this.#t=a.then(()=>{},()=>{}),await a,this.get()}async clear(){let t=this.#t.then(async()=>{try{await dQe(this.#e)}catch(o){if(o?.code!=="ENOENT")throw o}this.#A=null});this.#t=t.then(()=>{},()=>{}),await t}};import{createHash as _Qe}from"node:crypto";import{setTimeout as bQe}from"node:timers/promises";function GT(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 cd(n,t="office-transport-failed",o){let a=new Error(n,o===void 0?void 0:{cause:o});return a.code=t,a}function FT(n,t){return t?.aborted||n?.name==="AbortError"}function fQe(n){let t="message",o,a=[];for(let i of n.split(/\r?\n/))i.startsWith("event:")?t=i.slice(6).trim()||"message":i.startsWith("id:")?o=i.slice(3).trim()||void 0:i.startsWith("data:")&&a.push(i.slice(5).trimStart());if(a.length===0)return null;let e;try{e=JSON.parse(a.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 by=class{#e;#A;#t;#r;constructor({baseUrl:t,deviceId:o,token:a,fetchImpl:e=fetch}){this.#e=t,this.#A=o,this.#t=a,this.#r=e}hooks(){return wy(this.#e)}#I(t={}){return{authorization:`Bearer ${this.#t}`,"x-harness-device-id":this.#A,...t}}async heartbeat(t,{signal:o}={}){let a;try{a=await this.#r(new URL(bn.heartbeat,this.#e),{method:"POST",headers:this.#I({accept:"application/json","content-type":"application/json"}),body:JSON.stringify(t),signal:o,redirect:"error"})}catch(i){throw FT(i,o)?i:cd("AI Office heartbeat request could not be completed",void 0,i)}if(!a.ok)throw GT("heartbeat",a);let e;try{e=await a.json()}catch(i){throw cd("AI Office heartbeat returned invalid JSON","office-protocol-mismatch",i)}if(!e||typeof e!="object"||e.ok!==!0||e.protocolVersion!==nd)throw cd("AI Office heartbeat protocol does not match","office-protocol-mismatch");return e}async#o(t,{method:o="POST",body:a,leaseToken:e,signal:i}={}){let A=this.#I({accept:"application/json"});a!==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,...a===void 0?{}:{body:JSON.stringify(a)},signal:i,redirect:"error",cache:"no-store"})}catch(s){throw FT(s,i)?s:cd("AI Office Job request could not be completed",void 0,s)}if(!r.ok)throw GT("Job request",r);try{return await r.json()}catch(s){throw cd("AI Office Job returned invalid JSON","office-protocol-mismatch",s)}}async getJob(t,o={}){return this.#o(bn.job.replace(":id",t),{...o,method:"GET"})}async acceptJob(t,o={}){return this.#o(bn.accept.replace(":id",t),o)}async renewJob(t,o,a={}){return this.#o(bn.renew.replace(":id",t),{...a,leaseToken:o})}async progressJob(t,o,a,e={}){return this.#o(bn.progress.replace(":id",t),{...e,leaseToken:o,body:a})}async requestApproval(t,o,a,e={}){return this.#o(bn.approval.replace(":id",t),{...e,leaseToken:o,body:a})}async completeJob(t,o,a,e={}){return this.#o(bn.result.replace(":id",t),{...e,leaseToken:o,body:a})}async failJob(t,o,a,e={}){return this.#o(bn.fail.replace(":id",t),{...e,leaseToken:o,body:a})}async stream({signal:t,lastEventId:o,onOpen:a,onEvent:e}){let i=this.#I({accept:"text/event-stream"});o&&(i["last-event-id"]=o);let A;try{A=await this.#r(new URL(bn.stream,this.#e),{method:"GET",headers:i,signal:t,redirect:"error",cache:"no-store"})}catch(c){throw FT(c,t)?c:cd("AI Office SSE request could not be completed",void 0,c)}if(!A.ok)throw GT("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");a?.();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(` +`);let p;for(;(p=g.indexOf(` -`))!==-1;){let B=g.slice(0,d);g=g.slice(d+2);let f=pQe(B);f&&await e?.(f)}}throw new Error("AI Office SSE stream ended")}};import{setTimeout as hQe}from"node:timers/promises";var tj=/^job-[a-f0-9]{32}$/,EQe=3e4,uQe=2048;function ip(){return new DOMException("Office Job was cancelled","AbortError")}function ri(n,t=8e3){return typeof n=="string"?n.trim().slice(0,t):""}function CQe(n){return n?.code==="office-job-alias-invalid"?n.message:n?.code==="turn-stopped"?w("\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002"):n?.code==="office-job-conflict"?w("Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002"):w("\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002")}function BQe(n,t){return["# AI Office Handoff","",w("\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002"),w("\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"),"",w("## \u672C\u673A Instruction Preset"),t,"",...ri(n.instruction)?[w("## \u672C\u8F6E\u8865\u5145\u6307\u4EE4"),ri(n.instruction),""]:[],w("## Office \u65F6\u95F4\u7EBF"),ri(n.markdown,2e5)].join(` -`)}function fQe(n){let t=ri(n?.interactionId||n?.rpcId,180);if(!t||typeof n?.respond!="function")return null;if(n.kind==="approval"){let i=S_(n.payload,{toolCall:n.toolCall,maxArgumentsLength:1e4});return i?{id:t,kind:"approval",title:w("\u6279\u51C6 {tool}",{tool:ri(n.payload?.toolName,120)||w("Harness \u5DE5\u5177")}),prompt:i,toolName:ri(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=>!Di(i))?null:{id:t,kind:"question",title:o.length>1?w("Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F",{count:o.length}):ri(o[0].header||o[0].question,160),prompt:o.map((i,e)=>gi(i,e,o.length)).join(` +`))!==-1;){let B=g.slice(0,p);g=g.slice(p+2);let f=fQe(B);f&&await e?.(f)}}throw new Error("AI Office SSE stream ended")}};import{setTimeout as QQe}from"node:timers/promises";var sj=/^job-[a-f0-9]{32}$/,yQe=3e4,mQe=2048;function Id(){return new DOMException("Office Job was cancelled","AbortError")}function aa(n,t=8e3){return typeof n=="string"?n.trim().slice(0,t):""}function SQe(n){return n?.code==="office-job-alias-invalid"?n.message:n?.code==="turn-stopped"?w("\u672C\u673A Harness \u5DF2\u505C\u6B62\u8FD9\u6B21\u6267\u884C\u3002"):n?.code==="office-job-conflict"?w("Office Job \u5DF2\u88AB\u9886\u53D6\u3001\u53D6\u6D88\u6216\u7ED3\u675F\u3002"):w("\u672C\u673A Harness \u672A\u80FD\u5B8C\u6210\u4EFB\u52A1\uFF1B\u8BF7\u68C0\u67E5 Harness \u4F1A\u8BDD\u540E\u91CD\u8BD5\u3002")}function wQe(n,t){return["# AI Office Handoff","",w("\u4F60\u6B63\u5728\u672C\u673A DeepSeek Harness \u4E2D\u7EE7\u7EED\u4E00\u4E2A\u6765\u81EA AI Office \u7684\u4EFB\u52A1\u3002"),w("\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"),"",w("## \u672C\u673A Instruction Preset"),t,"",...aa(n.instruction)?[w("## \u672C\u8F6E\u8865\u5145\u6307\u4EE4"),aa(n.instruction),""]:[],w("## Office \u65F6\u95F4\u7EBF"),aa(n.markdown,2e5)].join(` +`)}function DQe(n){let t=aa(n?.interactionId||n?.rpcId,180);if(!t||typeof n?.respond!="function")return null;if(n.kind==="approval"){let a=M_(n.payload,{toolCall:n.toolCall,maxArgumentsLength:1e4});return a?{id:t,kind:"approval",title:w("\u6279\u51C6 {tool}",{tool:aa(n.payload?.toolName,120)||w("Harness \u5DE5\u5177")}),prompt:a,toolName:aa(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(a=>!ba(a))?null:{id:t,kind:"question",title:o.length>1?w("Harness \u9700\u8981 {count} \u9879\u8865\u5145\u4FE1\u606F",{count:o.length}):aa(o[0].header||o[0].question,160),prompt:o.map((a,e)=>Ia(a,e,o.length)).join(` --- -`),questions:o}}function QQe(n,t){return new Promise((o,i)=>{if(n.controller.signal.aborted)return i(n.controller.signal.reason??ip());let e=()=>{n.approvals.delete(t),i(n.controller.signal.reason??ip())};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 Sy=class{#e;#A;#t;#r;#l;#o=new Map;#i=new Set;#a=new Set;#n=!1;#s={running:0,completed:0,failed:0,lastJobId:null,lastJobAt:null};constructor({config:t,transport:o,createHarness:i,logger:e=console,sleepImpl:a=hQe}){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.#l=a}get status(){return structuredClone(this.#s)}offer(t){return this.#n||!tj.test(t)||this.#o.has(t)||this.#i.has(t)||this.#a.has(t)?!1:(this.#i.add(t),this.#d(),!0)}handleEvent(t){let o=ri(t?.data?.jobId,80);if(!tj.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.#o.get(o),e=ri(t.data?.approvalId,180),a=i?.approvals.get(e);return a?(a.resolve({decision:t.data?.decision==="approved"?"approved":"rejected",answer:ri(t.data?.answer)}),!0):!1}return!1}cancel(t){this.#i.delete(t);let o=this.#o.get(t);return o?(o.cancelled=!0,o.controller.abort(ip()),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{}),!0):!1}async close(){this.#n=!0,this.#i.clear();for(let t of this.#o.values())t.controller.abort(ip());await Promise.allSettled([...this.#o.values()].map(t=>t.task))}#d(){for(;!this.#n&&this.#o.size0;){let t=this.#i.values().next().value;this.#i.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.#c(t,o).finally(()=>{this.#o.delete(t),this.#s.running=this.#o.size,this.#d()}),this.#o.set(t,o),this.#s.running=this.#o.size,o.task.catch(i=>this.#r.warn?.("[dsh-im:office] Job task ended:",i.message))}}async#c(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(!ri(r?.leaseToken,200))throw new Error("Office returned an invalid Job lease");o.leaseToken=r.leaseToken,e=this.#g(t,o);let s=this.#e.workspaces[A.workspaceAlias],g=this.#e.instructionPresets[A.instructionPreset];if(!s||!g){let I=new Error(w("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.#p(t,o,{kind:"status",message:w("\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.#p(t,o,{kind:"status",message:w("Harness Session \u5DF2\u521B\u5EFA\u3002"),sessionId:o.sessionId},!0);let c=await o.harness.ask(o.sessionId,BQe(A,g),{timeoutMs:30*6e4,signal:i,onUpdate:I=>this.#I(t,o,I),onInteraction:I=>this.#E(t,o,I),onInteractionResolved:I=>{let d=ri(I?.interactionId,180);o.approvals.get(d)?.resolve({decision:"rejected",answer:""})}});if(i.aborted)throw i.reason??ip();await this.#A.completeJob(t,o.leaseToken,{resultMarkdown:c,sessionId:o.sessionId},{signal:i}),this.#s.completed+=1,this.#u(t)}catch(a){if(!o.cancelled&&o.leaseToken&&(await this.#A.failJob(t,o.leaseToken,{error:CQe(a),...o.sessionId?{sessionId:o.sessionId}:{}}).catch(()=>{}),this.#s.failed+=1),a?.code==="office-job-conflict"||a?.code==="office-hook-unavailable"){this.#u(t);return}!o.cancelled&&!i.aborted&&this.#r.warn?.(`[dsh-im:office] Job ${t} failed:`,a.message)}finally{o.controller.abort(ip()),await e?.catch(()=>{}),this.#s.lastJobId=t,this.#s.lastJobAt=new Date().toISOString()}}async#g(t,o){for(;!o.controller.signal.aborted;){try{await this.#l(EQe,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:ri(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#I(t,o,i){let e=i?.type==="tool"?w("\u6B63\u5728\u4F7F\u7528 {tool}\u2026",{tool:ri(i.name,160)||w("Harness \u5DE5\u5177")}):ri(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.#p(t,o,{kind:i.type==="tool"?"tool":i.type==="text"?"text":"status",message:e,...o.sessionId?{sessionId:o.sessionId}:{}}))}#p(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#E(t,o,i){let e=fQe(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=QQe(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=ri(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}}#u(t){this.#a.add(t),!(this.#a.size<=uQe)&&this.#a.delete(this.#a.values().next().value)}};var rj=Object.freeze([1e3,3e3,1e4,3e4]);function mQe(n){let t=typeof n?.code=="string"?n.code:"office-connection-failed",o={"invalid-device-token":w("AI Office \u62D2\u7EDD\u4E86 Device Token\u3002"),"office-hook-unavailable":w("AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002"),"office-protocol-mismatch":w("AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002"),"office-transport-failed":w("\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002")};return{code:t,message:o[t]??w("AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002")}}var op=class{#e;#A;#t;#r;#l;#o=null;#i=null;#a;#n;constructor({config:t,token:o,logger:i=console,transport:e,createHarness:a,jobExecutor:A,sleepImpl:r=yQe}){this.#e=t,this.#A=o,this.#t=i,this.#l=r,this.#r=e??new my({baseUrl:t.baseUrl,deviceId:t.deviceId,token:o}),this.#a={state:"idle",connected:!1,startedAt:null,lastHeartbeatAt:null,lastEventAt:null,lastEventId:null,lastEventType:null,reconnects:0,jobsOffered:0,error:null},this.#n=A??(a?new Sy({config:t,transport:this.#r,createHarness:a,logger:i}):null)}get status(){return structuredClone({...this.#a,...this.#n?{jobs:this.#n.status}:{}})}capabilities(){return{protocolVersion:Ap,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.#i?this.status:(this.#o=new AbortController,this.#a.startedAt=new Date().toISOString(),this.#a.state="connecting",this.#i=this.#s(this.#o.signal).finally(()=>{this.#i=null}),this.#i.catch(t=>{this.#o?.signal.aborted||this.#t.error?.("[dsh-im:office] connector stopped:",t)}),this.status)}async#s(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.#c(a?.jobs),this.#a.lastHeartbeatAt=new Date().toISOString();let A=!1,r=this.#d(e,()=>{A&&!e.aborted&&(o=0)}),s=this.#r.stream({signal:e,lastEventId:this.#a.lastEventId,onOpen:()=>{this.#a.connected=!0,this.#a.state="connected",this.#a.error=null,A=!0},onEvent:async g=>{this.#a.lastEventAt=new Date().toISOString(),this.#a.lastEventId=g.id??this.#a.lastEventId,this.#a.lastEventType=g.type,g.type==="job.available"&&(this.#a.jobsOffered+=1),this.#n?.handleEvent(g)}});await Promise.race([s,r])}catch(a){if(t.aborted)break;i.abort(),this.#a.connected=!1,this.#a.state="reconnecting",this.#a.error=mQe(a),this.#a.reconnects+=1;let A=rj[Math.min(o,rj.length-1)];o+=1;try{await this.#l(A,void 0,{signal:t})}catch{break}}finally{i.abort()}}this.#a.connected=!1,this.#a.state="idle"}async#d(t,o){for(;!t.aborted;){await this.#l(this.#e.heartbeatSeconds*1e3,void 0,{signal:t});let i=await this.#r.heartbeat(this.capabilities(),{signal:t});this.#c(i?.jobs),this.#a.lastHeartbeatAt=new Date().toISOString(),o?.()}}#c(t){if(Array.isArray(t))for(let o of t)typeof o?.id=="string"&&this.#n?.offer(o.id)&&(this.#a.jobsOffered+=1)}async stop(){let t=this.#i;return this.#o?.abort(),this.#o=null,t&&await t.catch(()=>{}),await this.#n?.close(),this.#a.connected=!1,this.#a.state="idle",this.status}};function kT(n){return typeof n=="string"&&n.trim()?n.trim():null}function wQe(n,t){return`DSH_OFFICE_DEVICE_TOKEN_${SQe("sha256").update(`${n} -${t}`).digest("hex").slice(0,24).toUpperCase()}`}var wy=class{#e;#A;#t;#r;#l=null;#o=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 op(a))}async initialize(){let t=this.#A.get();if(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});o?.value&&await this.#a(t,o.value)}return this.status()}async configure(t={}){return this.#s(async()=>{let o=this.#A.get(),i=kT(t.baseUrl),e=kT(t.deviceId);if(!i||!e)throw new TypeError("Office URL and Device ID are required");let a=uu(i).origin,A=wQe(a,e),r=kT(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=Qy({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.#a(I,g),this.status()})}async reconnect(){return this.#s(async()=>{let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");return await this.#a(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.#i(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.#s(async()=>{let t=this.#A.get();return await this.#n(),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.#l?.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:fy(t.baseUrl)},health:i,tokenConfigured:!!o?.value}}async close(){await this.#o.catch(()=>{}),await this.#n()}async#i(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#a(t,o){await this.#n();let i=o??await this.#i(t),e=this.#r({config:t,token:i,logger:this.#t});this.#l=e,e.start()}async#n(){let t=this.#l;this.#l=null,t&&await t.stop()}#s(t){let o=this.#o.then(t,t);return this.#o=o.then(()=>{},()=>{}),o}};function OQe(n={}){let t=PT(n.dshHome??process.env.DSH_HOME??vT(DQe(),".dsh")),o=PT(n.dataDir??vT(t,"integrations","dsh-office"));return{root:o,config:PT(n.configPath??vT(o,"config.json"))}}async function aj(n,t={},o={}){let i=na(n,t),e=o.ConfigStore??yy,a=o.Controller??wy,A=o.Runtime??op,r=o.HarnessClient??Qr,s=OQe(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 GT(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function Cu(n,t){return GT(n)&&Object.keys(n).every(o=>t.includes(o))}function bQe(n){return Cu(n,["baseUrl","deviceId","deviceToken","maxConcurrency","heartbeatSeconds","workspaces","instructionPresets"])&&typeof n.baseUrl=="string"&&typeof n.deviceId=="string"&&(n.deviceToken===void 0||typeof n.deviceToken=="string")&>(n.workspaces)&>(n.instructionPresets)}function MQe(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===tp.status&&Cu(o,[]))e=await n.status();else if(t===tp.configure&&bQe(o))e=await n.configure(o);else if(t===tp.reconnect&&Cu(o,[]))e=await n.reconnect();else if(t===tp.test&&Cu(o,[]))e=await n.test();else if(t===tp.remove&&Cu(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 FT(n,t,o){return n.connection.rpc.handle(ej,MQe(t),{authority:yr(o)})}async function ij(n,t={}){if(t.controller)return FT(n,t.controller,t.rpcAuthority);let o=await aj(n,t,t.internals??{}),i=FT(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close AI Office connector"),i}var _Qe=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]);function TQe(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 NQe(n){return typeof n.status!="function"?{}:await n.status()}function RQe(n){return n?.connected===!0?!0:n?.ready===!0&&n?.feishuLongConnectionState==="connected"&&n?.harnessReachable===!0}var Dy=class{#e;#A;#t;#r;#l=!1;#o=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.#i(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.#o=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.#l=!1,this.#o=null}catch{this.#o={code:"credential_removal_failed",message:"Unable to remove the Feishu credentials."}}return this.status()}async status(){let t=await this.#r.status(),o=await NQe(this.#A),i=RQe(o),e=this.#l;if(typeof this.#e.configured=="function")try{e=await this.#e.configured()}catch{e=this.#l}let a="unconfigured";return i?a="connected":_Qe.has(t?.state)?a="registering":t?.state==="saving"?a="connecting":this.#o||t?.state==="error"?a="error":e&&(a="disconnected"),{phase:a,connected:i,configured:e,registration:t,connection:o,error:this.#o??t?.error??null}}async close(){await this.#r.cancel(),await this.#A.disconnect()}async#i(t){let o=TQe(t);try{await this.#e.save(o),this.#l=!0,await this.#A.connect(o),this.#o=null}catch{throw this.#o={code:"connection_failed",message:"The bot was created, but its connection could not be started."},new Error("Unable to activate the Feishu connection.")}}};function LT(n){return new Dy(n)}import{homedir as hGe}from"node:os";import{join as Ah,resolve as Uc}from"node:path";import{unlink as EGe}from"node:fs/promises";var vP={};Lr(vP,{AESCipher:()=>_C,AccessTokenError:()=>qp,Aily:()=>IP,AppType:()=>ws,CAppTicket:()=>MC,CTenantAccessToken:()=>SC,CardActionHandler:()=>nP,Client:()=>sS,ClientAssertionError:()=>ii,DefaultCache:()=>iS,Domain:()=>Ds,EventDispatcher:()=>cS,LarkChannel:()=>ES,LarkChannelError:()=>Ut,LoggerLevel:()=>po,LoggerProxy:()=>Pc,WSClient:()=>lS,adaptDefault:()=>mRe,adaptExpress:()=>SRe,adaptKoa:()=>wRe,adaptKoaRouter:()=>DRe,createLarkChannel:()=>cve,defaultHttpInstance:()=>zp,defaultLogger:()=>kg,generateChallenge:()=>NC,internalCache:()=>TC,messageCard:()=>bRe,normalize:()=>J6,normalizeBotAdded:()=>Y6,normalizeCardAction:()=>x6,normalizeComment:()=>j6,normalizeReaction:()=>SP,registerApp:()=>LRe,withAll:()=>uRe,withHelpDeskCredential:()=>BRe,withTenantKey:()=>CRe,withTenantToken:()=>fRe,withUserAccessToken:()=>QRe});function Bu(n,t){return function(){return n.apply(t,arguments)}}var{toString:kQe}=Object.prototype,{getPrototypeOf:np}=Object,{iterator:Qu,toStringTag:sj}=Symbol,by=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),fu=(n,t)=>{let o=n,i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),by(o,t))return!0;o=np(o)}return!1},vQe=(n,t)=>n!=null&&fu(n,t)?n[t]:void 0,HT=(n=>t=>{let o=kQe.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Uo=n=>(n=n.toLowerCase(),t=>HT(t)===n),My=n=>t=>typeof t===n,{isArray:WI}=Array,ZI=My("undefined");function sp(n){return n!==null&&!ZI(n)&&n.constructor!==null&&!ZI(n.constructor)&&Li(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var gj=Uo("ArrayBuffer");function PQe(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&gj(n.buffer),t}var GQe=My("string"),Li=My("function"),cj=My("number"),gp=n=>n!==null&&typeof n=="object",FQe=n=>n===!0||n===!1,Oy=n=>{if(!gp(n))return!1;let t=np(n);return(t===null||t===Object.prototype||np(t)===null)&&!fu(n,sj)&&!fu(n,Qu)},LQe=n=>{if(!gp(n)||sp(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},UQe=Uo("Date"),HQe=Uo("File"),KQe=n=>!!(n&&typeof n.uri<"u"),xQe=n=>n&&typeof n.getParts<"u",YQe=Uo("Blob"),jQe=Uo("FileList"),JQe=Uo("Set"),qQe=n=>gp(n)&&Li(n.pipe);function zQe(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var oj=zQe(),nj=typeof oj.FormData<"u"?oj.FormData:void 0,VQe=n=>{if(!n)return!1;if(nj&&n instanceof nj)return!0;let t=np(n);if(!t||t===Object.prototype||!Li(n.append))return!1;let o=HT(n);return o==="formdata"||o==="object"&&Li(n.toString)&&n.toString()==="[object FormData]"},WQe=Uo("URLSearchParams"),[ZQe,XQe,$Qe,eye]=["ReadableStream","Request","Response","Headers"].map(Uo),Aye=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function yu(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,e;if(typeof n!="object"&&(n=[n]),WI(n))for(i=0,e=n.length;i0;)if(e=o[i],t===e.toLowerCase())return e;return null}var VI=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lj=n=>!ZI(n)&&n!==VI;function UT(...n){let{caseless:t,skipUndefined:o}=lj(this)&&this||{},i={},e=(a,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")return;let r=t&&typeof A=="string"&&Ij(i,A)||A,s=by(i,r)?i[r]:void 0;Oy(s)&&Oy(a)?i[r]=UT(s,a):Oy(a)?i[r]=UT({},a):WI(a)?i[r]=a.slice():(!o||!ZI(a))&&(i[r]=a)};for(let a=0,A=n.length;a(yu(t,(e,a)=>{o&&Li(e)?Object.defineProperty(n,a,{__proto__:null,value:Bu(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),rye=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),aye=(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)},iye=(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&&np(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},oye=(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},nye=n=>{if(!n)return null;if(WI(n))return n;let t=n.length;if(!cj(t))return null;let o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},sye=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&np(Uint8Array)),gye=(n,t)=>{let i=(n&&n[Qu]).call(n),e;for(;(e=i.next())&&!e.done;){let a=e.value;t.call(n,a[0],a[1])}},cye=(n,t)=>{let o,i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},Iye=Uo("HTMLFormElement"),lye=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,e){return i.toUpperCase()+e}),{propertyIsEnumerable:dye}=Object.prototype,pye=Uo("RegExp"),dj=(n,t)=>{let o=Object.getOwnPropertyDescriptors(n),i={};yu(o,(e,a)=>{let A;(A=t(e,a,n))!==!1&&(i[a]=A||e)}),Object.defineProperties(n,i)},hye=n=>{dj(n,(t,o)=>{if(Li(n)&&["arguments","caller","callee"].includes(o))return!1;let i=n[o];if(Li(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+"'")})}})},Eye=(n,t)=>{let o={},i=e=>{e.forEach(a=>{o[a]=!0})};return WI(n)?i(n):i(String(n).split(t)),o},uye=()=>{},Cye=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Bye(n){return!!(n&&Li(n.append)&&n[sj]==="FormData"&&n[Qu])}var fye=n=>{let t=new WeakSet,o=i=>{if(gp(i)){if(t.has(i))return;if(sp(i))return i;if(!("toJSON"in i)){t.add(i);let e;if(JQe(i)){e=[];for(let a of i){let A=o(a);!ZI(A)&&e.push(A)}}else e=WI(i)?[]:{},yu(i,(a,A)=>{let r=o(a);!ZI(r)&&(e[A]=r)});return t.delete(i),e}}return i};return o(n)},Qye=Uo("AsyncFunction"),yye=n=>n&&(gp(n)||Li(n))&&Li(n.then)&&Li(n.catch),pj=((n,t)=>n?setImmediate:t?((o,i)=>(VI.addEventListener("message",({source:e,data:a})=>{e===VI&&a===o&&i.length&&i.shift()()},!1),e=>{i.push(e),VI.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Li(VI.postMessage)),mye=typeof queueMicrotask<"u"?queueMicrotask.bind(VI):typeof process<"u"&&process.nextTick||pj,hj=n=>n!=null&&Li(n[Qu]),Sye=n=>n!=null&&fu(n,Qu)&&hj(n),Z={isArray:WI,isArrayBuffer:gj,isBuffer:sp,isFormData:VQe,isArrayBufferView:PQe,isString:GQe,isNumber:cj,isBoolean:FQe,isObject:gp,isPlainObject:Oy,isEmptyObject:LQe,isReadableStream:ZQe,isRequest:XQe,isResponse:$Qe,isHeaders:eye,isUndefined:ZI,isDate:UQe,isFile:HQe,isReactNativeBlob:KQe,isReactNative:xQe,isBlob:YQe,isRegExp:pye,isFunction:Li,isStream:qQe,isURLSearchParams:WQe,isTypedArray:sye,isFileList:jQe,forEach:yu,merge:UT,extend:tye,trim:Aye,stripBOM:rye,inherits:aye,toFlatObject:iye,kindOf:HT,kindOfTest:Uo,endsWith:oye,toArray:nye,forEachEntry:gye,matchAll:cye,isHTMLForm:Iye,hasOwnProperty:by,hasOwnProp:by,hasOwnInPrototypeChain:fu,getSafeProp:vQe,reduceDescriptors:dj,freezeMethods:hye,toObjectSet:Eye,toCamelCase:lye,noop:uye,toFiniteNumber:Cye,findKey:Ij,global:VI,isContextDefined:lj,isSpecCompliantForm:Bye,toJSONObject:fye,isAsyncFn:Qye,isThenable:yye,setImmediate:pj,asap:mye,isIterable:hj,isSafeIterable:Sye};var wye=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"]),Ej=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(wye,o)||(o==="set-cookie"?r?t[o].push(i):t[o]=[i]:t[o]=r?t[o]+", "+i:i)}),t};function Dye(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 Oye=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),bye=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function KT(n,t){return Z.isArray(n)?n.map(o=>KT(o,t)):Dye(String(n).replace(t,""))}var uj=n=>KT(n,Oye),Mye=n=>KT(n,bye);function cp(n){let t=Object.create(null);return Z.forEach(n.toJSON(),(o,i)=>{t[i]=Mye(o)}),t}var Cj=Symbol("internals");function mu(n){return n&&String(n).trim().toLowerCase()}function _y(n){return n===!1||n==null?n:Z.isArray(n)?n.map(_y):uj(String(n))}function _ye(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 Tye=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function xT(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 Nye(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 Rye(n){let t=Object.create(null),o=String(n),i=0,e=!1,a=!1;function A(r){let s=xT(o.slice(i,r)),g=s.indexOf("=");if(g<1)return;let c=xT(s.slice(0,g));if(!Tye.test(c))return;let I=c.toLowerCase();if(I==="__proto__"||I==="constructor"||I==="prototype")return;let d=xT(s.slice(g+1));t[I]=Nye(d)}for(let r=0;r/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function YT(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 vye(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function Pye(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 Ip=class{constructor(t){t&&this.set(t)}set(t,o,i){let e=this;function a(r,s,g){let c=mu(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]=_y(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())&&!kye(t))A(Ej(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=mu(t),t){let i=Z.findKey(this,t);if(i){let e=this[i];if(!o)return e;if(o===!0)return _ye(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=mu(t),t){let i=Z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||YT(this,this[i],i,o)))}return!1}delete(t,o){let i=this,e=!1;function a(A){if(A=mu(A),A){let r=Z.findKey(i,A);r&&(!o||YT(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||YT(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]=_y(e),delete o[a];return}let r=t?vye(a):String(a).trim();r!==a&&delete o[a],o[r]=_y(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 Rye(t)}static concat(t,...o){let i=new this(t);return o.forEach(e=>i.set(e)),i}static accessor(t){let i=(this[Cj]=this[Cj]={accessors:{}}).accessors,e=this.prototype;function a(A){let r=mu(A);i[r]||(Pye(e,A),i[r]=!0)}return Z.isArray(t)?t.forEach(a):a(t),this}};Ip.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(Ip.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}});Z.freezeMethods(Ip);var xt=Ip;var Su="[REDACTED ****]";function Gye(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 Fye(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 xt&&(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)&&Gye(a))return i.pop(),a;A=Object.create(null);for(let[r,s]of Object.entries(a)){let g=o.has(r.toLowerCase())?Su:e(s);Z.isUndefined(g)||(A[r]=g)}}return i.pop(),A};return e(n)}function Bj(n){try{return String(n)}catch{return""}}function Lye(n){return n.errors.map(o=>{try{return o&&o.message?Bj(o.message):Bj(o)}catch{return""}}).filter(Boolean).join("; ")||n.name||"AggregateError"}var ba=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=Lye(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?Fye(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}}};ba.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ba.ERR_BAD_OPTION="ERR_BAD_OPTION";ba.ECONNABORTED="ECONNABORTED";ba.ETIMEDOUT="ETIMEDOUT";ba.ECONNREFUSED="ECONNREFUSED";ba.ERR_NETWORK="ERR_NETWORK";ba.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ba.ERR_DEPRECATED="ERR_DEPRECATED";ba.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ba.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ba.ERR_CANCELED="ERR_CANCELED";ba.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ba.ERR_INVALID_URL="ERR_INVALID_URL";ba.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Oe=ba;var Qq=ze(fq(),1),Uy=Qq.default;var Hy={isBufferAvailable(){return typeof Buffer<"u"},from(n){return Buffer.from(n)}};var p0=100;function d0(n){return Z.isPlainObject(n)||Z.isArray(n)}function yq(n){return Z.endsWith(n,"[]")?n.slice(0,-2):n}function l0(n,t,o){return n?n.concat(t).map(function(e,a){return e=yq(e),!o&&a?"["+e+"]":e}).join(o?".":""):t}function SSe(n){return Z.isArray(n)&&!n.some(d0)}var wSe=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function DSe(n,t,o){if(!Z.isObject(n))throw new TypeError("target must be an object");t=t||new(Uy||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?p0: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 Oe("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(Hy&&Hy.isBufferAvailable())return Hy.from(m);throw new Oe("Blob is not supported. Use a Buffer instead.",Oe.ERR_NOT_SUPPORT)}return m}function d(m){if(m>s)throw new Oe("Object is too deeply nested ("+m+" levels). Max depth: "+s,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(m,T){if(s===1/0)return JSON.stringify(m);let _=[];return JSON.stringify(m,function(H,F){if(!Z.isObject(F))return F;for(;_.length&&_[_.length-1]!==this;)_.pop();return _.push(F),d(T+_.length-1),F})}function f(m,T,_){let R=m;if(Z.isReactNative(t)&&Z.isReactNativeBlob(m))return t.append(l0(_,T,a),I(m)),!1;if(m&&!_&&typeof m=="object"){if(Z.endsWith(T,"{}"))T=i?T:T.slice(0,-2),m=B(m,1);else if(Z.isArray(m)&&SSe(m)||(Z.isFileList(m)||Z.endsWith(T,"[]"))&&(R=Z.toArray(m)))return T=yq(T),R.forEach(function(F,L){!(Z.isUndefined(F)||F===null)&&t.append(A===!0?l0([T],L,a):A===null?T:T+"[]",I(F))}),!1}return d0(m)?!0:(t.append(l0(_,T,a),I(m)),!1)}let Q=Object.assign(wSe,{defaultVisitor:f,convertValue:I,isVisitable:d0});function y(m,T,_=0){if(!Z.isUndefined(m)){if(d(_),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+T.join("."));c.push(m),Z.forEach(m,function(H,F){(!(Z.isUndefined(H)||H===null)&&e.call(t,H,Z.isString(F)?F.trim():F,T,Q))===!0&&y(H,T?T.concat(F):[F],_+1)}),c.pop()}}if(!Z.isObject(n))throw new TypeError("data must be an object");return y(n),t}var mc=DSe;function mq(n){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Sq(n,t){this._pairs=[],n&&mc(n,this,t)}var wq=Sq.prototype;wq.append=function(t,o){this._pairs.push([t,o])};wq.toString=function(t){let o=t?i=>t.call(this,i,mq):mq;return this._pairs.map(function(e){return o(e[0])+"="+o(e[1])},"").join("&")};var Dq=Sq;function OSe(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $I(n,t,o){if(!t)return n;n=n||"";let i=Z.isFunction(o)?{serialize:o}:o,e=Z.getSafeProp(i,"encode")||OSe,a=Z.getSafeProp(i,"serialize"),A;if(a?A=a(t,i):A=Z.isURLSearchParams(t)?t.toString():new Dq(t,i).toString(e),A){let r=n.indexOf("#");r!==-1&&(n=n.slice(0,r)),n+=(n.indexOf("?")===-1?"?":"&")+A}return n}var h0=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)})}},E0=h0;var Sc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import MSe from"crypto";import bSe from"url";var Oq=bSe.URLSearchParams;var u0="abcdefghijklmnopqrstuvwxyz",bq="0123456789",Mq={DIGIT:bq,ALPHA:u0,ALPHA_DIGIT:u0+u0.toUpperCase()+bq},_Se=(n=16,t=Mq.ALPHA_DIGIT)=>{let o="",{length:i}=t,e=new Uint32Array(n);MSe.randomFillSync(e);for(let a=0;aB0,hasStandardBrowserEnv:()=>TSe,hasStandardBrowserWebWorkerEnv:()=>NSe,navigator:()=>C0,origin:()=>RSe});var B0=typeof window<"u"&&typeof document<"u",C0=typeof navigator=="object"&&navigator||void 0,TSe=B0&&(!C0||["ReactNative","NativeScript","NS"].indexOf(C0.product)<0),NSe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",RSe=B0&&window.location.href||"http://localhost";var Qt={...f0,..._q};function Q0(n,t){return mc(n,new Qt.classes.URLSearchParams,{visitor:function(o,i,e,a){return Qt.isNode&&Z.isBuffer(o)?(this.append(i,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}var Tq=p0;function Nq(n){if(n>Tq)throw new Oe("FormData field is too deeply nested ("+n+" levels). Max depth: "+Tq,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function kSe(n){let t=[],o=/[^.[\]]+|\[([^.[\]]*)]/g,i;for(;(i=o.exec(n))!==null;)Nq(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function vSe(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]=vSe(e[A])),!r)}if(Z.isFormData(n)&&Z.isFunction(n.entries)){let o={};return Z.forEachEntry(n,(i,e)=>{t(kSe(i),e,o,0)}),o}return null}var Ky=PSe;var Ep=(n,t)=>n!=null&&Z.hasOwnProp(n,t)?n[t]:void 0;function GSe(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 y0={transitional:Sc,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(Ky(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=Ep(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Q0(t,s).toString();if((r=Z.isFileList(t))||i.indexOf("multipart/form-data")>-1){let g=Ep(this,"env"),c=g&&g.FormData;return mc(r?{"files[]":t}:t,c&&new c,s)}}return a||e?(o.setContentType("application/json",!1),GSe(t)):t}],transformResponse:[function(t){let o=Ep(this,"transitional")||y0.transitional,i=o&&o.forcedJSONParsing,e=Ep(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,Ep(this,"parseReviver"))}catch(s){if(r)throw s.name==="SyntaxError"?Oe.from(s,Oe.ERR_BAD_RESPONSE,this,null,Ep(this,"response")):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qt.classes.FormData,Blob:Qt.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=>{y0.headers[n]={}});var up=y0;function _u(n,t){let o=this||up,i=t||o,e=xt.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 Tu(n){return!!(n&&n.__CANCEL__)}var m0=class extends Oe{constructor(t,o,i){super(t??"canceled",Oe.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}},go=m0;function us(n,t,o){let i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new Oe("Request failed with status code "+o.status,o.status>=400&&o.status<500?Oe.ERR_BAD_REQUEST:Oe.ERR_BAD_RESPONSE,o.config,o.request,o))}function S0(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function w0(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 FSe=/^https?:(?!\/\/)/i,LSe=/[\t\n\r]/g;function USe(n){let t=0;for(;t`${o}${i}${Su}`)}function xSe(n){let t=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Su}@`),o=t.indexOf("#"),e=(o===-1?t:t.slice(0,o)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Su}`);return o===-1?e:`${e}#${KSe(t.slice(o+1))}`}function Rq(n,t){if(typeof n=="string"){let o=HSe(n);if(FSe.test(o))throw new Oe(`Invalid URL ${JSON.stringify(xSe(o))}: missing "//" after protocol`,Oe.ERR_INVALID_URL,t)}}function el(n,t,o,i){Rq(t,i);let e=!S0(t);return n&&(e||o===!1)?(Rq(n,i),w0(n,t)):t}var YSe={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function jSe(n){try{return new URL(n)}catch{return null}}function kq(n){var t=(typeof n=="string"?jSe(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)||YSe[o]||0,!JSe(i,e)))return"";var a=D0(o+"_proxy")||D0("all_proxy");return a&&a.indexOf("://")===-1&&(a=o+"://"+a),a}function JSe(n,t){var o=D0("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 D0(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}var oN=ze(P0(),1),T4=ze(t4(),1);import M4 from"http";import _4 from"https";import QDe from"http2";import yDe from"util";import{resolve as B4}from"path";import Ho from"zlib";var Qg="1.19.0";function Uu(n){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}var Jwe=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function V0(n,t,o){let i=o&&o.Blob||Qt.classes.Blob,e=Uu(n);if(t===void 0&&i&&(t=!0),e==="data"){n=e.length?n.slice(e.length+1):n;let a=Jwe.exec(n);if(!a)throw new Oe("Invalid URL",Oe.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 Oe("Blob is not supported",Oe.ERR_NOT_SUPPORT);return new i([I],{type:c})}return I}throw new Oe("Unsupported protocol "+e,Oe.ERR_NOT_SUPPORT)}import On from"stream";var qwe=["content-type","content-length"];function Hu(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,e])=>{qwe.includes(i.toLowerCase())&&n.set(i,e)})}import zwe from"stream";var W0=Symbol("internals"),Z0=class extends zwe.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[W0]={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[W0];return o.onReadCallback&&o.onReadCallback(),super._read(t)}_transform(t,o,i){let e=this[W0],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||(_=R-e.ts)>=r)&&(e.ts=R,T=g-e.bytes,e.bytes=T<0?-T:0,_=0),T=g-e.bytes}if(a){if(T<=0)return setTimeout(()=>{f(null,B)},r-_);Tm&&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)})}},X0=Z0;import{EventEmitter as mDe}from"events";import Wwe from"util";import{Readable as Zwe}from"stream";var{asyncIterator:r4}=Symbol,Vwe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[r4]?yield*n[r4]():yield n},zy=Vwe;var Xwe=Qt.ALPHABET.ALPHA_DIGIT+"-_",Ku=typeof TextEncoder=="function"?new TextEncoder:new Wwe.TextEncoder,il=`\r -`,$we=Ku.encode(il),eDe=2,$0=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)}"`:""}${il}`;if(e)o=Ku.encode(String(o).replace(/\r?\n|\r\n?/g,il));else{let A=String(o.type||"application/octet-stream").replace(/[\r\n]/g,"");a+=`Content-Type: ${A}${il}`}this.headers=Ku.encode(a+il),this.contentLength=e?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+eDe,this.name=t,this.value=o}async*encode(){yield this.headers;let{value:t}=this;Z.isTypedArray(t)?yield t:yield*zy(t),yield $we}static escapeName(t){return String(t).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},ADe=(n,t,o)=>{let{tag:i="form-data-boundary",size:e=25,boundary:a=i+"-"+Qt.generateString(e,Xwe)}=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=Ku.encode("--"+a+il),r=Ku.encode("--"+a+"--"+il),s=r.byteLength,g=Array.from(n.entries()).map(([I,d])=>{let B=new $0(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),Zwe.from((async function*(){for(let I of g)yield A,yield*I.encode();yield r})())},a4=ADe;import tDe from"stream";var eN=class extends tDe.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)}},i4=eN;import rDe from"http2";import aDe from"util";var AN=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}},o4=AN;var iDe=(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,n4=iDe;var oDe=new Set(["localhost","0.0.0.0"]),c4=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)},tN=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},nDe=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(tN);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=tN(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(tN);return g.some(c=>c===null||c<0||c>255)?n:[...g,...s].join(".")},rN=n=>/^0{1,4}$/.test(n),sDe=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(rN)&&A.every(rN)}let o=n.split(":");return o.length===8&&o.every(rN)},gDe=n=>{if(n==="::1")return!0;let t=n.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return c4(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},s4=n=>n?oDe.has(n)||c4(n)||sDe(n)?!0:gDe(n):!1,cDe={http:80,https:443,ws:80,wss:443,ftp:21},IDe=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]},lDe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,dDe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,pDe=n=>{if(typeof n!="string"||n.indexOf(":")===-1)return n;let t=n.match(lDe);if(t)return t[1];let o=n.match(dDe);if(o){let i=parseInt(o[1],16),e=parseInt(o[2],16);return`${i>>8}.${i&255}.${e>>8}.${e&255}`}return n},g4=n=>{if(!n)return n;n.charAt(0)==="["&&n.charAt(n.length-1)==="]"&&(n=n.slice(1,-1));let t=n.replace(/\.+$/,""),o=nDe(t);return o!==t?o:pDe(t)};function aN(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)||cDe[t.protocol.split(":",1)[0]]||0,e=g4(t.hostname.toLowerCase());return o.split(/[\s,]+/).some(a=>{if(!a)return!1;if(a==="*")return!0;let[A,r]=IDe(a);return A=g4(A),!A||r&&r!==i?!1:(A.charAt(0)==="*"&&(A=A.slice(1)),A.charAt(0)==="."?e.endsWith(A):e===A||s4(e)&&s4(A))})}function hDe(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 l4=EDe;var yg=(n,t,o=3)=>{let i=0,e=I4(50,250);return l4(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)},yp=(n,t)=>{let o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},mp=(n,t=Z.asap)=>(...o)=>t(()=>n(...o));var d4=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,h4=(n,t,o)=>t+2n<=57?n-48:(n&223)-55,uDe=n=>n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47||n===45||n===95,CDe=n=>n===9||n===10||n===12||n===13||n===32,BDe=n=>{let t=Math.floor(n/4),o=n%4;return t*3+(o===2?1:o===3?2:0)},E4=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)},fDe=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?E4(n):BDe(o)},u4=(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 iN(n){let t=typeof n=="string"?n.indexOf("#"):-1;return u4(t===-1?n:n.slice(0,t),fDe)}function C4(n){return u4(n,E4)}var f4={flush:Ho.constants.Z_SYNC_FLUSH,finishFlush:Ho.constants.Z_SYNC_FLUSH},SDe={flush:Ho.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ho.constants.BROTLI_OPERATION_FLUSH},wDe={flush:Ho.constants.ZSTD_e_flush,finishFlush:Ho.constants.ZSTD_e_flush},N4=Z.isFunction(Ho.createBrotliDecompress),R4=Z.isFunction(Ho.createZstdDecompress),k4="gzip, compress, deflate"+(N4?", br":""),DDe=k4+(R4?", zstd":""),Q4=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):Z.asap,{http:ODe,https:bDe}=T4.default,nN=/https:?/,y4=Symbol("axios.http.socketListener"),Vy=Symbol("axios.http.currentReq"),v4=Symbol("axios.http.installedTunnel"),MDe=new Map,m4=new WeakMap,S4={22:21,24:5};function _De(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:S4[t]!=null&&o>=S4[t]}function TDe(n,t=process.versions&&process.versions.node){if(!_De(t))return!1;let o=n&&n.options;return!!(o&&Z.hasOwnProp(o,"proxyEnv")&&o.proxyEnv!=null)}function NDe(n,t,o){return nN.test(n.protocol)?o||_4.globalAgent:t||M4.globalAgent}function RDe(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||"")+"#"+(n.auth||""),i=t?m4.get(t)||m4.set(t,new Map).get(t):MDe,e=i.get(o);if(e)return e;let a=t&&t.options?{...t.options,...n}:n;if(e=new oN.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[v4]=!0,i.set(o,e),e}var w4=Qt.protocols.map(n=>n+":"),D4=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},O4=(n,[t,o])=>(n.on("end",o).on("error",o),t),kDe=new o4;function vDe(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 PDe(n,t){n&&Object.keys(n).forEach(o=>{t.has(o.toLowerCase())&&delete n[o]})}function GDe(n,t){if(!t)return!1;try{return new URL(t.url).origin===new URL(n.href).origin}catch{return!1}}function P4(n,t,o,i,e,a){let A=t,r=NDe(n,a,e);if(!A&&A!==!1&&!TDe(r)){let s=kq(o);s&&(aN(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[v4]&&(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 Oe("Invalid proxy authorization",Oe.ERR_BAD_OPTION,{proxy:A})}if(nN.test(n.protocol)){if(!(e instanceof oN.default)){let f=g("hostname")||g("host"),Q=g("port"),y=g("protocol"),m=y?y.includes(":")?y:`${y}:`:"http:",T=f&&f.includes(":")&&!f.startsWith("[")?`[${f}]`:f,_=new URL(`${m}//${T}${Q?":"+Q:""}`),R={protocol:_.protocol,hostname:_.hostname.replace(/^\[|\]$/g,""),port:_.port,auth:d&&typeof d=="string"?d:void 0};_.protocol==="https:"&&(R.ALPNProtocols=["http/1.1"]);let H=RDe(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){P4(g,t,g.href,!0,e,a)}}var FDe=typeof process<"u"&&Z.kindOf(process)==="process",LDe=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)}),UDe=({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)}},b4=(n,t)=>UDe(Z.isObject(n)?n:{address:n,family:t}),HDe={request(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||(n.protocol==="https:"?443:80)),{http2Options:i,headers:e}=n,a=kDe.getSession(o,i),{HTTP2_HEADER_SCHEME:A,HTTP2_HEADER_METHOD:r,HTTP2_HEADER_PATH:s,HTTP2_HEADER_STATUS:g}=QDe.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}},G4=FDe&&function(t){return LDe(async function(i,e,a){let A=Ce=>Z.getSafeProp(t,Ce),r=A("transitional")||Sc,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"),T=A("socketPath"),_=A("method").toUpperCase(),R=A("maxRedirects"),H=A("maxBodyLength"),F=A("maxContentLength"),L=A("decompress"),q,z=!1,K,G;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 V=I===2;if(g){let Ce=n4(g,ke=>Z.isArray(ke)?ke:[ke]);g=(ke,Ue,MA)=>{Ce(ke,Ue,(Ke,_A,ot)=>{if(Ke)return MA(Ke);let wA=Z.isArray(_A)?_A.map(ht=>b4(ht)):[b4(_A,ot)];Ue.all?MA(Ke,wA):MA(Ke,wA[0].address,wA[0].family)})}}let U=new mDe;function N(Ce){try{U.emit("abort",!Ce||Ce.type?new go(null,t,K):Ce)}catch{}}function k(){G&&(clearTimeout(G),G=null)}function J(){let Ce=A("timeout"),ke=Ce?"timeout of "+Ce+"ms exceeded":"timeout exceeded",Ue=A("timeoutErrorMessage");return Ue&&(ke=Ue),new Oe(ke,r.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,t,K)}U.once("abort",e);let X=()=>{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((Ce,ke)=>{if(q=!0,k(),ke){z=!0,X();return}let{data:Ue}=Ce;if(Ue instanceof On.Readable||Ue instanceof On.Duplex){let MA=On.finished(Ue,()=>{MA(),X()})}else X()});let ae=el(A("baseURL"),A("url"),A("allowAbsoluteUrls"),t),De=T?"http://localhost":Qt.hasBrowserEnv?Qt.origin:void 0,oe=new URL(ae,De),Se=oe.protocol||w4[0];if(Se==="data:"){if(F>-1){let ke=String(A("url")||ae||"");if(C4(ke)>F)return e(new Oe("maxContentLength size of "+F+" exceeded",Oe.ERR_BAD_RESPONSE,t))}let Ce;if(_!=="GET")return us(i,e,{status:405,statusText:"method not allowed",headers:{},config:t});try{Ce=V0(A("url"),y==="blob",{Blob:t.env&&t.env.Blob})}catch(ke){throw Oe.from(ke,Oe.ERR_BAD_REQUEST,t)}return y==="text"?(Ce=Ce.toString(m),(!m||m==="utf8")&&(Ce=Z.stripBOM(Ce))):y==="stream"&&(Ce=On.Readable.from(Ce)),us(i,e,{data:Ce,status:200,statusText:"OK",headers:new xt,config:t})}if(w4.indexOf(Se)===-1)return e(new Oe("Unsupported protocol "+Se,Oe.ERR_BAD_REQUEST,t));let Be=xt.from(t.headers).normalize();Be.set("User-Agent","axios/"+Qg,!1);let{onUploadProgress:Re,onDownloadProgress:Ne}=t,Je=t.maxRate,ve,aA;if(Z.isSpecCompliantForm(s)){let Ce=Be.getContentType(/boundary=([-_\w\d]{10,70})/i);s=a4(s,ke=>{Be.set(ke)},{tag:`axios-${Qg}-boundary`,boundary:Ce&&Ce[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)&&s.getHeaders!==Object.prototype.getHeaders){if(Hu(Be,s.getHeaders(),A("formDataHeaderPolicy")),!Be.hasContentLength())try{let Ce=await yDe.promisify(s.getLength).call(s);Number.isFinite(Ce)&&Ce>=0&&Be.setContentLength(Ce)}catch{}}else if(Z.isBlob(s)||Z.isFile(s))s.size&&Be.setContentType(s.type||"application/octet-stream"),Be.setContentLength(s.size||0),s=On.Readable.from(zy(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 Oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Oe.ERR_BAD_REQUEST,t));if(Be.setContentLength(s.length,!1),H>-1&&s.length>H)return e(new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,t))}let fe=Z.toFiniteNumber(Be.getContentLength());Z.isArray(Je)?(ve=Je[0],aA=Je[1]):ve=aA=Je,s&&(Re||ve)&&(Z.isStream(s)||(s=On.Readable.from(s,{objectMode:!1})),s=On.pipeline([s,new X0({maxRate:Z.toFiniteNumber(ve)})],Z.noop),Re&&s.on("progress",O4(s,yp(fe,yg(mp(Re,Q4),!1,3)))));let Ie,Xe=A("auth");if(Xe){let Ce=Z.getSafeProp(Xe,"username")||"",ke=Z.getSafeProp(Xe,"password")||"";Ie=Ce+":"+ke}if(!Ie&&(oe.username||oe.password)){let Ce=D4(oe.username),ke=D4(oe.password);Ie=Ce+":"+ke}Ie&&Be.delete("authorization");let je;try{je=$I(oe.pathname+oe.search,A("params"),A("paramsSerializer")).replace(/^\?/,"")}catch(Ce){return e(Oe.from(Ce,Oe.ERR_BAD_REQUEST,t,null,null,{url:A("url"),exists:!0}))}Be.set("Accept-Encoding",Z.hasOwnProp(r,"advertiseZstdAcceptEncoding")&&r.advertiseZstdAcceptEncoding===!0?DDe:k4,!1);let be=Object.assign(Object.create(null),{path:je,method:_,headers:cp(Be),agents:{http:B,https:f},auth:Ie,protocol:Se,family:c,beforeRedirect:vDe,beforeRedirects:Object.create(null),http2Options:d});if(!Z.isUndefined(g)&&(be.lookup=g),T){if(typeof T!="string")return e(new Oe("socketPath must be a string",Oe.ERR_BAD_OPTION_VALUE,t));let Ce=A("allowedSocketPaths");if(Ce!=null){let ke=Array.isArray(Ce)?Ce:[Ce],Ue=B4(T);if(!ke.some(Ke=>typeof Ke=="string"&&B4(Ke)===Ue))return e(new Oe(`socketPath "${T}" is not permitted by allowedSocketPaths`,Oe.ERR_BAD_OPTION_VALUE,t))}be.socketPath=T}else be.hostname=oe.hostname.startsWith("[")?oe.hostname.slice(1,-1):oe.hostname,be.port=oe.port,P4(be,Q,Se+"//"+oe.hostname+(oe.port?":"+oe.port:"")+be.path,!1,f,B);let EA,hA=!1,iA=!1,Ze=nN.test(be.protocol);if(be.agent==null&&(be.agent=Ze?f:B),V)EA=HDe;else{let Ce=A("transport");if(Ce)EA=Ce;else if(R===0)EA=Ze?_4:M4,hA=!0;else{iA=!0,be.sensitiveHeaders=[],R&&(be.maxRedirects=R);let ke=A("beforeRedirect");if(ke&&(be.beforeRedirects.config=ke),Ie){let MA=oe.origin,Ke=Ie;be.beforeRedirects.auth=function(ot){try{new URL(ot.href).origin===MA&&(ot.auth=Ke)}catch{}}}let Ue=A("sensitiveHeaders");if(Ue!=null){if(!Z.isArray(Ue))return e(new Oe("sensitiveHeaders must be an array of strings",Oe.ERR_BAD_OPTION_VALUE,t));let MA=new Set;for(let Ke of Ue){if(!Z.isString(Ke))return e(new Oe("sensitiveHeaders must be an array of strings",Oe.ERR_BAD_OPTION_VALUE,t));MA.add(Ke.toLowerCase())}MA.size&&(be.sensitiveHeaders=Array.from(MA),be.beforeRedirects.sensitiveHeaders=function(_A,ot){GDe(_A,ot)||PDe(_A.headers,MA)})}EA=Ze?bDe:ODe}}H>-1?be.maxBodyLength=H:be.maxBodyLength=1/0,be.insecureHTTPParser=!!A("insecureHTTPParser"),K=EA.request(be,function(ke){if(k(),K.destroyed)return;let Ue=[ke],MA=Z.toFiniteNumber(ke.headers["content-length"]);if(Ne||aA){let wA=new X0({maxRate:Z.toFiniteNumber(aA)});Ne&&wA.on("progress",O4(wA,yp(MA,yg(mp(Ne,Q4),!0,3)))),Ue.push(wA)}let Ke=ke,_A=ke.req||K;if(L!==!1&&ke.headers["content-encoding"])switch((_==="HEAD"||ke.statusCode===204)&&delete ke.headers["content-encoding"],(ke.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ue.push(Ho.createUnzip(f4)),delete ke.headers["content-encoding"];break;case"deflate":Ue.push(new i4),Ue.push(Ho.createUnzip(f4)),delete ke.headers["content-encoding"];break;case"br":N4&&(Ue.push(Ho.createBrotliDecompress(SDe)),delete ke.headers["content-encoding"]);break;case"zstd":R4&&(Ue.push(Ho.createZstdDecompress(wDe)),delete ke.headers["content-encoding"]);break}Ke=Ue.length>1?On.pipeline(Ue,Z.noop):Ue[0];let ot={status:ke.statusCode,statusText:ke.statusMessage,headers:new xt(ke.headers),config:t,request:_A};if(y==="stream"){if(F>-1){let wA=F,ht=Ke;async function*Br(){let UA=0;for await(let de of ht){if(UA+=de.length,UA>wA)throw new Oe("maxContentLength size of "+wA+" exceeded",Oe.ERR_BAD_RESPONSE,t,_A);yield de}}Ke=On.Readable.from(Br(),{objectMode:!1})}ot.data=Ke,us(i,e,ot)}else{let wA=[],ht=0;Ke.on("data",function(UA){wA.push(UA),ht+=UA.length,F>-1&&ht>F&&(z=!0,Ke.destroy(),N(new Oe("maxContentLength size of "+F+" exceeded",Oe.ERR_BAD_RESPONSE,t,_A)))}),Ke.on("aborted",function(){if(z)return;let UA=new Oe("stream has been aborted",Oe.ERR_BAD_RESPONSE,t,_A,ot);Ke.destroy(UA),e(UA)}),Ke.on("error",function(UA){z||e(Oe.from(UA,null,t,_A,ot))}),Ke.on("end",function(){try{let UA=wA.length===1?wA[0]:Buffer.concat(wA);y!=="arraybuffer"&&(UA=UA.toString(m),(!m||m==="utf8")&&(UA=Z.stripBOM(UA))),ot.data=UA}catch(UA){return e(Oe.from(UA,null,t,ot.request,ot))}us(i,e,ot)})}U.once("abort",wA=>{Ke.destroyed||(Ke.emit("error",wA),Ke.destroy())})}),U.once("abort",Ce=>{K.close?K.close():K.destroy(Ce)}),K.on("error",function(ke){e(Oe.from(ke,null,t,K))});let bA=new Set;if(K.on("socket",function(ke){typeof ke.setKeepAlive=="function"&&ke.setKeepAlive(!0,1e3*60),ke[y4]||(ke.on("error",function(MA){let Ke=ke[Vy];Ke&&!Ke.destroyed&&Ke.destroy(MA)}),ke[y4]=!0),ke[Vy]=K,bA.add(ke)}),K.once("close",function(){k();for(let ke of bA)ke[Vy]===K&&(ke[Vy]=null);bA.clear()}),A("timeout")){let Ce=parseInt(A("timeout"),10);if(Number.isNaN(Ce)){N(new Oe("error trying to parse `config.timeout` to int",Oe.ERR_BAD_OPTION_VALUE,t,K));return}let ke=function(){q||N(J())};hA&&Ce>0&&(G=setTimeout(ke,Ce)),K.setTimeout(Ce,ke)}else K.setTimeout(0);if(Z.isStream(s)){let Ce=!1,ke=!1;s.on("end",()=>{Ce=!0}),s.once("error",MA=>{ke=!0,K.destroy(MA)}),s.on("close",()=>{!Ce&&!ke&&N(new go("Request stream has been aborted",t,K))});let Ue=s;if(H>-1&&!iA){let MA=H,Ke=0;Ue=On.pipeline([s,new On.Transform({transform(_A,ot,wA){if(Ke+=_A.length,Ke>MA)return wA(new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,t,K));wA(null,_A)}})],Z.noop),Ue.on("error",_A=>{K.destroyed||K.destroy(_A)})}Ue.pipe(K)}else s&&K.write(s),K.end()})};var F4=Qt.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,Qt.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(Qt.origin),Qt.navigator&&/(msie|trident)/i.test(Qt.navigator.userAgent)):()=>!0;var L4=Qt.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 xt?{...n}:n,KDe=n=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(n).concat(Object.getOwnPropertySymbols(n).filter(t=>Object.getOwnPropertyDescriptor(n,t).enumerable)):Object.keys(n);function bn(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(U4(c),U4(I),d,!0)};return Z.forEach(KDe({...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 xDe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function YDe(n){let t=bn({},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=xt.from(r),t.url=$I(el(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?xDe(B):"")))}catch(f){throw Oe.from(f,Oe.ERR_BAD_OPTION_VALUE,n)}}if(Z.isFormData(i)&&(Qt.hasStandardBrowserEnv||Qt.hasStandardBrowserWebWorkerEnv||Z.isReactNative(i)?r.setContentType(void 0):Z.isFunction(i.getHeaders)&&Hu(r,i.getHeaders(),o("formDataHeaderPolicy"))),Qt.hasStandardBrowserEnv&&(Z.isFunction(e)&&(e=e(t)),e===!0||e==null&&F4(t.url))){let B=a&&A&&L4.read(A);B&&r.set(a,B)}return t}var Wy=YDe;var jDe=typeof XMLHttpRequest<"u",H4=jDe&&function(n){return new Promise(function(o,i){let e=Wy(n),a=e.data,A=xt.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 _=xt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),H={data:!r||r==="text"||r==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:n,request:y};us(function(L){o(L),Q()},function(L){i(L),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 Oe("Request aborted",Oe.ECONNABORTED,n,y)),Q(),y=null)},y.onerror=function(R){let H=R&&R.message?R.message:"Network Error",F=new Oe(H,Oe.ERR_NETWORK,n,y);F.event=R||null,i(F),Q(),y=null},y.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",H=e.transitional||Sc;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),i(new Oe(R,H.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,n,y)),Q(),y=null},a===void 0&&A.setContentType(null),"setRequestHeader"in y&&Z.forEach(cp(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]=yg(g,!0),y.addEventListener("progress",d)),s&&y.upload&&([I,B]=yg(s),y.upload.addEventListener("progress",I),y.upload.addEventListener("loadend",B)),(e.cancelToken||e.signal)&&(c=_=>{y&&(i(!_||_.type?new go(null,n,y):_),y.abort(),Q(),y=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let T=Uu(e.url);if(T&&!Qt.protocols.includes(T)){i(new Oe("Unsupported protocol "+T+":",Oe.ERR_BAD_REQUEST,n)),Q();return}y.send(a||null)})};var JDe=(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 Oe?g:new go(g instanceof Error?g.message:g))}},a=t&&setTimeout(()=>{a=null,e(new Oe(`timeout of ${t}ms exceeded`,Oe.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},K4=JDe;var qDe=function*(n,t){let o=n.byteLength;if(!t||o{let e=zDe(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 x4=64*1024,{isFunction:Zy}=Z,WDe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),Y4=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},j4=(n,...t)=>{try{return!!n(...t)}catch{return!1}},ZDe=n=>{let t=n.indexOf("://"),o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},XDe=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?Zy(e):typeof fetch=="function",s=Zy(a),g=Zy(A);if(!r)return!1;let c=r&&Zy(o),I=r&&(typeof i=="function"?(m=>T=>m.encode(T))(new i):async m=>new Uint8Array(await new a(m).arrayBuffer())),d=s&&c&&j4(()=>{let m=!1,T=new a(Qt.origin,{body:new o,method:"POST",get duplex(){return m=!0,"half"}}),_=T.headers.has("Content-Type");return T.body!=null&&T.body.cancel(),m&&!_}),B=g&&c&&j4(()=>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=T&&T[m];if(R)return R.call(T);throw new Oe(`Response type '${m}' is not supported`,Oe.ERR_NOT_SUPPORT,_)})});let Q=async m=>{if(m==null)return 0;if(Z.isBlob(m))return m.size;if(Z.isSpecCompliantForm(m))return(await new a(Qt.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,T)=>{let _=Z.toFiniteNumber(m.getContentLength());return _??Q(T)};return async m=>{let{url:T,method:_,data:R,signal:H,cancelToken:F,timeout:L,onDownloadProgress:q,onUploadProgress:z,responseType:K,headers:G,withCredentials:V="same-origin",fetchOptions:U,maxContentLength:N,maxBodyLength:k}=Wy(m),J=Z.isNumber(N)&&N>-1,X=Z.isNumber(k)&&k>-1,ae=ve=>Z.hasOwnProp(m,ve)?m[ve]:void 0,De=e||fetch;K=K?(K+"").toLowerCase():"text";let oe=K4([H,F&&F.toAbortSignal()],L),Se=null,Be=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()}),Re,Ne=null,Je=()=>new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,m,Se);try{let ve,aA=ae("auth");if(aA){let Ze=Z.getSafeProp(aA,"username")||"",bA=Z.getSafeProp(aA,"password")||"";ve={username:Ze,password:bA}}if(ZDe(T)){let Ze=new URL(T,Qt.origin);if(!ve&&(Ze.username||Ze.password)){let bA=Y4(Ze.username),Ce=Y4(Ze.password);ve={username:bA,password:Ce}}(Ze.username||Ze.password)&&(Ze.username="",Ze.password="",T=Ze.href)}if(ve&&(G.delete("authorization"),G.set("Authorization","Basic "+btoa(WDe((ve.username||"")+":"+(ve.password||""))))),J&&typeof T=="string"&&T.startsWith("data:")&&iN(T)>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se);if(X&&_!=="get"&&_!=="head"){let Ze=await Q(R);if(typeof Ze=="number"&&isFinite(Ze)&&(Re=Ze,Ze>k))throw Je()}let fe=X&&(Z.isReadableStream(R)||Z.isStream(R)),Ie=(Ze,bA,Ce)=>sN(Ze,x4,ke=>{if(X&&ke>k)throw Ne=Je();bA&&bA(ke)},Ce);if(d&&_!=="get"&&_!=="head"&&(z||fe)){if(Re=Re??await y(G,R),Re!==0||fe){let Ze=new a(T,{method:"POST",body:R,duplex:"half"}),bA;if(Z.isFormData(R)&&(bA=Ze.headers.get("content-type"))&&G.setContentType(bA),Ze.body){let[Ce,ke]=z&&yp(Re,yg(mp(z)))||[];R=Ie(Ze.body,Ce,ke)}}}else if(fe&&!s&&c&&_!=="get"&&_!=="head")R=Ie(R);else if(fe&&s&&!d&&_!=="get"&&_!=="head")throw new Oe("Stream request bodies are not supported by the current fetch implementation",Oe.ERR_NOT_SUPPORT,m,Se);Z.isString(V)||(V=V?"include":"omit");let Xe=s&&"credentials"in a.prototype;if(Z.isFormData(R)){let Ze=G.getContentType();Ze&&/^multipart\/form-data/i.test(Ze)&&!/boundary=/i.test(Ze)&&G.delete("content-type")}G.set("User-Agent","axios/"+Qg,!1);let je={...U,signal:oe,method:_.toUpperCase(),headers:cp(G.normalize()),body:R,duplex:"half",credentials:Xe?V:void 0};Se=s&&new a(T,je);let be=await(s?De(Se,U):De(T,je)),EA=xt.from(be.headers);if(J){let Ze=Z.toFiniteNumber(EA.getContentLength());if(Ze!=null&&Ze>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se)}let hA=B&&(K==="stream"||K==="response");if(B&&be.body&&(q||J||hA&&Be)){let Ze={};["status","statusText","headers"].forEach(Ke=>{Ze[Ke]=be[Ke]});let bA=Z.toFiniteNumber(EA.getContentLength()),[Ce,ke]=q&&yp(bA,yg(mp(q),!0))||[],Ue=0,MA=Ke=>{if(J&&(Ue=Ke,Ue>N))throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se);Ce&&Ce(Ke)};be=new A(sN(be.body,x4,MA,()=>{ke&&ke(),Be&&Be()}),Ze)}K=K||"text";let iA=await f[Z.findKey(f,K)||"text"](be,m);if(J&&!B&&!hA){let Ze;if(iA!=null&&(typeof iA.byteLength=="number"?Ze=iA.byteLength:typeof iA.size=="number"?Ze=iA.size:typeof iA=="string"&&(Ze=typeof i=="function"?new i().encode(iA).byteLength:iA.length)),typeof Ze=="number"&&Ze>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se)}return!hA&&Be&&Be(),await new Promise((Ze,bA)=>{us(Ze,bA,{data:iA,headers:xt.from(be.headers),status:be.status,statusText:be.statusText,config:m,request:Se})})}catch(ve){if(Be&&Be(),oe&&oe.aborted&&oe.reason instanceof Oe){let aA=oe.reason;throw aA.config=m,Se&&(aA.request=Se),ve!==aA&&Object.defineProperty(aA,"cause",{__proto__:null,value:ve,writable:!0,enumerable:!1,configurable:!0}),aA}if(Ne)throw Se&&!Ne.request&&(Ne.request=Se),Ne;if(ve instanceof Oe)throw Se&&!ve.request&&(ve.request=Se),ve;if(ve&&ve.name==="TypeError"&&/Load failed|fetch/i.test(ve.message)){let aA=new Oe("Network Error",Oe.ERR_NETWORK,m,Se,ve&&ve.response);throw Object.defineProperty(aA,"cause",{__proto__:null,value:ve.cause||ve,writable:!0,enumerable:!1,configurable:!0}),aA}throw Oe.from(ve,ve&&ve.code,m,Se,ve&&ve.response)}}},$De=new Map,gN=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=$De;for(;r--;)s=a[r],g=c.get(s),g===void 0&&c.set(s,g=r?new Map:XDe(t)),c=g;return g},zcA=gN();var cN={http:G4,xhr:H4,fetch:{get:gN}};Z.forEach(cN,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});var J4=n=>`- ${n}`,AOe=n=>Z.isFunction(n)||n===null||n===!1;function tOe(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(J4).join(` -`):" "+J4(A[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+r,Oe.ERR_NOT_SUPPORT)}return e}var Xy={getAdapter:tOe,adapters:cN};function IN(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new go(null,n)}function xu(n){return IN(n),n.headers=xt.from(n.headers),n.data=_u.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Xy.getAdapter(n.adapter||up.adapter,n)(n).then(function(i){IN(n),n.response=i;try{i.data=_u.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=xt.from(i.headers),i},function(i){if(!Tu(i)&&(IN(n),i&&i.response)){n.response=i.response;try{i.response.data=_u.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=xt.from(i.response.headers)}return Promise.reject(i)})}var $y={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{$y[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});var q4={};$y.transitional=function(t,o,i){function e(a,A){return"[Axios v"+Qg+"] Transitional option '"+a+"'"+A+(i?". "+i:"")}return(a,A,r)=>{if(t===!1)throw new Oe(e(A," has been removed"+(o?" in "+o:"")),Oe.ERR_DEPRECATED);return o&&!q4[A]&&(q4[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}};$y.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function rOe(n,t,o){if(typeof n!="object"||n===null)throw new Oe("options must be an object",Oe.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 Oe("option "+a+" must be "+s,Oe.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Oe("Unknown option "+a,Oe.ERR_BAD_OPTION)}}var Yu={assertOptions:rOe,validators:$y};var ai=Yu.validators,Sp=class{constructor(t){this.defaults=t||{},this.interceptors={request:new E0,response:new E0}}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=bn(this.defaults,o);let{transitional:i,paramsSerializer:e,headers:a}=o;i!==void 0&&Yu.assertOptions(i,{silentJSONParsing:ai.transitional(ai.boolean),forcedJSONParsing:ai.transitional(ai.boolean),clarifyTimeoutError:ai.transitional(ai.boolean),legacyInterceptorReqResOrdering:ai.transitional(ai.boolean),advertiseZstdAcceptEncoding:ai.transitional(ai.boolean),validateStatusUndefinedResolves:ai.transitional(ai.boolean)},!1),e!=null&&(Z.isFunction(e)?o.paramsSerializer={serialize:e}:Yu.assertOptions(e,{encode:ai.function,serialize:ai.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Yu.assertOptions(o,{baseUrl:ai.spelling("baseURL"),withXsrfToken:ai.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=xt.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||Sc;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=[xu.bind(this),void 0];for(f.unshift(...r),f.push(...g),d=f.length,c=Promise.resolve(o);Ixu.call(this,B)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=xu.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 go(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}}},z4=lN;function dN(n){return function(o){return n.apply(null,o)}}function pN(n){return Z.isObject(n)&&n.isAxiosError===!0}var hN={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(hN).forEach(([n,t])=>{hN[t]=n});var V4=hN;function W4(n){let t=new ju(n),o=Bu(ju.prototype.request,t);return Z.extend(o,ju.prototype,t,{allOwnKeys:!0}),Z.extend(o,t,null,{allOwnKeys:!0}),o.create=function(e){return W4(bn(n,e))},o}var Rr=W4(up);Rr.Axios=ju;Rr.CanceledError=go;Rr.CancelToken=z4;Rr.isCancel=Tu;Rr.VERSION=Qg;Rr.toFormData=mc;Rr.AxiosError=Oe;Rr.Cancel=Rr.CanceledError;Rr.all=function(t){return Promise.all(t)};Rr.spread=dN;Rr.isAxiosError=pN;Rr.mergeConfig=bn;Rr.AxiosHeaders=xt;Rr.formToJSON=n=>Ky(Z.isHTMLForm(n)?new FormData(n):n);Rr.getAdapter=Xy.getAdapter;Rr.HttpStatusCode=V4;Rr.default=Rr;var em=Rr;var{Axios:jIA,AxiosError:EN,CanceledError:JIA,isCancel:qIA,CancelToken:zIA,VERSION:VIA,all:WIA,Cancel:ZIA,isAxiosError:XIA,spread:$IA,toFormData:elA,AxiosHeaders:AlA,HttpStatusCode:tlA,formToJSON:rlA,getAdapter:alA,mergeConfig:ilA,create:olA}=em;var E=ze(x8()),b=ze(j8()),M=ze(bz()),w6=ze(rV());import at from"fs";import wC from"path";import tS from"crypto";import ARe from"querystring";var LNe=ze(XV(),1),UNe=ze(Hm(),1),HNe=ze(Fp(),1),KNe=ze(mR(),1),xNe=ze(DR(),1),YNe=ze(NR(),1),nW=ze(jm(),1),jNe=ze(oW(),1);var Yo=nW.default;import{gzipSync as tRe}from"zlib";import rRe from"http";import aRe from"https";import{promises as iRe}from"dns";import{isIP as D6}from"net";function Y(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 j(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 o6(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 i6=="function"?i6(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 Xm;function oRe(){if(Xm!==void 0)return Xm;let n=[wC.resolve(__dirname,"..","package.json"),wC.resolve(__dirname,"..","..","package.json")];for(let t of n)try{let o=JSON.parse(at.readFileSync(t,"utf-8"));if(o.name==="@larksuiteoapi/node-sdk"&&typeof o.version=="string")return Xm=o.version,o.version}catch{}return Xm="unknown","unknown"}function n6(n){return n.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,64)}function wP(n,t){let o=`oapi-node-sdk/${oRe()}`;if(n){let i=n6(n);i&&(o+=` source/${i}`)}if(t?.extraTags)for(let i of t.extraTags){let e=n6(i);e&&(o+=` ${e}`)}return o}var zp=em.create(),nRe=wP();zp.interceptors.request.use(n=>(n.headers&&!n.headers["User-Agent"]&&(n.headers["User-Agent"]=nRe),n),void 0,{synchronous:!0});zp.interceptors.response.use(n=>n.config.$return_headers?{data:n.data,headers:n.headers}:n.data);var ws;(function(n){n[n.SelfBuild=0]="SelfBuild",n[n.ISV=1]="ISV"})(ws||(ws={}));var Ds;(function(n){n[n.Feishu=0]="Feishu",n[n.Lark=1]="Lark"})(Ds||(Ds={}));var po;(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"})(po||(po={}));var rS=Symbol("event-type"),aS=Symbol("tenant-key"),MC=Symbol("app-ticket"),SC=Symbol("tenant-access-token"),O6=Symbol("with-helpdesk-authorization"),b6=Symbol("with-user-access-token"),sRe=Symbol("user-access-token"),s6=Symbol("aily-session-record"),gRe=n=>Buffer.from(n).toString("base64"),iS=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})}},TC=new iS,_C=class{constructor(t){let o=tS.createHash("sha256");o.update(t),this.key=o.digest()}decrypt(t){let o=Buffer.from(t,"base64"),i=tS.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}},M6=n=>{switch(n){case Ds.Feishu:return"https://open.feishu.cn";case Ds.Lark:return"https://open.larksuite.com";default:return n}},u=(n,t={})=>n.replace(/:([^/]+)/g,(o,i)=>{if(t[i]!==void 0)return t[i];throw new Error(`request miss ${i} path argument`)}),oS=(n,t)=>h(void 0,void 0,void 0,function*(){(typeof n=="function"?n():n)&&(yield t())}),cRe=n=>n?n.replace(/^\//,""):"",$m=(n,t=[])=>{let o={};return n&&t.forEach(i=>{Object.prototype.hasOwnProperty.call(n,i)&&(o[i]=n[i])}),o},C=n=>{var t;if(n instanceof EN){let{message:o,response:i,request:e,config:a}=$m(n,["message","response","request","config"]),r=[{message:o,config:$m(a,["data","url","params","method"]),request:$m(e,["protocol","host","path","method"]),response:$m(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]},WR=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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},ZR=class extends WR{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},XR=class extends ZR{constructor(){super(...arguments),this.aily_rag={}}},$R=class extends XR{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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},ek=class extends $R{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Ak=class extends ek{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},tk=class extends Ak{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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},rk=class extends tk{constructor(){super(...arguments),this.attendance_machine={}}},ak=class extends rk{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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},ik=class extends ak{constructor(){super(...arguments),this.audio_video_ai={}}},ok=class extends ik{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},nk=class extends ok{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},sk=class extends nk{constructor(){super(...arguments),this.authz={}}},gk=class extends sk{constructor(){super(...arguments),this.aweme_ecosystem={}}},ck=class extends gk{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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Ik=class extends ck{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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},lk=class extends Ik{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},dk=class extends lk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},pk=class extends dk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},hk=class extends pk{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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})})}}}}},Ek=class extends hk{constructor(){super(...arguments),this.c360={}}},uk=class extends Ek{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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Ck=class extends uk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Bk=class extends Ck{constructor(){super(...arguments),this.ccm_unified_resource={}}},fk=class extends Bk{constructor(){super(...arguments),this.collab_plugins={}}},Qk=class extends fk{constructor(){super(...arguments),this.comment_sdk={}}},yk=class extends Qk{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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})})}}}}},mk=class extends yk{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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Sk=class extends mk{constructor(){super(...arguments),this.content_check={}}},wk=class extends Sk{constructor(){super(...arguments),this.contract={}}},Dk=class extends wk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Ok=class extends Dk{constructor(){super(...arguments),this.data_cube={}}},bk=class extends Ok{constructor(){super(...arguments),this.device={}}},Mk=class extends bk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},_k=class extends Mk{constructor(){super(...arguments),this.docs_ai={}}},Tk=class extends _k{constructor(){super(...arguments),this.docs_tool={}}},Nk=class extends Tk{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:u(`${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(C(r)),r})})}}}}},Rk=class extends Nk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(s)),s});return r?.data||null})}}}}},kk=class extends Rk{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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},vk=class extends kk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Pk=class extends vk{constructor(){super(...arguments),this.ea_symphony={}}},Gk=class extends Pk{constructor(){super(...arguments),this.edu={}}},Fk=class extends Gk{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:u(`${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(C(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=at.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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Lk=class extends Fk{constructor(){super(...arguments),this.elearning={}}},Uk=class extends Lk{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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Hk=class extends Uk{constructor(){super(...arguments),this.exam={}}},Kk=class extends Hk{constructor(){super(...arguments),this.face_detection={}}},xk=class extends Kk{constructor(){super(...arguments),this.financial_access_platform={}}},Yk=class extends xk{constructor(){super(...arguments),this.grounding={}}},jk=class extends Yk{constructor(){super(...arguments),this.gtm_ai={}}},Jk=class extends jk{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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},qk=class extends Jk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},zk=class extends qk{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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Vk=class extends zk{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=Y(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:u(`${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(C(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=Y(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:u(`${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(C(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=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=Y(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:u(`${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(C(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=Y(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:u(`${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(C(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=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})})}}}}},Wk=class extends Vk{constructor(){super(...arguments),this.inline_platform={}}},Zk=class extends Wk{constructor(){super(...arguments),this.laps={}}},Xk=class extends Zk{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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},$k=class extends Xk{constructor(){super(...arguments),this.llpp={}}},ev=class extends $k{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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Av=class extends ev{constructor(){super(...arguments),this.mcp={}}},tv=class extends Av{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},rv=class extends tv{constructor(){super(...arguments),this.meeting_room={}}},av=class extends rv{constructor(){super(...arguments),this.mindnote={}}},iv=class extends av{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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},ov=class extends iv{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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},nv=class extends ov{constructor(){super(...arguments),this.myai_ai_extension={}}},sv=class extends nv{constructor(){super(...arguments),this.myai_assistant={}}},gv=class extends sv{constructor(){super(...arguments),this.myai_base_ai={}}},cv=class extends gv{constructor(){super(...arguments),this.myai_ccm_extension={}}},Iv=class extends cv{constructor(){super(...arguments),this.myai_data={}}},lv=class extends Iv{constructor(){super(...arguments),this.myai_im_extension={}}},dv=class extends lv{constructor(){super(...arguments),this.myai_mail={}}},pv=class extends dv{constructor(){super(...arguments),this.myai_memory_reflection={}}},hv=class extends pv{constructor(){super(...arguments),this.myai_scenario_summary={}}},Ev=class extends hv{constructor(){super(...arguments),this.myai_slides={}}},uv=class extends Ev{constructor(){super(...arguments),this.myai_url_extension={}}},Cv=class extends uv{constructor(){super(...arguments),this.myai={}}},Bv=class extends Cv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},fv=class extends Bv{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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Qv=class extends fv{constructor(){super(...arguments),this.partner_ai={}}},yv=class extends Qv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},mv=class extends yv{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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Sv=class extends mv{constructor(){super(...arguments),this.people_admin={}}},wv=class extends Sv{constructor(){super(...arguments),this.people_ai={}}},Dv=class extends wv{constructor(){super(...arguments),this.people_bytedance={}}},Ov=class extends Dv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})})}}}}},bv=class extends Ov{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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Mv=class extends bv{constructor(){super(...arguments),this.profile={}}},_v=class extends Mv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Tv=class extends _v{constructor(){super(...arguments),this.rule_engine={}}},Nv=class extends Tv{constructor(){super(...arguments),this.saasbi={}}},Rv=class extends Nv{constructor(){super(...arguments),this.scim={}}},kv=class extends Rv{constructor(){super(...arguments),this.search_in_app={}}},vv=class extends kv{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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})})}}}}},Pv=class extends vv{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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Gv=class extends Pv{constructor(){super(...arguments),this.security_plugin={}}},Fv=class extends Gv{constructor(){super(...arguments),this.sheet_ai={}}},Lv=class extends Fv{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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Uv=class extends Lv{constructor(){super(...arguments),this.slides_ai={}}},Hv=class extends Uv{constructor(){super(...arguments),this.slides={}}},Kv=class extends Hv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},xv=class extends Kv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Yv=class extends xv{constructor(){super(...arguments),this.subscriptions={}}},jv=class extends Yv{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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})})}}}}},Jv=class extends jv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},qv=class extends Jv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},zv=class extends qv{constructor(){super(...arguments),this.trust_layer={}}},Vv=class extends zv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},Wv=class extends Vv{constructor(){super(...arguments),this.unified_kms_log={}}},Zv=class extends Wv{constructor(){super(...arguments),this.unified_kms={}}},Xv=class extends Zv{constructor(){super(...arguments),this.vault={}}},$v=class extends Xv{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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=at.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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(r)),r})})}}}}},eP=class extends $v{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:u(`${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(C(r)),r})})}}}}},AP=class extends eP{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let d=yield S(r({headers:i,params:Object.assign(Object.assign({},e),{page_token:I}),data:a})),B=d?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:i,params:e,data:a,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},tP=class extends AP{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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(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:u(`${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(C(r)),r})})}}}}},kg={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)}},Pc=class{constructor(t,o){this.level=t,this.logger=o}error(...t){this.level>=po.error&&this.logger.error(t)}warn(...t){this.level>=po.warn&&this.logger.warn(t)}info(...t){this.level>=po.info&&this.logger.info(t)}debug(...t){this.level>=po.debug&&this.logger.debug(t)}trace(...t){this.level>=po.trace&&this.logger.trace(t)}},rP=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===ws.ISV&&((yield(t=this.cache)===null||t===void 0?void 0:t.get(MC,{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(MC,{namespace:this.appId});if(o)return this.logger.debug("use cache app ticket"),o;yield this.requestAppTicket()})}},nS="/oauth/v3/token",IRe="urn:ietf:params:oauth:grant-type:jwt-bearer",_6="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",lRe="authorization_code",dRe="refresh_token",DP="X-Target-Service",T6=7100,OP=7101,N6=7102,bP=7104,pRe=Object.freeze({"open.feishu.cn":"https://accounts.feishu.cn","open.larksuite.com":"https://accounts.larksuite.com"}),ii=class extends Error{constructor(t,o){super(o),this.name="ClientAssertionError",this.code=t,this.msg=o}},qp=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}},MP=n=>n.includes("://")?n:`https://${n}`;function _P(n){let t=new URL(MP(n));if(!t.host)throw new Error(`invalid url: ${n}`);return t.host}function TP(n){if(n.oauthBaseUrl)return MP(n.oauthBaseUrl).replace(/\/+$/,"");let t=_P(n.domain),o=pRe[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 R6(n){return _P(TP(n))}function NP(n,t){let o=new URL(MP(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 hRe(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 aP=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 rP({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(hRe(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(SC,{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(SC,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=TP({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),c=R6({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),I=yield(t=this.cache)===null||t===void 0?void 0:t.get(SC,{namespace:this.appId});if(I)return this.logger.debug("use cache token"),I;let d;try{d=yield this.clientAssertionProvider.retrieveToken(c)}catch(T){throw new ii(N6,T?.message||"client assertion provider failed")}if(!d||!d.value)throw new ii(OP,"client assertion token is empty");let B=`${g}${nS}`,f={};d.targetInfo&&(B=NP(d.targetInfo,nS),f[DP]=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:IRe,client_assertion_type:_6,client_assertion:d.value,client_id:this.appId}})}catch(T){throw this.logger.error(T),new ii(((i=(o=T?.response)===null||o===void 0?void 0:o.data)===null||i===void 0?void 0:i.code)||0,((a=(e=T?.response)===null||e===void 0?void 0:e.data)===null||a===void 0?void 0:a.error_description)||((r=(A=T?.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 ii(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(SC,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 ii(T6,"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 oS(this.appType===ws.SelfBuild,()=>h(this,void 0,void 0,function*(){this.logger.debug("get custom app token")})),oS(this.appType===ws.ISV,()=>h(this,void 0,void 0,function*(){this.logger.debug("get market app token ")})),this.appType===ws.SelfBuild?yield this.getCustomTenantAccessToken():yield this.getMarketTenantAccessToken(t?.[aS])})}},k6=(n,t)=>{let o=Object.assign({},n);for(let[i,e]of Object.entries(t))e!==void 0&&(o[i]=e);return o},iP=class{constructor(t){this.client=t.client}getCacheKey(t,o){return`${o?.namespace||this.client.appId}/${sRe.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=k6(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)}})}},jp=n=>n===""||n===0||n===null||n===void 0?void 0:n,ERe=n=>{if(!n||n.error)return!0;let{code:t}=n;return t!==void 0&&t!==0&&t!=="0"&&t!==""},oP=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:lRe,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:dRe,refresh_token:t.refreshToken,scope:t.scope},t.headers)})}doRequest(t,o){return h(this,void 0,void 0,function*(){let i=TP({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),e=R6({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}${nS}`,r=Object.assign({},o||{});if(this.clientAssertionProvider){let I;try{I=yield this.clientAssertionProvider.retrieveToken(e)}catch(d){throw new ii(N6,d?.message||"client assertion provider failed")}if(!I||!I.value)throw new ii(OP,"client assertion token is empty");a.client_assertion_type=_6,a.client_assertion=I.value,I.targetInfo&&(A=NP(I.targetInfo,nS),r[DP]=e)}else if(this.appSecret)a.client_secret=this.appSecret;else throw new ii(bP,"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 qp(0,0,"",I?.message||"oauth token request failed")}if(s!==200||ERe(g))throw new qp(s,g?.code||0,g?.error||"",g?.error_description||g?.msg||"");let c=jp(g?.access_token);if(!c)throw new qp(s,g?.code||0,g?.error||"",g?.error_description||"oauth token response missing access_token");return{accessToken:c,tokenType:jp(g.token_type),expiresIn:jp(g.expires_in),refreshToken:jp(g.refresh_token),refreshTokenExpiresIn:jp(g.refresh_token_expires_in),scope:jp(g.scope)}})}},sS=class extends tP{constructor(t){if(super(),this.appId="",this.appSecret="",this.helpDeskId="",this.helpDeskToken="",this.appType=ws.SelfBuild,this.logger=new Pc(t.loggerLevel||po.info,t.logger||kg),this.appId=t.appId,this.appSecret=t.appSecret||"",this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.disableTokenCache=t.disableTokenCache,this.userAgent=wP(t.source,{extraTags:t.extraUaTags}),oS(!this.appId,()=>this.logger.error("appId is needed")),this.helpDeskId=t.helpDeskId,this.helpDeskToken=t.helpDeskToken,this.appType=t?.appType||ws.SelfBuild,!this.appSecret&&!this.clientAssertionProvider)throw new ii(bP,"appSecret or clientAssertionProvider is required");if(this.clientAssertionProvider&&this.appType===ws.ISV)throw new ii(T6,"ClientAssertion mode is not supported for ISV apps");this.domain=M6(t.domain||Ds.Feishu),this.logger.debug(`use domain url: ${this.domain}`),this.cache=t.cache||TC,this.httpInstance=t.httpInstance||zp,this.tokenManager=new aP({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 iP({client:this}),this.accessToken=new oP({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[b6];if(r)this.logger.debug("use passed token"),A.headers.Authorization=`Bearer ${r}`;else if(!this.disableTokenCache){let g=yield this.tokenManager.getTenantAccessToken({[aS]:(e=A?.lark)===null||e===void 0?void 0:e[aS]});g?A.headers.Authorization=`Bearer ${g}`:this.logger.warn("failed to obtain token")}if((a=A?.lark)===null||a===void 0?void 0:a[O6]){this.logger.debug("generate help desk credential");let g=gRe(`${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=Y(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}/${cRe(r)}`,headers:g.headers,data:c,params:g.params})).catch(d=>{throw this.logger.error(d),d})})}},uRe=n=>n.reduce((t,o)=>(0,w6.default)(t,o),{}),CRe=n=>({lark:{[aS]:n}}),BRe=()=>({lark:{[O6]:!0}}),fRe=n=>({headers:{Authorization:`Bearer ${n}`}}),QRe=n=>({lark:{[b6]:n}}),gS=class{constructor(t){let{encryptKey:o,verificationToken:i,logger:e}=t;this.verificationToken=i,this.encryptKey=o,this.logger=e,o&&(this.aesCipher=new _C(o))}parse(t){var o,i;let e=(()=>{var r;let s=t||{},{encrypt:g}=s,c=Y(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=Y(e,["header","event"]);return Object.assign(Object.assign(Object.assign({[rS]:(o=e?.header)===null||o===void 0?void 0:o.event_type},g),r),s)}let{event:a}=e,A=Y(e,["event"]);return Object.assign(Object.assign({[rS]:(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?tS.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 tS.createHash("sha256").update(a).digest("hex")===e}},yRe="app_ticket",cS=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 Pc(t.loggerLevel||po.info,t.logger||kg),this.requestHandle=new gS({encryptKey:o,verificationToken:i,logger:this.logger}),this.cache=t.cache||TC,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(MC,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!==yRe&&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[rS];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`})}},nP=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 Pc(t.loggerLevel||po.info,t.logger||kg),this.requestHandle=new gS({encryptKey:e,verificationToken:i,logger:this.logger}),this.cache=t.cache||TC,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(MC,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[rS];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)}})}},uS=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("")}})}),NC=(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 _C(t.encryptKey).decrypt(n.encrypt)):n;return{isChallenge:o.type==="url_verification",challenge:{challenge:o.challenge}}},mRe=(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 uS(i));if(o?.autoChallenge||!1){let{isChallenge:s,challenge:g}=NC(a,{encryptKey:t.encryptKey});if(s){e.end(JSON.stringify(g));return}}let r=yield t.invoke(a);e.end(JSON.stringify(r))}),SRe=(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||kg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield uS(o)}),a=Object.assign(Object.create({headers:o.headers}),e);if(t?.autoChallenge||!1){let{isChallenge:s,challenge:g}=NC(a,{encryptKey:n.encryptKey});if(s){i.json(g);return}}let r=yield n.invoke(a);i.json(r)}),wRe=(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||kg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield uS(A)}),g=Object.assign(Object.create({headers:A.headers}),s);if(o?.autoChallenge||!1){let{isChallenge:d,challenge:B}=NC(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()}),DRe=(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||kg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield uS(e)}),r=Object.assign(Object.create({headers:e.headers}),A);if(t?.autoChallenge||!1){let{isChallenge:c,challenge:I}=NC(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()}),ORe=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"}}})},bRe=Object.freeze({__proto__:null,defaultCard:ORe}),Rg=Zm();Rg.util.Long=void 0;Rg.configure();var vc=Rg.Reader,g6=Rg.Writer,HA=Rg.util,qo=Rg.roots.default||(Rg.roots.default={}),v6=qo.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 vc||(i=new vc(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 qo.pbbp2.Header)return i;let e=new qo.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,Rg.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(qo.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 vc||(i=new vc(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;Av6.Frame.decode(n),sP=class{constructor(){this.client={appId:"",appSecret:"",domain:Ds.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}},gP=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 OC;(function(n){n[n.control=0]="control",n[n.data=1]="data"})(OC||(OC={}));var bC;(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"})(bC||(bC={}));var Jp;(function(n){n.event="event",n.card="card",n.ping="ping",n.pong="pong"})(Jp||(Jp={}));var IS;(function(n){n[n.ok=200]="ok",n[n.internal_server_error=500]="internal_server_error"})(IS||(IS={}));var lS=class{constructor(t){var o;this.wsConfig=new sP,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=Ds.Feishu,httpInstance:s=zp,loggerLevel:g=po.info,logger:c=kg,autoReconnect:I=!0,source:d,extraUaTags:B,onReady:f,onError:Q,onReconnecting:y,onReconnected:m,handshakeTimeoutMs:T,wsConfig:_}=t;if(this.userAgent=wP(d,{extraTags:B}),this.logger=new Pc(g,c),oS(!i,()=>this.logger.error("appId is needed")),!e&&!a)throw new ii(bP,"appSecret or clientAssertionProvider is required");this.agent=A,this.dataCache=new gP({logger:this.logger}),this.httpInstance=s,this.wsConfig.updateClient({appId:i,appSecret:e||"",clientAssertionProvider:a,domain:M6(r)}),this.wsConfig.updateWs({autoReconnect:I}),this.onReady=f,this.onError=Q,this.onReconnecting=y,this.onReconnected=m,this.handshakeTimeoutMs=T,this.pingTimeoutSec=(o=_?.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=_P(e),y=yield i.retrieveToken(Q);if(!y||!y.value)throw new ii(OP,"client assertion token is empty");s.AppSecret="",s.ClientAssertion=y.value,y.targetInfo&&(A=NP(y.targetInfo,a),r[DP]=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}=ARe.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 ii?{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 Yo(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===Yo.OPEN){let e={headers:[{key:bC.type,value:Jp.ping}],service:Number(t),method:OC.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=MRe(o),{method:e}=i;e===OC.control&&(yield this.handleControlData(i)),e===OC.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===bC.type))===null||o===void 0?void 0:o.value,e=t.payload;if(i!==Jp.ping&&i===Jp.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!==Jp.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:IS.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=IS.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:bC.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===Yo.OPEN){let e=v6.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)===Yo.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!==Yo.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: +`),questions:o}}function OQe(n,t){return new Promise((o,a)=>{if(n.controller.signal.aborted)return a(n.controller.signal.reason??Id());let e=()=>{n.approvals.delete(t),a(n.controller.signal.reason??Id())};n.controller.signal.addEventListener("abort",e,{once:!0}),n.approvals.set(t,{resolve(i){n.controller.signal.removeEventListener("abort",e),n.approvals.delete(t),o(i)}})})}var My=class{#e;#A;#t;#r;#I;#o=new Map;#c=new Set;#i=new Set;#a=!1;#s={running:0,completed:0,failed:0,lastJobId:null,lastJobAt:null};constructor({config:t,transport:o,createHarness:a,logger:e=console,sleepImpl:i=QQe}){if(!t||!o||typeof a!="function")throw new TypeError("OfficeJobExecutor requires config, transport, and createHarness");this.#e=t,this.#A=o,this.#t=a,this.#r=e,this.#I=i}get status(){return structuredClone(this.#s)}offer(t){return this.#a||!sj.test(t)||this.#o.has(t)||this.#c.has(t)||this.#i.has(t)?!1:(this.#c.add(t),this.#p(),!0)}handleEvent(t){let o=aa(t?.data?.jobId,80);if(!sj.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 a=this.#o.get(o),e=aa(t.data?.approvalId,180),i=a?.approvals.get(e);return i?(i.resolve({decision:t.data?.decision==="approved"?"approved":"rejected",answer:aa(t.data?.answer)}),!0):!1}return!1}cancel(t){this.#c.delete(t);let o=this.#o.get(t);return o?(o.cancelled=!0,o.controller.abort(Id()),o.sessionId&&o.harness&&o.harness.rpc("session.cancel",{sessionId:o.sessionId,keepInbox:!0},1e4).catch(()=>{}),!0):!1}async close(){this.#a=!0,this.#c.clear();for(let t of this.#o.values())t.controller.abort(Id());await Promise.allSettled([...this.#o.values()].map(t=>t.task))}#p(){for(;!this.#a&&this.#o.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.#o.delete(t),this.#s.running=this.#o.size,this.#p()}),this.#o.set(t,o),this.#s.running=this.#o.size,o.task.catch(a=>this.#r.warn?.("[dsh-im:office] Job task ended:",a.message))}}async#g(t,o){let a=o.controller.signal,e=null;try{let A=(await this.#A.getJob(t,{signal:a}))?.job;if(!A||A.id!==t)throw new Error("Office returned an invalid Job payload");let r=await this.#A.acceptJob(t,{signal:a});if(!aa(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(w("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.#h(t,o,{kind:"status",message:w("\u5DF2\u9886\u53D6 Job\uFF0C\u51C6\u5907 Workspace alias\uFF1A{alias}",{alias:A.workspaceAlias})},!0),o.sessionId=await o.harness.createSession({signal:a,workspace:s}),await this.#h(t,o,{kind:"status",message:w("Harness Session \u5DF2\u521B\u5EFA\u3002"),sessionId:o.sessionId},!0);let c=await o.harness.ask(o.sessionId,wQe(A,g),{timeoutMs:30*6e4,signal:a,onUpdate:I=>this.#n(t,o,I),onInteraction:I=>this.#d(t,o,I),onInteractionResolved:I=>{let p=aa(I?.interactionId,180);o.approvals.get(p)?.resolve({decision:"rejected",answer:""})}});if(a.aborted)throw a.reason??Id();await this.#A.completeJob(t,o.leaseToken,{resultMarkdown:c,sessionId:o.sessionId},{signal:a}),this.#s.completed+=1,this.#C(t)}catch(i){if(!o.cancelled&&o.leaseToken&&(await this.#A.failJob(t,o.leaseToken,{error:SQe(i),...o.sessionId?{sessionId:o.sessionId}:{}}).catch(()=>{}),this.#s.failed+=1),i?.code==="office-job-conflict"||i?.code==="office-hook-unavailable"){this.#C(t);return}!o.cancelled&&!a.aborted&&this.#r.warn?.(`[dsh-im:office] Job ${t} failed:`,i.message)}finally{o.controller.abort(Id()),await e?.catch(()=>{}),this.#s.lastJobId=t,this.#s.lastJobAt=new Date().toISOString()}}async#l(t,o){for(;!o.controller.signal.aborted;){try{await this.#I(yQe,void 0,{signal:o.controller.signal})}catch{return}try{await this.#A.renewJob(t,o.leaseToken,{signal:o.controller.signal})}catch(a){if(o.controller.signal.aborted)return;o.cancelled=!0,o.controller.abort(a),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:aa(e.answer)})}catch(a){if(o.controller.signal.aborted)return;this.#r.warn?.(`[dsh-im:office] Job ${t} approval poll failed; will retry after the next renewal:`,a.message)}}}async#n(t,o,a){let e=a?.type==="tool"?w("\u6B63\u5728\u4F7F\u7528 {tool}\u2026",{tool:aa(a.name,160)||w("Harness \u5DE5\u5177")}):aa(a?.text,4e3);if(!e)return;let i=`${a.type}:${e}`;if(i===o.lastProgress)return;let A=Date.now();a.type==="text"&&A-o.lastProgressAt<1e3||(o.lastProgress=i,o.lastProgressAt=A,await this.#h(t,o,{kind:a.type==="tool"?"tool":a.type==="text"?"text":"status",message:e,...o.sessionId?{sessionId:o.sessionId}:{}}))}#h(t,o,a,e=!1){let i=this.#A.progressJob(t,o.leaseToken,a,{signal:o.controller.signal});return e?i:i.catch(A=>{this.#r.debug?.("[dsh-im:office] ignored a progress delivery failure:",A.message)})}async#d(t,o,a){let e=DQe(a);if(!e){a?.kind==="approval"&&typeof a.respond=="function"&&await a.respond({ok:!0,value:{sessionId:a.sessionId,approvalId:a.payload?.approvalId,outcome:"rejected"}});return}let i=OQe(o,e.id);try{await this.#A.requestApproval(t,o.leaseToken,e,{signal:o.controller.signal});let A=await i;if(e.kind==="approval"){await a.respond({ok:!0,value:{sessionId:a.sessionId,approvalId:a.payload.approvalId,outcome:A.decision==="approved"?"allowed-once":"rejected"}});return}if(A.decision!=="approved"){await a.respond({ok:!1,error:{code:"cancelled",message:"The AI Office user rejected this question.",details:{}}});return}let r=aa(A.answer).split(/\r?\n/);await a.respond({ok:!0,value:{sessionId:a.sessionId,answer:{answers:e.questions.map((s,g)=>Ma(s,r[g]||r[0]||""))}}})}catch(A){throw o.approvals.delete(e.id),A}}#C(t){this.#i.add(t),!(this.#i.size<=mQe)&&this.#i.delete(this.#i.values().next().value)}};var gj=Object.freeze([1e3,3e3,1e4,3e4]);function MQe(n){let t=typeof n?.code=="string"?n.code:"office-connection-failed",o={"invalid-device-token":w("AI Office \u62D2\u7EDD\u4E86 Device Token\u3002"),"office-hook-unavailable":w("AI Office Connector Hook \u5C1A\u672A\u5C31\u7EEA\u3002"),"office-protocol-mismatch":w("AI Office Connector \u534F\u8BAE\u7248\u672C\u4E0D\u517C\u5BB9\u3002"),"office-transport-failed":w("\u672C\u673A\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE AI Office\u3002")};return{code:t,message:o[t]??w("AI Office \u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002")}}var ld=class{#e;#A;#t;#r;#I;#o=null;#c=null;#i;#a;constructor({config:t,token:o,logger:a=console,transport:e,createHarness:i,jobExecutor:A,sleepImpl:r=bQe}){this.#e=t,this.#A=o,this.#t=a,this.#I=r,this.#r=e??new by({baseUrl:t.baseUrl,deviceId:t.deviceId,token:o}),this.#i={state:"idle",connected:!1,startedAt:null,lastHeartbeatAt:null,lastEventAt:null,lastEventId:null,lastEventType:null,reconnects:0,jobsOffered:0,error:null},this.#a=A??(i?new My({config:t,transport:this.#r,createHarness:i,logger:a}):null)}get status(){return structuredClone({...this.#i,...this.#a?{jobs:this.#a.status}:{}})}capabilities(){return{protocolVersion:nd,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.#o=new AbortController,this.#i.startedAt=new Date().toISOString(),this.#i.state="connecting",this.#c=this.#s(this.#o.signal).finally(()=>{this.#c=null}),this.#c.catch(t=>{this.#o?.signal.aborted||this.#t.error?.("[dsh-im:office] connector stopped:",t)}),this.status)}async#s(t){let o=0;for(;!t.aborted;){let a=new AbortController,e=AbortSignal.any([t,a.signal]);try{let i=await this.#r.heartbeat(this.capabilities(),{signal:e});this.#g(i?.jobs),this.#i.lastHeartbeatAt=new Date().toISOString();let A=!1,r=this.#p(e,()=>{A&&!e.aborted&&(o=0)}),s=this.#r.stream({signal:e,lastEventId:this.#i.lastEventId,onOpen:()=>{this.#i.connected=!0,this.#i.state="connected",this.#i.error=null,A=!0},onEvent:async g=>{this.#i.lastEventAt=new Date().toISOString(),this.#i.lastEventId=g.id??this.#i.lastEventId,this.#i.lastEventType=g.type,g.type==="job.available"&&(this.#i.jobsOffered+=1),this.#a?.handleEvent(g)}});await Promise.race([s,r])}catch(i){if(t.aborted)break;a.abort(),this.#i.connected=!1,this.#i.state="reconnecting",this.#i.error=MQe(i),this.#i.reconnects+=1;let A=gj[Math.min(o,gj.length-1)];o+=1;try{await this.#I(A,void 0,{signal:t})}catch{break}}finally{a.abort()}}this.#i.connected=!1,this.#i.state="idle"}async#p(t,o){for(;!t.aborted;){await this.#I(this.#e.heartbeatSeconds*1e3,void 0,{signal:t});let a=await this.#r.heartbeat(this.capabilities(),{signal:t});this.#g(a?.jobs),this.#i.lastHeartbeatAt=new Date().toISOString(),o?.()}}#g(t){if(Array.isArray(t))for(let o of t)typeof o?.id=="string"&&this.#a?.offer(o.id)&&(this.#i.jobsOffered+=1)}async stop(){let t=this.#c;return this.#o?.abort(),this.#o=null,t&&await t.catch(()=>{}),await this.#a?.close(),this.#i.connected=!1,this.#i.state="idle",this.status}};function LT(n){return typeof n=="string"&&n.trim()?n.trim():null}function TQe(n,t){return`DSH_OFFICE_DEVICE_TOKEN_${_Qe("sha256").update(`${n} +${t}`).digest("hex").slice(0,24).toUpperCase()}`}var _y=class{#e;#A;#t;#r;#I=null;#o=Promise.resolve();constructor({credentials:t,configStore:o,logger:a=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=a,this.#r=e??(i=>new ld(i))}async initialize(){let t=this.#A.get();if(t){let o=await this.#e.resolve(t.deviceTokenRef).catch(()=>{});o?.value&&await this.#i(t,o.value)}return this.status()}async configure(t={}){return this.#s(async()=>{let o=this.#A.get(),a=LT(t.baseUrl),e=LT(t.deviceId);if(!a||!e)throw new TypeError("Office URL and Device ID are required");let i=yu(a).origin,A=TQe(i,e),r=LT(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=Dy({version:1,baseUrl:i,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(p){throw s?.value?await this.#e.set(A,s.value).catch(()=>{}):await this.#e.unset(A).catch(()=>{}),p}return o?.deviceTokenRef&&o.deviceTokenRef!==A&&await this.#e.unset(o.deviceTokenRef).catch(()=>{}),await this.#i(I,g),this.status()})}async reconnect(){return this.#s(async()=>{let t=this.#A.get();if(!t)throw new Error("AI Office connector is not configured");return await this.#i(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),a=this.#r({config:t,token:o,logger:this.#t});try{await a.testConnection(AbortSignal.timeout(1e4))}finally{await a.stop().catch(()=>{})}return{tested:!0,snapshot:await this.status()}}async remove(){return this.#s(async()=>{let t=this.#A.get();return await this.#a(),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(()=>{}),a=this.#I?.status??null;return{schemaVersion:1,configured:!0,connected:a?.connected===!0,state:a?.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:wy(t.baseUrl)},health:a,tokenConfigured:!!o?.value}}async close(){await this.#o.catch(()=>{}),await this.#a()}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#i(t,o){await this.#a();let a=o??await this.#c(t),e=this.#r({config:t,token:a,logger:this.#t});this.#I=e,e.start()}async#a(){let t=this.#I;this.#I=null,t&&await t.stop()}#s(t){let o=this.#o.then(t,t);return this.#o=o.then(()=>{},()=>{}),o}};function RQe(n={}){let t=HT(n.dshHome??process.env.DSH_HOME??UT(NQe(),".dsh")),o=HT(n.dataDir??UT(t,"integrations","dsh-office"));return{root:o,config:HT(n.configPath??UT(o,"config.json"))}}async function cj(n,t={},o={}){let a=si(n,t),e=o.ConfigStore??Oy,i=o.Controller??_y,A=o.Runtime??ld,r=o.HarnessClient??yr,s=RQe(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({...a,workspace:B,autostart:!1,dshBin:t.dshBin??"dsh",rpcIdPrefix:"office",logPrefix:"dsh-im:office"})),p=new i({credentials:n.credentials,configStore:g,logger:c,createRuntime:B=>new A({...B,createHarness:I,...o.transport?{transport:o.transport}:{}})});return await p.initialize(),{controller:p,close:()=>p.close(),paths:s}}function KT(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function mu(n,t){return KT(n)&&Object.keys(n).every(o=>t.includes(o))}function kQe(n){return mu(n,["baseUrl","deviceId","deviceToken","maxConcurrency","heartbeatSeconds","workspaces","instructionPresets"])&&typeof n.baseUrl=="string"&&typeof n.deviceId=="string"&&(n.deviceToken===void 0||typeof n.deviceToken=="string")&&KT(n.workspaces)&&KT(n.instructionPresets)}function vQe(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,a)=>{if(a?.aborted)return{ok:!1,error:{code:"cancelled",message:"The request was cancelled."}};try{let e;if(t===sd.status&&mu(o,[]))e=await n.status();else if(t===sd.configure&&kQe(o))e=await n.configure(o);else if(t===sd.reconnect&&mu(o,[]))e=await n.reconnect();else if(t===sd.test&&mu(o,[]))e=await n.test();else if(t===sd.remove&&mu(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 i=e?.code==="invalid-device-token"?"invalid-device-token":e?.code==="office-hook-unavailable"?"office-hook-unavailable":"office-operation-failed",A=i==="invalid-device-token"?"AI Office Device Token \u65E0\u6548\u3002":i==="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:i,message:A}}}}}function xT(n,t,o){return n.connection.rpc.handle(oj,vQe(t),{authority:mr(o)})}async function Ij(n,t={}){if(t.controller)return xT(n,t.controller,t.rpcAuthority);let o=await cj(n,t,t.internals??{}),a=xT(n,o.controller,t.rpcAuthority);return n.effect(()=>async()=>o.close(),"dsh-im: close AI Office connector"),a}var PQe=new Set(["starting","qr_ready","polling","slow_down","domain_switched"]);function GQe(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 FQe(n){return typeof n.status!="function"?{}:await n.status()}function LQe(n){return n?.connected===!0?!0:n?.ready===!0&&n?.feishuLongConnectionState==="connected"&&n?.harnessReachable===!0}var Ty=class{#e;#A;#t;#r;#I=!1;#o=null;constructor({createProvisioningManager:t,credentialStore:o,connectionManager:a,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(!a||typeof a.connect!="function"||typeof a.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=a,this.#t=structuredClone(e),this.#r=t({onCredentials:i=>this.#c(i)}),!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.#o=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.#I=!1,this.#o=null}catch{this.#o={code:"credential_removal_failed",message:"Unable to remove the Feishu credentials."}}return this.status()}async status(){let t=await this.#r.status(),o=await FQe(this.#A),a=LQe(o),e=this.#I;if(typeof this.#e.configured=="function")try{e=await this.#e.configured()}catch{e=this.#I}let i="unconfigured";return a?i="connected":PQe.has(t?.state)?i="registering":t?.state==="saving"?i="connecting":this.#o||t?.state==="error"?i="error":e&&(i="disconnected"),{phase:i,connected:a,configured:e,registration:t,connection:o,error:this.#o??t?.error??null}}async close(){await this.#r.cancel(),await this.#A.disconnect()}async#c(t){let o=GQe(t);try{await this.#e.save(o),this.#I=!0,await this.#A.connect(o),this.#o=null}catch{throw this.#o={code:"connection_failed",message:"The bot was created, but its connection could not be started."},new Error("Unable to activate the Feishu connection.")}}};function YT(n){return new Ty(n)}import{homedir as QGe}from"node:os";import{join as nh,resolve as Yc}from"node:path";import{unlink as yGe}from"node:fs/promises";var UP={};Lr(UP,{AESCipher:()=>vC,AccessTokenError:()=>$d,Aily:()=>EP,AppType:()=>Os,CAppTicket:()=>kC,CTenantAccessToken:()=>MC,CardActionHandler:()=>lP,Client:()=>pS,ClientAssertionError:()=>na,DefaultCache:()=>cS,Domain:()=>bs,EventDispatcher:()=>hS,LarkChannel:()=>QS,LarkChannelError:()=>Ht,LoggerLevel:()=>Eo,LoggerProxy:()=>Uc,WSClient:()=>uS,adaptDefault:()=>MRe,adaptExpress:()=>_Re,adaptKoa:()=>TRe,adaptKoaRouter:()=>NRe,createLarkChannel:()=>Eve,defaultHttpInstance:()=>eh,defaultLogger:()=>Pg,generateChallenge:()=>GC,internalCache:()=>PC,messageCard:()=>kRe,normalize:()=>X6,normalizeBotAdded:()=>W6,normalizeCardAction:()=>V6,normalizeComment:()=>Z6,normalizeReaction:()=>MP,registerApp:()=>jRe,withAll:()=>mRe,withHelpDeskCredential:()=>wRe,withTenantKey:()=>SRe,withTenantToken:()=>DRe,withUserAccessToken:()=>ORe});function Su(n,t){return function(){return n.apply(t,arguments)}}var{toString:UQe}=Object.prototype,{getPrototypeOf:pd}=Object,{iterator:Du,toStringTag:dj}=Symbol,Ry=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),wu=(n,t)=>{let o=n,a=[];for(;o!=null&&o!==Object.prototype;){if(a.indexOf(o)!==-1)return!1;if(a.push(o),Ry(o,t))return!0;o=pd(o)}return!1},HQe=(n,t)=>n!=null&&wu(n,t)?n[t]:void 0,JT=(n=>t=>{let o=UQe.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Ko=n=>(n=n.toLowerCase(),t=>JT(t)===n),ky=n=>t=>typeof t===n,{isArray:el}=Array,Al=ky("undefined");function dd(n){return n!==null&&!Al(n)&&n.constructor!==null&&!Al(n.constructor)&&Ha(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var hj=Ko("ArrayBuffer");function KQe(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&hj(n.buffer),t}var xQe=ky("string"),Ha=ky("function"),Ej=ky("number"),hd=n=>n!==null&&typeof n=="object",YQe=n=>n===!0||n===!1,Ny=n=>{if(!hd(n))return!1;let t=pd(n);return(t===null||t===Object.prototype||pd(t)===null)&&!wu(n,dj)&&!wu(n,Du)},jQe=n=>{if(!hd(n)||dd(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},JQe=Ko("Date"),qQe=Ko("File"),zQe=n=>!!(n&&typeof n.uri<"u"),VQe=n=>n&&typeof n.getParts<"u",WQe=Ko("Blob"),ZQe=Ko("FileList"),XQe=Ko("Set"),$Qe=n=>hd(n)&&Ha(n.pipe);function eye(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var lj=eye(),pj=typeof lj.FormData<"u"?lj.FormData:void 0,Aye=n=>{if(!n)return!1;if(pj&&n instanceof pj)return!0;let t=pd(n);if(!t||t===Object.prototype||!Ha(n.append))return!1;let o=JT(n);return o==="formdata"||o==="object"&&Ha(n.toString)&&n.toString()==="[object FormData]"},tye=Ko("URLSearchParams"),[rye,iye,aye,oye]=["ReadableStream","Request","Response","Headers"].map(Ko),nye=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ou(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let a,e;if(typeof n!="object"&&(n=[n]),el(n))for(a=0,e=n.length;a0;)if(e=o[a],t===e.toLowerCase())return e;return null}var $I=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cj=n=>!Al(n)&&n!==$I;function jT(...n){let{caseless:t,skipUndefined:o}=Cj(this)&&this||{},a={},e=(i,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")return;let r=t&&typeof A=="string"&&uj(a,A)||A,s=Ry(a,r)?a[r]:void 0;Ny(s)&&Ny(i)?a[r]=jT(s,i):Ny(i)?a[r]=jT({},i):el(i)?a[r]=i.slice():(!o||!Al(i))&&(a[r]=i)};for(let i=0,A=n.length;i(Ou(t,(e,i)=>{o&&Ha(e)?Object.defineProperty(n,i,{__proto__:null,value:Su(e,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,i,{__proto__:null,value:e,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),n),gye=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),cye=(n,t,o,a)=>{n.prototype=Object.create(t.prototype,a),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)},Iye=(n,t,o,a)=>{let e,i,A,r={};if(t=t||{},n==null)return t;do{for(e=Object.getOwnPropertyNames(n),i=e.length;i-- >0;)A=e[i],(!a||a(A,n,t))&&!r[A]&&(t[A]=n[A],r[A]=!0);n=o!==!1&&pd(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},lye=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;let a=n.indexOf(t,o);return a!==-1&&a===o},pye=n=>{if(!n)return null;if(el(n))return n;let t=n.length;if(!Ej(t))return null;let o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},dye=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&pd(Uint8Array)),hye=(n,t)=>{let a=(n&&n[Du]).call(n),e;for(;(e=a.next())&&!e.done;){let i=e.value;t.call(n,i[0],i[1])}},Eye=(n,t)=>{let o,a=[];for(;(o=n.exec(t))!==null;)a.push(o);return a},uye=Ko("HTMLFormElement"),Cye=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,a,e){return a.toUpperCase()+e}),{propertyIsEnumerable:Bye}=Object.prototype,fye=Ko("RegExp"),Bj=(n,t)=>{let o=Object.getOwnPropertyDescriptors(n),a={};Ou(o,(e,i)=>{let A;(A=t(e,i,n))!==!1&&(a[i]=A||e)}),Object.defineProperties(n,a)},Qye=n=>{Bj(n,(t,o)=>{if(Ha(n)&&["arguments","caller","callee"].includes(o))return!1;let a=n[o];if(Ha(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},yye=(n,t)=>{let o={},a=e=>{e.forEach(i=>{o[i]=!0})};return el(n)?a(n):a(String(n).split(t)),o},mye=()=>{},Sye=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function wye(n){return!!(n&&Ha(n.append)&&n[dj]==="FormData"&&n[Du])}var Dye=n=>{let t=new WeakSet,o=a=>{if(hd(a)){if(t.has(a))return;if(dd(a))return a;if(!("toJSON"in a)){t.add(a);let e;if(XQe(a)){e=[];for(let i of a){let A=o(i);!Al(A)&&e.push(A)}}else e=el(a)?[]:{},Ou(a,(i,A)=>{let r=o(i);!Al(r)&&(e[A]=r)});return t.delete(a),e}}return a};return o(n)},Oye=Ko("AsyncFunction"),bye=n=>n&&(hd(n)||Ha(n))&&Ha(n.then)&&Ha(n.catch),fj=((n,t)=>n?setImmediate:t?((o,a)=>($I.addEventListener("message",({source:e,data:i})=>{e===$I&&i===o&&a.length&&a.shift()()},!1),e=>{a.push(e),$I.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Ha($I.postMessage)),Mye=typeof queueMicrotask<"u"?queueMicrotask.bind($I):typeof process<"u"&&process.nextTick||fj,Qj=n=>n!=null&&Ha(n[Du]),_ye=n=>n!=null&&wu(n,Du)&&Qj(n),Z={isArray:el,isArrayBuffer:hj,isBuffer:dd,isFormData:Aye,isArrayBufferView:KQe,isString:xQe,isNumber:Ej,isBoolean:YQe,isObject:hd,isPlainObject:Ny,isEmptyObject:jQe,isReadableStream:rye,isRequest:iye,isResponse:aye,isHeaders:oye,isUndefined:Al,isDate:JQe,isFile:qQe,isReactNativeBlob:zQe,isReactNative:VQe,isBlob:WQe,isRegExp:fye,isFunction:Ha,isStream:$Qe,isURLSearchParams:tye,isTypedArray:dye,isFileList:ZQe,forEach:Ou,merge:jT,extend:sye,trim:nye,stripBOM:gye,inherits:cye,toFlatObject:Iye,kindOf:JT,kindOfTest:Ko,endsWith:lye,toArray:pye,forEachEntry:hye,matchAll:Eye,isHTMLForm:uye,hasOwnProperty:Ry,hasOwnProp:Ry,hasOwnInPrototypeChain:wu,getSafeProp:HQe,reduceDescriptors:Bj,freezeMethods:Qye,toObjectSet:yye,toCamelCase:Cye,noop:mye,toFiniteNumber:Sye,findKey:uj,global:$I,isContextDefined:Cj,isSpecCompliantForm:wye,toJSONObject:Dye,isAsyncFn:Oye,isThenable:bye,setImmediate:fj,asap:Mye,isIterable:Qj,isSafeIterable:_ye};var Tye=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"]),yj=n=>{let t={},o,a,e;return n&&n.split(` +`).forEach(function(A){e=A.indexOf(":"),o=A.substring(0,e).trim().toLowerCase(),a=A.substring(e+1).trim();let r=Z.hasOwnProp(t,o);!o||r&&Z.hasOwnProp(Tye,o)||(o==="set-cookie"?r?t[o].push(a):t[o]=[a]:t[o]=r?t[o]+", "+a:a)}),t};function Nye(n){let t=0,o=n.length;for(;tt;){let a=n.charCodeAt(o-1);if(a!==9&&a!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}var Rye=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),kye=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function qT(n,t){return Z.isArray(n)?n.map(o=>qT(o,t)):Nye(String(n).replace(t,""))}var mj=n=>qT(n,Rye),vye=n=>qT(n,kye);function Ed(n){let t=Object.create(null);return Z.forEach(n.toJSON(),(o,a)=>{t[a]=vye(o)}),t}var Sj=Symbol("internals");function bu(n){return n&&String(n).trim().toLowerCase()}function vy(n){return n===!1||n==null?n:Z.isArray(n)?n.map(vy):mj(String(n))}function Pye(n){let t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,a;for(;a=o.exec(n);)t[a[1]]=a[2];return t}var Gye=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function zT(n){let t=0,o=n.length;for(;tt;){let a=n.charCodeAt(o-1);if(a!==9&&a!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}function Fye(n){let t=n.length-1;if(t<1||n.charCodeAt(0)!==34||n.charCodeAt(t)!==34)return n;let o="";for(let a=1;a=t))return n;o+=n[a]}return o}function Lye(n){let t=Object.create(null),o=String(n),a=0,e=!1,i=!1;function A(r){let s=zT(o.slice(a,r)),g=s.indexOf("=");if(g<1)return;let c=zT(s.slice(0,g));if(!Gye.test(c))return;let I=c.toLowerCase();if(I==="__proto__"||I==="constructor"||I==="prototype")return;let p=zT(s.slice(g+1));t[I]=Fye(p)}for(let r=0;r/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function VT(n,t,o,a,e){if(Z.isFunction(a))return a.call(this,t,o);if(e&&(t=o),!!Z.isString(t)){if(Z.isString(a))return t.indexOf(a)!==-1;if(Z.isRegExp(a))return a.test(t)}}function Hye(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,a)=>o.toUpperCase()+a)}function Kye(n,t){let o=Z.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(n,a+o,{__proto__:null,value:function(e,i,A){return this[a].call(this,t,e,i,A)},configurable:!0})})}var ud=class{constructor(t){t&&this.set(t)}set(t,o,a){let e=this;function i(r,s,g){let c=bu(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]=vy(r))}let A=(r,s)=>Z.forEach(r,(g,c)=>i(g,c,s));if(Z.isPlainObject(t)||t instanceof this.constructor)A(t,o);else if(Z.isString(t)&&(t=t.trim())&&!Uye(t))A(yj(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&&i(o,t,a);return this}get(t,o){if(t=bu(t),t){let a=Z.findKey(this,t);if(a){let e=this[a];if(!o)return e;if(o===!0)return Pye(e);if(Z.isFunction(o))return o.call(this,e,a);if(Z.isRegExp(o))return o.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=bu(t),t){let a=Z.findKey(this,t);return!!(a&&this[a]!==void 0&&(!o||VT(this,this[a],a,o)))}return!1}delete(t,o){let a=this,e=!1;function i(A){if(A=bu(A),A){let r=Z.findKey(a,A);r&&(!o||VT(a,a[r],r,o))&&(delete a[r],e=!0)}}return Z.isArray(t)?t.forEach(i):i(t),e}clear(t){let o=Object.keys(this),a=o.length,e=!1;for(;a--;){let i=o[a];(!t||VT(this,this[i],i,t,!0))&&(delete this[i],e=!0)}return e}normalize(t){let o=this,a={};return Z.forEach(this,(e,i)=>{let A=Z.findKey(a,i);if(A){o[A]=vy(e),delete o[i];return}let r=t?Hye(i):String(i).trim();r!==i&&delete o[i],o[r]=vy(e),a[r]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let o=Object.create(null);return Z.forEach(this,(a,e)=>{a!=null&&a!==!1&&(o[e]=t&&Z.isArray(a)?a.join(", "):a)}),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 Lye(t)}static concat(t,...o){let a=new this(t);return o.forEach(e=>a.set(e)),a}static accessor(t){let a=(this[Sj]=this[Sj]={accessors:{}}).accessors,e=this.prototype;function i(A){let r=bu(A);a[r]||(Kye(e,A),a[r]=!0)}return Z.isArray(t)?t.forEach(i):i(t),this}};ud.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(ud.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(a){this[o]=a}}});Z.freezeMethods(ud);var Yt=ud;var Mu="[REDACTED ****]";function xye(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 Yye(n,t){let o=new Set(t.map(i=>String(i).toLowerCase())),a=[],e=i=>{if(i===null||typeof i!="object"||Z.isBuffer(i))return i;if(a.indexOf(i)!==-1)return;i instanceof Yt&&(i=i.toJSON()),a.push(i);let A;if(Z.isArray(i))A=[],i.forEach((r,s)=>{let g=e(r);Z.isUndefined(g)||(A[s]=g)});else{if(!Z.isPlainObject(i)&&xye(i))return a.pop(),i;A=Object.create(null);for(let[r,s]of Object.entries(i)){let g=o.has(r.toLowerCase())?Mu:e(s);Z.isUndefined(g)||(A[r]=g)}}return a.pop(),A};return e(n)}function wj(n){try{return String(n)}catch{return""}}function jye(n){return n.errors.map(o=>{try{return o&&o.message?wj(o.message):wj(o)}catch{return""}}).filter(Boolean).join("; ")||n.name||"AggregateError"}var _i=class n extends Error{static from(t,o,a,e,i,A){let r=t.message;!r&&Z.isArray(t.errors)&&t.errors.length&&(r=jye(t));let s=new n(r,o||t.code,a,e,i);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,a,e,i){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),a&&(this.config=a),e&&(this.request=e),i&&(this.response=i,this.status=i.status)}toJSON(){let t=this.config,o=t&&Z.hasOwnProp(t,"redact")?t.redact:void 0,a=Z.isArray(o)&&o.length>0?Yye(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:a,code:this.code,status:this.status}}};_i.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";_i.ERR_BAD_OPTION="ERR_BAD_OPTION";_i.ECONNABORTED="ECONNABORTED";_i.ETIMEDOUT="ETIMEDOUT";_i.ECONNREFUSED="ECONNREFUSED";_i.ERR_NETWORK="ERR_NETWORK";_i.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";_i.ERR_DEPRECATED="ERR_DEPRECATED";_i.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";_i.ERR_BAD_REQUEST="ERR_BAD_REQUEST";_i.ERR_CANCELED="ERR_CANCELED";_i.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";_i.ERR_INVALID_URL="ERR_INVALID_URL";_i.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Oe=_i;var Oq=ze(Dq(),1),jy=Oq.default;var Jy={isBufferAvailable(){return typeof Buffer<"u"},from(n){return Buffer.from(n)}};var B0=100;function C0(n){return Z.isPlainObject(n)||Z.isArray(n)}function bq(n){return Z.endsWith(n,"[]")?n.slice(0,-2):n}function u0(n,t,o){return n?n.concat(t).map(function(e,i){return e=bq(e),!o&&i?"["+e+"]":e}).join(o?".":""):t}function _Se(n){return Z.isArray(n)&&!n.some(C0)}var TSe=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function NSe(n,t,o){if(!Z.isObject(n))throw new TypeError("target must be an object");t=t||new(jy||FormData),o=Z.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,_){return!Z.isUndefined(_[T])});let a=o.metaTokens,e=o.visitor||f,i=o.dots,A=o.indexes,r=o.Blob||typeof Blob<"u"&&Blob,s=o.maxDepth===void 0?B0: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 Oe("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(Jy&&Jy.isBufferAvailable())return Jy.from(m);throw new Oe("Blob is not supported. Use a Buffer instead.",Oe.ERR_NOT_SUPPORT)}return m}function p(m){if(m>s)throw new Oe("Object is too deeply nested ("+m+" levels). Max depth: "+s,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(m,T){if(s===1/0)return JSON.stringify(m);let _=[];return JSON.stringify(m,function(L,U){if(!Z.isObject(U))return U;for(;_.length&&_[_.length-1]!==this;)_.pop();return _.push(U),p(T+_.length-1),U})}function f(m,T,_){let R=m;if(Z.isReactNative(t)&&Z.isReactNativeBlob(m))return t.append(u0(_,T,i),I(m)),!1;if(m&&!_&&typeof m=="object"){if(Z.endsWith(T,"{}"))T=a?T:T.slice(0,-2),m=B(m,1);else if(Z.isArray(m)&&_Se(m)||(Z.isFileList(m)||Z.endsWith(T,"[]"))&&(R=Z.toArray(m)))return T=bq(T),R.forEach(function(U,F){!(Z.isUndefined(U)||U===null)&&t.append(A===!0?u0([T],F,i):A===null?T:T+"[]",I(U))}),!1}return C0(m)?!0:(t.append(u0(_,T,i),I(m)),!1)}let Q=Object.assign(TSe,{defaultVisitor:f,convertValue:I,isVisitable:C0});function y(m,T,_=0){if(!Z.isUndefined(m)){if(p(_),c.indexOf(m)!==-1)throw new Error("Circular reference detected in "+T.join("."));c.push(m),Z.forEach(m,function(L,U){(!(Z.isUndefined(L)||L===null)&&e.call(t,L,Z.isString(U)?U.trim():U,T,Q))===!0&&y(L,T?T.concat(U):[U],_+1)}),c.pop()}}if(!Z.isObject(n))throw new TypeError("data must be an object");return y(n),t}var Oc=NSe;function Mq(n){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(a){return t[a]})}function _q(n,t){this._pairs=[],n&&Oc(n,this,t)}var Tq=_q.prototype;Tq.append=function(t,o){this._pairs.push([t,o])};Tq.toString=function(t){let o=t?a=>t.call(this,a,Mq):Mq;return this._pairs.map(function(e){return o(e[0])+"="+o(e[1])},"").join("&")};var Nq=_q;function RSe(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rl(n,t,o){if(!t)return n;n=n||"";let a=Z.isFunction(o)?{serialize:o}:o,e=Z.getSafeProp(a,"encode")||RSe,i=Z.getSafeProp(a,"serialize"),A;if(i?A=i(t,a):A=Z.isURLSearchParams(t)?t.toString():new Nq(t,a).toString(e),A){let r=n.indexOf("#");r!==-1&&(n=n.slice(0,r)),n+=(n.indexOf("?")===-1?"?":"&")+A}return n}var f0=class{constructor(){this.handlers=[]}use(t,o,a){return this.handlers.push({fulfilled:t,rejected:o,synchronous:a?a.synchronous:!1,runWhen:a?a.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(a){a!==null&&t(a)})}},Q0=f0;var bc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import vSe from"crypto";import kSe from"url";var Rq=kSe.URLSearchParams;var y0="abcdefghijklmnopqrstuvwxyz",kq="0123456789",vq={DIGIT:kq,ALPHA:y0,ALPHA_DIGIT:y0+y0.toUpperCase()+kq},PSe=(n=16,t=vq.ALPHA_DIGIT)=>{let o="",{length:a}=t,e=new Uint32Array(n);vSe.randomFillSync(e);for(let i=0;iS0,hasStandardBrowserEnv:()=>GSe,hasStandardBrowserWebWorkerEnv:()=>FSe,navigator:()=>m0,origin:()=>LSe});var S0=typeof window<"u"&&typeof document<"u",m0=typeof navigator=="object"&&navigator||void 0,GSe=S0&&(!m0||["ReactNative","NativeScript","NS"].indexOf(m0.product)<0),FSe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",LSe=S0&&window.location.href||"http://localhost";var Qt={...w0,...Pq};function D0(n,t){return Oc(n,new Qt.classes.URLSearchParams,{visitor:function(o,a,e,i){return Qt.isNode&&Z.isBuffer(o)?(this.append(a,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}var Gq=B0;function Fq(n){if(n>Gq)throw new Oe("FormData field is too deeply nested ("+n+" levels). Max depth: "+Gq,Oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function USe(n){let t=[],o=/[^.[\]]+|\[([^.[\]]*)]/g,a;for(;(a=o.exec(n))!==null;)Fq(t.length),t.push(a[0]==="[]"?"":a[1]||a[0]);return t}function HSe(n){let t={},o=Object.keys(n),a,e=o.length,i;for(a=0;a=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(a):[e[A],a]:e[A]=a,!r):((!Z.hasOwnProp(e,A)||!Z.isObject(e[A]))&&(e[A]=[]),t(o,a,e[A],i)&&Z.isArray(e[A])&&(e[A]=HSe(e[A])),!r)}if(Z.isFormData(n)&&Z.isFunction(n.entries)){let o={};return Z.forEachEntry(n,(a,e)=>{t(USe(a),e,o,0)}),o}return null}var qy=KSe;var yd=(n,t)=>n!=null&&Z.hasOwnProp(n,t)?n[t]:void 0;function xSe(n,t,o){if(Z.isString(n))try{return(t||JSON.parse)(n),Z.trim(n)}catch(a){if(a.name!=="SyntaxError")throw a}return(o||JSON.stringify)(n)}var O0={transitional:bc,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){let a=o.getContentType()||"",e=a.indexOf("application/json")>-1,i=Z.isObject(t);if(i&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return e?JSON.stringify(qy(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(i){let s=yd(this,"formSerializer");if(a.indexOf("application/x-www-form-urlencoded")>-1)return D0(t,s).toString();if((r=Z.isFileList(t))||a.indexOf("multipart/form-data")>-1){let g=yd(this,"env"),c=g&&g.FormData;return Oc(r?{"files[]":t}:t,c&&new c,s)}}return i||e?(o.setContentType("application/json",!1),xSe(t)):t}],transformResponse:[function(t){let o=yd(this,"transitional")||O0.transitional,a=o&&o.forcedJSONParsing,e=yd(this,"responseType"),i=e==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(a&&!e||i)){let r=!(o&&o.silentJSONParsing)&&i;try{return JSON.parse(t,yd(this,"parseReviver"))}catch(s){if(r)throw s.name==="SyntaxError"?Oe.from(s,Oe.ERR_BAD_RESPONSE,this,null,yd(this,"response")):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qt.classes.FormData,Blob:Qt.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=>{O0.headers[n]={}});var md=O0;function vu(n,t){let o=this||md,a=t||o,e=Yt.from(a.headers),i=a.data;return Z.forEach(n,function(r){i=r.call(o,i,e.normalize(),t?t.status:void 0)}),e.normalize(),i}function Pu(n){return!!(n&&n.__CANCEL__)}var b0=class extends Oe{constructor(t,o,a){super(t??"canceled",Oe.ERR_CANCELED,o,a),this.name="CanceledError",this.__CANCEL__=!0}},Io=b0;function Bs(n,t,o){let a=o.config.validateStatus;!o.status||!a||a(o.status)?n(o):t(new Oe("Request failed with status code "+o.status,o.status>=400&&o.status<500?Oe.ERR_BAD_REQUEST:Oe.ERR_BAD_RESPONSE,o.config,o.request,o))}function M0(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function _0(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 YSe=/^https?:(?!\/\/)/i,jSe=/[\t\n\r]/g;function JSe(n){let t=0;for(;t`${o}${a}${Mu}`)}function VSe(n){let t=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Mu}@`),o=t.indexOf("#"),e=(o===-1?t:t.slice(0,o)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Mu}`);return o===-1?e:`${e}#${zSe(t.slice(o+1))}`}function Lq(n,t){if(typeof n=="string"){let o=qSe(n);if(YSe.test(o))throw new Oe(`Invalid URL ${JSON.stringify(VSe(o))}: missing "//" after protocol`,Oe.ERR_INVALID_URL,t)}}function il(n,t,o,a){Lq(t,a);let e=!M0(t);return n&&(e||o===!1)?(Lq(n,a),_0(n,t)):t}var WSe={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function ZSe(n){try{return new URL(n)}catch{return null}}function Uq(n){var t=(typeof n=="string"?ZSe(n):n)||{},o=t.protocol,a=t.host,e=t.port;if(typeof a!="string"||!a||typeof o!="string"||(o=o.split(":",1)[0],a=a.replace(/:\d*$/,""),e=parseInt(e)||WSe[o]||0,!XSe(a,e)))return"";var i=T0(o+"_proxy")||T0("all_proxy");return i&&i.indexOf("://")===-1&&(i=o+"://"+i),i}function XSe(n,t){var o=T0("no_proxy").toLowerCase();return o?o==="*"?!1:o.split(/[,\s]/).every(function(a){if(!a)return!0;var e=a.match(/^(.+):(\d+)$/),i=e?e[1]:a,A=e?parseInt(e[2]):0;return A&&A!==t?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!n.endsWith(i)):n!==i}):!0}function T0(n){return process.env[n.toLowerCase()]||process.env[n.toUpperCase()]||""}var IN=ze(H0(),1),G4=ze(s4(),1);import v4 from"http";import P4 from"https";import ODe from"http2";import bDe from"util";import{resolve as w4}from"path";import xo from"zlib";var mg="1.19.0";function ju(n){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}var Xwe=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function eN(n,t,o){let a=o&&o.Blob||Qt.classes.Blob,e=ju(n);if(t===void 0&&a&&(t=!0),e==="data"){n=e.length?n.slice(e.length+1):n;let i=Xwe.exec(n);if(!i)throw new Oe("Invalid URL",Oe.ERR_INVALID_URL);let A=i[1],r=i[2],s=i[3]?"base64":"utf8",g=i[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(!a)throw new Oe("Blob is not supported",Oe.ERR_NOT_SUPPORT);return new a([I],{type:c})}return I}throw new Oe("Unsupported protocol "+e,Oe.ERR_NOT_SUPPORT)}import _n from"stream";var $we=["content-type","content-length"];function Ju(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([a,e])=>{$we.includes(a.toLowerCase())&&n.set(a,e)})}import eDe from"stream";var AN=Symbol("internals"),tN=class extends eDe.Transform{constructor(t){t=Z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,e)=>!Z.isUndefined(e[a])),super({readableHighWaterMark:t.chunkSize});let o=this[AN]={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",a=>{a==="progress"&&(o.isCaptured||(o.isCaptured=!0))})}_read(t){let o=this[AN];return o.onReadCallback&&o.onReadCallback(),super._read(t)}_transform(t,o,a){let e=this[AN],i=e.maxRate,A=this.readableHighWaterMark,r=e.timeWindow,s=1e3/r,g=i/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)}},p=(B,f)=>{let Q=Buffer.byteLength(B),y=null,m=A,T,_=0;if(i){let R=Date.now();(!e.ts||(_=R-e.ts)>=r)&&(e.ts=R,T=g-e.bytes,e.bytes=T<0?-T:0,_=0),T=g-e.bytes}if(i){if(T<=0)return setTimeout(()=>{f(null,B)},r-_);Tm&&Q-m>c&&(y=B.subarray(m),B=B.subarray(0,m)),I(B,y?()=>{process.nextTick(f,null,y)}:f)};p(t,function B(f,Q){if(f)return a(f);Q?p(Q,B):a(null)})}},rN=tN;import{EventEmitter as MDe}from"events";import tDe from"util";import{Readable as rDe}from"stream";var{asyncIterator:g4}=Symbol,ADe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[g4]?yield*n[g4]():yield n},$y=ADe;var iDe=Qt.ALPHABET.ALPHA_DIGIT+"-_",qu=typeof TextEncoder=="function"?new TextEncoder:new tDe.TextEncoder,gl=`\r +`,aDe=qu.encode(gl),oDe=2,iN=class{constructor(t,o){let{escapeName:a}=this.constructor,e=Z.isString(o),i=`Content-Disposition: form-data; name="${a(t)}"${!e&&o.name?`; filename="${a(o.name)}"`:""}${gl}`;if(e)o=qu.encode(String(o).replace(/\r?\n|\r\n?/g,gl));else{let A=String(o.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${A}${gl}`}this.headers=qu.encode(i+gl),this.contentLength=e?o.byteLength:o.size,this.size=this.headers.byteLength+this.contentLength+oDe,this.name=t,this.value=o}async*encode(){yield this.headers;let{value:t}=this;Z.isTypedArray(t)?yield t:yield*$y(t),yield aDe}static escapeName(t){return String(t).replace(/[\r\n"]/g,o=>({"\r":"%0D","\n":"%0A",'"':"%22"})[o])}},nDe=(n,t,o)=>{let{tag:a="form-data-boundary",size:e=25,boundary:i=a+"-"+Qt.generateString(e,iDe)}=o||{};if(!Z.isFormData(n))throw new TypeError("FormData instance required");if(i.length<1||i.length>70)throw new Error("boundary must be 1-70 characters long");let A=qu.encode("--"+i+gl),r=qu.encode("--"+i+"--"+gl),s=r.byteLength,g=Array.from(n.entries()).map(([I,p])=>{let B=new iN(I,p);return s+=B.size,B});s+=A.byteLength*g.length,s=Z.toFiniteNumber(s);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(s)&&(c["Content-Length"]=s),t&&t(c),rDe.from((async function*(){for(let I of g)yield A,yield*I.encode();yield r})())},c4=nDe;import sDe from"stream";var aN=class extends sDe.Transform{__transform(t,o,a){this.push(t),a()}_transform(t,o,a){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,a)}},I4=aN;import gDe from"http2";import cDe from"util";var oN=class{constructor(){this.sessions=Object.create(null)}getSession(t,o){o=Object.assign({sessionTimeout:1e3},o);let a=this.sessions[t];if(a){let I=a.length;for(let p=0;p{if(i)return;i=!0,A&&(clearTimeout(A),A=null);let I=a,p=I.length,B=p;for(;B--;)if(I[B][0]===e){p===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 p=s.apply(this,arguments);return I++,A&&(clearTimeout(A),A=null),p.once("close",()=>{--I||(A=setTimeout(()=>{A=null,r()},g))}),p}}e.once("close",r);let c=[e,o];return a?a.push(c):a=this.sessions[t]=[c],e}},l4=oN;var IDe=(n,t)=>Z.isAsyncFn(n)?function(...o){let a=o.pop();n.apply(this,o).then(e=>{try{t?a(null,...t(e)):a(null,e)}catch(i){a(i)}},a)}:n,p4=IDe;var lDe=new Set(["localhost","0.0.0.0"]),E4=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)},nN=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},pDe=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(nN);return c.some(I=>I===null||I<0||I>255)?n:c.join(".")}if(o.length>4||o.length===1)return n;let a=o.slice(0,-1),e=o[o.length-1],i=4-a.length,A=nN(e);if(A===null)return n;let r=(1<<8*i)-1;if(A<0||A>r)return n;let s=new Array(i).fill(0);for(let c=i-1,I=A;c>=0;c--,I>>=8)s[c]=I&255;let g=a.map(nN);return g.some(c=>c===null||c<0||c>255)?n:[...g,...s].join(".")},sN=n=>/^0{1,4}$/.test(n),dDe=n=>{if(n==="::")return!0;let t=n.indexOf("::");if(t!==-1){if(t!==n.lastIndexOf("::"))return!1;let a=n.slice(0,t),e=n.slice(t+2),i=a?a.split(":"):[],A=e?e.split(":"):[];return i.length+A.length<8&&i.every(sN)&&A.every(sN)}let o=n.split(":");return o.length===8&&o.every(sN)},hDe=n=>{if(n==="::1")return!0;let t=n.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return E4(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 a=n.split(":");if(a.length===8){for(let e=0;e<7;e++)if(!/^0+$/.test(a[e]))return!1;return/^0*1$/.test(a[7])}return!1},d4=n=>n?lDe.has(n)||E4(n)||dDe(n)?!0:hDe(n):!1,EDe={http:80,https:443,ws:80,wss:443,ftp:21},uDe=n=>{let t=n,o=0;if(t.charAt(0)==="["){let i=t.indexOf("]");if(i!==-1){let A=t.slice(1,i),r=t.slice(i+1);return r.charAt(0)===":"&&/^\d+$/.test(r.slice(1))&&(o=Number.parseInt(r.slice(1),10)),[A,o]}}let a=t.indexOf(":"),e=t.lastIndexOf(":");return a!==-1&&a===e&&/^\d+$/.test(t.slice(e+1))&&(o=Number.parseInt(t.slice(e+1),10),t=t.slice(0,e)),[t,o]},CDe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,BDe=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,fDe=n=>{if(typeof n!="string"||n.indexOf(":")===-1)return n;let t=n.match(CDe);if(t)return t[1];let o=n.match(BDe);if(o){let a=parseInt(o[1],16),e=parseInt(o[2],16);return`${a>>8}.${a&255}.${e>>8}.${e&255}`}return n},h4=n=>{if(!n)return n;n.charAt(0)==="["&&n.charAt(n.length-1)==="]"&&(n=n.slice(1,-1));let t=n.replace(/\.+$/,""),o=pDe(t);return o!==t?o:fDe(t)};function gN(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 a=Number.parseInt(t.port,10)||EDe[t.protocol.split(":",1)[0]]||0,e=h4(t.hostname.toLowerCase());return o.split(/[\s,]+/).some(i=>{if(!i)return!1;if(i==="*")return!0;let[A,r]=uDe(i);return A=h4(A),!A||r&&r!==a?!1:(A.charAt(0)==="*"&&(A=A.slice(1)),A.charAt(0)==="."?e.endsWith(A):e===A||d4(e)&&d4(A))})}function QDe(n,t){n=n||10;let o=new Array(n),a=new Array(n),e=0,i=0,A;return t=t!==void 0?t:1e3,function(s){let g=Date.now(),c=a[i];A||(A=g),o[e]=s,a[e]=g;let I=i,p=0;for(;I!==e;)p+=o[I++],I=I%n;if(e=(e+1)%n,e===i&&(i=(i+1)%n),g-A{o=c,e=null,i&&(clearTimeout(i),i=null),n(...g)};return[(...g)=>{let c=Date.now(),I=c-o;I>=a?A(g,c):(e=g,i||(i=setTimeout(()=>{i=null,A(e)},a-I)))},()=>e&&A(e)]}var C4=yDe;var Sg=(n,t,o=3)=>{let a=0,e=u4(50,250);return C4(i=>{if(!i||typeof i.loaded!="number")return;let A=i.loaded,r=i.lengthComputable?i.total:void 0,s=Math.max(0,r!=null?Math.min(A,r):A),g=Math.max(0,s-a),c=e(g);a=Math.max(a,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:i,lengthComputable:r!=null,[t?"download":"upload"]:!0};n(I)},o)},bd=(n,t)=>{let o=n!=null;return[a=>t[0]({lengthComputable:o,total:n,loaded:a}),t[1]]},Md=(n,t=Z.asap)=>(...o)=>t(()=>n(...o));var B4=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,Q4=(n,t,o)=>t+2n<=57?n-48:(n&223)-55,mDe=n=>n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47||n===45||n===95,SDe=n=>n===9||n===10||n===12||n===13||n===32,wDe=n=>{let t=Math.floor(n/4),o=n%4;return t*3+(o===2?1:o===3?2:0)},y4=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)},DDe=n=>{let t=n.length,o=0,a=0,e=!1;for(let i=0;i0){e=!0;continue}o++}}return e||a>2||a>0&&(o+a)%4!==0||o%4===1?y4(n):wDe(o)},m4=(n,t)=>{if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;let o=n.indexOf(",");if(o<0)return 0;let a=n.slice(5,o),e=n.slice(o+1);if(/;base64/i.test(a))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 cN(n){let t=typeof n=="string"?n.indexOf("#"):-1;return m4(t===-1?n:n.slice(0,t),DDe)}function S4(n){return m4(n,y4)}var D4={flush:xo.constants.Z_SYNC_FLUSH,finishFlush:xo.constants.Z_SYNC_FLUSH},_De={flush:xo.constants.BROTLI_OPERATION_FLUSH,finishFlush:xo.constants.BROTLI_OPERATION_FLUSH},TDe={flush:xo.constants.ZSTD_e_flush,finishFlush:xo.constants.ZSTD_e_flush},F4=Z.isFunction(xo.createBrotliDecompress),L4=Z.isFunction(xo.createZstdDecompress),U4="gzip, compress, deflate"+(F4?", br":""),NDe=U4+(L4?", zstd":""),O4=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):Z.asap,{http:RDe,https:kDe}=G4.default,lN=/https:?/,b4=Symbol("axios.http.socketListener"),em=Symbol("axios.http.currentReq"),H4=Symbol("axios.http.installedTunnel"),vDe=new Map,M4=new WeakMap,_4={22:21,24:5};function PDe(n=process.versions&&process.versions.node){if(!n)return!1;let[t,o]=n.split(".").map(a=>Number(a));return!Number.isInteger(t)||!Number.isInteger(o)?!1:t>24?!0:_4[t]!=null&&o>=_4[t]}function GDe(n,t=process.versions&&process.versions.node){if(!PDe(t))return!1;let o=n&&n.options;return!!(o&&Z.hasOwnProp(o,"proxyEnv")&&o.proxyEnv!=null)}function FDe(n,t,o){return lN.test(n.protocol)?o||P4.globalAgent:t||v4.globalAgent}function LDe(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||"")+"#"+(n.auth||""),a=t?M4.get(t)||M4.set(t,new Map).get(t):vDe,e=a.get(o);if(e)return e;let i=t&&t.options?{...t.options,...n}:n;if(e=new IN.default(i),t&&t.options){let A={...t.options},r=e.callback;e.callback=function(g,c){return r.call(this,g,{...A,...c})}}return e[H4]=!0,a.set(o,e),e}var T4=Qt.protocols.map(n=>n+":"),N4=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},R4=(n,[t,o])=>(n.on("end",o).on("error",o),t),UDe=new l4;function HDe(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 KDe(n,t){n&&Object.keys(n).forEach(o=>{t.has(o.toLowerCase())&&delete n[o]})}function xDe(n,t){if(!t)return!1;try{return new URL(t.url).origin===new URL(n.href).origin}catch{return!1}}function K4(n,t,o,a,e,i){let A=t,r=FDe(n,i,e);if(!A&&A!==!1&&!GDe(r)){let s=Uq(o);s&&(gN(o)||(A=new URL(s)))}if(a&&n.headers)for(let s of Object.keys(n.headers))s.toLowerCase()==="proxy-authorization"&&delete n.headers[s];if(a&&n.agent&&n.agent[H4]&&(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"),p=Z.hasOwnProp(A,"auth")?A.auth:void 0;if(c&&(p=(c||"")+":"+(I||"")),p){let f=typeof p=="object",Q=f&&Z.hasOwnProp(p,"username")?p.username:void 0,y=f&&Z.hasOwnProp(p,"password")?p.password:void 0;if(!!(Q||y))p=(Q||"")+":"+(y||"");else if(f)throw new Oe("Invalid proxy authorization",Oe.ERR_BAD_OPTION,{proxy:A})}if(lN.test(n.protocol)){if(!(e instanceof IN.default)){let f=g("hostname")||g("host"),Q=g("port"),y=g("protocol"),m=y?y.includes(":")?y:`${y}:`:"http:",T=f&&f.includes(":")&&!f.startsWith("[")?`[${f}]`:f,_=new URL(`${m}//${T}${Q?":"+Q:""}`),R={protocol:_.protocol,hostname:_.hostname.replace(/^\[|\]$/g,""),port:_.port,auth:p&&typeof p=="string"?p:void 0};_.protocol==="https:"&&(R.ALPNProtocols=["http/1.1"]);let L=LDe(R,e);n.agent=L,n.agents&&(n.agents.https=L)}}else{if(p){let m=Buffer.from(p,"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){K4(g,t,g.href,!0,e,i)}}var YDe=typeof process<"u"&&Z.kindOf(process)==="process",jDe=n=>new Promise((t,o)=>{let a,e,i=(s,g)=>{e||(e=!0,a&&a(s,g))},A=s=>{i(s),t(s)},r=s=>{i(s,!0),o(s)};n(A,r,s=>a=s).catch(r)}),JDe=({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)}},k4=(n,t)=>JDe(Z.isObject(n)?n:{address:n,family:t}),qDe={request(n,t){let o=n.protocol+"//"+n.hostname+":"+(n.port||(n.protocol==="https:"?443:80)),{http2Options:a,headers:e}=n,i=UDe.getSession(o,a),{HTTP2_HEADER_SCHEME:A,HTTP2_HEADER_METHOD:r,HTTP2_HEADER_PATH:s,HTTP2_HEADER_STATUS:g}=ODe.constants,c={[A]:n.protocol.replace(":",""),[r]:n.method,[s]:n.path};Z.forEach(e,(p,B)=>{B.charAt(0)!==":"&&(c[B]=p)});let I=i.request(c);return I.once("response",p=>{let B=I;p=Object.assign({},p);let f=p[g];delete p[g],B.headers=p,B.statusCode=+f,t(B)}),I}},x4=YDe&&function(t){return jDe(async function(a,e,i){let A=Ce=>Z.getSafeProp(t,Ce),r=A("transitional")||bc,s=A("data"),g=A("lookup"),c=A("family"),I=A("httpVersion");I===void 0&&(I=1);let p=A("http2Options"),B=A("httpAgent"),f=A("httpsAgent"),Q=A("proxy"),y=A("responseType"),m=A("responseEncoding"),T=A("socketPath"),_=A("method").toUpperCase(),R=A("maxRedirects"),L=A("maxBodyLength"),U=A("maxContentLength"),F=A("decompress"),q,z=!1,K,G;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 V=I===2;if(g){let Ce=p4(g,ke=>Z.isArray(ke)?ke:[ke]);g=(ke,Ue,MA)=>{Ce(ke,Ue,(Ke,_A,ot)=>{if(Ke)return MA(Ke);let wA=Z.isArray(_A)?_A.map(ht=>k4(ht)):[k4(_A,ot)];Ue.all?MA(Ke,wA):MA(Ke,wA[0].address,wA[0].family)})}}let H=new MDe;function N(Ce){try{H.emit("abort",!Ce||Ce.type?new Io(null,t,K):Ce)}catch{}}function k(){G&&(clearTimeout(G),G=null)}function J(){let Ce=A("timeout"),ke=Ce?"timeout of "+Ce+"ms exceeded":"timeout exceeded",Ue=A("timeoutErrorMessage");return Ue&&(ke=Ue),new Oe(ke,r.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,t,K)}H.once("abort",e);let X=()=>{k(),t.cancelToken&&t.cancelToken.unsubscribe(N),t.signal&&t.signal.removeEventListener("abort",N),H.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(N),t.signal&&(t.signal.aborted?N():t.signal.addEventListener("abort",N))),i((Ce,ke)=>{if(q=!0,k(),ke){z=!0,X();return}let{data:Ue}=Ce;if(Ue instanceof _n.Readable||Ue instanceof _n.Duplex){let MA=_n.finished(Ue,()=>{MA(),X()})}else X()});let ie=il(A("baseURL"),A("url"),A("allowAbsoluteUrls"),t),De=T?"http://localhost":Qt.hasBrowserEnv?Qt.origin:void 0,oe=new URL(ie,De),Se=oe.protocol||T4[0];if(Se==="data:"){if(U>-1){let ke=String(A("url")||ie||"");if(S4(ke)>U)return e(new Oe("maxContentLength size of "+U+" exceeded",Oe.ERR_BAD_RESPONSE,t))}let Ce;if(_!=="GET")return Bs(a,e,{status:405,statusText:"method not allowed",headers:{},config:t});try{Ce=eN(A("url"),y==="blob",{Blob:t.env&&t.env.Blob})}catch(ke){throw Oe.from(ke,Oe.ERR_BAD_REQUEST,t)}return y==="text"?(Ce=Ce.toString(m),(!m||m==="utf8")&&(Ce=Z.stripBOM(Ce))):y==="stream"&&(Ce=_n.Readable.from(Ce)),Bs(a,e,{data:Ce,status:200,statusText:"OK",headers:new Yt,config:t})}if(T4.indexOf(Se)===-1)return e(new Oe("Unsupported protocol "+Se,Oe.ERR_BAD_REQUEST,t));let Be=Yt.from(t.headers).normalize();Be.set("User-Agent","axios/"+mg,!1);let{onUploadProgress:Re,onDownloadProgress:Ne}=t,Je=t.maxRate,ve,tA;if(Z.isSpecCompliantForm(s)){let Ce=Be.getContentType(/boundary=([-_\w\d]{10,70})/i);s=c4(s,ke=>{Be.set(ke)},{tag:`axios-${mg}-boundary`,boundary:Ce&&Ce[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)&&s.getHeaders!==Object.prototype.getHeaders){if(Ju(Be,s.getHeaders(),A("formDataHeaderPolicy")),!Be.hasContentLength())try{let Ce=await bDe.promisify(s.getLength).call(s);Number.isFinite(Ce)&&Ce>=0&&Be.setContentLength(Ce)}catch{}}else if(Z.isBlob(s)||Z.isFile(s))s.size&&Be.setContentType(s.type||"application/octet-stream"),Be.setContentLength(s.size||0),s=_n.Readable.from($y(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 Oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Oe.ERR_BAD_REQUEST,t));if(Be.setContentLength(s.length,!1),L>-1&&s.length>L)return e(new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,t))}let fe=Z.toFiniteNumber(Be.getContentLength());Z.isArray(Je)?(ve=Je[0],tA=Je[1]):ve=tA=Je,s&&(Re||ve)&&(Z.isStream(s)||(s=_n.Readable.from(s,{objectMode:!1})),s=_n.pipeline([s,new rN({maxRate:Z.toFiniteNumber(ve)})],Z.noop),Re&&s.on("progress",R4(s,bd(fe,Sg(Md(Re,O4),!1,3)))));let Ie,Xe=A("auth");if(Xe){let Ce=Z.getSafeProp(Xe,"username")||"",ke=Z.getSafeProp(Xe,"password")||"";Ie=Ce+":"+ke}if(!Ie&&(oe.username||oe.password)){let Ce=N4(oe.username),ke=N4(oe.password);Ie=Ce+":"+ke}Ie&&Be.delete("authorization");let je;try{je=rl(oe.pathname+oe.search,A("params"),A("paramsSerializer")).replace(/^\?/,"")}catch(Ce){return e(Oe.from(Ce,Oe.ERR_BAD_REQUEST,t,null,null,{url:A("url"),exists:!0}))}Be.set("Accept-Encoding",Z.hasOwnProp(r,"advertiseZstdAcceptEncoding")&&r.advertiseZstdAcceptEncoding===!0?NDe:U4,!1);let be=Object.assign(Object.create(null),{path:je,method:_,headers:Ed(Be),agents:{http:B,https:f},auth:Ie,protocol:Se,family:c,beforeRedirect:HDe,beforeRedirects:Object.create(null),http2Options:p});if(!Z.isUndefined(g)&&(be.lookup=g),T){if(typeof T!="string")return e(new Oe("socketPath must be a string",Oe.ERR_BAD_OPTION_VALUE,t));let Ce=A("allowedSocketPaths");if(Ce!=null){let ke=Array.isArray(Ce)?Ce:[Ce],Ue=w4(T);if(!ke.some(Ke=>typeof Ke=="string"&&w4(Ke)===Ue))return e(new Oe(`socketPath "${T}" is not permitted by allowedSocketPaths`,Oe.ERR_BAD_OPTION_VALUE,t))}be.socketPath=T}else be.hostname=oe.hostname.startsWith("[")?oe.hostname.slice(1,-1):oe.hostname,be.port=oe.port,K4(be,Q,Se+"//"+oe.hostname+(oe.port?":"+oe.port:"")+be.path,!1,f,B);let EA,hA=!1,aA=!1,Ze=lN.test(be.protocol);if(be.agent==null&&(be.agent=Ze?f:B),V)EA=qDe;else{let Ce=A("transport");if(Ce)EA=Ce;else if(R===0)EA=Ze?P4:v4,hA=!0;else{aA=!0,be.sensitiveHeaders=[],R&&(be.maxRedirects=R);let ke=A("beforeRedirect");if(ke&&(be.beforeRedirects.config=ke),Ie){let MA=oe.origin,Ke=Ie;be.beforeRedirects.auth=function(ot){try{new URL(ot.href).origin===MA&&(ot.auth=Ke)}catch{}}}let Ue=A("sensitiveHeaders");if(Ue!=null){if(!Z.isArray(Ue))return e(new Oe("sensitiveHeaders must be an array of strings",Oe.ERR_BAD_OPTION_VALUE,t));let MA=new Set;for(let Ke of Ue){if(!Z.isString(Ke))return e(new Oe("sensitiveHeaders must be an array of strings",Oe.ERR_BAD_OPTION_VALUE,t));MA.add(Ke.toLowerCase())}MA.size&&(be.sensitiveHeaders=Array.from(MA),be.beforeRedirects.sensitiveHeaders=function(_A,ot){xDe(_A,ot)||KDe(_A.headers,MA)})}EA=Ze?kDe:RDe}}L>-1?be.maxBodyLength=L:be.maxBodyLength=1/0,be.insecureHTTPParser=!!A("insecureHTTPParser"),K=EA.request(be,function(ke){if(k(),K.destroyed)return;let Ue=[ke],MA=Z.toFiniteNumber(ke.headers["content-length"]);if(Ne||tA){let wA=new rN({maxRate:Z.toFiniteNumber(tA)});Ne&&wA.on("progress",R4(wA,bd(MA,Sg(Md(Ne,O4),!0,3)))),Ue.push(wA)}let Ke=ke,_A=ke.req||K;if(F!==!1&&ke.headers["content-encoding"])switch((_==="HEAD"||ke.statusCode===204)&&delete ke.headers["content-encoding"],(ke.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ue.push(xo.createUnzip(D4)),delete ke.headers["content-encoding"];break;case"deflate":Ue.push(new I4),Ue.push(xo.createUnzip(D4)),delete ke.headers["content-encoding"];break;case"br":F4&&(Ue.push(xo.createBrotliDecompress(_De)),delete ke.headers["content-encoding"]);break;case"zstd":L4&&(Ue.push(xo.createZstdDecompress(TDe)),delete ke.headers["content-encoding"]);break}Ke=Ue.length>1?_n.pipeline(Ue,Z.noop):Ue[0];let ot={status:ke.statusCode,statusText:ke.statusMessage,headers:new Yt(ke.headers),config:t,request:_A};if(y==="stream"){if(U>-1){let wA=U,ht=Ke;async function*fr(){let UA=0;for await(let pe of ht){if(UA+=pe.length,UA>wA)throw new Oe("maxContentLength size of "+wA+" exceeded",Oe.ERR_BAD_RESPONSE,t,_A);yield pe}}Ke=_n.Readable.from(fr(),{objectMode:!1})}ot.data=Ke,Bs(a,e,ot)}else{let wA=[],ht=0;Ke.on("data",function(UA){wA.push(UA),ht+=UA.length,U>-1&&ht>U&&(z=!0,Ke.destroy(),N(new Oe("maxContentLength size of "+U+" exceeded",Oe.ERR_BAD_RESPONSE,t,_A)))}),Ke.on("aborted",function(){if(z)return;let UA=new Oe("stream has been aborted",Oe.ERR_BAD_RESPONSE,t,_A,ot);Ke.destroy(UA),e(UA)}),Ke.on("error",function(UA){z||e(Oe.from(UA,null,t,_A,ot))}),Ke.on("end",function(){try{let UA=wA.length===1?wA[0]:Buffer.concat(wA);y!=="arraybuffer"&&(UA=UA.toString(m),(!m||m==="utf8")&&(UA=Z.stripBOM(UA))),ot.data=UA}catch(UA){return e(Oe.from(UA,null,t,ot.request,ot))}Bs(a,e,ot)})}H.once("abort",wA=>{Ke.destroyed||(Ke.emit("error",wA),Ke.destroy())})}),H.once("abort",Ce=>{K.close?K.close():K.destroy(Ce)}),K.on("error",function(ke){e(Oe.from(ke,null,t,K))});let bA=new Set;if(K.on("socket",function(ke){typeof ke.setKeepAlive=="function"&&ke.setKeepAlive(!0,1e3*60),ke[b4]||(ke.on("error",function(MA){let Ke=ke[em];Ke&&!Ke.destroyed&&Ke.destroy(MA)}),ke[b4]=!0),ke[em]=K,bA.add(ke)}),K.once("close",function(){k();for(let ke of bA)ke[em]===K&&(ke[em]=null);bA.clear()}),A("timeout")){let Ce=parseInt(A("timeout"),10);if(Number.isNaN(Ce)){N(new Oe("error trying to parse `config.timeout` to int",Oe.ERR_BAD_OPTION_VALUE,t,K));return}let ke=function(){q||N(J())};hA&&Ce>0&&(G=setTimeout(ke,Ce)),K.setTimeout(Ce,ke)}else K.setTimeout(0);if(Z.isStream(s)){let Ce=!1,ke=!1;s.on("end",()=>{Ce=!0}),s.once("error",MA=>{ke=!0,K.destroy(MA)}),s.on("close",()=>{!Ce&&!ke&&N(new Io("Request stream has been aborted",t,K))});let Ue=s;if(L>-1&&!aA){let MA=L,Ke=0;Ue=_n.pipeline([s,new _n.Transform({transform(_A,ot,wA){if(Ke+=_A.length,Ke>MA)return wA(new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,t,K));wA(null,_A)}})],Z.noop),Ue.on("error",_A=>{K.destroyed||K.destroy(_A)})}Ue.pipe(K)}else s&&K.write(s),K.end()})};var Y4=Qt.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,Qt.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(Qt.origin),Qt.navigator&&/(msie|trident)/i.test(Qt.navigator.userAgent)):()=>!0;var j4=Qt.hasStandardBrowserEnv?{write(n,t,o,a,e,i,A){if(typeof document>"u")return;let r=[`${n}=${encodeURIComponent(t)}`];Z.isNumber(o)&&r.push(`expires=${new Date(o).toUTCString()}`),Z.isString(a)&&r.push(`path=${a}`),Z.isString(e)&&r.push(`domain=${e}`),i===!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 Yt?{...n}:n,zDe=n=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(n).concat(Object.getOwnPropertySymbols(n).filter(t=>Object.getOwnPropertyDescriptor(n,t).enumerable)):Object.keys(n);function Tn(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 a(c,I,p,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,p,B){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return a(void 0,c,p,B)}else return a(c,I,p,B)}function i(c,I){if(!Z.isUndefined(I))return a(void 0,I)}function A(c,I){if(Z.isUndefined(I)){if(!Z.isUndefined(c))return a(void 0,c)}else return a(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 p=Z.hasOwnProp(n,"transitional")?n.transitional:void 0;if(Z.isPlainObject(p)&&Z.hasOwnProp(p,c))return p[c]}function s(c,I,p){if(Z.hasOwnProp(t,p))return a(c,I);if(Z.hasOwnProp(n,p))return a(void 0,c)}let g={url:i,method:i,data:i,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,p)=>e(J4(c),J4(I),p,!0)};return Z.forEach(zDe({...n,...t}),function(I){if(I==="__proto__"||I==="constructor"||I==="prototype")return;let p=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=p(B,f,I);Z.isUndefined(Q)&&p!==s||(o[I]=Q)}),Z.hasOwnProp(t,"validateStatus")&&Z.isUndefined(t.validateStatus)&&r("validateStatusUndefinedResolves")===!1&&(Z.hasOwnProp(n,"validateStatus")?o.validateStatus=a(void 0,n.validateStatus):delete o.validateStatus),o}var VDe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function WDe(n){let t=Tn({},n),o=p=>Z.hasOwnProp(t,p)?t[p]:void 0,a=o("data"),e=o("withXSRFToken"),i=o("xsrfHeaderName"),A=o("xsrfCookieName"),r=o("headers"),s=o("auth"),g=o("baseURL"),c=o("allowAbsoluteUrls"),I=o("url");if(t.headers=r=Yt.from(r),t.url=rl(il(g,I,c,t),o("params"),o("paramsSerializer")),s){let p=Z.getSafeProp(s,"username")||"",B=Z.getSafeProp(s,"password")||"";try{r.set("Authorization","Basic "+btoa(p+":"+(B?VDe(B):"")))}catch(f){throw Oe.from(f,Oe.ERR_BAD_OPTION_VALUE,n)}}if(Z.isFormData(a)&&(Qt.hasStandardBrowserEnv||Qt.hasStandardBrowserWebWorkerEnv||Z.isReactNative(a)?r.setContentType(void 0):Z.isFunction(a.getHeaders)&&Ju(r,a.getHeaders(),o("formDataHeaderPolicy"))),Qt.hasStandardBrowserEnv&&(Z.isFunction(e)&&(e=e(t)),e===!0||e==null&&Y4(t.url))){let B=i&&A&&j4.read(A);B&&r.set(i,B)}return t}var Am=WDe;var ZDe=typeof XMLHttpRequest<"u",q4=ZDe&&function(n){return new Promise(function(o,a){let e=Am(n),i=e.data,A=Yt.from(e.headers).normalize(),{responseType:r,onUploadProgress:s,onDownloadProgress:g}=e,c,I,p,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 _=Yt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),L={data:!r||r==="text"||r==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:n,request:y};Bs(function(F){o(F),Q()},function(F){a(F),Q()},L),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&&(a(new Oe("Request aborted",Oe.ECONNABORTED,n,y)),Q(),y=null)},y.onerror=function(R){let L=R&&R.message?R.message:"Network Error",U=new Oe(L,Oe.ERR_NETWORK,n,y);U.event=R||null,a(U),Q(),y=null},y.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",L=e.transitional||bc;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),a(new Oe(R,L.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,n,y)),Q(),y=null},i===void 0&&A.setContentType(null),"setRequestHeader"in y&&Z.forEach(Ed(A),function(R,L){y.setRequestHeader(L,R)}),Z.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),r&&r!=="json"&&(y.responseType=e.responseType),g&&([p,f]=Sg(g,!0),y.addEventListener("progress",p)),s&&y.upload&&([I,B]=Sg(s),y.upload.addEventListener("progress",I),y.upload.addEventListener("loadend",B)),(e.cancelToken||e.signal)&&(c=_=>{y&&(a(!_||_.type?new Io(null,n,y):_),y.abort(),Q(),y=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let T=ju(e.url);if(T&&!Qt.protocols.includes(T)){a(new Oe("Unsupported protocol "+T+":",Oe.ERR_BAD_REQUEST,n)),Q();return}y.send(i||null)})};var XDe=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;let o=new AbortController,a=!1,e=function(s){if(!a){a=!0,A();let g=s instanceof Error?s:this.reason;o.abort(g instanceof Oe?g:new Io(g instanceof Error?g.message:g))}},i=t&&setTimeout(()=>{i=null,e(new Oe(`timeout of ${t}ms exceeded`,Oe.ETIMEDOUT))},t),A=()=>{n&&(i&&clearTimeout(i),i=null,n.forEach(s=>{s.unsubscribe?s.unsubscribe(e):s.removeEventListener("abort",e)}),n=null)};n.forEach(s=>{if(!a){if(s.aborted){e.call(s);return}s.addEventListener("abort",e,{once:!0})}});let{signal:r}=o;return r.unsubscribe=()=>Z.asap(A),r},z4=XDe;var $De=function*(n,t){let o=n.byteLength;if(!t||o{let e=eOe(n,t),i=0,A,r=s=>{A||(A=!0,a&&a(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 p=i+=I;o(p)}s.enqueue(new Uint8Array(c))}catch(g){throw r(g),g}},cancel(s){return r(s),e.return()}},{highWaterMark:2})};var V4=64*1024,{isFunction:tm}=Z,tOe=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),W4=n=>{if(!Z.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Z4=(n,...t)=>{try{return!!n(...t)}catch{return!1}},rOe=n=>{let t=n.indexOf("://"),o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},iOe=n=>{let t=Z.global!==void 0&&Z.global!==null?Z.global:globalThis,{ReadableStream:o,TextEncoder:a}=t;n=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);let{fetch:e,Request:i,Response:A}=n,r=e?tm(e):typeof fetch=="function",s=tm(i),g=tm(A);if(!r)return!1;let c=r&&tm(o),I=r&&(typeof a=="function"?(m=>T=>m.encode(T))(new a):async m=>new Uint8Array(await new i(m).arrayBuffer())),p=s&&c&&Z4(()=>{let m=!1,T=new i(Qt.origin,{body:new o,method:"POST",get duplex(){return m=!0,"half"}}),_=T.headers.has("Content-Type");return T.body!=null&&T.body.cancel(),m&&!_}),B=g&&c&&Z4(()=>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=T&&T[m];if(R)return R.call(T);throw new Oe(`Response type '${m}' is not supported`,Oe.ERR_NOT_SUPPORT,_)})});let Q=async m=>{if(m==null)return 0;if(Z.isBlob(m))return m.size;if(Z.isSpecCompliantForm(m))return(await new i(Qt.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,T)=>{let _=Z.toFiniteNumber(m.getContentLength());return _??Q(T)};return async m=>{let{url:T,method:_,data:R,signal:L,cancelToken:U,timeout:F,onDownloadProgress:q,onUploadProgress:z,responseType:K,headers:G,withCredentials:V="same-origin",fetchOptions:H,maxContentLength:N,maxBodyLength:k}=Am(m),J=Z.isNumber(N)&&N>-1,X=Z.isNumber(k)&&k>-1,ie=ve=>Z.hasOwnProp(m,ve)?m[ve]:void 0,De=e||fetch;K=K?(K+"").toLowerCase():"text";let oe=z4([L,U&&U.toAbortSignal()],F),Se=null,Be=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()}),Re,Ne=null,Je=()=>new Oe("Request body larger than maxBodyLength limit",Oe.ERR_BAD_REQUEST,m,Se);try{let ve,tA=ie("auth");if(tA){let Ze=Z.getSafeProp(tA,"username")||"",bA=Z.getSafeProp(tA,"password")||"";ve={username:Ze,password:bA}}if(rOe(T)){let Ze=new URL(T,Qt.origin);if(!ve&&(Ze.username||Ze.password)){let bA=W4(Ze.username),Ce=W4(Ze.password);ve={username:bA,password:Ce}}(Ze.username||Ze.password)&&(Ze.username="",Ze.password="",T=Ze.href)}if(ve&&(G.delete("authorization"),G.set("Authorization","Basic "+btoa(tOe((ve.username||"")+":"+(ve.password||""))))),J&&typeof T=="string"&&T.startsWith("data:")&&cN(T)>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se);if(X&&_!=="get"&&_!=="head"){let Ze=await Q(R);if(typeof Ze=="number"&&isFinite(Ze)&&(Re=Ze,Ze>k))throw Je()}let fe=X&&(Z.isReadableStream(R)||Z.isStream(R)),Ie=(Ze,bA,Ce)=>pN(Ze,V4,ke=>{if(X&&ke>k)throw Ne=Je();bA&&bA(ke)},Ce);if(p&&_!=="get"&&_!=="head"&&(z||fe)){if(Re=Re??await y(G,R),Re!==0||fe){let Ze=new i(T,{method:"POST",body:R,duplex:"half"}),bA;if(Z.isFormData(R)&&(bA=Ze.headers.get("content-type"))&&G.setContentType(bA),Ze.body){let[Ce,ke]=z&&bd(Re,Sg(Md(z)))||[];R=Ie(Ze.body,Ce,ke)}}}else if(fe&&!s&&c&&_!=="get"&&_!=="head")R=Ie(R);else if(fe&&s&&!p&&_!=="get"&&_!=="head")throw new Oe("Stream request bodies are not supported by the current fetch implementation",Oe.ERR_NOT_SUPPORT,m,Se);Z.isString(V)||(V=V?"include":"omit");let Xe=s&&"credentials"in i.prototype;if(Z.isFormData(R)){let Ze=G.getContentType();Ze&&/^multipart\/form-data/i.test(Ze)&&!/boundary=/i.test(Ze)&&G.delete("content-type")}G.set("User-Agent","axios/"+mg,!1);let je={...H,signal:oe,method:_.toUpperCase(),headers:Ed(G.normalize()),body:R,duplex:"half",credentials:Xe?V:void 0};Se=s&&new i(T,je);let be=await(s?De(Se,H):De(T,je)),EA=Yt.from(be.headers);if(J){let Ze=Z.toFiniteNumber(EA.getContentLength());if(Ze!=null&&Ze>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se)}let hA=B&&(K==="stream"||K==="response");if(B&&be.body&&(q||J||hA&&Be)){let Ze={};["status","statusText","headers"].forEach(Ke=>{Ze[Ke]=be[Ke]});let bA=Z.toFiniteNumber(EA.getContentLength()),[Ce,ke]=q&&bd(bA,Sg(Md(q),!0))||[],Ue=0,MA=Ke=>{if(J&&(Ue=Ke,Ue>N))throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se);Ce&&Ce(Ke)};be=new A(pN(be.body,V4,MA,()=>{ke&&ke(),Be&&Be()}),Ze)}K=K||"text";let aA=await f[Z.findKey(f,K)||"text"](be,m);if(J&&!B&&!hA){let Ze;if(aA!=null&&(typeof aA.byteLength=="number"?Ze=aA.byteLength:typeof aA.size=="number"?Ze=aA.size:typeof aA=="string"&&(Ze=typeof a=="function"?new a().encode(aA).byteLength:aA.length)),typeof Ze=="number"&&Ze>N)throw new Oe("maxContentLength size of "+N+" exceeded",Oe.ERR_BAD_RESPONSE,m,Se)}return!hA&&Be&&Be(),await new Promise((Ze,bA)=>{Bs(Ze,bA,{data:aA,headers:Yt.from(be.headers),status:be.status,statusText:be.statusText,config:m,request:Se})})}catch(ve){if(Be&&Be(),oe&&oe.aborted&&oe.reason instanceof Oe){let tA=oe.reason;throw tA.config=m,Se&&(tA.request=Se),ve!==tA&&Object.defineProperty(tA,"cause",{__proto__:null,value:ve,writable:!0,enumerable:!1,configurable:!0}),tA}if(Ne)throw Se&&!Ne.request&&(Ne.request=Se),Ne;if(ve instanceof Oe)throw Se&&!ve.request&&(ve.request=Se),ve;if(ve&&ve.name==="TypeError"&&/Load failed|fetch/i.test(ve.message)){let tA=new Oe("Network Error",Oe.ERR_NETWORK,m,Se,ve&&ve.response);throw Object.defineProperty(tA,"cause",{__proto__:null,value:ve.cause||ve,writable:!0,enumerable:!1,configurable:!0}),tA}throw Oe.from(ve,ve&&ve.code,m,Se,ve&&ve.response)}}},aOe=new Map,dN=n=>{let t=n&&n.env||{},{fetch:o,Request:a,Response:e}=t,i=[a,e,o],A=i.length,r=A,s,g,c=aOe;for(;r--;)s=i[r],g=c.get(s),g===void 0&&c.set(s,g=r?new Map:iOe(t)),c=g;return g},sIA=dN();var hN={http:x4,xhr:q4,fetch:{get:dN}};Z.forEach(hN,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});var X4=n=>`- ${n}`,nOe=n=>Z.isFunction(n)||n===null||n===!1;function sOe(n,t){n=Z.isArray(n)?n:[n];let{length:o}=n,a,e,i={};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(X4).join(` +`):" "+X4(A[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+r,Oe.ERR_NOT_SUPPORT)}return e}var rm={getAdapter:sOe,adapters:hN};function EN(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Io(null,n)}function zu(n){return EN(n),n.headers=Yt.from(n.headers),n.data=vu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),rm.getAdapter(n.adapter||md.adapter,n)(n).then(function(a){EN(n),n.response=a;try{a.data=vu.call(n,n.transformResponse,a)}finally{delete n.response}return a.headers=Yt.from(a.headers),a},function(a){if(!Pu(a)&&(EN(n),a&&a.response)){n.response=a.response;try{a.response.data=vu.call(n,n.transformResponse,a.response)}finally{delete n.response}a.response.headers=Yt.from(a.response.headers)}return Promise.reject(a)})}var im={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{im[n]=function(a){return typeof a===n||"a"+(t<1?"n ":" ")+n}});var $4={};im.transitional=function(t,o,a){function e(i,A){return"[Axios v"+mg+"] Transitional option '"+i+"'"+A+(a?". "+a:"")}return(i,A,r)=>{if(t===!1)throw new Oe(e(A," has been removed"+(o?" in "+o:"")),Oe.ERR_DEPRECATED);return o&&!$4[A]&&($4[A]=!0,console.warn(e(A," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(i,A,r):!0}};im.spelling=function(t){return(o,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function gOe(n,t,o){if(typeof n!="object"||n===null)throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);let a=Object.keys(n),e=a.length;for(;e-- >0;){let i=a[e],A=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(A){let r=n[i],s=r===void 0||A(r,i,n);if(s!==!0)throw new Oe("option "+i+" must be "+s,Oe.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Oe("Unknown option "+i,Oe.ERR_BAD_OPTION)}}var Vu={assertOptions:gOe,validators:im};var oa=Vu.validators,_d=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Q0,response:new Q0}}async request(t,o){try{return await this._request(t,o)}catch(a){if(a instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;let i=(()=>{if(!e.stack)return"";let A=e.stack.indexOf(` +`);return A===-1?"":e.stack.slice(A+1)})();try{if(!a.stack)a.stack=i;else if(i){let A=i.indexOf(` +`),r=A===-1?-1:i.indexOf(` +`,A+1),s=r===-1?"":i.slice(r+1);String(a.stack).endsWith(s)||(a.stack+=` +`+i)}}catch{}}throw a}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=Tn(this.defaults,o);let{transitional:a,paramsSerializer:e,headers:i}=o;a!==void 0&&Vu.assertOptions(a,{silentJSONParsing:oa.transitional(oa.boolean),forcedJSONParsing:oa.transitional(oa.boolean),clarifyTimeoutError:oa.transitional(oa.boolean),legacyInterceptorReqResOrdering:oa.transitional(oa.boolean),advertiseZstdAcceptEncoding:oa.transitional(oa.boolean),validateStatusUndefinedResolves:oa.transitional(oa.boolean)},!1),e!=null&&(Z.isFunction(e)?o.paramsSerializer={serialize:e}:Vu.assertOptions(e,{encode:oa.function,serialize:oa.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Vu.assertOptions(o,{baseUrl:oa.spelling("baseURL"),withXsrfToken:oa.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let A=i&&Z.merge(i.common,i[o.method]);i&&Z.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete i[f]}),o.headers=Yt.concat(A,i);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||bc;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,p;if(!s){let f=[zu.bind(this),void 0];for(f.unshift(...r),f.push(...g),p=f.length,c=Promise.resolve(o);Izu.call(this,B)))}catch(m){c=Promise.reject(m)}break}}if(!c)try{c=zu.call(this,B)}catch(f){c=Promise.reject(f)}for(I=0,p=g.length;I{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](e);a._listeners=null}),this.promise.then=e=>{let i,A=new Promise(r=>{a.subscribe(r),i=r}).then(e);return A.cancel=function(){a.unsubscribe(i)},A},t(function(i,A,r){a.reason||(a.reason=new Io(i,A,r),o(a.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=a=>{t.abort(a)};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}}},e8=uN;function CN(n){return function(o){return n.apply(null,o)}}function BN(n){return Z.isObject(n)&&n.isAxiosError===!0}var fN={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(fN).forEach(([n,t])=>{fN[t]=n});var A8=fN;function t8(n){let t=new Wu(n),o=Su(Wu.prototype.request,t);return Z.extend(o,Wu.prototype,t,{allOwnKeys:!0}),Z.extend(o,t,null,{allOwnKeys:!0}),o.create=function(e){return t8(Tn(n,e))},o}var Rr=t8(md);Rr.Axios=Wu;Rr.CanceledError=Io;Rr.CancelToken=e8;Rr.isCancel=Pu;Rr.VERSION=mg;Rr.toFormData=Oc;Rr.AxiosError=Oe;Rr.Cancel=Rr.CanceledError;Rr.all=function(t){return Promise.all(t)};Rr.spread=CN;Rr.isAxiosError=BN;Rr.mergeConfig=Tn;Rr.AxiosHeaders=Yt;Rr.formToJSON=n=>qy(Z.isHTMLForm(n)?new FormData(n):n);Rr.getAdapter=rm.getAdapter;Rr.HttpStatusCode=A8;Rr.default=Rr;var am=Rr;var{Axios:alA,AxiosError:QN,CanceledError:olA,isCancel:nlA,CancelToken:slA,VERSION:glA,all:clA,Cancel:IlA,isAxiosError:llA,spread:plA,toFormData:dlA,AxiosHeaders:hlA,HttpStatusCode:ElA,formToJSON:ulA,getAdapter:ClA,mergeConfig:BlA,create:flA}=am;var E=ze(V8()),b=ze(Z8()),M=ze(kz()),T6=ze(gV());import it from"fs";import _C from"path";import nS from"crypto";import nRe from"querystring";var jNe=ze(iW(),1),JNe=ze(Jm(),1),qNe=ze(Yd(),1),zNe=ze(bR(),1),VNe=ze(TR(),1),WNe=ze(GR(),1),pW=ze(Wm(),1),ZNe=ze(lW(),1);var Jo=pW.default;import{gzipSync as sRe}from"zlib";import gRe from"http";import cRe from"https";import{promises as IRe}from"dns";import{isIP as N6}from"net";function Y(n,t){var o={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.indexOf(a)<0&&(o[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,a=Object.getOwnPropertySymbols(n);e=n.length&&(n=void 0),{value:n&&n[a++],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 j(n,t,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=o.apply(n,t||[]),e,i=[];return e={},A("next"),A("throw"),A("return"),e[Symbol.asyncIterator]=function(){return this},e;function A(p){a[p]&&(e[p]=function(B){return new Promise(function(f,Q){i.push([p,B,f,Q])>1||r(p,B)})})}function r(p,B){try{s(a[p](B))}catch(f){I(i[0][3],f)}}function s(p){p.value instanceof S?Promise.resolve(p.value.v).then(g,c):I(i[0][2],p)}function g(p){r("next",p)}function c(p){r("throw",p)}function I(p,B){p(B),i.shift(),i.length&&r(i[0][0],i[0][1])}}function l6(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 I6=="function"?I6(n):n[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(i){o[i]=n[i]&&function(A){return new Promise(function(r,s){A=n[i](A),e(r,s,A.done,A.value)})}}function e(i,A,r,s){Promise.resolve(s).then(function(g){i({value:g,done:r})},A)}}var rS;function lRe(){if(rS!==void 0)return rS;let n=[_C.resolve(__dirname,"..","package.json"),_C.resolve(__dirname,"..","..","package.json")];for(let t of n)try{let o=JSON.parse(it.readFileSync(t,"utf-8"));if(o.name==="@larksuiteoapi/node-sdk"&&typeof o.version=="string")return rS=o.version,o.version}catch{}return rS="unknown","unknown"}function p6(n){return n.replace(/[^a-zA-Z0-9._-]/g,"_").slice(0,64)}function _P(n,t){let o=`oapi-node-sdk/${lRe()}`;if(n){let a=p6(n);a&&(o+=` source/${a}`)}if(t?.extraTags)for(let a of t.extraTags){let e=p6(a);e&&(o+=` ${e}`)}return o}var eh=am.create(),pRe=_P();eh.interceptors.request.use(n=>(n.headers&&!n.headers["User-Agent"]&&(n.headers["User-Agent"]=pRe),n),void 0,{synchronous:!0});eh.interceptors.response.use(n=>n.config.$return_headers?{data:n.data,headers:n.headers}:n.data);var Os;(function(n){n[n.SelfBuild=0]="SelfBuild",n[n.ISV=1]="ISV"})(Os||(Os={}));var bs;(function(n){n[n.Feishu=0]="Feishu",n[n.Lark=1]="Lark"})(bs||(bs={}));var Eo;(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"})(Eo||(Eo={}));var sS=Symbol("event-type"),gS=Symbol("tenant-key"),kC=Symbol("app-ticket"),MC=Symbol("tenant-access-token"),R6=Symbol("with-helpdesk-authorization"),k6=Symbol("with-user-access-token"),dRe=Symbol("user-access-token"),d6=Symbol("aily-session-record"),hRe=n=>Buffer.from(n).toString("base64"),cS=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 a=this.getCacheKey(t,o?.namespace),e=this.values.get(a);if(e){let{value:i,expiredTime:A}=e;if(!A||A-new Date().getTime()>0)return i}})}set(t,o,a,e){return h(this,void 0,void 0,function*(){let i=this.getCacheKey(t,e?.namespace);return this.values.set(i,{value:o,expiredTime:a}),!0})}},PC=new cS,vC=class{constructor(t){let o=nS.createHash("sha256");o.update(t),this.key=o.digest()}decrypt(t){let o=Buffer.from(t,"base64"),a=nS.createDecipheriv("aes-256-cbc",this.key,o.slice(0,16)),e=a.update(o.slice(16).toString("hex"),"hex","utf8");return e+=a.final("utf8"),e}},v6=n=>{switch(n){case bs.Feishu:return"https://open.feishu.cn";case bs.Lark:return"https://open.larksuite.com";default:return n}},u=(n,t={})=>n.replace(/:([^/]+)/g,(o,a)=>{if(t[a]!==void 0)return t[a];throw new Error(`request miss ${a} path argument`)}),IS=(n,t)=>h(void 0,void 0,void 0,function*(){(typeof n=="function"?n():n)&&(yield t())}),ERe=n=>n?n.replace(/^\//,""):"",iS=(n,t=[])=>{let o={};return n&&t.forEach(a=>{Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])}),o},C=n=>{var t;if(n instanceof QN){let{message:o,response:a,request:e,config:i}=iS(n,["message","response","request","config"]),r=[{message:o,config:iS(i,["data","url","params","method"]),request:iS(e,["protocol","host","path","method"]),response:iS(a,["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]},Ak=class{constructor(){this.acs={accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{accessRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},device:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/devices`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessRecordAccessPhoto:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},user:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFace:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/users/:user_id/face`,A),method:"PUT",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ruleExternal:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deviceBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/rule_external`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},visitor:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/acs/v1/visitors`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},tk=class extends Ak{constructor(){super(...arguments),this.admin={badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{badgeGrant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badge:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges/:badge_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badges`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{reset:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/password/reset`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},badgeImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/badge_images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},auditInfo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/audit_infos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminUserStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_user_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},adminDeptStat:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/admin/v1/admin_dept_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},rk=class extends tk{constructor(){super(...arguments),this.aily_rag={}}},ik=class extends rk{constructor(){super(...arguments),this.aily={v1:{ailySession:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDataAssetTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appSkill:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appKnowledge:{ask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDataAsset:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/upload_file`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},ailySessionRun:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ailySessionAilyMessage:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentVisibility:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/agent_visibility/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentAttachment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},tenantAppStat:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/app_stats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentChat:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats/:agent_chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentChatSession:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions/:agent_chat_session_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/sessions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentAgentArtifact:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/aily/v1/agents/:agent_id/artifacts/:agent_artifact_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ak=class extends ik{constructor(){super(...arguments),this.apaas={v1:{approvalTask:{addAssignee:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),agree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationObjectRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationObject:{oqlQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/oql_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFunction:{invoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationRoleMember:{batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationRecordPermissionMember:{batchCreateAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemoveAuthorization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationEnvironmentVariable:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{expediting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/expediting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),chatGroup:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/chat_group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollbackPoints:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback_points`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/user_task/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFlow:{execute:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInstance:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAuditLog:{auditLogList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),dataChangeLogsList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),dataChangeLogDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},seatAssignment:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_assignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},seatActivity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/seat_activities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/apps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceTable:{recordsBatchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsPatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recordsPost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tableGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspace:{sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceView:{viewsGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workspaceEnum:{enumGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAppMetrics:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/apaas/v1/tenant_app_metrics/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ok=class extends ak{constructor(){super(...arguments),this.application={applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v5:{application:{favouriteWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/favourite`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recommendWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v5/applications/recommend`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v6:{applicationAppUsage:{overview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),messagePushOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),departmentOverview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationFeedback:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRecommendRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_recommend_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{contactsRangeConfiguration:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),underauditlistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/underauditlist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAppVersion:{contactsRangeSuggest:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationVisibility:{checkWhiteBlackList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationContactsRange:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationCollaborators:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationOwner:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationManagement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/applications/:app_id/management`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/scopes/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBadge:{set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v6/app_badge/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v7:{applicationBase:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/base`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationPublish:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appAvatarUpload:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/app_avatar/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/config`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},applicationAbility:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/application/v7/applications/:app_id/ability`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},nk=class extends ok{constructor(){super(...arguments),this.approval={instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v4:{instance:{specifiedRollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/search_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/remind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addCc:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/add_cc`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),initiatedWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/initiated`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{transfer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/transfer`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reject:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/reject`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resubmit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/resubmit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),approve:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),refuse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/refuse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pass:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/pass`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addSign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/add_sign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rollback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/rollback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/tasks/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approval:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},instanceComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInstance:{check:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances/check`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_instances`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApproval:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/external_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},district:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/approval/v4/districts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},sk=class extends nk{constructor(){super(...arguments),this.attendance_machine={}}},gk=class extends sk{constructor(){super(...arguments),this.attendance={file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},group:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/groups/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userDailyShift:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreateTemp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTaskRemedy:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryUserAllowedRemedys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},shift:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/shifts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsView:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalInfo:{process:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/approval_infos/process`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userSetting:{modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_settings/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userStatsData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archiveRule:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userStatsFieldsQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadReport:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveEmployExpireRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveAccrualRecord:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userFlow:{batchDel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userApproval:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_approvals/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userTask:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/attendance/v1/user_tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ck=class extends gk{constructor(){super(...arguments),this.audio_video_ai={}}},Ik=class extends ck{constructor(){super(...arguments),this.auth={appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{appAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),internal:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTicket:{resend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/auth/v3/app_ticket/resend`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},lk=class extends Ik{constructor(){super(...arguments),this.authen={userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{userInfo:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/user_info`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},accessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},refreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},oidcRefreshAccessToken:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},pk=class extends lk{constructor(){super(...arguments),this.authz={}}},dk=class extends pk{constructor(){super(...arguments),this.aweme_ecosystem={}}},hk=class extends dk{constructor(){super(...arguments),this.baike={entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extract:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/extract`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Ek=class extends hk{constructor(){super(...arguments),this.base={v2:{appRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/base/v2/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},uk=class extends Ek{constructor(){super(...arguments),this.bitable={appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{appTable:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appDashboard:{copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableRecord:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRoleMember:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableView:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableForm:{upgrade:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFieldGroup:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/field_groups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableFormField:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appWorkflow:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appTableField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appBlockWorkflow:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bitable/v1/apps/:app_token/block_workflows`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Ck=class extends uk{constructor(){super(...arguments),this.block={entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{entity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/entities/:block_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/block/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Bk=class extends Ck{constructor(){super(...arguments),this.board={v1:{whiteboardNode:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createPlantuml:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},whiteboard:{downloadAsImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),theme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTheme:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},fk=class extends Bk{constructor(){super(...arguments),this.bot={v4:{bot:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/bot/v4/bot/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Qk=class extends fk{constructor(){super(...arguments),this.c360={}}},yk=class extends Qk{constructor(){super(...arguments),this.calendar={exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v4:{exchangeBinding:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/exchange_bindings`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendar:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primarys:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primarys`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),primary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/primary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarAcl:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),instanceView:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendee:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},setting:{generateCaldavConf:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},timeoffEvent:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/timeoff_events`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingMinute:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventMeetingChat:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},freebusy:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/freebusy/list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},calendarEventAttendeeChatMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},mk=class extends yk{constructor(){super(...arguments),this.cardkit={v1:{card:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),settings:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/settings`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/id_convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},cardElement:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),content:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id/content`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Sk=class extends mk{constructor(){super(...arguments),this.ccm_unified_resource={}}},wk=class extends Sk{constructor(){super(...arguments),this.collab_plugins={}}},Dk=class extends wk{constructor(){super(...arguments),this.comment_sdk={}}},Ok=class extends Dk{constructor(){super(...arguments),this.compensation={v1:{indicator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialPlan:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_plans/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},item:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/items`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},plan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialInsurance:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_insurances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},itemCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/item_categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},changeReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/change_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},archive:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/archives`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/archives/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recurringPayment:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialArchive:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_archive/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},socialArchiveAdjustRecord:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},lumpSumPayment:{batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryDetailWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},bk=class extends Ok{constructor(){super(...arguments),this.contact={group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{group:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),memberBelong:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/member_belong`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),simplelistWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},unit:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/list_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/unbind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/:unit_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bindDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit/bind_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/unit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},groupMember:{simplelist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchRemove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchAdd:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateDepartmentId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unbindDepartmentChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/parent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),childrenWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{updateUserId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByDepartmentWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/find_by_department`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/:user_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),basicBatch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/basic_batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/users/batch`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeTypeEnum:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRoleMember:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),scopes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},functionalRole:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobTitle:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/job_titles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workCity:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/work_cities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scope:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/scopes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customAttr:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/contact/v3/custom_attrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Mk=class extends bk{constructor(){super(...arguments),this.content_check={}}},_k=class extends Mk{constructor(){super(...arguments),this.contract={}}},Tk=class extends _k{constructor(){super(...arguments),this.corehr={contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{contract:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/contracts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies/:company_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/companies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},nationalIdType:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/national_id_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subregion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subdivision:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/subdivisions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workingHoursType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments/:department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/locations/:location_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/files/:id`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataId:{convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leaveGrantingRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leave_granting_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},leave:{leaveTypes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendar:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),workCalendarDate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),calendarByScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveBalances:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveRequestHistory:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/offboardings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},securityGroup:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/security_groups/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{listObjectApiName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/custom_fields/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commonDataMetaData:{editEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addEnumOption:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},authorization:{updateRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addRoleAssign:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByParam:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/authorizations/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},assignedUser:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/assigned_users/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobData:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/job_datas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},currency:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferReason:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},transferType:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/transfer_types/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},compensationStandard:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{costCenter:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCountryRegionSubdivision:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},probation:{submit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/submit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),enableDisableAssessment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/edit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},probationAssessment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/probation/assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customOrg:{deleteOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/delete_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/:org_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateRule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/update_rule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_orgs/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},preHire:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transitTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdrawOnboarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),restoreFlowInstance:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transformOnboardingTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pre_hires/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobGrade:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},position:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/del_position`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/positions/:position_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesBp:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/bps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByDepartment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesAdditionalJob:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoNationality:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCountryRegion:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCity:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoDistrict:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoBank:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoCurrency:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeeCustomOrg:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/create_emp_custom_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),editEmpCustomOrg:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/edit_emp_custom_org`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),employmentCustomOrgRecord:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/employment_custom_org_record`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querybyid:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/custom_org/querybyid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureFile:{listByBizId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`,A),method:"POST",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureNode:{listByFileId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},company:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/companies/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryOperationLogsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),parents:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/parents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tree:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/departments/tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},draft:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approvalGroups:{openQueryPositionChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/:process_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),openQueryJobChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_job_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),openQueryDepartmentChangeListByIds:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},locationAddress:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoLanguage:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoTimeZone:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reportDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlanDetailRow:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchDelete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchSave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchSave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offboarding:{submitV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),edit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/edit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/offboardings/revoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},basicInfoBankBranch:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},enum:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/enums/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},process:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),flowVariableData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processApprover:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/approvers/:approver_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processWithdraw:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},approver:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/approvers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processTransfer:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processExtra:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/extra`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobLevel:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFamily:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{queryRecentChangeWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryMultiTimeline:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesInternationalAssignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processFormVariableData:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pathway:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),active:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/active`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processStart:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_start`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocation:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/update_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/create_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_allocations/remove_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costCenterVersion:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processQueryFlowDataTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/query_flow_data_template`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},defaultCostCenter:{createVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/create_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/remove_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateVersion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/default_cost_centers/update_version`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},processRevoke:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureTemplateInfoWithThumbnail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobChange:{revoke:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/job_changes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},contract:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/contracts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlanDetail:{batch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchV2:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch_v2`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},signatureTemplate:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/signature_templates/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employeesJobData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/job_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/employees/job_datas/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},person:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/persons/:person_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/persons`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workforcePlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/corehr/v2/workforce_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Nk=class extends Tk{constructor(){super(...arguments),this.data_cube={}}},Rk=class extends Nk{constructor(){super(...arguments),this.device={}}},kk=class extends Rk{constructor(){super(...arguments),this.directory={v1:{employee:{resurrect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/resurrect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),regular:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/regular`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),toBeResigned:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id/to_be_resigned`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/employees/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenant:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_tenants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationRule:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collborationShareEntity:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/share_entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},department:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/:department_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),filter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/directory/v1/departments/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},vk=class extends kk{constructor(){super(...arguments),this.docs_ai={}}},Pk=class extends vk{constructor(){super(...arguments),this.docs_tool={}}},Gk=class extends Pk{constructor(){super(...arguments),this.docs={v1:{content:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docs/v1/content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Fk=class extends Gk{constructor(){super(...arguments),this.document_ai={v1:{businessCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},contract:{fieldExtraction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},businessLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},drivingLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vehicleLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},foodManageLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},foodProduceLicense:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},hkmMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},chinesePassport:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},twMainlandTravelPermit:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},healthCertificate:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/health_certificate/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vehicleInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vehicle_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},resume:{parse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/resume/parse`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},bankCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},trainInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},taxiInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},vatInvoice:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},idCard:{recognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})}}}}},Lk=class extends Fk{constructor(){super(...arguments),this.docx={document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{document:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),rawContent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),convert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockChildren:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncementBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlock:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},documentBlockDescendant:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Uk=class extends Lk{constructor(){super(...arguments),this.drive={file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{file:{createFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createShortcut:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/create_shortcut`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),taskCheck:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/task_check`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meta:{batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/metas/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileSubscription:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exportTask:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/export_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileVersion:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileViewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublicPassword:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileComment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},media:{batchGetTmpDownloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadFinish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_finish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadAll:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_all`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadPrepare:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},importTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/import_tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{subscriptionStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/remove_subscription`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/user/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},fileCommentReply:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionMember:{batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOwner:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),auth:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v1/permissions/:token/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{fileLike:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},commentReaction:{updateReaction:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/files/:file_token/comments/reaction`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},permissionPublic:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/drive/v2/permissions/:token/public`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Hk=class extends Uk{constructor(){super(...arguments),this.ea_symphony={}}},Kk=class extends Hk{constructor(){super(...arguments),this.edu={}}},xk=class extends Kk{constructor(){super(...arguments),this.ehr={attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/attachments/:token`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},employee:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/ehr/v1/employees`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Yk=class extends xk{constructor(){super(...arguments),this.elearning={}}},jk=class extends Yk{constructor(){super(...arguments),this.event={outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{outboundIp:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/outbound_ip`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},connection:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/event/v1/connection`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Jk=class extends jk{constructor(){super(...arguments),this.exam={}}},qk=class extends Jk{constructor(){super(...arguments),this.face_detection={}}},zk=class extends qk{constructor(){super(...arguments),this.financial_access_platform={}}},Vk=class extends zk{constructor(){super(...arguments),this.grounding={}}},Wk=class extends Vk{constructor(){super(...arguments),this.gtm_ai={}}},Zk=class extends Wk{constructor(){super(...arguments),this.helpdesk={agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{agent:{agentEmail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_emails`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedule:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkill:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skills`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSkillRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},category:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/categories/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},event:{subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},faq:{faqImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agentSchedules:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticket:{customizedFields:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),ticketImage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_images`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startService:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/start_service`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),answerUserQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketCustomizedField:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},notification:{cancelApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),executeSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),submitApprove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ticketMessage:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},botMessage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/helpdesk/v1/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Xk=class extends Zk{constructor(){super(...arguments),this.hire={websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{websiteChannel:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRoundType:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_round_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerCustomField:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDelivery:{createByAttachment:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),createByResume:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecordAttachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talent:{batchGetId:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),onboardStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tag:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToFolder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterviewAssessment:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interview_assessments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralWebsiteJobPost:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},job:{config:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),close:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateConfig:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),open:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recruiter:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),combinedCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/combined_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},location:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/locations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalReferralReward:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/notes/:note_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApprovalTemplate:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_approval_templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},website:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},examMarkingTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referral:{getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referrals/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},exam:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/exams`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirementSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoAccountCustomField:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentExternalInfo:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},questionnaire:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/questionnaires`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExamPaper:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offer:{internOfferStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offerStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offers/:offer_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheck:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},agency:{protect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),protectSearch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),operateAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAgencyAccount:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentPool:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchChangeTalentPool:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},diversityInclusion:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoExam:{loginInfo:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateResult:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},terminationReason:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/termination_reasons`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobManager:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobPublishRecord:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_publish_records/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteJobPost:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobType:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_types`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalApplication:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckCustomField:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},application:{transferStage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recover:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),terminate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),transferOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),offer:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelOnboard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},registrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},role:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/roles/:role_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewer:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviewers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentFolder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interview:{getByTalent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},referralAccount:{enable:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/enable`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),withdraw:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deactivate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reconciliation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getAccountAssets:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ehrImportTask:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteDeliveryTask:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentObject:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_objects/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobSchema:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobFunction:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_functions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},advertisement:{publish:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerSchema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),preview:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/attachments`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},applicationInterview:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},websiteSiteUser:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tripartiteAgreement:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ecoBackgroundCheckPackage:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resumeSource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/resume_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},offerApplicationForm:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentOperationLog:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userRole:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/user_roles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalInterview:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalBackgroundCheck:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},todo:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/todos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},externalOffer:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQueryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/external_offers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},talentBlocklist:{changeTalentBlock:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},portalApplySchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRegistrationSchema:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobRequirement:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listById:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},backgroundCheckOrder:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},employee:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getByApplication:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/get_by_application`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/employees/:employee_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},subject:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/subjects`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewFeedbackForm:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluationTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluation_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},evaluation:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/evaluations`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewTask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/interview_tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},jobProcess:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/job_processes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minutes:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/minutes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},test:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v1/tests/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{talent:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/talents/:talent_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},interviewRecord:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/interview_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/hire/v2/interview_records/:interview_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},$k=class extends Xk{constructor(){super(...arguments),this.human_authentication={identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{identity:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/human_authentication/v1/identities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ev=class extends $k{constructor(){super(...arguments),this.im={message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["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:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["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:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["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:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{message:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pushFollowUp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentApp:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentPhone:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),urgentSms:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mergeForward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/merge_forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),readUsers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),replyByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["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:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),createByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["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:u(`${this.domain}/open-apis/im/v1/messages`,A),method:"POST",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})}),updateByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),{template_id:r,template_variable:s}=i,g=Y(i,["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:u(`${this.domain}/open-apis/im/v1/messages/:message_id`,A),method:"PUT",data:c,params:e,headers:a,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{throw this.logger.error(C(I)),I})})},batchMessage:{readUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getProgress:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMembers:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),isInChat:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meJoin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},pin:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins/:message_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/pins`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),link:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatModeration:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTab:{listTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sortTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),deleteTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateTabs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatTopNotice:{deleteTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),putTopNotice:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatAnnouncement:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuTree:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sort:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatManagers:{deleteManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addManagers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatMenuItem:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images/:image_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/images`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageReaction:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchQuery:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},file:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/files`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},messageResource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},thread:{forward:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{bizEntityTagRelation:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},urlPreview:{batchUpdate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/url_previews/batch_update`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appFeedCardBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card/batch`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},feedCard:{botTimeSentive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/feed_cards/:feed_card_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tag:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/tags`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/tags/:tag_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chatButton:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/chat_button`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appFeedCard:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/app_feed_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},chat:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/im/v2/chats/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Av=class extends ev{constructor(){super(...arguments),this.inline_platform={}}},tv=class extends Av{constructor(){super(...arguments),this.laps={}}},rv=class extends tv{constructor(){super(...arguments),this.lingo={v1:{file:{download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/files/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},entity:{match:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/match`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),highlight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/highlight`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},repo:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/repos`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},classification:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/classifications`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},draft:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},iv=class extends rv{constructor(){super(...arguments),this.llpp={}}},av=class extends iv{constructor(){super(...arguments),this.mail={mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{mailgroupMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupPermissionMember:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroup:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxMember:{clear:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailboxAlias:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessibleMailboxes:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),profile:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/profile`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxAlias:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},mailgroupManager:{batchDelete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchCreate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},publicMailbox:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeToRecycleBin:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/public_mailboxes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},user:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/users/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessage:{getByCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sendStatus:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/send_status`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listThreadMessage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxThread:{batchModify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchTrash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),modify:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),trash:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxEvent:{unsubscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscribe:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMailContact:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxLabel:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxDraft:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),cancelScheduledSend:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/cancel_scheduled_send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),send:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxRule:{reorder:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSetting:{sendAs:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getSignatures:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/signatures`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxSentMessage:{getRecallDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),recall:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/recall`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplate:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxTemplateAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiEntity:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/multi_entity/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxFolder:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMailboxMessageAttachment:{downloadUrl:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},ov=class extends av{constructor(){super(...arguments),this.mcp={}}},nv=class extends ov{constructor(){super(...arguments),this.mdm={userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{userAuthDataRelation:{unbind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),bind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v3:{countryRegion:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v3/country_regions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},batchCountryRegion:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/mdm/v3/batch_country_region`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},sv=class extends nv{constructor(){super(...arguments),this.meeting_room={}}},gv=class extends sv{constructor(){super(...arguments),this.mindnote={}}},cv=class extends gv{constructor(){super(...arguments),this.minutes={v1:{minuteTranscript:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/transcript`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}})},minuteStatistics:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/statistics`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minuteMedia:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/media`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},minute:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),artifacts:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/artifacts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Iv=class extends cv{constructor(){super(...arguments),this.moments={post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{post:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/moments/v1/posts/:post_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},lv=class extends Iv{constructor(){super(...arguments),this.myai_ai_extension={}}},pv=class extends lv{constructor(){super(...arguments),this.myai_assistant={}}},dv=class extends pv{constructor(){super(...arguments),this.myai_base_ai={}}},hv=class extends dv{constructor(){super(...arguments),this.myai_ccm_extension={}}},Ev=class extends hv{constructor(){super(...arguments),this.myai_data={}}},uv=class extends Ev{constructor(){super(...arguments),this.myai_im_extension={}}},Cv=class extends uv{constructor(){super(...arguments),this.myai_mail={}}},Bv=class extends Cv{constructor(){super(...arguments),this.myai_memory_reflection={}}},fv=class extends Bv{constructor(){super(...arguments),this.myai_scenario_summary={}}},Qv=class extends fv{constructor(){super(...arguments),this.myai_slides={}}},yv=class extends Qv{constructor(){super(...arguments),this.myai_url_extension={}}},mv=class extends yv{constructor(){super(...arguments),this.myai={}}},Sv=class extends mv{constructor(){super(...arguments),this.okr={review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})},v1:{review:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/reviews/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},periodRule:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/period_rules`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},progressRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/progress_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},period:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/periods/:period_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okr:{batchGet:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/okrs/batch_get`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userOkr:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},image:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v1/images/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null})}},v2:{okrAlignment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/alignments/:alignment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjective:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),keyResultsPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_position`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),keyResultsWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results_weight`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResult:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveAlignment:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/alignments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCategory:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/categories`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCycle:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),objectivesWeight:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_weight`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),objectivesPosition:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives_position`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveKeyResult:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/key_results`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResultIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveIndicator:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/indicators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrCycleObjective:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/cycles/:cycle_id/objectives`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrIndicator:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/indicators/:indicator_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrObjectiveProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/objectives/:objective_id/progresses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},okrKeyResultProgress:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/okr/v2/key_results/:key_result_id/progresses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},wv=class extends Sv{constructor(){super(...arguments),this.optical_char_recognition={image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{image:{basicRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Dv=class extends wv{constructor(){super(...arguments),this.partner_ai={}}},Ov=class extends Dv{constructor(){super(...arguments),this.passport={session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{session:{logout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/logout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/sessions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},password:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/passport/v1/password`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},bv=class extends Ov{constructor(){super(...arguments),this.payroll={v1:{datasourceRecord:{save:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasource_records/save`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasource_records/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentDetail:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_detail/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentActivity:{archive:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activitys/archive`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activitys`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationPlan:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paymentActivityDetail:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/payment_activity_details`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},datasource:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/datasources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationDetail:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},costAllocationReport:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},paygroup:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/paygroups`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},acctItem:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/payroll/v1/acct_items`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Mv=class extends bv{constructor(){super(...arguments),this.people_admin={}}},_v=class extends Mv{constructor(){super(...arguments),this.people_ai={}}},Tv=class extends _v{constructor(){super(...arguments),this.people_bytedance={}}},Nv=class extends Tv{constructor(){super(...arguments),this.performance={v1:{reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/review_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},stageTask:{findByUserList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_user_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),findByPage:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/stage_tasks/find_by_page`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},semester:{list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v1/semesters`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{reviewee:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/reviewees/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},additionalInformationsBatch:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/batch`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricDetail:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_details/import`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_details/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},question:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/questions/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},indicator:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/indicators/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},activity:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/activity/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricTag:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_tags`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricField:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_fields/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricLib:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_libs/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reviewData:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/review_datas/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},metricTemplate:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/metric_templates/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/user_info/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reviewTemplate:{queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/review_templates/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userGroupUserRel:{write:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/user_group_user_rels/write`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},additionalInformation:{import:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/import`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),queryWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/performance/v2/additional_informations/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Rv=class extends Nv{constructor(){super(...arguments),this.personal_settings={systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{systemStatus:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchClose:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchOpen:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},kv=class extends Rv{constructor(){super(...arguments),this.profile={}}},vv=class extends kv{constructor(){super(...arguments),this.report={rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{rule:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},ruleView:{remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/report/v1/tasks/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Pv=class extends vv{constructor(){super(...arguments),this.rule_engine={}}},Gv=class extends Pv{constructor(){super(...arguments),this.saasbi={}}},Fv=class extends Gv{constructor(){super(...arguments),this.scim={}}},Lv=class extends Fv{constructor(){super(...arguments),this.search_in_app={}}},Uv=class extends Lv{constructor(){super(...arguments),this.search={dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{dataSource:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},message:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},schema:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/schemas/:schema_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},dataSourceItem:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/app`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},docWiki:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/search/v2/doc_wiki/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Hv=class extends Uv{constructor(){super(...arguments),this.security_and_compliance={openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{openapiLog:{listData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},userMigration:{cancel:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},multiGeoEntityTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{deviceApplyRecord:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},deviceRecord:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mine:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/security_and_compliance/v2/device_records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Kv=class extends Hv{constructor(){super(...arguments),this.security_plugin={}}},xv=class extends Kv{constructor(){super(...arguments),this.sheet_ai={}}},Yv=class extends xv{constructor(){super(...arguments),this.sheets={spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v3:{spreadsheet:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheet:{replace:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDimension:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),find:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilter:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterView:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFilterViewCondition:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spreadsheetSheetFloatImage:{create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},jv=class extends Yv{constructor(){super(...arguments),this.slides_ai={}}},Jv=class extends jv{constructor(){super(...arguments),this.slides={}}},qv=class extends Jv{constructor(){super(...arguments),this.spark={v1:{appTable:{deleteTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),postTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patchTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchUpdateTableRecords:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records_batch_update`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTableRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/tables/:table_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appEnum:{getEnumDetail:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums/:enum_name`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getEnumList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/enums`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appView:{getViewRecordList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/views/:view_name/records`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},appStorage:{upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage`,A),method:"GET",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadInitialize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/initialize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uploadPart:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/part`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadComplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/storage/upload/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},app:{icon:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/icon`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),uploadHtmlCodeAndRelease:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/upload_and_release_html_code`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),getAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),updateAppVisibility:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/access-scope`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sqlCommands:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id/sql_commands`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps/:app_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/apps`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},directoryUser:{idConvert:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/spark/v1/directory/user/id_convert`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},zv=class extends qv{constructor(){super(...arguments),this.speech_to_text={speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{speech:{fileRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),streamRecognize:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Vv=class extends zv{constructor(){super(...arguments),this.subscriptions={}}},Wv=class extends Vv{constructor(){super(...arguments),this.task={task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteFollower:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),batchDeleteCollaborator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),uncomplete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),complete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskComment:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskCollaborator:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskFollower:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskReminder:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{task:{tasklists:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/tasklists`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_dependencies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeDependencies:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_dependencies`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setAncestorTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/set_ancestor_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeReminders:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_reminders`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_tasklist`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addTasklist:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_tasklist`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},comment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments/:comment_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/comments`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},section:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),tasksWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections/:section_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/sections`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tasklist:{tasks:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/tasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),addMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/add_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),removeMembers:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/remove_members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customField:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),add:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/add`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tasklistActivitySubscription:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},attachment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),upload:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments/upload`,A),method:"POST",data:i,params:e,headers:Object.assign(Object.assign({},a),{"Content-Type":"multipart/form-data"}),paramsSerializer:s=>(0,E.stringify)(s,{arrayFormat:"repeat"})}).catch(s=>{throw this.logger.error(C(s)),s});return r?.data||null}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/attachments`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customFieldOption:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskV2:{taskSubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/task_v2/task_subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listRelatedTaskWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/task_v2/list_related_task`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},taskSubtask:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Zv=class extends Wv{constructor(){super(...arguments),this.tenant={tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v2:{tenant:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},tenantProductAssignInfo:{query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Xv=class extends Zv{constructor(){super(...arguments),this.translation={text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{text:{translate:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/translate`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),detect:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/translation/v1/text/detect`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},$v=class extends Xv{constructor(){super(...arguments),this.trust_layer={}}},eP=class extends $v{constructor(){super(...arguments),this.trust_party={v1:{collaborationTenantCollaborationUser:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_users/:target_user_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenantCollaborationDepartment:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/collaboration_departments/:target_department_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},collaborationTenant:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),visibleOrganization:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/trust_party/v1/collaboration_tenants/:target_tenant_key/visible_organization`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},AP=class extends eP{constructor(){super(...arguments),this.unified_kms_log={}}},tP=class extends AP{constructor(){super(...arguments),this.unified_kms={}}},rP=class extends tP{constructor(){super(...arguments),this.vault={}}},iP=class extends rP{constructor(){super(...arguments),this.vc={material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{material:{uploadMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/upload_meta`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),remove:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/remove`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),pullMeta:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/materials/pull_meta`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingRecording:{start:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),stop:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setPermission:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomConfig:{del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setCheckboardAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setRoomAccessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/query`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),set:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_configs/set`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserve:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),apply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/apply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVcMeeting:{getCommonReply:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_common_reply`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),doOperation:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/do_operation`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTodoTask:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_todo_task`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),seedAiPullData:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/seed_ai_pull_data`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),docBasedSuggestQuestion:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/doc_based_suggest_question`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),callback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),sectionSummary:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/section_summary`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getRecap:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/get_recap`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchStepSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_step_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchSectionSummaryStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_section_summary_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchRecapStream:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc_meeting/fetch_recap_stream`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meeting:{end:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),kickout:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setHost:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),invite:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),changeName:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/change_name`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listByNoWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiRoom:{joinOfflineMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_offline_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveInstantEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/reserve_instant_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),helpSceneType:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/help_scene_type`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),checkInSchedule:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/check_in_schedule`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),exit:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/exit`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoReleaseEvent:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_release_event`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),autoWelcome:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/auto_welcome`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),roomCalling:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/room_calling`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),joinMeetingNumber:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/join_meeting_number`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leaveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_room/leave_meeting`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiMm:{mediaParse:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_parse`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),extensionBoarding:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/extension_boarding`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),querySuggestContext:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query_suggest_context`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mediaBind:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/media_bind`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),query:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_mm/query`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiSip:{createEventCard:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_sip/create_event_card`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},alert:{listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/alerts`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},myAiVc:{cardCallback:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/card_callback`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),startAnalysis:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/start_analysis`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),setMeetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/set_meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),fetchMeetingAnalyze:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/my_ai_vc/fetch_meeting_analyze`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},report:{getDaily:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_daily`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),getTopUser:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reports/get_top_user`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},room:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/rooms/:room_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},resourceReservationList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/resource_reservation_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantQualityList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_quality_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},roomLevel:{mget:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/mget`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/search`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),del:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/del`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/room_levels`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},scopeConfig:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),accessCode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/scope_config/access_code`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigForm:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigAdmin:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfigDisableInform:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},reserveConfig:{patch:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`,A),method:"PATCH",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),reserveScope:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},export:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),download:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=yield this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/download`,A),method:"GET",headers:a,data:i,params:e,responseType:"stream",paramsSerializer:g=>(0,E.stringify)(g,{arrayFormat:"repeat"}),$return_headers:!0}).catch(g=>{throw this.logger.error(C(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 p=it.createWriteStream(g);p.on("finish",()=>{c(g)}),p.on("error",B=>{I(B)}),r.data.pipe(p)})}),getReadableStream:()=>(s(),r.data),headers:r.headers}}),resourceReservationList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantQualityList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),participantList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/participant_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),meetingList:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/exports/meeting_list`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meeting_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},participantList:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/participant_list`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},meetingPullSubtitle:{getWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/pull_subtitle`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},note:{subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),unifiedNoteTranscriptWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id/unified_note_transcript`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/notes/:note_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},recording:{unsubscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/unsubscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),subscription:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/recordings/subscription`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},bot:{realtimeEndpoint:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/realtime/endpoint`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),leave:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/leave`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),message:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/message`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),userActiveMeeting:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/user_active_meeting`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),join:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/join`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),eventsWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/vc/v1/bots/events`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},aP=class extends iP{constructor(){super(...arguments),this.verification={v1:{verification:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/verification/v1/verification`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},oP=class extends aP{constructor(){super(...arguments),this.wiki={spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{node:{searchWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(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:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v1/nodes/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}},v2:{spaceSetting:{update:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`,A),method:"PUT",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceNode:{updateTitle:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),moveDocsToWiki:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),copy:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),move:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},spaceMember:{delete:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`,A),method:"DELETE",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},space:{getNode:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/get_node`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),create:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})}),listWithIterator:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o),r=g=>h(this,void 0,void 0,function*(){return yield this.httpInstance.request({url:u(`${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:i,paramsSerializer:I=>(0,E.stringify)(I,{arrayFormat:"repeat"})}).catch(I=>{this.logger.error(C(I))})});return{[Symbol.asyncIterator](){return j(this,arguments,function*(){let c=!0,I;for(;c;)try{let p=yield S(r({headers:a,params:Object.assign(Object.assign({},e),{page_token:I}),data:i})),B=p?.data||{},{has_more:f,page_token:Q,next_page_token:y}=B,m=Y(B,["has_more","page_token","next_page_token"]);yield yield S(m),c=!!f,I=Q||y}catch{yield yield S(null);break}})}}}),list:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/spaces`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},task:{get:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`,A),method:"GET",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},nP=class extends oP{constructor(){super(...arguments),this.workplace={workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},v1:{workplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},workplaceBlockAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})},customWorkplaceAccessData:{search:(t,o)=>h(this,void 0,void 0,function*(){let{headers:a,params:e,data:i,path:A}=yield this.formatPayload(t,o);return this.httpInstance.request({url:u(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`,A),method:"POST",data:i,params:e,headers:a,paramsSerializer:r=>(0,E.stringify)(r,{arrayFormat:"repeat"})}).catch(r=>{throw this.logger.error(C(r)),r})})}}}}},Pg={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)}},Uc=class{constructor(t,o){this.level=t,this.logger=o}error(...t){this.level>=Eo.error&&this.logger.error(t)}warn(...t){this.level>=Eo.warn&&this.logger.warn(t)}info(...t){this.level>=Eo.info&&this.logger.info(t)}debug(...t){this.level>=Eo.debug&&this.logger.debug(t)}trace(...t){this.level>=Eo.trace&&this.logger.trace(t)}},sP=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===Os.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()})}},lS="/oauth/v3/token",uRe="urn:ietf:params:oauth:grant-type:jwt-bearer",P6="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",CRe="authorization_code",BRe="refresh_token",TP="X-Target-Service",G6=7100,NP=7101,F6=7102,RP=7104,fRe=Object.freeze({"open.feishu.cn":"https://accounts.feishu.cn","open.larksuite.com":"https://accounts.larksuite.com"}),na=class extends Error{constructor(t,o){super(o),this.name="ClientAssertionError",this.code=t,this.msg=o}},$d=class extends Error{constructor(t,o,a,e){super(e||a||"access token request failed"),this.name="AccessTokenError",this.statusCode=t,this.code=o,this.error=a,this.errorDescription=e}},kP=n=>n.includes("://")?n:`https://${n}`;function vP(n){let t=new URL(kP(n));if(!t.host)throw new Error(`invalid url: ${n}`);return t.host}function PP(n){if(n.oauthBaseUrl)return kP(n.oauthBaseUrl).replace(/\/+$/,"");let t=vP(n.domain),o=fRe[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 L6(n){return vP(PP(n))}function GP(n,t){let o=new URL(kP(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 QRe(n,t){var o,a;let e=(o=t?.code)!==null&&o!==void 0?o:"unknown",i=(a=t?.msg)!==null&&a!==void 0?a:"no message";return`failed to get ${n}, code: ${e}, msg: ${i}`}var gP=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 sP({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,a){return h(this,void 0,void 0,function*(){let e=yield this.httpInstance.post(t,o).catch(i=>{throw this.logger.error(i),i});if(!e||!e[a])throw new Error(QRe(a,e));return e})}getCustomTenantAccessToken(){var t,o;return h(this,void 0,void 0,function*(){if(this.clientAssertionProvider)return this.getTenantTokenByClientAssertion();let a=yield(t=this.cache)===null||t===void 0?void 0:t.get(MC,{namespace:this.appId});if(a)return this.logger.debug("use cache token"),a;this.logger.debug("request token");let{tenant_access_token:e,expire:i}=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()+i*1e3-180*1e3,{namespace:this.appId}),e})}getTenantTokenByClientAssertion(){var t,o,a,e,i,A,r,s;return h(this,void 0,void 0,function*(){let g=PP({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),c=L6({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 p;try{p=yield this.clientAssertionProvider.retrieveToken(c)}catch(T){throw new na(F6,T?.message||"client assertion provider failed")}if(!p||!p.value)throw new na(NP,"client assertion token is empty");let B=`${g}${lS}`,f={};p.targetInfo&&(B=GP(p.targetInfo,lS),f[TP]=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:uRe,client_assertion_type:P6,client_assertion:p.value,client_id:this.appId}})}catch(T){throw this.logger.error(T),new na(((a=(o=T?.response)===null||o===void 0?void 0:o.data)===null||a===void 0?void 0:a.code)||0,((i=(e=T?.response)===null||e===void 0?void 0:e.data)===null||i===void 0?void 0:i.error_description)||((r=(A=T?.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 na(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 na(G6,"ClientAssertion mode is not supported for ISV apps");if(!t){this.logger.error("market app request need tenant key");return}let a=yield(o=this.cache)===null||o===void 0?void 0:o.get(`larkMarketAccessToken${t}`,{namespace:this.appId});if(a)return this.logger.debug("use cache token"),a;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:i}=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:i,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 IS(this.appType===Os.SelfBuild,()=>h(this,void 0,void 0,function*(){this.logger.debug("get custom app token")})),IS(this.appType===Os.ISV,()=>h(this,void 0,void 0,function*(){this.logger.debug("get market app token ")})),this.appType===Os.SelfBuild?yield this.getCustomTenantAccessToken():yield this.getMarketTenantAccessToken(t?.[gS])})}},U6=(n,t)=>{let o=Object.assign({},n);for(let[a,e]of Object.entries(t))e!==void 0&&(o[a]=e);return o},cP=class{constructor(t){this.client=t.client}getCacheKey(t,o){return`${o?.namespace||this.client.appId}/${dRe.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 a={};for(let[e,i]of Object.entries(t)){let A=yield this.client.authen.oidcAccessToken.create({data:{grant_type:"authorization_code",code:i}});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,i);continue}a[e]={code:i,token:A.data.access_token,refreshToken:A.data.refresh_token,expiredTime:this.calibrateTime(A.data.expires_in)}}return yield this.update(a,{namespace:o?.namespace}),a})}update(t,o){return h(this,void 0,void 0,function*(){for(let[a,e]of Object.entries(t)){let i=this.getCacheKey(a,{namespace:o?.namespace}),A=(yield this.client.cache.get(i))||{},{code:r,token:s,refreshToken:g,expiredTime:c}=e,I=U6(A,{code:r,token:s,refreshToken:g,expiredTime:c});yield this.client.cache.set(i,I,1/0)}})}get(t,o){return h(this,void 0,void 0,function*(){let a=this.getCacheKey(t,{namespace:o?.namespace}),e=yield this.client.cache.get(a);if(!e){this.client.logger.error("user access token needs to be initialized or updated first");return}let{token:i,code:A,refreshToken:r,expiredTime:s}=e;if(i&&s&&s-new Date().getTime()>0)return i;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)}})}},Zd=n=>n===""||n===0||n===null||n===void 0?void 0:n,yRe=n=>{if(!n||n.error)return!0;let{code:t}=n;return t!==void 0&&t!==0&&t!=="0"&&t!==""},IP=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:CRe,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:BRe,refresh_token:t.refreshToken,scope:t.scope},t.headers)})}doRequest(t,o){return h(this,void 0,void 0,function*(){let a=PP({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),e=L6({oauthBaseUrl:this.oauthBaseUrl,domain:this.domain}),i={client_id:this.appId};for(let[I,p]of Object.entries(t))p!=null&&(i[I]=p);let A=`${a}${lS}`,r=Object.assign({},o||{});if(this.clientAssertionProvider){let I;try{I=yield this.clientAssertionProvider.retrieveToken(e)}catch(p){throw new na(F6,p?.message||"client assertion provider failed")}if(!I||!I.value)throw new na(NP,"client assertion token is empty");i.client_assertion_type=P6,i.client_assertion=I.value,I.targetInfo&&(A=GP(I.targetInfo,lS),r[TP]=e)}else if(this.appSecret)i.client_secret=this.appSecret;else throw new na(RP,"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:i})}catch(I){if(this.logger.error(I),I?.response)s=I.response.status,g=I.response.data;else throw new $d(0,0,"",I?.message||"oauth token request failed")}if(s!==200||yRe(g))throw new $d(s,g?.code||0,g?.error||"",g?.error_description||g?.msg||"");let c=Zd(g?.access_token);if(!c)throw new $d(s,g?.code||0,g?.error||"",g?.error_description||"oauth token response missing access_token");return{accessToken:c,tokenType:Zd(g.token_type),expiresIn:Zd(g.expires_in),refreshToken:Zd(g.refresh_token),refreshTokenExpiresIn:Zd(g.refresh_token_expires_in),scope:Zd(g.scope)}})}},pS=class extends nP{constructor(t){if(super(),this.appId="",this.appSecret="",this.helpDeskId="",this.helpDeskToken="",this.appType=Os.SelfBuild,this.logger=new Uc(t.loggerLevel||Eo.info,t.logger||Pg),this.appId=t.appId,this.appSecret=t.appSecret||"",this.clientAssertionProvider=t.clientAssertionProvider,this.oauthBaseUrl=t.oauthBaseUrl,this.disableTokenCache=t.disableTokenCache,this.userAgent=_P(t.source,{extraTags:t.extraUaTags}),IS(!this.appId,()=>this.logger.error("appId is needed")),this.helpDeskId=t.helpDeskId,this.helpDeskToken=t.helpDeskToken,this.appType=t?.appType||Os.SelfBuild,!this.appSecret&&!this.clientAssertionProvider)throw new na(RP,"appSecret or clientAssertionProvider is required");if(this.clientAssertionProvider&&this.appType===Os.ISV)throw new na(G6,"ClientAssertion mode is not supported for ISV apps");this.domain=v6(t.domain||bs.Feishu),this.logger.debug(`use domain url: ${this.domain}`),this.cache=t.cache||PC,this.httpInstance=t.httpInstance||eh,this.tokenManager=new gP({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 cP({client:this}),this.accessToken=new IP({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 a,e,i;return h(this,void 0,void 0,function*(){let A=["lark","params","data","headers","path"].reduce((g,c)=>(g[c]=o?.[c]||{},g),{}),r=(a=A?.lark)===null||a===void 0?void 0:a[k6];if(r)this.logger.debug("use passed token"),A.headers.Authorization=`Bearer ${r}`;else if(!this.disableTokenCache){let g=yield this.tokenManager.getTenantAccessToken({[gS]:(e=A?.lark)===null||e===void 0?void 0:e[gS]});g?A.headers.Authorization=`Bearer ${g}`:this.logger.warn("failed to obtain token")}if((i=A?.lark)===null||i===void 0?void 0:i[R6]){this.logger.debug("generate help desk credential");let g=hRe(`${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 a;return h(this,void 0,void 0,function*(){let{data:e,params:i,headers:A,url:r}=t,s=Y(t,["data","params","headers","url"]),g=yield this.formatPayload({data:e,params:i,headers:A},o),c=((a=t.method)===null||a===void 0?void 0:a.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}/${ERe(r)}`,headers:g.headers,data:c,params:g.params})).catch(p=>{throw this.logger.error(p),p})})}},mRe=n=>n.reduce((t,o)=>(0,T6.default)(t,o),{}),SRe=n=>({lark:{[gS]:n}}),wRe=()=>({lark:{[R6]:!0}}),DRe=n=>({headers:{Authorization:`Bearer ${n}`}}),ORe=n=>({lark:{[k6]:n}}),dS=class{constructor(t){let{encryptKey:o,verificationToken:a,logger:e}=t;this.verificationToken=a,this.encryptKey=o,this.logger=e,o&&(this.aesCipher=new vC(o))}parse(t){var o,a;let e=(()=>{var r;let s=t||{},{encrypt:g}=s,c=Y(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=Y(e,["header","event"]);return Object.assign(Object.assign(Object.assign({[sS]:(o=e?.header)===null||o===void 0?void 0:o.event_type},g),r),s)}let{event:i}=e,A=Y(e,["event"]);return Object.assign(Object.assign({[sS]:(a=e?.event)===null||a===void 0?void 0:a.type},i),A)}checkIsCardEventValidated(t){if("encrypt"in t||"schema"in t)return this.checkIsEventValidated(t);let{"x-lark-request-timestamp":o,"x-lark-request-nonce":a,"x-lark-signature":e}=t.headers;return this.verificationToken?nS.createHash("sha1").update(o+a+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":a,"x-lark-signature":e}=t.headers,i=o+a+this.encryptKey+JSON.stringify(t);return nS.createHash("sha256").update(i).digest("hex")===e}},bRe="app_ticket",hS=class{constructor(t){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{encryptKey:o,verificationToken:a}=t;this.encryptKey=o||"",this.verificationToken=a||"",this.logger=new Uc(t.loggerLevel||Eo.info,t.logger||Pg),this.requestHandle=new dS({encryptKey:o,verificationToken:a,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:a}=t;o?(yield this.cache.set(kC,o,void 0,{namespace:a}),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!==bRe&&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 a,e;return h(this,void 0,void 0,function*(){if(o?.needCheck!==!1&&!(!((a=this.requestHandle)===null||a===void 0)&&a.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[sS];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`})}},lP=class{constructor(t,o){this.verificationToken="",this.encryptKey="",this.handles=new Map;let{verificationToken:a,encryptKey:e}=t;this.encryptKey=e||"",this.verificationToken=a||"",this.cardHandler=o,this.logger=new Uc(t.loggerLevel||Eo.info,t.logger||Pg),this.requestHandle=new dS({encryptKey:e,verificationToken:a,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:a}=t;o?(yield this.cache.set(kC,o,void 0,{namespace:a}),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,a;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=(a=this.requestHandle)===null||a===void 0?void 0:a.parse(t),i=e[sS];if(this.handles.has(i))try{return yield this.handles.get(i)(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)}})}},yS=n=>new Promise(t=>{let o="";n.on("data",a=>{o+=a}),n.on("end",()=>{try{let a=JSON.parse(o);t(a)}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}}},MRe=(n,t,o)=>(a,e)=>h(void 0,void 0,void 0,function*(){if(a.url!==n)return;let i=Object.assign(Object.create({headers:a.headers}),yield yS(a));if(o?.autoChallenge||!1){let{isChallenge:s,challenge:g}=GC(i,{encryptKey:t.encryptKey});if(s){e.end(JSON.stringify(g));return}}let r=yield t.invoke(i);e.end(JSON.stringify(r))}),_Re=(n,t)=>(o,a)=>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||Pg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield yS(o)}),i=Object.assign(Object.create({headers:o.headers}),e);if(t?.autoChallenge||!1){let{isChallenge:s,challenge:g}=GC(i,{encryptKey:n.encryptKey});if(s){a.json(g);return}}let r=yield n.invoke(i);a.json(r)}),TRe=(n,t,o)=>(a,e)=>h(void 0,void 0,void 0,function*(){let{originalUrl:i,req:A,request:r}=a;if(i===n){let s=yield h(void 0,void 0,void 0,function*(){return r.body?r.body:A.complete?((o?.logger||Pg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield yS(A)}),g=Object.assign(Object.create({headers:A.headers}),s);if(o?.autoChallenge||!1){let{isChallenge:p,challenge:B}=GC(g,{encryptKey:t.encryptKey});if(p){a.body=B,yield e();return}}let I=yield t.invoke(g);a.body=JSON.stringify(I)}yield e()}),NRe=(n,t)=>(o,a)=>h(void 0,void 0,void 0,function*(){let{req:e,request:i}=o,A=yield h(void 0,void 0,void 0,function*(){return i.body?i.body:e.complete?((t?.logger||Pg).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body"),null):yield yS(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 a();return}}let g=yield n.invoke(r);o.body=JSON.stringify(g),yield a()}),RRe=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"}}})},kRe=Object.freeze({__proto__:null,defaultCard:RRe}),vg=tS();vg.util.Long=void 0;vg.configure();var Lc=vg.Reader,h6=vg.Writer,HA=vg.util,Vo=vg.roots.default||(vg.roots.default={}),H6=Vo.pbbp2=(()=>{let n={};return n.Header=(function(){function t(o){if(o)for(let a=Object.keys(o),e=0;e>>3){case 1:{A.key=a.string();break}case 2:{A.value=a.string();break}default:a.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(a){return a instanceof Lc||(a=new Lc(a)),this.decode(a,a.uint32())},t.verify=function(a){return typeof a!="object"||a===null?"object expected":HA.isString(a.key)?HA.isString(a.value)?null:"value: string expected":"key: string expected"},t.fromObject=function(a){if(a instanceof Vo.pbbp2.Header)return a;let e=new Vo.pbbp2.Header;return a.key!=null&&(e.key=String(a.key)),a.value!=null&&(e.value=String(a.value)),e},t.toObject=function(a,e){e||(e={});let i={};return e.defaults&&(i.key="",i.value=""),a.key!=null&&a.hasOwnProperty("key")&&(i.key=a.key),a.value!=null&&a.hasOwnProperty("value")&&(i.value=a.value),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,vg.util.toJSONOptions)},t.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/pbbp2.Header"},t})(),n.Frame=(function(){function t(o){if(this.headers=[],o)for(let a=Object.keys(o),e=0;e>>3){case 1:{A.SeqID=a.uint64();break}case 2:{A.LogID=a.uint64();break}case 3:{A.service=a.int32();break}case 4:{A.method=a.int32();break}case 5:{A.headers&&A.headers.length||(A.headers=[]),A.headers.push(Vo.pbbp2.Header.decode(a,a.uint32()));break}case 6:{A.payloadEncoding=a.string();break}case 7:{A.payloadType=a.string();break}case 8:{A.payload=a.bytes();break}case 9:{A.LogIDNew=a.string();break}default:a.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(a){return a instanceof Lc||(a=new Lc(a)),this.decode(a,a.uint32())},t.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(!HA.isInteger(a.SeqID)&&!(a.SeqID&&HA.isInteger(a.SeqID.low)&&HA.isInteger(a.SeqID.high)))return"SeqID: integer|Long expected";if(!HA.isInteger(a.LogID)&&!(a.LogID&&HA.isInteger(a.LogID.low)&&HA.isInteger(a.LogID.high)))return"LogID: integer|Long expected";if(!HA.isInteger(a.service))return"service: integer expected";if(!HA.isInteger(a.method))return"method: integer expected";if(a.headers!=null&&a.hasOwnProperty("headers")){if(!Array.isArray(a.headers))return"headers: array expected";for(let e=0;e>>0,a.SeqID.high>>>0).toNumber(!0))),a.LogID!=null&&(HA.Long?(e.LogID=HA.Long.fromValue(a.LogID)).unsigned=!0:typeof a.LogID=="string"?e.LogID=parseInt(a.LogID,10):typeof a.LogID=="number"?e.LogID=a.LogID:typeof a.LogID=="object"&&(e.LogID=new HA.LongBits(a.LogID.low>>>0,a.LogID.high>>>0).toNumber(!0))),a.service!=null&&(e.service=a.service|0),a.method!=null&&(e.method=a.method|0),a.headers){if(!Array.isArray(a.headers))throw TypeError(".pbbp2.Frame.headers: array expected");e.headers=[];for(let i=0;i=0&&(e.payload=a.payload)),a.LogIDNew!=null&&(e.LogIDNew=String(a.LogIDNew)),e},t.toObject=function(a,e){e||(e={});let i={};if((e.arrays||e.defaults)&&(i.headers=[]),e.defaults){if(HA.Long){let A=new HA.Long(0,0,!0);i.SeqID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else i.SeqID=e.longs===String?"0":0;if(HA.Long){let A=new HA.Long(0,0,!0);i.LogID=e.longs===String?A.toString():e.longs===Number?A.toNumber():A}else i.LogID=e.longs===String?"0":0;i.service=0,i.method=0,i.payloadEncoding="",i.payloadType="",e.bytes===String?i.payload="":(i.payload=[],e.bytes!==Array&&(i.payload=HA.newBuffer(i.payload))),i.LogIDNew=""}if(a.SeqID!=null&&a.hasOwnProperty("SeqID")&&(typeof a.SeqID=="number"?i.SeqID=e.longs===String?String(a.SeqID):a.SeqID:i.SeqID=e.longs===String?HA.Long.prototype.toString.call(a.SeqID):e.longs===Number?new HA.LongBits(a.SeqID.low>>>0,a.SeqID.high>>>0).toNumber(!0):a.SeqID),a.LogID!=null&&a.hasOwnProperty("LogID")&&(typeof a.LogID=="number"?i.LogID=e.longs===String?String(a.LogID):a.LogID:i.LogID=e.longs===String?HA.Long.prototype.toString.call(a.LogID):e.longs===Number?new HA.LongBits(a.LogID.low>>>0,a.LogID.high>>>0).toNumber(!0):a.LogID),a.service!=null&&a.hasOwnProperty("service")&&(i.service=a.service),a.method!=null&&a.hasOwnProperty("method")&&(i.method=a.method),a.headers&&a.headers.length){i.headers=[];for(let A=0;AH6.Frame.decode(n),pP=class{constructor(){this.client={appId:"",appSecret:"",domain:bs.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}},dP=class{constructor(t){this.cache=new Map,this.logger=t.logger,this.clearAtInterval()}mergeData(t){let{message_id:o,sum:a,seq:e,trace_id:i,data:A}=t,r=this.cache.get(o);if(r)r.buffer[e]=A;else{let g=new Array(a).fill(void 0);g[e]=A,this.cache.set(o,{buffer:g,trace_id:i,message_id:o,create_time:Date.now()})}let s=this.cache.get(o);if(s?.buffer.every(g=>!!g)){let g=s.buffer.reduce((p,B)=>{let f=new Uint8Array(p.byteLength+B.byteLength);return f.set(p,0),f.set(B,p.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((a,e)=>{var i;let{create_time:A,trace_id:r,message_id:s}=a;o-A>t&&((i=this.logger)===null||i===void 0||i.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 Xd;(function(n){n.event="event",n.card="card",n.ping="ping",n.pong="pong"})(Xd||(Xd={}));var ES;(function(n){n[n.ok=200]="ok",n[n.internal_server_error=500]="internal_server_error"})(ES||(ES={}));var uS=class{constructor(t){var o;this.wsConfig=new pP,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:a,appSecret:e,clientAssertionProvider:i,agent:A,domain:r=bs.Feishu,httpInstance:s=eh,loggerLevel:g=Eo.info,logger:c=Pg,autoReconnect:I=!0,source:p,extraUaTags:B,onReady:f,onError:Q,onReconnecting:y,onReconnected:m,handshakeTimeoutMs:T,wsConfig:_}=t;if(this.userAgent=_P(p,{extraTags:B}),this.logger=new Uc(g,c),IS(!a,()=>this.logger.error("appId is needed")),!e&&!i)throw new na(RP,"appSecret or clientAssertionProvider is required");this.agent=A,this.dataCache=new dP({logger:this.logger}),this.httpInstance=s,this.wsConfig.updateClient({appId:a,appSecret:e||"",clientAssertionProvider:i,domain:v6(r)}),this.wsConfig.updateWs({autoReconnect:I}),this.onReady=f,this.onError=Q,this.onReconnecting=y,this.onReconnected=m,this.handshakeTimeoutMs=T,this.pingTimeoutSec=(o=_?.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,...a){if(o)try{o(...a)}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:a,domain:e}=this.wsConfig.getClient(),i="/callback/ws/endpoint",A=this.wsConfig.wsConfigUrl,r={locale:"zh","User-Agent":this.userAgent},s={AppID:t};try{if(a){let Q=vP(e),y=yield a.retrieveToken(Q);if(!y||!y.value)throw new na(NP,"client assertion token is empty");s.AppSecret="",s.ClientAssertion=y.value,y.targetInfo&&(A=GP(y.targetInfo,i),r[TP]=Q)}else s.AppSecret=o;let{code:g,data:{URL:c,ClientConfig:I},msg:p}=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":p;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}=nRe.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 na?{ok:!1,retryable:!1,error:g.message}:{ok:!1,retryable:!0}}})}connect(){let t=this.wsConfig.getWS("connectUrl"),o;try{let{agent:a}=this;o=new Jo(t,{agent:a})}catch{this.logger.error("[ws]","new WebSocket error")}return o?(this.pendingWsInstance=o,new Promise(a=>{let e=!1,i,A=r=>{e||(e=!0,i&&clearTimeout(i),this.pendingWsInstance===o&&(this.pendingWsInstance=null),a(r))};this.handshakeTimeoutMs&&this.handshakeTimeoutMs>0&&(i=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,a=()=>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 a()}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:i,reconnectNonce:A,reconnectCount:r,reconnectInterval:s}=this.wsConfig.getWS();if(!i){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 p=yield a();if(o===this.reconnectGeneration){if(p.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(!p.retryable){this.isConnecting=!1,this.hasEverConnected=!1,this.terminalError=!0,this.safeInvoke("onError",this.onError,new Error(p.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(),a=this.wsConfig.getWSInstance();if(a?.readyState===Jo.OPEN){let e={headers:[{key:RC.type,value:Xd.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 a=vRe(o),{method:e}=a;e===NC.control&&(yield this.handleControlData(a)),e===NC.data&&(yield this.handleEventData(a))})),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 a=(o=t.headers.find(i=>i.key===RC.type))===null||o===void 0?void 0:o.value,e=t.payload;if(a!==Xd.ping&&a===Xd.pong&&e){this.logger.trace("[ws]","receive pong");let i=new TextDecoder("utf-8").decode(e),{PingInterval:A,ReconnectCount:r,ReconnectInterval:s,ReconnectNonce:g}=JSON.parse(i);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 a=t.headers.reduce((f,Q)=>(f[Q.key]=Q.value,f),{}),{message_id:e,sum:i,seq:A,type:r,trace_id:s}=a,g=t.payload;if(r!==Xd.event)return;let c=this.dataCache.mergeData({message_id:e,sum:Number(i),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:ES.ok},p=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=ES.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(p-B)}],payload:new TextEncoder().encode(JSON.stringify(I))}))})}sendMessage(t){var o;let a=this.wsConfig.getWSInstance();if(a?.readyState===Jo.OPEN){let e=H6.Frame.encode(t).finish();(o=this.wsConfig.getWSInstance())===null||o===void 0||o.send(e,i=>{i&&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)===Jo.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 a=this.pendingWsInstance;if(a){this.pendingWsInstance=null,a.removeAllListeners("open");try{o?a.terminate():a.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:a}=t;if(!a){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!==Jo.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)})}},cP=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=k6(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())})}},lo;(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"})(lo||(lo={}));var IP=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 cP}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 lo.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),lo.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),lo.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"),lo.ERROR;let m=()=>h(this,void 0,void 0,function*(){return new Promise(_=>{setTimeout(()=>h(this,void 0,void 0,function*(){var R,H;let F=yield this.client.aily.v1.ailySessionRun.get({path:{aily_session_id:d,run_id:y}},o);if(!(F.code===0&&F.data)){_(3);return}switch((H=(R=F.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();_(q)});case"COMPLETED":_(lo.SUCCESS);case"EXPIRED":_(lo.EXPIRED);case"CANCELLED":_(lo.CANCELLED);case"FAILED":_(lo.FAILED);default:_(lo.OTHER)}}),500)})}),T=yield m();if(T!==lo.SUCCESS)throw this.logger.error("aily run error"),T;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=o6(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"),lo.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 j(this,arguments,function*(){var c,I,d,B;try{for(var f=!0,Q=o6(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 T of m.messages||[])if(r){if(yield yield S(T),T.status==="COMPLETED")return yield S(void 0)}else T.id===a&&T.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(s6))||{}})}updateRecords(t){return h(this,void 0,void 0,function*(){yield this.cache.set(s6,t)})}};function fC(n,t){if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${t} must be an object`)}function QC(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 _Re(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 TRe(n){fC(n,"addons"),QC(n,["preset","scopes","events","callbacks"],"addons");let t=0,o=(e,a)=>{var A;let r=_Re(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&&(fC(n.scopes,"addons.scopes"),QC(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&&(fC(n.events,"addons.events"),QC(n.events,["items"],"addons.events"),n.events.items!==void 0&&(fC(n.events.items,"addons.events.items"),QC(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&&(fC(n.callbacks,"addons.callbacks"),QC(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 NRe(n){let t=JSON.stringify(TRe(n));return tRe(Buffer.from(t,"utf8")).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function yC(n,t){return{code:n,description:t}}var c6="node-sdk",RRe="accounts.feishu.cn",kRe="accounts.larksuite.com",vRe="/oauth/v1/app/registration",I6=6;function PRe(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>I6)throw new Error(`appPreset.avatar supports at most ${I6} 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 P6(n,t){var o;return h(this,void 0,void 0,function*(){try{return yield zp.post(`${n}${vRe}`,new URLSearchParams(t).toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(i){if(i instanceof EN&&(!((o=i.response)===null||o===void 0)&&o.data))return i.response.data;throw i}})}function GRe(n){return P6(n,{action:"begin",archetype:"PersonalAgent",auth_method:"client_secret",request_user_info:"open_id"})}function FRe(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(yC("abort","Registration was aborted"))};if(!((i=n.signal)===null||i===void 0)&&i.aborted)return o(yC("abort","Registration was aborted"));(e=n.signal)===null||e===void 0||e.addEventListener("abort",I,{once:!0}),g=setTimeout(()=>{c(),o(yC("expired_token","Polling timed out"))},n.expireIn);let d=()=>h(this,void 0,void 0,function*(){var B,f,Q,y,m,T;try{let _=yield P6(a,{action:"poll",device_code:n.deviceCode});if(((B=_.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(_.client_id&&_.client_secret){c(),t({client_id:_.client_id,client_secret:_.client_secret,user_info:_.user_info});return}switch(_.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(yC(_.error,(m=_.error_description)!==null&&m!==void 0?m:"Unknown error"));return;default:if(_.error){c(),o(yC(_.error,(T=_.error_description)!==null&&T!==void 0?T:"Unknown error"));return}break}s=setTimeout(d,A)}catch(_){c(),o(_)}});d()})}function LRe(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??RRe}`,Q=yield GRe(f),y=new URL(Q.verification_uri_complete);return y.searchParams.set("from","sdk"),y.searchParams.set("source",A?`${c6}/${A}`:c6),y.searchParams.set("tp","sdk"),c&&PRe(y,c),I&&y.searchParams.set("addons",NRe(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}),FRe({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:kRe}`,signal:r,onStatusChange:g})})}var Ut=class extends Error{constructor(t,o,i){super(o),this.name="LarkChannelError",this.code=t,this.cause=i?.cause,this.context=i?.context}},dS=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)}},pS=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 URe(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 G6(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 HRe=100,KRe=50,xRe="Thinking...",l6="(no content)",YRe="[Generating...]",jRe=50,JRe=` + Receive events/callbacks through persistent connection(\u4F7F\u7528 \u957F\u8FDE\u63A5 \u63A5\u6536\u4E8B\u4EF6/\u56DE\u8C03)`),this.eventDispatcher=a,this.reConnect(!0)})}},hP=class{constructor(){this.sessions=new Map}set(t,o){return h(this,void 0,void 0,function*(){let a=this.sessions.get(t.toString())||{},e=U6(a,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())})}},ho;(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"})(ho||(ho={}));var EP=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 hP}getSessionId(t){var o;return h(this,void 0,void 0,function*(){let{sessionId:a,payload:e,options:i}=t,A=yield this.getRecords();if(a&&a in A)return A[a];let r=yield this.client.aily.v1.ailySession.create({data:e},i);if(r.code===0&&r.data){let s=(o=r.data.session)===null||o===void 0?void 0:o.id;return a&&(yield this.updateRecords({[a]:s})),s}else{this.logger.error("get aily session id error",r.msg);return}})}waitReply(t,o){var a,e;return h(this,void 0,void 0,function*(){let{sessionId:i,ailyAppId:A,message:r,sessionInfo:s,messageInfo:g,runInfo:c,skillId:I}=t,p=yield this.getSessionId({sessionId:i,payload:s,options:o});if(!p)throw ho.ERROR;let B=yield this.client.aily.v1.ailySessionAilyMessage.create({path:{aily_session_id:p},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),ho.ERROR;let f=(a=B.data.message)===null||a===void 0?void 0:a.id,Q=yield this.client.aily.v1.ailySessionRun.create({path:{aily_session_id:p},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),ho.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"),ho.ERROR;let m=()=>h(this,void 0,void 0,function*(){return new Promise(_=>{setTimeout(()=>h(this,void 0,void 0,function*(){var R,L;let U=yield this.client.aily.v1.ailySessionRun.get({path:{aily_session_id:p,run_id:y}},o);if(!(U.code===0&&U.data)){_(3);return}switch((L=(R=U.data)===null||R===void 0?void 0:R.run)===null||L===void 0?void 0:L.status){case"QUEUED":case"IN_PROGRESS":yield h(this,void 0,void 0,function*(){let q=yield m();_(q)});case"COMPLETED":_(ho.SUCCESS);case"EXPIRED":_(ho.EXPIRED);case"CANCELLED":_(ho.CANCELLED);case"FAILED":_(ho.FAILED);default:_(ho.OTHER)}}),500)})}),T=yield m();if(T!==ho.SUCCESS)throw this.logger.error("aily run error"),T;return{ailySessionId:p,runId:y,messageId:f}})}create(t,o){var a,e,i,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,p=l6(yield this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:s},params:{run_id:g,with_partial_message:!1}},o)),B;B=yield p.next(),a=B.done,!a;){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&&!a&&(i=p.return)&&(yield i.call(p))}finally{if(e)throw e.error}}if(!c)throw this.logger.error("no aily reply"),ho.ERROR;return c})}createWithStream(t,o){return h(this,void 0,void 0,function*(){let{ailySessionId:a,runId:e,messageId:i}=yield this.waitReply(t,o),A=()=>this.client.aily.v1.ailySessionAilyMessage.listWithIterator({path:{aily_session_id:a},params:{run_id:e,with_partial_message:!0}},o),r=!1;return{[Symbol.asyncIterator](){return j(this,arguments,function*(){var c,I,p,B;try{for(var f=!0,Q=l6(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 T of m.messages||[])if(r){if(yield yield S(T),T.status==="COMPLETED")return yield S(void 0)}else T.id===i&&T.status==="COMPLETED"&&(r=!0)}finally{f=!0}}}catch(m){I={error:m}}finally{try{!f&&!c&&(p=Q.return)&&(yield S(p.call(Q)))}finally{if(I)throw I.error}}})}}})}getRecords(){return h(this,void 0,void 0,function*(){return(yield this.cache.get(d6))||{}})}updateRecords(t){return h(this,void 0,void 0,function*(){yield this.cache.set(d6,t)})}};function wC(n,t){if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${t} must be an object`)}function DC(n,t,o){for(let a of Object.keys(n))if(!t.includes(a))throw new Error(`${o}.${a} is not allowed; allowed keys: ${t.join(", ")}`)}function PRe(n,t){if(n!==void 0){if(!Array.isArray(n))throw new Error(`${t} must be an array of strings`);return n.forEach((o,a)=>{if(typeof o!="string"||o==="")throw new Error(`${t}[${a}] must be a non-empty string`)}),n}}function GRe(n){wC(n,"addons"),DC(n,["preset","scopes","events","callbacks"],"addons");let t=0,o=(e,i)=>{var A;let r=PRe(e,i);return t+=(A=r?.length)!==null&&A!==void 0?A:0,r},a={};if(n.preset!==void 0){if(typeof n.preset!="boolean")throw new Error("addons.preset must be a boolean");a.preset=n.preset}if(n.scopes!==void 0&&(wC(n.scopes,"addons.scopes"),DC(n.scopes,["tenant","user"],"addons.scopes"),a.scopes={tenant:o(n.scopes.tenant,"addons.scopes.tenant"),user:o(n.scopes.user,"addons.scopes.user")}),n.events!==void 0&&(wC(n.events,"addons.events"),DC(n.events,["items"],"addons.events"),n.events.items!==void 0&&(wC(n.events.items,"addons.events.items"),DC(n.events.items,["tenant","user"],"addons.events.items"),a.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&&(wC(n.callbacks,"addons.callbacks"),DC(n.callbacks,["items"],"addons.callbacks"),a.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 a}function FRe(n){let t=JSON.stringify(GRe(n));return sRe(Buffer.from(t,"utf8")).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function OC(n,t){return{code:n,description:t}}var E6="node-sdk",LRe="accounts.feishu.cn",URe="accounts.larksuite.com",HRe="/oauth/v1/app/registration",u6=6;function KRe(n,t){let{avatar:o,name:a,desc:e}=t;if(o!==void 0){let i=Array.isArray(o)?o:[o];if(i.length===0)throw new Error("appPreset.avatar must contain at least 1 URL");if(i.length>u6)throw new Error(`appPreset.avatar supports at most ${u6} URLs, got ${i.length}`);i.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)})}a!==void 0&&n.searchParams.set("name",a),e!==void 0&&n.searchParams.set("desc",e)}function K6(n,t){var o;return h(this,void 0,void 0,function*(){try{return yield eh.post(`${n}${HRe}`,new URLSearchParams(t).toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}catch(a){if(a instanceof QN&&(!((o=a.response)===null||o===void 0)&&o.data))return a.response.data;throw a}})}function xRe(n){return K6(n,{action:"begin",archetype:"PersonalAgent",auth_method:"client_secret",request_user_info:"open_id"})}function YRe(n){return new Promise((t,o)=>{var a,e;let{baseUrl:i,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(!((a=n.signal)===null||a===void 0)&&a.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 p=()=>h(this,void 0,void 0,function*(){var B,f,Q,y,m,T;try{let _=yield K6(i,{action:"poll",device_code:n.deviceCode});if(((B=_.user_info)===null||B===void 0?void 0:B.tenant_brand)==="lark"&&!r){i=n.larkBaseUrl,r=!0,(f=n.onStatusChange)===null||f===void 0||f.call(n,{status:"domain_switched"}),p();return}if(_.client_id&&_.client_secret){c(),t({client_id:_.client_id,client_secret:_.client_secret,user_info:_.user_info});return}switch(_.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(_.error,(m=_.error_description)!==null&&m!==void 0?m:"Unknown error"));return;default:if(_.error){c(),o(OC(_.error,(T=_.error_description)!==null&&T!==void 0?T:"Unknown error"));return}break}s=setTimeout(p,A)}catch(_){c(),o(_)}});p()})}function jRe(n){var t,o,a,e;return h(this,void 0,void 0,function*(){let{domain:i,source:A,signal:r,onQRCodeReady:s,onStatusChange:g,appPreset:c,addons:I,createOnly:p,appId:B}=n;if(B!==void 0&&(typeof B!="string"||B===""))throw new Error("appId must be a non-empty string");let f=`https://${i??LRe}`,Q=yield xRe(f),y=new URL(Q.verification_uri_complete);return y.searchParams.set("from","sdk"),y.searchParams.set("source",A?`${E6}/${A}`:E6),y.searchParams.set("tp","sdk"),c&&KRe(y,c),I&&y.searchParams.set("addons",FRe(I)),p===!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}),YRe({baseUrl:f,deviceCode:Q.device_code,interval:((o=Q.interval)!==null&&o!==void 0?o:5)*1e3,expireIn:((a=Q.expires_in)!==null&&a!==void 0?a:600)*1e3,larkBaseUrl:`https://${(e=n.larkDomain)!==null&&e!==void 0?e:URe}`,signal:r,onStatusChange:g})})}var Ht=class extends Error{constructor(t,o,a){super(o),this.name="LarkChannelError",this.code=t,this.cause=a?.cause,this.context=a?.context}},CS=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,a=Math.max(0,this.opts.ms-o);this.fireSoon(a)}}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)}},BS=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 JRe(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 a=o;a>0;a--)if(n.endsWith(t.substring(0,a)))return n+t.substring(a);return n+t}function x6(n,t){if(n.length<=t)return[n];let o=n.split(` +`),a=[],e=[],i=0,A=null,r=()=>{if(e.length===0)return;let s=e.join(` +`);A!==null&&(s+="\n```"),a.push(s),e=[],i=0,A!==null&&(e.push("```"+A),i=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),p=i>t*.75;(i+c>t||I&&p&&e.length>0)&&r(),e.push(s),i+=c,g&&(A=A===null?g[1]||"":null)}return r(),a}var qRe=100,zRe=50,VRe="Thinking...",C6="(no content)",WRe="[Generating...]",ZRe=50,XRe=` -\u2014 _(Generation interrupted)_`,qRe=3e4,AS="stream_md";function VR(n,t=jRe){if(!n)return"";let o=n.replace(/\s+/g," ").trim();return o.length<=t?o:o.slice(0,t-1)+"\u2026"}function d6(n){return{schema:"2.0",config:{streaming_mode:!0,summary:{content:YRe},streaming_config:{print_frequency_ms:{default:70},print_step:{default:1},print_strategy:"fast"}},body:{elements:[{tag:"markdown",element_id:AS,content:n}]}}}var lP=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 pS,this.started=!1,this.streamingFailed=!1,this.rolloverMessageIds=[];let s=this.sender.config;this.throttle=new dS({ms:(a=s.streamThrottleMs)!==null&&a!==void 0?a:HRe,chars:(A=s.streamThrottleChars)!==null&&A!==void 0?A:KRe},()=>this.pushContent()),this.maxChars=(r=s.streamMaxElementChars)!==null&&r!==void 0?r:qRe}get messageId(){return this._messageId}append(t){return h(this,void 0,void 0,function*(){if(!t)return;yield this.ensureStarted();let o=URe(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:xRe,i=d6(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,AS,t,++this.sequence)})}rollover(){return h(this,void 0,void 0,function*(){let t=G6(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,AS,o,++this.sequence);try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,VR(o))}catch{}let e=d6(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,AS,l6,++this.sequence)}catch{}})),yield this.queue.drain());try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,VR(this.content||l6))}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||"")+JRe,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,VR(this.content))}catch{}}})}},dP=class{constructor(t,o,i,e){this.impl=new lP(t,o,i,e)}run(t){return this.impl.run(t)}},zRe=100,VRe=50,pP=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 pS,this._current=a;let s=t.config;this.throttle=new dS({ms:(A=s.streamThrottleMs)!==null&&A!==void 0?A:zRe,chars:(r=s.streamThrottleChars)!==null&&r!==void 0?r:VRe},()=>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=WRe(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 WRe(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 hP=class{constructor(t,o,i,e,a){this.impl=new pP(t,o,i,e,a)}run(t){return this.impl.run(t)}};function ZRe(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 p6(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 $Re=[[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 eke(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(D6(A))s=A,r||h6(s);else{let g=yield iRe.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)h6(c.address);s=g[0].address}return{resolvedIp:s,originalHost:A}})}function h6(n){let t=D6(n);if(t===4&&F6(n))throw new Error(`ssrf_blocked: ${n}`);if(t===6&&nke(n))throw new Error(`ssrf_blocked: ${n}`);if(t===0)throw new Error(`ssrf_blocked: not a valid IP: ${n}`)}function F6(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 $Re.some(([i,e])=>{let a=e===0?0:-1<<32-e>>>0;return(o&a)===(i&a)})}var Ake=[[BigInt("0xfe800000000000000000000000000000"),10],[BigInt("0xfc000000000000000000000000000000"),7],[BigInt("0xff000000000000000000000000000000"),8],[BigInt("0x01000000000000000000000000000000"),64],[BigInt("0x20010db8000000000000000000000000"),32],[BigInt("0x20010000000000000000000000000000"),32]],tke=BigInt("0xffffffffffffffffffffffff00000000"),rke=BigInt("0x00000000000000000000ffff00000000"),ake=BigInt(0),ike=BigInt("0x0064ff9b000000000000000000000000"),oke=BigInt("0xffffffff");function nke(n){let t;try{t=ske(n)}catch{return!0}let o=t&tke;if(o===rke||o===ike||o===ake){let i=Number(t&oke),e=[i>>>24&255,i>>>16&255,i>>>8&255,i&255].join(".");return F6(e)}return Ake.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=wC.resolve(d);try{return yield at.promises.realpath(B)}catch{return B}})))).some(d=>g===d||g.startsWith(d+wC.sep)))throw new Ut("upload_failed",`file path is outside allowed directories: ${g}`);return yield at.promises.readFile(g)}catch(g){throw g instanceof Ut?g:new Ut("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 eke(t,r))}catch(s){throw new Ut("ssrf_blocked",`URL blocked: ${String(s)}`,{cause:s})}}try{let r={url:t,method:"GET",responseType:"arraybuffer",timeout:15e3,maxContentLength:E6,maxBodyLength:E6};if(A){let g=cke(t,A);r.httpAgent=g,r.httpsAgent=g}let s=yield this.client.httpInstance.request(r);return Buffer.from(s)}catch(r){throw new Ut("upload_failed","fetch source URL failed",{cause:r})}})}assertNotOnPosixBlocklist(t){if(process.platform!=="win32"&&gke.some(o=>t===o.slice(0,-1)||t.startsWith(o)))throw new Ut("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"?ZRe(o):t.kind==="video"?XRe(o):void 0;if(i!=null)return i;throw new Ut("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 Ut("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 Ut?r:new Ut("upload_failed","file upload failed",{cause:r})}})}};function cke(n,t){let o=n.startsWith("https:")?aRe.Agent:rRe.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 L6(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 Ike(n,t=1){try{return lke(n,t)}catch{return n}}function lke(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)_`,$Re=3e4,oS="stream_md";function ek(n,t=ZRe){if(!n)return"";let o=n.replace(/\s+/g," ").trim();return o.length<=t?o:o.slice(0,t-1)+"\u2026"}function B6(n){return{schema:"2.0",config:{streaming_mode:!0,summary:{content:WRe},streaming_config:{print_frequency_ms:{default:70},print_step:{default:1},print_strategy:"fast"}},body:{elements:[{tag:"markdown",element_id:oS,content:n}]}}}var uP=class{constructor(t,o,a,e){var i,A,r;this.sender=t,this.to=o,this.idType=a,this.opts=e,this.content="",this.fullAccumulated="",this._messageId="",this.cardId="",this.sequence=0,this.queue=new BS,this.started=!1,this.streamingFailed=!1,this.rolloverMessageIds=[];let s=this.sender.config;this.throttle=new CS({ms:(i=s.streamThrottleMs)!==null&&i!==void 0?i:qRe,chars:(A=s.streamThrottleChars)!==null&&A!==void 0?A:zRe},()=>this.pushContent()),this.maxChars=(r=s.streamMaxElementChars)!==null&&r!==void 0?r:$Re}get messageId(){return this._messageId}append(t){return h(this,void 0,void 0,function*(){if(!t)return;yield this.ensureStarted();let o=JRe(this.fullAccumulated,t),a=o.slice(this.fullAccumulated.length);this.fullAccumulated=o,this.content+=a,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:VRe,a=B6(o||"...");this.cardId=yield this.sender.createCardInstance(a),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(a){this.streamingFailed=!0,(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] update failed",a)}})))})}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,oS,t,++this.sequence)})}rollover(){return h(this,void 0,void 0,function*(){let t=x6(this.content,this.maxChars);if(t.length<2)throw new Error("rollover: content not splittable below limit");let o=t[0],a=t.slice(1).join(` +`);yield this.sender.updateCardElementContent(this.cardId,oS,o,++this.sequence);try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,ek(o))}catch{}let e=B6(a||"..."),i=yield this.sender.createCardInstance(e),A=yield this.sender.sendCardByReference(this.to,this.idType,i,this.opts);this.cardId=i,this.content=a,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,oS,C6,++this.sequence)}catch{}})),yield this.queue.drain());try{yield this.sender.finishStreamingCard(this.cardId,++this.sequence,ek(this.content||C6))}catch(a){(o=(t=this.sender.logger).warn)===null||o===void 0||o.call(t,"[stream] finishStreamingCard failed",a)}}})}failTerminal(t){return h(this,void 0,void 0,function*(){if(this.throttle.dispose(),!!this.cardId){this.content=(this.content||"")+XRe,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,ek(this.content))}catch{}}})}},CP=class{constructor(t,o,a,e){this.impl=new uP(t,o,a,e)}run(t){return this.impl.run(t)}},eke=100,Ake=50,BP=class{constructor(t,o,a,e,i){var A,r;this.sender=t,this.to=o,this.idType=a,this.opts=e,this._messageId="",this.queue=new BS,this._current=i;let s=t.config;this.throttle=new CS({ms:(A=s.streamThrottleMs)!==null&&A!==void 0?A:eke,chars:(r=s.streamThrottleChars)!==null&&r!==void 0?r:Ake},()=>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=tke(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 tke(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 fP=class{constructor(t,o,a,e,i){this.impl=new BP(t,o,a,e,i)}run(t){return this.impl.run(t)}};function rke(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(a),i=a+4,A,r;if(e===1){if(i+28>n.length)return;A=n.readUInt32BE(i+16),r=Number(n.readBigUInt64BE(i+20))}else{if(i+16>n.length)return;A=n.readUInt32BE(i+8),r=n.readUInt32BE(i+12)}if(!(!A||!Number.isFinite(A)||!Number.isFinite(r)))return Math.round(r/A*1e3)}function f6(n,t,o,a){let e=t;for(;e+8<=o&&e+8<=n.length;){let i=n.readUInt32BE(e),A=n.slice(e+4,e+8).toString("ascii"),r=i===1?e+Number(n.readBigUInt64BE(e+8)):i===0?o:e+i;if(r<=e||r>o)return;if(A===a)return{start:i===1?e+16:e+8,end:r};e=r}}var ake=[[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 oke(n,t={}){var o,a;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 i=e.hostname,A=i.startsWith("[")&&i.endsWith("]")?i.slice(1,-1):i,r=(a=(o=t.allowlist)===null||o===void 0?void 0:o.includes(A))!==null&&a!==void 0?a:!1,s;if(N6(A))s=A,r||Q6(s);else{let g=yield IRe.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)Q6(c.address);s=g[0].address}return{resolvedIp:s,originalHost:A}})}function Q6(n){let t=N6(n);if(t===4&&Y6(n))throw new Error(`ssrf_blocked: ${n}`);if(t===6&&pke(n))throw new Error(`ssrf_blocked: ${n}`);if(t===0)throw new Error(`ssrf_blocked: not a valid IP: ${n}`)}function Y6(n){let t=n.split(".").map(Number);if(t.length!==4||t.some(a=>a<0||a>255))return!0;let o=(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0;return ake.some(([a,e])=>{let i=e===0?0:-1<<32-e>>>0;return(o&i)===(a&i)})}var nke=[[BigInt("0xfe800000000000000000000000000000"),10],[BigInt("0xfc000000000000000000000000000000"),7],[BigInt("0xff000000000000000000000000000000"),8],[BigInt("0x01000000000000000000000000000000"),64],[BigInt("0x20010db8000000000000000000000000"),32],[BigInt("0x20010000000000000000000000000000"),32]],ske=BigInt("0xffffffffffffffffffffffff00000000"),gke=BigInt("0x00000000000000000000ffff00000000"),cke=BigInt(0),Ike=BigInt("0x0064ff9b000000000000000000000000"),lke=BigInt("0xffffffff");function pke(n){let t;try{t=dke(n)}catch{return!0}let o=t&ske;if(o===gke||o===Ike||o===cke){let a=Number(t&lke),e=[a>>>24&255,a>>>16&255,a>>>8&255,a&255].join(".");return Y6(e)}return nke.some(([a,e])=>{let i=BigInt(128-e),r=(BigInt(1)<>i<!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 a=t.split("::");if(a.length>2)throw new Error('multiple "::"');let e;if(a.length===2){let A=a[0]?a[0].split(":"):[],r=a[1]?a[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 i=BigInt(0);for(let A of e){if(!/^[0-9a-f]{0,4}$/.test(A))throw new Error("bad group");i=i<0&&!(yield Promise.all(r.map(p=>h(this,void 0,void 0,function*(){let B=_C.resolve(p);try{return yield it.promises.realpath(B)}catch{return B}})))).some(p=>g===p||g.startsWith(p+_C.sep)))throw new Ht("upload_failed",`file path is outside allowed directories: ${g}`);return yield it.promises.readFile(g)}catch(g){throw g instanceof Ht?g:new Ht("upload_failed",`source is neither an http(s) URL nor a readable local file: ${t}`,{cause:g})}}let e=(a=this.config)===null||a===void 0?void 0:a.ssrfGuard,i=e!==!1,A;if(i){let r=typeof e=="object"&&e?{allowlist:e.allowlist}:{};try{({resolvedIp:A}=yield oke(t,r))}catch(s){throw new Ht("ssrf_blocked",`URL blocked: ${String(s)}`,{cause:s})}}try{let r={url:t,method:"GET",responseType:"arraybuffer",timeout:15e3,maxContentLength:y6,maxBodyLength:y6};if(A){let g=Eke(t,A);r.httpAgent=g,r.httpsAgent=g}let s=yield this.client.httpInstance.request(r);return Buffer.from(s)}catch(r){throw new Ht("upload_failed","fetch source URL failed",{cause:r})}})}assertNotOnPosixBlocklist(t){if(process.platform!=="win32"&&hke.some(o=>t===o.slice(0,-1)||t.startsWith(o)))throw new Ht("upload_failed",`file path is not allowed: ${t}`)}resolveDuration(t,o){if(t.duration!=null&&t.duration>0)return t.duration;let a=t.kind==="audio"?rke(o):t.kind==="video"?ike(o):void 0;if(a!=null)return a;throw new Ht("upload_failed",`duration could not be determined for ${t.kind}; pass it explicitly`)}uploadImage(t){var o,a;return h(this,void 0,void 0,function*(){try{let e=yield this.client.im.v1.image.create({data:{image_type:"message",image:t}}),i=(o=e?.image_key)!==null&&o!==void 0?o:(a=e?.data)===null||a===void 0?void 0:a.image_key;if(!i)throw new Error("image_key missing in upload response");return{kind:"image",fileKey:i}}catch(e){throw new Ht("upload_failed","image upload failed",{cause:e})}})}uploadFile(t,o,a,e){var i,A;return h(this,void 0,void 0,function*(){try{let r={file_type:o,file_name:a,file:t};e!=null&&(r.duration=e);let s=yield this.client.im.v1.file.create({data:r}),g=(i=s?.file_key)!==null&&i!==void 0?i:(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 Ht?r:new Ht("upload_failed","file upload failed",{cause:r})}})}};function Eke(n,t){let o=n.startsWith("https:")?cRe.Agent:gRe.Agent,a=new o,e=t.includes(":")?6:4,i=(r,s,g)=>{g(null,t,e)},A=a.createConnection.bind(a);return a.createConnection=(r,s)=>A(Object.assign(Object.assign({},r),{lookup:i}),s),a}function j6(n){var t;if(!n?.length)return"";let o=[];for(let a of n){if(!a.openId)continue;let e=(t=a.name)!==null&&t!==void 0?t:"";o.push(`${e}`)}return o.length>0?o.join(" ")+" ":""}function uke(n,t=1){try{return Cke(n,t)}catch{return n}}function Cke(n,t){let o="___CB_",a=[],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}${a.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 @@ -287,154 +287,154 @@ $2 $3`),e=e.replace(/^(\*\*.+)\n\n(
)\n\n(\|)/gm,`$1 $2 -$3`),e=e.replace(/(\|[^\n]*\n)\n(
\n)((?!#{4,5} )(?!\*\*))/gm,"$1$2$3"),i.forEach((A,r)=>{e=e.replace(`${o}${r}___`,` +$3`),e=e.replace(/(\|[^\n]*\n)\n(
\n)((?!#{4,5} )(?!\*\*))/gm,"$1$2$3"),a.forEach((A,r)=>{e=e.replace(`${o}${r}___`,`
${A}
-`)})):i.forEach((A,r)=>{e=e.replace(`${o}${r}___`,A)}),e=e.replace(/\n{3,}/g,` +`)})):a.forEach((A,r)=>{e=e.replace(`${o}${r}___`,A)}),e=e.replace(/\n{3,}/g,` -`),e}function dke(n,t){var o,i;let e=L6((o=t?.mentions)!==null&&o!==void 0?o:[]),a=Ike(e+n,1);return{zh_cn:{title:(i=t?.title)!==null&&i!==void 0?i:"",content:[[{tag:"md",text:a}]]}}}function pke(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 u6(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 RP(n,t){if(n instanceof Ut)return n;let o=hke(n),i=Eke(n);return new Ut(o,i,{cause:n,context:t})}function hke(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 Eke(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 uke(n){return n.code==="rate_limited"||n.code==="unknown"}function Cke(n){return n.code==="format_error"}function Bke(n){return n.code==="target_revoked"}function fke(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=RP(s,{attempt:r});if(A=g,r>=e||!uke(g))throw g;let c=a*Math.pow(3,r-1);yield Qke(c)}throw A})}function Qke(n){return new Promise(t=>setTimeout(t,n))}var yke=3500,uP=class{constructor(t,o,i){var e;this.client=t,this.config=o,this.logger=i,this.uploader=new EP(t,o),this.chunkLimit=(e=o.textChunkLimit)!==null&&e!==void 0?e:yke}send(t,o,i={}){return h(this,void 0,void 0,function*(){let e=u6(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 Ut("format_error","unrecognized SendInput shape")})}stream(t,o,i={}){return h(this,void 0,void 0,function*(){let e=u6(t);if("markdown"in o)return new dP(this,t,e,i).run(o.markdown);if("card"in o)return new hP(this,t,e,i,o.card.initial).run(o.card.producer);throw new Ut("format_error","unrecognized StreamInput shape")})}sendMarkdown(t,o,i,e){return h(this,void 0,void 0,function*(){let a=G6(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 Ut("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 Ut("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 Ut("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 mke(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:Ske(t),sourceIds:t.map(A=>A.messageId)},e=()=>o(i),a=this.tail.then(e,e);this.tail=a.then(()=>{},()=>{})}},BP=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 CP(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 Ske(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 Bke(n,t){var o,a;let e=j6((o=t?.mentions)!==null&&o!==void 0?o:[]),i=uke(e+n,1);return{zh_cn:{title:(a=t?.title)!==null&&a!==void 0?a:"",content:[[{tag:"md",text:i}]]}}}function fke(n){var t;let o=n?.zh_cn;if(!o?.content)return"";let a=[];for(let e of o.content){if(!Array.isArray(e))continue;let i=[];for(let A of e)switch(A.tag){case"md":case"text":case"a":i.push((t=A.text)!==null&&t!==void 0?t:"");break;case"at":i.push(A.user_name?`@${A.user_name}`:"");break;case"img":i.push(A.image_key?"[image]":"");break}a.push(i.join(""))}return a.join(` +`).trim()}function m6(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 FP(n,t){if(n instanceof Ht)return n;let o=Qke(n),a=yke(n);return new Ht(o,a,{cause:n,context:t})}function Qke(n){var t,o,a,e,i,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=(i=(e=(a=g?.response)===null||a===void 0?void 0:a.data)===null||e===void 0?void 0:e.code)!==null&&i!==void 0?i:(A=g?.data)===null||A===void 0?void 0:A.code)!==null&&r!==void 0?r:g?.code,p=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":p.startsWith("ssrf_blocked")?"ssrf_blocked":p.includes("timeout")||g?.code==="ETIMEDOUT"||g?.code==="ECONNABORTED"?"send_timeout":"unknown"}function yke(n){var t,o,a,e;let i=n;return((o=(t=i?.response)===null||t===void 0?void 0:t.data)===null||o===void 0?void 0:o.msg)||((e=(a=i?.response)===null||a===void 0?void 0:a.data)===null||e===void 0?void 0:e.message)||i?.message||String(n)}function mke(n){return n.code==="rate_limited"||n.code==="unknown"}function Ske(n){return n.code==="format_error"}function wke(n){return n.code==="target_revoked"}function Dke(n,t={}){var o,a;return h(this,void 0,void 0,function*(){let e=(o=t.maxAttempts)!==null&&o!==void 0?o:3,i=(a=t.baseDelayMs)!==null&&a!==void 0?a:500,A;for(let r=1;r<=e;r++)try{return yield n(r)}catch(s){let g=FP(s,{attempt:r});if(A=g,r>=e||!mke(g))throw g;let c=i*Math.pow(3,r-1);yield Oke(c)}throw A})}function Oke(n){return new Promise(t=>setTimeout(t,n))}var bke=3500,yP=class{constructor(t,o,a){var e;this.client=t,this.config=o,this.logger=a,this.uploader=new QP(t,o),this.chunkLimit=(e=o.textChunkLimit)!==null&&e!==void 0?e:bke}send(t,o,a={}){return h(this,void 0,void 0,function*(){let e=m6(t);if("markdown"in o)return this.sendMarkdown(t,e,o.markdown,a);if("text"in o)return this.sendText(t,e,o.text,a);if("post"in o)return this.sendPost(t,e,o.post,a);if("image"in o)return this.sendImage(t,e,o.image,a);if("file"in o)return this.sendFile(t,e,o.file,a);if("audio"in o)return this.sendAudio(t,e,o.audio,a);if("video"in o)return this.sendVideo(t,e,o.video,a);if("card"in o)return this.sendCard(t,e,o.card,a);if("shareChat"in o)return this.sendShareChat(t,e,o.shareChat.chatId,a);if("shareUser"in o)return this.sendShareUser(t,e,o.shareUser.userId,a);if("sticker"in o)return this.sendSticker(t,e,o.sticker.fileKey,a);throw new Ht("format_error","unrecognized SendInput shape")})}stream(t,o,a={}){return h(this,void 0,void 0,function*(){let e=m6(t);if("markdown"in o)return new CP(this,t,e,a).run(o.markdown);if("card"in o)return new fP(this,t,e,a,o.card.initial).run(o.card.producer);throw new Ht("format_error","unrecognized StreamInput shape")})}sendMarkdown(t,o,a,e){return h(this,void 0,void 0,function*(){let i=x6(a,this.chunkLimit),A=[];for(let r=0;rthis.rawSend(t),this.config.retry)})}rawSend(t){var o,a;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 Ht("unknown","message_id missing from reply response");return s}let A=(a=(yield this.client.im.v1.message.create({params:{receive_id_type:t.idType},data:e})).data)===null||a===void 0?void 0:a.message_id;if(!A)throw new Ht("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 Ht("unknown","cardkit.card.create returned no card_id");return e})}sendCardByReference(t,o,a,e){return h(this,void 0,void 0,function*(){return this.rawSendWithRetry({to:t,idType:o,msgType:"interactive",content:{type:"card",data:{card_id:a}},replyTo:e.replyTo,replyInThread:e.replyInThread})})}updateCardElementContent(t,o,a,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:a,sequence:e,uuid:`c_${t}_${e}`}})})}finishStreamingCard(t,o,a){return h(this,void 0,void 0,function*(){let e={streaming_mode:!1};a!==void 0&&(e.summary={content:a}),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 Mke(n,t){if(n.length<=t)return[n];let o=[];for(let a=0;a=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 a={message:_ke(t),sourceIds:t.map(A=>A.messageId)},e=()=>o(a),i=this.tail.then(e,e);this.tail=i.then(()=>{},()=>{})}},SP=class{constructor(t){this.config=t,this.pipelines=new Map}push(t,o,a){this.getOrCreate(t,!1).push(o,a)}run(t,o){return this.getOrCreate(t,!0).run(o)}getOrCreate(t,o){let a=this.pipelines.get(t);return a||(a=new mP(this.config,o),this.pipelines.set(t,a)),a}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 _ke(n){if(n.length===1)return n[0];let t=n[n.length-1],o=n.map(i=>i.content).filter(i=>i&&i.length>0).join(` -`),i=C6(n.flatMap(a=>a.resources),a=>a.fileKey),e=C6(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 C6(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 mC={delayMs:600,longThresholdChars:1e3,longDelayMs:2e3,maxMessages:8,maxChars:4e3},eS={ttl:12*36e5,maxEntries:5e3,sweepIntervalMs:5*6e4,namespace:"channel:seen"},U6=30*6e4,wke=5*6e4;function Dke(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:mC.delayMs,longThresholdChars:(e=s.longThresholdChars)!==null&&e!==void 0?e:mC.longThresholdChars,longDelayMs:(a=s.longDelayMs)!==null&&a!==void 0?a:mC.longDelayMs,maxMessages:(A=s.maxMessages)!==null&&A!==void 0?A:mC.maxMessages,maxChars:(r=s.maxChars)!==null&&r!==void 0?r:mC.maxChars}}var fP=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:eS.ttl,this.maxMem=(e=o.maxMemEntries)!==null&&e!==void 0?e:eS.maxEntries,this.ns=(a=o.namespace)!==null&&a!==void 0?a:eS.namespace;let g=(A=o.sweepMs)!==null&&A!==void 0?A:eS.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()}},QP=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}},yP=class{constructor(t=wke,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 Oke(n,t=U6){return!n||!Number.isFinite(n)?!1:Date.now()-n>t}var mP=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:U6,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 fP(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 yP,this.policy=new QP(t.policy,t.botIdentity),this.manager=new BP(Dke(t.config))}pushMessage(t){var o,i,e,a,A,r,s;return h(this,void 0,void 0,function*(){if(Oke(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 bke(n){return n.key==="@_all"}function Mke(n,t){var o,i,e;let a=new Map,A=new Map,r=[],s=!1,g=!1;for(let c of n??[]){if(bke(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 _ke(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?${Tke(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 Tke(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yr(n){if(n)try{return JSON.parse(n)}catch{return}}function Nke(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 Rke=["zh_cn","en_us","ja_jp"];function kke(n){if("title"in n||"content"in n)return n;for(let o of Rke){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 H6(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 hS(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 vke(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 Pke(n,t){return n.split(` +`),a=S6(n.flatMap(i=>i.resources),i=>i.fileKey),e=S6(n.flatMap(i=>i.mentions),i=>{var A;return(A=i.openId)!==null&&A!==void 0?A:i.key});return Object.assign(Object.assign({},t),{content:o,resources:a,mentions:e,mentionAll:n.some(i=>i.mentionAll),mentionedBot:n.some(i=>i.mentionedBot)})}function S6(n,t){let o=new Set,a=[];for(let e of n){let i=t(e);if(i==null){a.push(e);continue}o.has(i)||(o.add(i),a.push(e))}return a}var bC={delayMs:600,longThresholdChars:1e3,longDelayMs:2e3,maxMessages:8,maxChars:4e3},aS={ttl:12*36e5,maxEntries:5e3,sweepIntervalMs:5*6e4,namespace:"channel:seen"},J6=30*6e4,Tke=5*6e4;function Nke(n){var t,o,a,e,i,A,r;let s=(o=(t=n?.batch)===null||t===void 0?void 0:t.text)!==null&&o!==void 0?o:{};return{delayMs:(a=s.delayMs)!==null&&a!==void 0?a:bC.delayMs,longThresholdChars:(e=s.longThresholdChars)!==null&&e!==void 0?e:bC.longThresholdChars,longDelayMs:(i=s.longDelayMs)!==null&&i!==void 0?i: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 wP=class{constructor(t,o={}){var a,e,i,A,r,s;this.cache=t,this.memory=new Map,this.ttlMs=(a=o.ttlMs)!==null&&a!==void 0?a:aS.ttl,this.maxMem=(e=o.maxMemEntries)!==null&&e!==void 0?e:aS.maxEntries,this.ns=(i=o.namespace)!==null&&i!==void 0?i:aS.namespace;let g=(A=o.sweepMs)!==null&&A!==void 0?A:aS.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(),a=this.memory.get(t);return a&&a>o?(this.memory.delete(t),this.memory.set(t,a),!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,a]of this.memory)a<=t&&this.memory.delete(o)}dispose(){clearInterval(this.sweeper),this.memory.clear()}},DP=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,a;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&&!((a=this.cfg.respondToMentionAll)!==null&&a!==void 0&&a)?{allowed:!1,reason:"mention_all_blocked"}:{allowed:!0}}evaluateDm(t){var o,a;let e=(o=this.cfg.dmMode)!==null&&o!==void 0?o:"open";return e==="disabled"?{allowed:!1,reason:"dm_disabled"}:e==="allowlist"&&!((a=this.cfg.dmAllowlist)!==null&&a!==void 0?a:[]).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}},OP=class{constructor(t=Tke,o=6e4){var a,e;this.ttlMs=t,this.locks=new Map,this.sweeper=setInterval(()=>this.sweep(),o),(e=(a=this.sweeper).unref)===null||e===void 0||e.call(a)}acquire(t){let o=Date.now(),a=this.locks.get(t);return a&&a>o?!1:(this.locks.set(t,o+this.ttlMs),!0)}release(t){this.locks.delete(t)}sweep(){let t=Date.now();for(let[o,a]of this.locks)a<=t&&this.locks.delete(o)}dispose(){clearInterval(this.sweeper),this.locks.clear()}};function Rke(n,t=J6){return!n||!Number.isFinite(n)?!1:Date.now()-n>t}var bP=class{constructor(t){var o,a,e,i,A,r,s,g,c,I,p;this.logger=t.logger,this.onReject=t.onReject,this.onMessage=t.onMessage,this.staleWindow=(a=(o=t.config)===null||o===void 0?void 0:o.staleMessageWindowMs)!==null&&a!==void 0?a:J6,this.queueEnabled=(A=(i=(e=t.config)===null||e===void 0?void 0:e.chatQueue)===null||i===void 0?void 0:i.enabled)!==null&&A!==void 0?A:!0,this.seenCache=new wP(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:(p=(I=t.config)===null||I===void 0?void 0:I.dedup)===null||p===void 0?void 0:p.sweepIntervalMs}),this.lock=new OP,this.policy=new DP(t.policy,t.botIdentity),this.manager=new SP(Nke(t.config))}pushMessage(t){var o,a,e,i,A,r,s;return h(this,void 0,void 0,function*(){if(Rke(t.createTime,this.staleWindow)){(a=(o=this.logger).debug)===null||a===void 0||a.call(o,`safety: drop stale message ${t.messageId}`);return}if(yield this.seenCache.has(t.messageId)){(i=(e=this.logger).debug)===null||i===void 0||i.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 p,B;try{yield this.onMessage(I.message)}catch(f){(B=(p=this.logger).error)===null||B===void 0||B.call(p,"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,a){var e,i,A,r;return h(this,void 0,void 0,function*(){if(yield this.seenCache.has(t)){(i=(e=this.logger).debug)===null||i===void 0||i.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 a()}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 a,e;return h(this,void 0,void 0,function*(){if(!(yield this.seenCache.has(t))){yield this.seenCache.add(t);try{yield o()}catch(i){(e=(a=this.logger).warn)===null||e===void 0||e.call(a,"safety: light handler threw",i)}}})}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 kke(n){return n.key==="@_all"}function vke(n,t){var o,a,e;let i=new Map,A=new Map,r=[],s=!1,g=!1;for(let c of n??[]){if(kke(c)){s=!0,i.set(c.key,{key:c.key,name:c.name,isBot:!1});continue}let I=(a=(o=c.id)===null||o===void 0?void 0:o.open_id)!==null&&a!==void 0?a:"",p=(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:p,name:c.name,isBot:B};i.set(c.key,f),I&&A.set(I,f),r.push(f)}return{mentions:i,mentionsByOpenId:A,mentionList:r,mentionAll:s,mentionedBot:g}}function Pke(n,t){if(!n||t.mentions.size===0)return n;let o=n;for(let[a,e]of t.mentions){if(e.isBot&&t.stripBotMentions){let A=new RegExp(`\\s?${Gke(a)}\\s?`,"g");o=o.replace(A," ");continue}let i=e.name?`@${e.name}`:a;o=o.split(a).join(i)}return o.replace(/[ \t]{2,}/g," ").trim()}function Gke(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yr(n){if(n)try{return JSON.parse(n)}catch{return}}function Fke(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 Lke=["zh_cn","en_us","ja_jp"];function Uke(n){if("title"in n||"content"in n)return n;for(let o of Lke){let a=n[o];if(a!=null&&typeof a=="object")return a}let t=Object.keys(n)[0];if(t){let o=n[t];if(o!=null&&typeof o=="object")return o}}function q6(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 fS(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),a=o.getUTCFullYear(),e=String(o.getUTCMonth()+1).padStart(2,"0"),i=String(o.getUTCDate()).padStart(2,"0"),A=String(o.getUTCHours()).padStart(2,"0"),r=String(o.getUTCMinutes()).padStart(2,"0");return`${a}-${e}-${i} ${A}:${r}`}function Hke(n){let t=new Date(n+288e5),o=t.getUTCFullYear(),a=String(t.getUTCMonth()+1).padStart(2,"0"),e=String(t.getUTCDate()).padStart(2,"0"),i=String(t.getUTCHours()).padStart(2,"0"),A=String(t.getUTCMinutes()).padStart(2,"0"),r=String(t.getUTCSeconds()).padStart(2,"0");return`${o}-${a}-${e}T${i}:${A}:${r}+08:00`}function Kke(n,t){return n.split(` `).map(o=>`${t}${o}`).join(` -`)}function RC(n){return n.replace(/"/g,""")}var Gke=(n,t)=>h(void 0,void 0,void 0,function*(){let o=Yr(n),i=o?.file_key;if(!i)return{content:"[audio]",resources:[]};let e=o?.duration,a=H6(e),A=a?` duration="${a}"`:"";return{content:`